Yes that is correct.
so wifiâŠcheck out the suggestion I posted above
The issue with wifi is that you will not be âtrueâ wireless due to power consumption.
WTF is âtrue wirelessâ then? Do you want devices to get power from thin air? wifi IS wireless, 433MHz IS wireless. What âtrue wirelessâ do you want? Explain your magical technology for the rest of us, please
Keep calm, there is no need to use familiar expression to make a discussion progressing
I think by true wireless he means no cable. And with a wemos running a pir sensor due to the power consumption you will need a power cable.
This is not the case with zigbee which runs on batteries for instance.
But I think @Yammers could describe its need a little bit more.
Well @Yammers never said he wanted it to run off battery, only mentioned that it was supposed to be âtrue wirelessâ (not explaining power supply) and that he didnât want 433MHz because it requires another radio (wanted direct HA comms). Zigbee is also going to need a radio as no HA server that I know of has a Zigbee radio in-built.
Realistically, running something like a Wemos with a 5V power supply (easy to sort out) would be the best option since itâs always online, fast to respond and can also house other sensors. Depending on the location of the device, 1 Wemos D1 mini can be used for multiple PIRâs if placed between them with some short wires to each location - now I know that takes away from âwirelessâ but a few short wires to get many PIRâs⊠Otherwise just cough up the coin for a wireless sensor sold by one of the many retail companies⊠or maybe look at mysensors⊠EDIT: on further inspection I donât think they will fit the requirements anyway⊠still need power other than battery I think
With all wireless there is a security factor
433 MHz or 868 MHz simple systems are easy to jam. You need a handheld walkietalkie - transmit on 433.920. It will transmit 1-5 Watts and will kill anything that transmits in the milliwatt range. You only have to transmit while you break the window or door because these sensors only transmit ONE maybe a few messages. You cannot poll the status of these sensors. If it is a PIR sensor you just pull it down and step on it while you jam it. You can buy these handheld walkietalkies cheap on ebay. The 433.920 is in the middle of a radio amateur band.
868 MHz plain signalling sensors are more exotic. It is not in a ham band so radios that can transmit in that frequency are not as common. In some regions like US the frequency used is 915 MHz. Same applies.
You can get radios that can transmit in this frequency but they are more rare. Slightly higher security but still sucks
Then we have the Zâs
They are both mesh networks
Z-wave operates at 868.42 MHz in Europe, at 908.42 MHz in the North America
Zigbee shares the 2.4 MHz band with Wifi
They have one thing in common. They have both a receiver and a transmitter so they can be polled. Not too often because that sucks the life out of the battery. But it means that if you open a window or door you have to destroy the sensor while you jam it because otherwise the open door/window state will be retransmitted and you have an alarm triggered. Zigbee is difficult to jam because the transmitters you have available are usually spreading spectrum differently than Zigbee does. Zigbee lives happily with Wifi and interference is managed somehow.
Zigbee devices are cheap. In general I would say 30 to 50% the price of equivalent Z-wave
And I personally have better experience with the reliability of Zigbee than I have with Z-wave in my house. It may be interference. It may be the instability of the OpenZWave library used by home assistant. I might have had better results using a dedicated Z-wave hub.
If I am to recommend something simple for Home Assistant and window/door sensors I would say buy a Conbee II stick for Zigbee and the cheap Xiaomi Aqara window/door sensors. They are small. They pair well with the Conbee. I have not yet seen a missed opening or closing of a window.
For my doors I chose to build a Wifi based solution where I put
- An NFC reader (with libraries for Arduino)
- A row of 8 âneopixelâ LEDs that show the status of all windows and doors of the house and the alarm status (4 windows - 3 doors - 1 alarm status LED)
- A Wemos D1 mini as the brain
I wrote the software myself - and it connects to HA with MQTT
Housing is 3D printed
Is that easy? No.
Is is fun to do? You bet!
I have wired two sensors to these boxes. Simple reed contacts normally open, and magnets
One detects that the door is open
The other is in side door frame with a flat magnet glued to the bolt and this detects that the door is locked. When I leave the house I can check the row of LEDs. If a window is open or a door is not locked the LED is red instead of green. And then I say âAlexa turn on the alarm systemâ and leave.
So this brings us to Wifi based.
Wifi based sensors are very easy to jam because you do not need to jam the radio. You bring a little portable device with a âdeautherâ. Wifi WPA has a known problem that allows an attacker to throw you off the network and it can continue sending false access point messages that prevents the client to connect again. You can download the software for this and you can use off the shelf hardware. You do not need to know anything. Just follow a recipe on the net.
So I know a thief can attack my door sensors. But then he also needs to attack my Zigbee motion sensors that will get him the minute he opens the door. With multiple points of protection is becomes practically impossible to prevent the trigger of the alarm.
Now finally Motion sensors.
I have two types
- 433 MHz Sonoff types. They work great. They are not 100 % reliable because of the 433 MHz lack of reliability but the thing with Motion is that a burglar will move a round so the sensors will trigger many times and it just takes ONE to trigger.
- Philips Hue Zigbee sensors paired with the Conbee II stick. These are my favorites. They are cheap. They last long on the battery. They report their battery status well. They are small. Good looking. And super sensitive and less likely to cause false alarms. And harder to jam because they are zigbee based. I have a Philips motion sensor in the bathroom and it still works on the original coin cell battery after a year. And I can see the battery status is still good. Batteries are a pain but when they last for a couple of years it is not bad.
I could have built D1 mini based PIR sensors. I have the bits for it. But these Philips sensors are so small and cheap it is not worth it.
If you want a system that cannot be jammed then you need wired sensors all over the place. But that we all know is a pain to install so it hides the wires. But nothing beats wires.
I hope all these words gave some inspiration of what is possible
What I see also in your system as an interesting architecture concept is diversity, indeed diversity of technologies make the work for burglar a lot more difficult.
If he has to bring with him a jamming system for each frequency used and think on all the details and behaviour per communication technology, he will have a hard work bypassing all the systems.
The downside of that, is we need as tinkerer to handle these diversity of technologies.
In my side Iâm also mixing stuff I have 433mhz sensors and wired security devices.
Regarding jamming, I didnât worked on that but we could make a jamming detection quite easily by pinging a 433mhz device with a custom made program.
The problem with 433 MHz is that this band is a waste basket of misc signals from baby monitors to door bells. You will probably detect many false alarms if you try to detect jamming. You can detect it but all you could use it for is debugging. You could not trigger the alarm system from a jamming detection because odds are that the interfering signal is a legitimate signal
I have a small anekdote. I am a radio amateur also (OZ1IDD) but not very active any longer as I have worked with professionel radio for 32 years (Motorola). Many years ago while I still played with radio I had a strange carrier on my UHF radio around 434 MHz and it was very strong.
So I took a hand portable and started walking down the road and the signal got weaker no matter where I walked. The signal came from my house.
So I started turning off computers, radios, TVs. Nothing helped. Finally I flipped the main circuit breaker and put the entire house dead. The signal was still there. I gave up and went to bed.
Next morning my wife put her laptop in her bag and pulled out a remote control she used to flip slides in Power Point. Guess what. It transmitted on 434 MHz and it had been squeezed against a can of makeup and had transmitted for hours until it ran out of battery.
Another anekdote is when we radio amateurs drove south to Ham radio events it was a sport to transmit 50W on 433.920 on the car deck on the ferry. Back then all car alarms and key fobs used 433.92 MHz. The scene when 8-9 cars could not be opened and the car alarms going off when people panicâed and opened the door. There is a reason why car manufacturers introduced different solutions later for keyfobs
The learning is that 433.920 is a garbage frequency and I advice not to rely on it for mission critical stuff.
I do not use the 433 MHz sensors in my alarm system because it is so easy to transmit a false sensor code and the cheap Sonoff sensors do not even use rolling codes. But to announce that someone is entering the garden, or to signal that I have snail mail in the mailbox it is just fine because it is not the end of the world if you miss a message or get a false trigger
It probably depends on where you live also.
There is some commercial products that are selling this kind of functionnality (rfplayer), I donât know if it is worth the money. But reading your experiences it seems a difficult task.
No headache after 50W of RF ?
Sorry I shoukd have been a bit more clearer.
My plan would be to run them off a battery but have the communication or activation signals be sent over wifi.
I have seen videos where but you can hard wire pir alarm sensors to a system called connect. Which uses and esp2866 And wire off the shelf pirs into audrino board but these are boards are mains powered. I just like the idea of now power cables and using wifi. Dont mind using a combination of the two mains power and esp2866 etc. My idea stems from i like the goolge nest secure system and the detect sensor
So looking for diy version or similar off the shelf versiona dont want anything too big and clunky lol. Its just an idea at the moment though.
Iâd go zigbee and xiaomi sensors. This is a cheap option, battery life and form factor is also excellent.
There are a few options for Zigbee, I personally use zigbee2mqtt (http://www.zigbee2mqtt.io/) but you also have these options (https://www.home-assistant.io/components/zha/)
A battery powered PIR sensor that uses WiFi. That is possible but only in special cases feasible.
Any small device using wifi still consumes a lot of power.
A small Philips PIR sensor will happily report motion for a year on a coin cell because it sends short packages of Zigbee on a mesh.
Your Wifi based box needs to do a lot more work to stay connected to a wifi network.
The only way to do it is to have the device deep sleep and only wake up when it detects motion. If you do that with an ESP8266 and a low power PIR module then it can be done. But each time the PIR sensor triggers the ESP will wake up, connect to Wifi, send its message and go back to sleep. This takes many seconds. You can shorten the time by using hardcoded IP address in the ESP to avoid the comminucation with the DHCP server (fixed IP setting in router still requires this phase and 1-2 second delay). But still the ESP will run for seconds and consume on average 80 mA with 200-300 mA spikes. As a window sensor that is opened maybe 100 times per year max this is possible. For a PIR sensor in a place noone ever comes it may also work. But inside your house where people walk around when you are home the sensor is triggered so often that even with 18650 batteries you end up recharging the batteries way more often
To calculate a power budget you can use an average consumption of 80 mA.
And let is assume you can optimize a wakeup, connect to Wifi, send message, back to sleep in 5 seconds.
We assume a good 18650 Liion cell at 3000 mAh with linear regulator LDO type running an ESP down to 3 V. Let us be optimistic and still assume that we get all 3000 mAh. That is 37.5 hours of operation.
In 5 second periods that is 27000 wake ups. It now depends on the traffic. This may be OK. The cell will self discharge, the sleep current is not zero as the PIR runs all the time and the ESP uses some microamps when sleeping. The LDO must be a low quiescent current type. But still it also consumes some power. But let us say 15000 times. That is 150 days at 100 detections per day or a year if it is only you in the house and no kids running around. And you can always have two 18650s in parallel.
The small things will count. Many PIR sensors will have a timer so they only report a new Motion after a period. A larger period will wake up the ESP less often.
If you want to have an event when Motion has not been detected for a time interval means also waking up the ESP when Motion stops. That doubles the number of wake ups. Staying awake while the PIR interval is on is a disaster for the battery time. Do not even think of that.
You need to know when Motion stops for automations. For pure burglar alarm function the trigger on is OK. But it is nice to be able to see if there is still motion in the room even in alarm applications.
It can be done. But it depends on the application. Many of the examples you find on the net where people build sensors with ESP8266 in deep sleep do not report both on and off. It takes a little more circuit to reset the ESP to wake up on both rising and falling output from the sensor and the circuit has to consume microamps current.
Because of all of this, I use zigbee motion sensors. They report on and off and run on a coin cell.
Thanks for this - it really helped me decide a course of action that I feel comfortable with. I have aqara sensor on the way along with a conbee stick.
I do - however - also have all the items lying around for a DIY solution. How are you powering your wifi solution with the D1 mini? This was actually my first choice for my own system - but the powering of the ESP (and the length you have to go to in optimizing deep sleep etc. according to this article by Gammon: http://www.gammon.com.au/power) turned me off the idea.
I do still have a few doors where I want more than just just a open/close status though, so the D1 minis might still get some use. Are you just powering through an adapter of have you had succes in a battery-powered solution?
For D1 mini I use USB power supply to mains
And a commonly available USB power supply is the one from IKEA. It is working well while being cheap and safe unlike a lot of the cheap shit from China.
Great. That also sounds like the most appealing option for me, since I am not at all comfortable in adressing the power management of a battery-powered D1 mini just yet. Is this the charger you are referring to:
I whole heartedly agree on getting mains-connected items from China. Iâd rather not
Oh. They have one even cheaper now? I bought 10 of the one with 3 outputs because it is powerful enough to run a Raspberry Pi. It is 59 DKK as I remember. And I saw a tear down of it on Youtube that it is made properly. But I am sure the single output is also OK for a D1 mini. And I am sure all IKEA products meet basic safety standards even if it is produced in China. The advantage of the 3 output is that it has enough power to also drive a servo motor like I use for my toilet flusher
There are lots of options for wireless that IMHO are in the same class as wifi devices⊠a router translates wifi to ether so HA can read it (mqtt component)⊠a zwave stick translating zwave to serial (ozw integration)⊠not very different from using an arduino to translate X wireless protocol to serial so HA can see it (serial sensor component). The problem though with most of these diy/arduino wireless systems (ie, esp lora, 'duino 433 & 2.4, etcâŠ) is a lack of encryption. So for alarm sensors, I think the best choices will be in the wifi and zwave arenas (zigbee recently was found vulnerable to drive-by hacks⊠details are vague to determine how this may affect HA, but until we get a green light Iâd avoid zigbee for alarms for now).
FWIW, D1 minis are a poor choice if battery is a requirement. I like d1 minis anywhere there is mains power, z-wave mostly everywhere else⊠with a handful of DIY bare esp+esphome battery powered PIR devices (that donât see heavy traffic⊠like 5-10/day). If you have an area that doesnât have heavier traffic (like 30+/day), and you donât mind playing with bare esp modules, the latter is a perfect solution, that can last years on an 18650.
If soldering/programming isnât your thing, youâd be fine with zwave for battery devices. I prefer the ecolink pet-proof motion sensors. For doors/windows, I prefer ecolink door sensors. The door sensors are bulky looking, but Iâve tried the sehksier looking aeotec recessed sensors, and they donât even come close to the reliability of the ecolinks. All of the ecolink stuff Iâve tried so far has been easy to integrate, the batteries last forever, and they are rock solid stable (no affiliation⊠just sharing my personal experience). Also a nice feature of their door sensors is the screw terminals that you can use for external sensors. Say you have a window with 3 openings. Instead of buying a $40 device for each opening, just get one, and wire 2 cheap reed switches (in serial) to 1 device. That can cover all 3 openings with only one zwave node. Also you can cut out the built in reed switch to use a remotely located reed switch instead (I did this on my breaker panel⊠since wireless gets blocked by the metal case, the device had to be mounted away from the panel door⊠a wired reed sensor was a perfect solution for that).
Anyhow, I think this is getting tldr⊠hope you find stuff that works well!
Just wanted to add a thought I spotted in another thread about home security - âif someone decided to break into your house, theyâll do this way or the other so there is little sense in being too paranoid about insecure communications between your sensors and a gatewayâ.
And I know stories about thieves who had only 15-20 mins and yet managed to take a lot and get away.
So the point is perhaps you need a not too complicated (easy to use) home alarm but itâs very important to make your house look âprotectedâ and not empty so they just go elsewhere. And if they get in - make it as difficult as possible for them to stop any audio-visual alarms (which will trigger if you use even a simple combination of door/PIR sensors).
This is very true⊠at the end of the day what is preferable is a good deterrent vs securing keys, because even a fortress will be had to some extent with a quick grab and go. Quality cameras are an excellent deterrent⊠beware most professional criminals can tell the real deal from the fakes/toys. I donât bother with the âADT signâ⊠if they care, a criminal will know if you just stole a sign from your neighbor or not. I also have a well trained dog with a deep loud bark⊠and of course motion lighting on the exterior. All of these things together will convey that your house is not worthwhile target.
Failing the deterrents⊠it can definitely help having the big commotion of flashing lights and loud sirens that put pressure on said thieves if they do decide to go for it. I have known many criminals that had all day to plan out getting appliances on a truck⊠they wonât do that with sirens/lights and neighbors coming out their front door, LOL! Of course, if they could crack the alarm system, theyâd be in the former situation with lots more time to do damage. Itâs these kind of break ins that can result in bigger losses⊠consider the cost of appliances etc, vs a crackhead smashing the window and running out with an xbox on one of your bikes. Securing the alarm remains something to consider when it comes to professional thieves (theyâre the ones that will truly ruin your day⊠and a lot of them take time to carefully study cracking various alarm systems⊠same guys were the ones using decade counters to open dip switch secured garage doors in the 80âs⊠their methods have matured with tech and Iâm sure the good ones are studying the zha drive-by right now).