Closed dircm closed 8 years ago
Thanks for using wemo-client and giving feedback. Can you provide the firmware version of your Wemo Maker device?
UPDATE: Ran some tests with the Wemo Maker sending events to IFTTT. It seems the Wemo Maker is only sending one or the other (Sensor or Switch) events to IFTTT if I trigger both at same time. This is not ideal but does isolate the issue away from wemo-client code issues.
UPDATE2: Ran the new "maker.js" example test code (0.6.6), I only get one type of event when the Maker triggers both a Sensor AND Switch events at the same time.
WeMo_WW_2.00.10061
Also seeing events missed such as tripping a maker on ("Switch" event) and sensor ("Sensor" event) at same time. I'm running some more tests to see if the maker is sending these events to IFTTT for troubleshooting and will post here.
Regarding the issue with only one event sent for two trigger happen both at the same time: A fix is on it's way included in 0.7.0.
The issue originally mentioned seems a bit tricky, though. Can you still control the device (using the library) when it's no longer sending events?
Wow, thats a fast release!
I'll try 0.7.0 shortly.
Devices can still be controlled no problem. My guess is the dropped events were caused by the wemo hardware or wemo-client not handling synchronous events. I'll update shortly.
Hi Timon, the synchronous events are being caught and handled perfectly in 0.7.0 and the 0.6.6 code functioned for over 12 hours and then caught an event. Thanks for the work! Tom.
I'll close this.
Hi Timon, I had another case of events "sleeping" for one of my Wemo Makers. As with before, I could still set State fine but never got sensor or state change events. I have implemented a basic 3 hourly watchdog timer using setInterval() that performs a client.getAttributes() in attempt to keep the event subscription alive. I'll let you know how this goes after a few days. Tom.
I had another "sleeping" client.on from my Wemo Lightswitch after 25 hours.
Is there any way I can "unload" my Wemo bindings to refresh the device subscription ? Or can I just overwrite the device with another call to Wemo.load() ?
I'm trying to implement a watchdog to keep these events coming through.
Thanks, Tom.
Any chance the event handling recovers after polling the attributes with getAttributes
?
The subscriptions need a refactoring anyway. I'll come up with a solution that also covers destroying and recreating clients with the next release.
Any chance the event handling recovers after polling the attributes with
getAttributes
?
No, I have been polling the lightswitch every hour with a simple getAttributes call run off a setInterval timer...
Did you already run with env DEBUG=wemo-client
? If so, there should be a console message like Renewing subscription…
about every 2 minutes. In case something went wrong, you'll see an error message like HTTP Error (…) occurred (re)subscribing to Wemo Device…
. This should help getting your issue sorted.
When no events have been emitted for a long while ( > 6 hours), client.on is not catching any events and my code needs to be restarted to get events caught again.
Wemo Maker is setup as normal on/off and sensor set to receive active low.
Here is my code from a HAPNode (Homekit) Gate project: