Motion sensor to integrate with wemo smart plug (WSP080)

I’m trying to find a motion sensor (or rather collection of sensors - 5 sensors in 5 different rooms) that I could get to turn on a wemo smart plug (WSP080) and then turn it off 30 minutes after the last motion is detected. Currently I have a hot water recirculation pump being powered by the plug set to run each evening from 6PM-10PM. I watched a tutorial by John Stone the DIY Smart Home Guy (INSTALL: Watts Hot Water Recirculation Pump - Instant Hot Water - YouTube) and was inspired to explore options for a system that was controlled by motion sensors vs. a set schedule. I WOULD use his list of equipment, etc. however it’s from 2012 and so I’m guessing a bit antiquated… So far I haven’t found anyone that has had success doing what I’m trying to do (tried posting on reddit’s ifttt Chanel as well as another forum). Currently I’ve been unable to reach Mr. Stone. I’m not married to the Wemo smart plug. Totally open to other equipment configurations though I’d prefer to keep it simple if possible. As I’m writing I’ve realized that a system that would support electronic door locks might be a great addition as well but not the main goal at this point. YouTube and Google have proven helpful, but frankly a bit overwhelming. My programming capabilities are rather limited. Thank you for taking the time to read and any help/advice offered would be much appreciated.

Tbh, if probably go with ZigBee.

It will save on wiring & the devices are pretty cheap.

I have a selection of these: https://www.amazon.co.uk/SNZB-02-Temperature-Humidity-Compatible-Including/dp/B08BCKHSB7/ref=asc_df_B08BFW697F/

(You can find them cheaper around the internet)

Coupled with a ZigBee dongle & ZigBee2mqtt you can achieve you goal

2 Likes

With Node-RED, it hardly matters what collection of sensors you use :sunglasses:

But I would agree with Steve that, unless you want to build your own sensors, Zigbee is a worthwhile investment even though you need to also buy a Zigbee coordinator dongle and set up Zigbee2MQTT.

Get one of the coordinator dongles recommended by the Zigbee2MQTT project to save any potential configuration issues.

Zigbee devices are generally pretty interchangeable but again, pick ones that the Zigbee2MQTT project already knows about.

When you read about Zigbee, the details can be offputting, however you really don't need to worry about the detail. If you choose devices that the Zigbee2MQTT project have already tried and configured, all you really need to know is that if you need to cover a lot of area (from the coordinator dongle), you may need 1 or more mains-powered Zigbee devices in order to extend the mesh network.

In my own network for example, I have a couple of Ikea bulbs and a couple of Ikea plugs. As they are mains powered, they easily extend the mesh network out around our Victorian house.

2 Likes

Steve, many thanks for your input! I will definitely research ZigBee and see if I can work out a solution.

Sounds like Zigbee is the way to go. Many thanks! Will see what I can come up with and report back!

Just want to clarify one thing before you head off buy a bunch of sensors WITH a "gateway" - dont.

That link I posted has 4 sensors and 1 gateway, skip the gateway.
ebay sellers often try to bundle the gateway in with sensors - again, dont.

All you need is the dongle (coordinator)

I personally have the Sonoff ZBDongle-p which is supported by ZigBee2mqtt (even sonoff write it up as supporting ZigBee2mqtt) - it serves me well.

Other (with greater experience) may recommend another.

On a side note: The above mentioned is CC2652P based hardware - which I believe is currently the most popular/stable) - others on the forum may advise otherwise (like look for "Matter" capability/compatibility for example) however my take on that is there are still decisions to be made regarding interoperability with Zigbee and with the above mentioned dongle costing ~£25 its no great shakes if it doesnt support "Matter" in the future. In when it comes to it, I'd probably want a separate Matter dongle anyhow.

2 Likes

Steve, thank you for clarifying. I'll definitely take your thoughts into consideration as I decide what hardware to go with.
Best,
Jon

Good point and I should have said that. I use zzh (CC2652R Stick) - Electrolama as my controller dongle.

1 Like

Hello Steve. So, I ended up watching this tutorial "Home Assistant Beginners Guide: Installation, Addons, Integrations, Scripts, Scenes, and Automations" ( Home Assistant Beginners Guide: Installation, Addons, Integrations, Scripts, Scenes, and Automations - YouTube ) and from what I gather, the best set up is one in which I have a dedicated "always on" laptop/computer running home assistant. I'm guessing this is the most current approach? This smart plug is actually at a rental home and I don't live there. I'm guessing I can't "set it up" with a mobile app on my phone and then come back to the rental periodically to make sure the motion sensor/smart plug are functioning correctly. Also, I should probably mention that I'm predominantly a mac/iOS user.

Hi @nodeBoy816,

Not sure if you are still looking for help but thought that as someone who has already done something similar I would add a little of my experience. I don't want to put you off, just making you aware of some of the issues you may encounter.

First thing is to say that Zigbee as suggested by others can be a reasonable and relatively simple solution to the problem you outline. However, you need to be aware of a couple of caveats.

  1. All the Zigbee motion sensors I have seen are battery-powered and require that batteries are replaced fairly often depending on how often they are triggered. Most manufacturers claim long battery life but in the real world in a busy household around 2 to 3 months would seem like reality. You need to monitor battery life and replace it promptly when the level falls.

  2. Depending on the type, because of power constraints most do not stay triggered but simply send a state change and then reset and become inactive for a short time. There are workarounds in software (node red) but it's not always perfect. If you are looking to trigger a WEMO device for a fixed time period it should be OK but if you need the WEMO to stay triggered whilst a presence is detected it gets more complicated. In my case, I am switching on lights when a room is occupied and switching the lights off after there has been no movement in the room for a set period.

  3. In my experience, Zigbee generally works well over short distances (up to 6 mtr) from the coordinator but becomes increasingly flaky over greater distances. In my house, I had to add repeaters (Zigbee Bridges) at various locations around the house but even so, there can be conflict issues with WiFi.

  4. If there is a power outage, when power returns, the coordinator should automatically re-establish connections with all the other Zigbee devices. In my experience, this does not always happen, and re-pairing is necessary. Simple enough but it can be a nuisance if you are relying on the system.

I'm not sure what your level of competency is but my recommendations would be to set up a stand-alone Raspberry PI system with an MQTT server(Mosquitto) and Node red running Zigbee2MQTT. Use node red as your interface to your Zigbee devices and use MQTT installed as your messaging command control system, Sound complicated but is simpler than I make it sound.
The alternative would be to use something like eWelink https://ewelink.cc but that means allowing your data to be managed by a third-party company, something I am very wary of.

Another alternative to Zigbee would be to look at Tasmota https://tasmota.github.io/docs. Tasmota also interfaces easily to Zigbee, MQTT and can be used to control a huge and increasing number of devices. It does however require some knowledge of coding and updating firmware.

If I can help with ideas, please ask.

1 Like

I have three SN-ZB03 in my home which have been in most of a year and I have not had to replace batteries yet.

The zb03 devices send a motion start signal when they detect motion, then when there is no motion for a while they send motion stop. This makes it trivial for light control for example in node red. I use the Start to switch the light on and switch it off a bit after the End signal, using a Trigger node for that.

In my experience it is at least as good as good Wifi. I do not need any repeaters to cover the whole house, though I do have one to extend it into the garden.

I have not experienced that with various Sonoff zigbee devices (with my current co-ordinator). The fact that you get poor range and connect failures suggests the devices are not much good, or maybe more likely it is the co-ordinator. What co-ordinator are you using? I initially had a cheap one which behaved as you describe. Having switched to a SONOFF Zigbee 3.0 USB Dongle Plus all such problems went away. There are other good ones I believe. Some early co-ordinators were based on the CC2531 chipset, which did not work well. Later ones are based on the CC2652.

1 Like

My zigbee Ikea motion sensors last 1-2 years at least (in a family home in commonly traveled areas).

