-
Notifications
You must be signed in to change notification settings - Fork 463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lunchbox (Aqara FP2 and Philips Hue): handle wantread from luasocket/luasec #1654
Comments
This should already be happening in I believe the actual issue here is that this timeout is being reached and not being retried which is the only time we should see the allow-listed methods would return a timeout/want* error. The call to I think I see the bug in essentially this return is being dropped when called here but should probably be appended to |
Do you have an invitation link to the driver channel? (Not at home right now and setting up my own channel would be a hassle.) |
Hey @ldeora Thanks for your engagement, I was able to get a driver sharing link for the PR that @FreeMasen mentioned. Please check out this comment https://github.com/SmartThingsCommunity/SmartThingsEdgeDrivers/pull/1656#issuecomment-2384601737 The driver is available on this channel, https://bestow-regional.api.smartthings.com/invite/eGM6B8mq4eMA |
Good news: error is gone. Bad news: device still not added. Am I the only one with this device who is testing this driver? From what I've seen, those who tested the driver, did it before the last commit that updated the lunchbox. Seojune no longer responds to my email inquiries, although he has done so previously. I mean I can live without this driver and if it's broken, it's Aqara's problem...
|
I even tried to trick someone else to delete and add the device but he didn't fell for it... https://community.smartthings.com/t/aqara-fp2-tested-with-smartthings/270688/79 He's using the driver channel from the PR and who knows when he added the device the last time. Going to ask him later. Edit: 23/09/2024... That doesn't make it easier. Maybe there's an expiration date in my firmware version. If anyone can confirm that adding the device works, that would be great. My device has been successfully added a long time before the lunchbox was updated. After this 14e259b commit, I was able to add it several times without problems. After the whole PR was merged into main I tried it again but now it fails. The only change was this: 640f066 . But I repeat myself. |
Now we need a log.info() in here to check if the the request works. Would have been nice to have it in the original PR. Remember, this is where it failed:
|
@seojune79 Is there a reason why the FP2 can't be added anymore? Maybe a hidden expiration date for /authcode or the whole REST in firmware version 1.2.7_0011.0080? |
If something goes wrong while removing FP2 from the ST app, the device won't be onboarded. |
Not fixed. Another user has the same issue. Read the comments here (conversation between Andreas_Roedl and ewimer2): https://community.smartthings.com/t/aqara-fp2-tested-with-smartthings/270688/136 User has hub firmware 54.x, FP2 firmware 1.2.8x. Keep in mind that the rollout of the FP2 firmware isn't completed yet and these are the first users who are trying to connect the FP2 to ST. |
@FreeMasen User tried your modified driver but it didn't solve the issue. |
The wantread message indicates that the socket is not ready to read data yet and the operation should be retried later. This happens when you're trying to read data from a socket, but the data isn't available at that moment.
This is a proposal for a fix for the Aqara FP2 issue #1648 .
Add a new function in rest.lua to check if the socket is ready for reading
And use it here:
SmartThingsEdgeDrivers/drivers/SmartThings/philips-hue/src/lunchbox/rest.lua
Lines 106 to 108 in 7821a5d
SmartThingsEdgeDrivers/drivers/Aqara/aqara-presence-sensor/src/lunchbox/rest.lua
Lines 104 to 106 in 7821a5d
Additionally handle wantread here by waiting and trying again:
SmartThingsEdgeDrivers/drivers/SmartThings/philips-hue/src/lunchbox/rest.lua
Lines 109 to 120 in 7821a5d
SmartThingsEdgeDrivers/drivers/Aqara/aqara-presence-sensor/src/lunchbox/rest.lua
Lines 107 to 118 in 7821a5d
Sorry for the formatting...
The text was updated successfully, but these errors were encountered: