04-20-2017 06:19 AM
So my motion detectors stopped working after the last firmware upgrade.I think I figured out the problem! The rules are not automatically loading. So, if I power cycle the devices they fetch the rules and work perfectly. BUT when the rule ends, the next rule does not load! The app says the next rule is active, but the device is not automatically switching to the current rule. Bef ore, the rules all "lived" on each device, so even if the internet went out, the rule worked. If the rules were still living on the devices, my motion sensors would be working. When the rules switched over this morning, I noticed they stopped working.
Belkin, PUT THE RULES BACK ON THE DEVICES! This is the only thing I can think of that is making them not work. OR make them fetch the next rule when the current one expires. PLEASE!
04-20-2017 06:20 AM
OR let me roll my firmware back to the last version where the rules lived on the devices. PLEASE. I have rules that switch over several times per day, and every time I have to power cycle the devices. NO GOOD.
04-21-2017 06:12 AM
So I'm not sure that the rules have moved. But I did some more testing, and this is true:
1. This morning, my motion sensors were not working (as is the new normal).
2. I tried adding all my devices to Yonomi. Yonomi found all the devices, and had a running routine, which also did not work.
3. The motion sensor in my bedroom, which has had a factory reset since this problem started, is reporting motion to the app AND shows the rule is in effect that would turn on the light. So the app knows motion is being sensed, and knows the rule should be working, and I can see in the app that all my devices are currently connected to my network, AND STILL NO LIGHT.
4. I disabled the rule regarding motion in my bedroom, and then enabled it again, and VOILA, light.
So I can confirm that:
My devices are connected to my network, which is in turn connected to the internet
The app is getting the message from the device that motion has been detected.
The rule is in effect on the app
The outside vendor can see my devices, but does not seem to be getting the message that motion was detected either
My phone was connected to my network via wifi when it showed the motion in the app
I have an IFTTT rule to alert me to motion from this device as well, which also did not fire
Here's my very amateur diagnosis:
The motion is being sensed and sent out over my network
Somehow the message is NOT making it out to the internet, despite my network being connected and functioning
Somehow a recent firmware update has made it necessary for the motion message to go out to the internet, but since this is not working properly, neither are my lights
Forcing the device to refresh the rules, either with a power cycle, or through the disable/enable on the app, restores the function for some period of time. BUT it stops working when the rule expires, or sometime before that (can't figure out the cause)
04-21-2017 08:34 AM
You're sure putting a lot of effort into this! I know it's incredibly frustrating, and I imagine you get the same pressure I do from your family - home automation must be more simple than, er, turning on a light. So when it breaks there's a lot of complaining from the gallery...
If you step back a bit, most people are doing ok with their motion detectors and wemo switches. So it must be something unique in your environment. I can't believe it's internet access 'cause almost all of it have it! And unless the belkin team has spent a lot of time moving rule function from firmware to cloud (which I strongly doubt) the rules are still all managed and run inside your network.
I'll suggest again the problem is specific to your mesh google wifi. Recall that we discussed (offline) that iOS is crashing in it's network code too - I suspect for the same reason/same bug that's in the wemos. Devices & OS's often share common / opensource code like wifi, TCP, UDP, and uPNP stacks. Belkin uses a lot of freeware in their wemo firmware.
So the wemos are crashing and restarting, and then failing to find each other (via uPNP) when they restart. This is unlike iOS, browsers, or other devices that recover quietly. If wemos can't find each other the rules won't work - the motion detector has to report motion to the switch for it to turn on.
An android device may work better on the google mesh network - android is released by google so it's more likely to have been tested to work with it. AutomationManager will check wemo devices as often as you ask it (30s minimum) so it will recover easily if a wemo restarts. And the rules run in the AutomationManager/WemoServer so they're immune to the restart problem. I'd suggest giving it another try on android this time, and as always I'll help to get it up and running.
04-21-2017 10:01 AM
MikeP you got it...the gallery is REALLY complaining. "My light switch never failed in 40 years until you "automated" it..."
Here's my only problem with this diagnosis...if the wemos are crashing and restarting...wouldn't they blink as they restart? And when I power cycle them the rules actually work again! It could be some software inside is crashing and the device is NOT restarting...but then why does the app still see the motion during the time that the rule is not working? I purposely took out my phone (while it was connected to my wifi) this morning and WATCHED the app sense the motion from my motion detector, and the light did not fire.
I agree that it is probably related to the new router. I'm not convinced that the mesh is an issue, but of course it could be. I just don't understand...the devices all have static IPs now, so they should be easily found. And the app is still seeing the motion!
Surely there are enough Google Wifi routers out there that if there was a systemic problem with Wemo I would see it on THOSE forums. And I do not.
Also, the devices are always "available" and hitting the button in the app 100% turns them on/off. And Alexa has no problem finding the devices to turn them on/off as well. Something is fishy and it is annoying.
04-21-2017 10:24 AM
My understanding is that when the belkin app (re)starts or when you hit refresh it re-discovers and re-subscribes to the wemos - so it's going to start seeing motion again and it'll be thinking the rules are firing. I suspect the belkin team at some point started copying the aftermarket apps by caching the wemo IPs so it could find them again too so static IPs helps. The app working even when the lightswitches don't still makes sense to me.
Alexa only searches for the devices when it needs to do something - that "ok" you hear is sent after the devices are found and report they've changed as requested (I know that 'cause AutomationManager now uses alexa for non-wemo switches too).
It's 'cause the above works and a restart works that I suspect the problem is with the lightswitch to motion detector subscriptions. The switches must not realize the motion detectors have lost the subscriptions so they wait for an event that never comes. And they don't resubscribe 'cause they think they're already subscribed. When you power cycle the wemos they report back as initializing and they all re-subscribe till the next outage.
But it's only a theory .
04-21-2017 12:15 PM
So somehow, the app can see the motion, but it doesn't send the notification out to IFTTT either? I'm just not understanding how the device can be connected to the network (I can check in the Google Wifi app and see all of them), be assigned a static IP, successfully communicate with the app, and STILL not fire the rules.
Someone on Google Wifi forum says to make the devices all "forget" the network and basically start all over. I guess I could do that, but the only one I factory reset did not magically start firing the rules properly (although I did not factory reset the switches that go with it, I guess). It is impossible to reset them all at the same time either, so some trace of my old network will probably persist. I'm loathe to try and rebuild everything from scratch unless I'm SURE it is the right fix.
There must be a log somewhere, right?
04-21-2017 12:18 PM
Hi mlebowitz76 and Mike
I'm glad to see you suggesting static IPs, Mike. I've always suspected it to be best although others on the forum have said it's not the case.
I too have installed a new router fairly recently, mlebowitz76 and my WeMos went nuts dropping off the network initially. I discovered that my new router was issuing IP leases with an infinite lease expiry time by default. Well, actually the lease time was about a billion seconds in reality. I didn't like that so I set it to a one-week expiry time although not actively trying to fix the WeMos when I did so.
Presto! Suddenly all my WeMos started behaving and whilst I get an occasional drop-out, they are working perfectly. I've no idea why it worked mlebowitz76, but perhaps it's something you could look into...
04-21-2017 12:19 PM
A power cycle will bring them back, but it's easier for me to disable the offending rule, and re-enable it. I haven't had to power cycle one in a couple of weeks. I do not think that they are restarting as any part of this process.
04-21-2017 12:57 PM
IFTTT is different and there's so many moving parts there it's trickier - the path is wemo to router/internet to belkin cloud to ifttt (using your key), to whatever IFTTT automation you have. It's takes seconds to minutes to go through. I suspect it not working is unrelated to this particular problem.
Good point Peter, it could well be the DHCP lease expiration that's tripping them up.
A crash might or might not be visible. If it's a full crash the lights will reset and blink and eventually go out again as the wemo reconnects. Sometimes I can see it sometimes not, and when I'm checking I leave the wemo on so I'll a "click" when it resets. My app will log the error so I can check later, but with the belkin app you won't know it happened. Or it could just be one piece (task) in the wemo firmware that stops and doesn't restart so it might not be visible at all.
Let's say you create or re-enable a rule that has motion trigger a light. The belkin app will save/update that rule to all of the wemos. They each store the rules internally and examine them. The lightswtich will notice it's supposed to watch the motion detector, so it contacts the detector to "subscribe" for the motion event. The detector saves that subscription and the lightswitch remembers it's subscribed. Then when there's motion the detector sends out an event "I see motion!" to it's subsribers like the lightswitch, which will follow the rule and turn on.
There's a few places it can fail: the motion can forget it's subscriptions, or stop notifying properly. The lightswitch might stop subscribing (they expire), or stop listening. Or subscriptions might be sent incorrectly and not make it. If you power cycle or resave the rules it seems to recover whatever stopped for a while. AutomationManager runs and subscribes independently and logs if the subscriptions aren't remembered so it's a good 3rd party check to confirm or disprove this.
If you uninstall the app and factory reset one or a pair of your devices you can try to set them up in isolation. But the app will probably see the others in your network and it might pick up your old rules unless you unplug them. I've never heard of or found any log kept by the wemo or belkin app.