Agree though a couple of Ikea bulbs and a couple of Ikea wall switches mean that the house is very well covered anyway. Only my Wiser heating system is more of a problem in that, without an (expensive because you have to buy their repeater) extender, the batteries in some of the TRV's that are further from the controller don't quite last 12 months (I'm in a large Victorian end-terrace so wireless signals are not ideal).

I've never had to re-sync a zigbee device.

1 Like

Howdy @Purclewan , @Colin, and @TotallyInformation ! Sorry for the hiatus in resolving this thread. Too many fish in fryer, but looking forward to getting back with this soon. Finally succeeded in installing Debian on my HP2000 (Best install procedure for installing Debian on laptop exclusively dedicated to running Node Red - #2 by Colin ) and hardware is destined to arrive within the next 2 days. I ordered a SONOFF ZigBee 3.0, a Decora Smart Plug-In Single Outlet, Zigbee Certified, and 3 of the Aqara ‎RTCGQ11LM. Securing Node-red has been my next step and @jbudd helped me with a small hurdle. Look here Node red admin login failed (running on hp2000) - #2 by jbudd if curious! Will post soon! Many thanks again!!

@Colin @Steve-Mcl

Thanks for the replies guys and I am glad that Zigbee works so well for you.

I have been developing and using node red for home automation and in particular for security, energy conservation and heating systems for several years and now have a fairly sophisticated setup.

I started out using EPS8266 devices with firmware from Peter Scargill to build temperature sensors and motion detectors using various firmware before moving on to Tasmota as my preferred optimal solution.

Problem was all the cables needed to power devices all over the house and beyond so just over a year ago I decided to try and rebuild my system around Zigbee. As a retired Electronics engineer with a computing background, I am always open to new technology so I have bought, experimented and played with most of the common Zigbee equipment available including various Zigbee coordinators and firware.

I have settled on a Sonoff Coordinator (flashed with Tasmota Zigbee2MQTT), Sonoff and Aqara for my Motion and Temperature sensors with a few others thrown in as I test them.

I built a complete duplicate of my Tasmota/node red home heating system which controls my heat pump, ten thermostatic underfloor heating valves, three pumps and takes temperature readings from twelve thermostats. As previously mentioned I control the lighting in several rooms using Zigbee motion detectors. All is linked to openHasp on a Lambon display which allows me to see and control what is happening around the house. I should add I have four Zigbee switch/bridges to help form a Zigbee mesh. I also read up on Zigbee/Wifi cross interference and set up my wiFi and Zigbee channels well apart to maximise range. This runs in a sandbox but mirrors my actual live system so I can compare the performance.

I have been running this experiment with Zigbee for close to a year now and for me the results were variable and (are) disappointing. Despite your experience, I find that for motion sensors (Sonoff) to be reliable they require batteries to be replaced on average every three months and thermostats (Aqara and Sonoff) every four months. Mine is a large house but range issues have plagued me with devices dropping out for seemingly no reason. I suspect interference but up until now cannot get to the bottom of it. Also, living in the country we get fairly frequent mains dropouts and re-pairing has been an occasional issue. To be fair, I do have a lot of Zigbee devices and noticed that reliability dropped as I added more.

In summary, I was not trying to criticise Zigbee, I was simply trying to point out that it was not as plug and play as might be thought and that other solutions were available that might be more reliable.

Given that Zigbee sensors are largely battery-driven, it is hardly surprising that range and refresh speed are more limited than WiFi. In my case, I need 100% reliability and sadly at present my Zigbee system does not offer me that. Let's see what the future brings.

Which one is that? If it is the early one based on the CC2531 then I think that switching to the version 3 would make it a lot better. There is no need to flash it, it integrates directly with zigbee2MQTT.

@Colin

Interesting point and one that's worth checking. I have recently bought the latest Sonoff USB dongle Version 3 coordinator to see if it improves things but have not had the chance to integrate it yet.

At present, it has the latest Zigbee2MQTT firmware but I'm thinking of flashing it with the Tasmota Zigbee2MQTT firmware to retain compatibility with the code I have written to control and oversee my Tasmota environment and my existing node red flows.

Probably make no difference but it's a personal preference and I like using the Tasmota firmware.

I can't comment on the tasmota s/w. All I know is that it works fine with the standard s/w.
Is there a difference in the way the tasmota s/w interacts with zigee2mqtt?

Not to any great extent I suspect.

I think the major benefit for me is you can use the Tasmota interface (which is very familiar to me) to set all the required interfaces such as WIFi, MQTT friendly names etc. You can also view Zigbee activity, create a viewable topographical map of connections and use the console interface to send and receive commands to the coordinator which is great for setting friendly device names and experimenting with commands.

In node red I don't need the Zigbee2MQTT nodes installed I simply use the standard node red MQTT in/out node.

I suppose it comes down to personal preference at the end of the day.

@Colin
Just realised, I think you helped me with a problem I had trying to extract data from a zigbee JSON string back in Sept 21. Small world.

I think maybe you are talking about a different device. Are you talking about a Zigbee Wifi gateway possibly? I am talking about a zigbee controller dongle that plugs directly into usb, this one for example. You run Zigbee2MQTT on the pi (or whatever it is plugged into). Friendly names and MQTT broker address are configured via its web interface. No wifi to configure for the dongle.

So do I. The zigbee nodes have problems I think, and don't really add anything.