Support contacted back pretty quickly. What I did was to create a new device type from template, using the second SmartSense Motion from the code library. When I switched the type to that device type and unplugged the power, I got the alert for both power out and power restored.
So I don’t think the problem is in the platform.
[Edit] - Just switched the type back to the second SmartSense Motion, (which is supposedly what it was), and it worked again. So maybe we just have to update the device types?
There are three device types in the templates… two named SmartSense motion (which are identical), and one named SmartSense motion sensor (which is for the new one with temp sensor).
Unfortunately, creating a new deviceType means no local operation on v2 hubs, but I have yet to have anything running locally so I guess it is what it is.
But I still don’t understand why a new deviceType with the exact same code as the existing one is necessary to get it working again.
So create a new device type from code pasting the code from the current V1 device type code and then apply that?..makes no sense to me but I’ll give it a whirl
It is indeed an issue with the platform as it occasionally needs a kick in the ass to run code it already knows it should be running. This is akin to the issue where stalled smartapps need to be edited to re-instantiate there proper operation.
I tried reassigning the deviceType to the other identical one, and back… no good. Guessing it indeed requires a new deviceType be instantiated (which I’ll try tomorrow).
Removed my V1 motion sensor from ST and added it back. When plugging the 120v back in sure enough it worked.
I still have the question concerning if power is killed to the hub and to my router on V1 hub. If that happens will this still work or no? It would seem that the router and Hub would still be rebooting and therefore would not receive the command from the V1 motion sensor.
Over the years I have found the APC units to be the most reliable. I like the ‘back-UPS’ models and have an XS-1000 on my low voltage board (modem, router, switch, HUE bridge, Obi phone) which gets me about 4-5 hours. I have an XS-1300 on my server which gets me about 4 hours. Longer than that and I drag out the generator.
You can occasionally find these on sale at BB, Staples, Office Max/Depot for not much more than a hundred dollars.
Well, in the use case of G.E. bulbs that (if controlled through the new lighting app which runs locally w/ V2 hub) all come on like Chevy Chase plugging in the extension cord on Christmas Vacation…you would not need internet because you don’t need the cloud…correct?
Just to put this to bed, apparently the HEM device does not report a change in powerstate (from wired to batteries) so this app wouldn’t work with it, instead however, ST has a built-in Smart App under Energy Management called “Energy Alerts”. I configured it to send me an alert if my HEM device reports less than 50 watts being used and simulated a power outage by tripping my service disconnect breakers and voila, push notification was a success!
Well… I want the notification, so I need it. As for you, you can see what’s running locally here… and for me it is bupkiss (and I don’t expect that to change anytime soon).
Well this is just going further and further into the weeds. After following official support’s advice of creating a custom device-type with the code from the official device-type didn’t address the issue, the next step was to remove and re-add the device. However I was not able to re-add the device without resetting it.
After the reset and pair, my perfectly functioning motion sensor is now stuck seeing motion. Remove, reset, and repair, now it is stuck seeing no motion. After a couple of hours of this, and resisting the urge to throw this thing against a wall, and visiting SmartThings headquarters to reward their efforts with a delicious, fresh-frozen rainbow trout, strategically placed within the intake vent of each of their vehicles, I discovered something odd.
Each time USB power is connected OR disconnected from the sensor, another instantiation of the sensor is added to the device list, assigned my custom device-type. I had 3 of them, and could continue creating them at will simply by connecting or disconnecting USB power. I deleted all instantiations of the motion sensor, but still can not delete the device type. I even edited the device-type to a blank state, saved and republished, but still get the error that it is in use when trying to delete it.
So now this seems pretty obvious that it needs to be fixed on the back end… unfortunately the only thing offered from support in the last TEN days has been to “try this”, or “maybe try that” or “do what Dan did”, which has only served to exacerbate the problem. Now, not only do I not have power failure notifications, I no longer have the motion sensor or the zigbee repeater that keeps the presence sensor in my truck operational.
Hopefully support can help you clean up the device type code. I’ve had issues in the past where I could not delete device types, no matter what I tried.
I just tested the power out notification again, and again it did not work. No events in the event list.
I then got it working again by editing the device, choosing another smart sense device type, updating, editing again and selecting the original device type. That restored the functionality, but who knows for how long.
For Hub v2 users, a notification that the hub is running on batteries would be ideal. I just ordered a UPS for my router.
Until that time comes, pingdom.com offers a single check for free. I setup this to ping a device on my network with the help of port forwarding. Works perfect.
@scottinpollock Any chance this can be done with other motion sensors that have both battery and USB power support?
I have the Aeon Multisensor. Has anybody tried anything like this with that one?
Obviously, I’d have to figure out how to get a thin enough power cord in there somehow while the batteries are in place, but that part would be on me. I’m just not even sure if the device would work this way or not.
I noticed this from @drshaw above, and am wondering something…
What do you have running all the time that you can use as the source device for this kind of thing? I know I must be overlooking something I have around here, but I just can’t think of anything that I actually leave running all the time AND have a smart power outlet or controller or switch of any sort for it. I do have some of the Aeon Appliance switches, but they are only for devices that are not on all the time.