“We live in a society exquisitely dependent on science and technology, in which hardly anyone knows anything about science and technology.”
— Carl Sagan
It`s extremely important to have a piece of critical information, right on time. So, it`s great to have an option to be remotely alerted in case of fire or smoke at your house. I`m thinking Telegram… E-mail… and … Domoticz in combination with C50W 433 MHz smoke detector.
So, this article is about choosing and adding a wireless smoke detector to Domoticz. In this example, we used C50W 433 MHz wireless device. No, it does not mean Wi-Fi, but wireless 🙂 There can be a big difference since Wi-Fi is wireless, and wireless does not necessarily mean that it is Wi-Fi.
Wi-Fi is a family of wireless networking technologies, based on the IEEE 802.11 standards. In general, it is intended for use in short-range networking of computers, smartphones, and other devices. On the other hand, wireless means that the device can transmit and/or receive something without cables (wires). For example, a walkie talkie is wireless but not Wi-Fi. Then there is a wireless charger. Not to forget our 433 MHz smoke detector that is wireless, and not Wi-Fi. The main reason is the much lower energy consumption. You definitely do not want to change the battery in your smoke detector on a weekly routine.
First of all, for this to work you need some kind of 433 MHz RF Bridge already setup and working with Domoticz. I Use SONOFF RF Bridge, flashed with Tasmota firmware. RF bridge is both transmitter and receiver on 433 MHz but also has Wi-Fi connectivity, so it talks with Domoticz over Wi-Fi. This Sonoff device is great, and yet under 10 $. After that, you obviously need a 433 MHz smoke detector. I`m using these ones. It is marked as C50W and it costs around 10$. A short piece of advice, there are many devices out there marked as 433 MHz. And manufacturers are not lying about it. The trick is that they use some proprietary or nonstandard protocols, which means they may or may not work with third-party devices. You will need to do some research before buying it.
This pretty little thing comes with a terrible, unusable manual. It also comes without the battery so prepare a quality one. Do not even try to test or use it with a used 9V battery. When the time comes to change the battery it will start beeping at 45 seconds interval and note: it will not give you an audible alarm or send any signal on RF. There are also four jumper places with two jumpers placed in the middle. Their intent is to change electrical resistance and the code it sends over the radio. If you ask me how to place those jumpers I would say that I do not know. Just leave them be for the start. There is a little hole for adjusting sensitivity to smoke, and that also has a great range. You can play with it to adjust it to your needs if you want.
First of all accept “virtual sensor” as a term, since most things you add to Domoticz are represented by VS. If it`s easier observe it as a virtual representation of physical sensor, or its digital twin. Since this kind of device has a normal state, where nothing happens, and an active state where the alarm is triggered, the default state is normal. This means that the state will change only if it detects smoke. So we kind of have a two-state thing, and it may remind us of a ….. switch? True! So let us start with a virtual s… .
Next chose a Switch as a sensor type, and name it as you wish.
After that find your switch under switches tab and click on edit.
The whole new world of switches opens up there. We are aiming for the smoke detector.
Let`s summarize what we did and what needs to be done. We created a virtual switch that serves as a representation of the real one. What is missing now? A link between them. We mentioned before that C50W sends some kind of code on 433 MHz when activated. What is needed is to intercept that code, and link it to changing state of a virtual switch.
Quick reminder of how RF bridge works. Whenever it detects 433 MHz signal or if you like it more, commands, it reports it to Domoticz via MQTT. It means that you can find that exact code in Domoticz log file, and it looks something like this.
So this is the code that my C50W will send if activated. Just to mention, you do not need to set fire to discover the code. The big round thing in the middle of the sensor is a test button. When pressed for a few seconds it will simulate triggered alarm and you will get your code transmitted 🙂 .
Now we go to Setup – More options and Events and create a new Blockly script.
I do not think that this needs much explanation. In short, if the RF bridge detects the value of “x” then set the state of a Smoke detector switch to On. X is a value that you read in your log file. And that is it, ready for testing.
Pressed the test button on C50W and voila…
Now the real power comes in. We go to notifications on switch widget and set some alerts.
I prefer these two types of alerts. Since this is a critical sensor, Telegram is the first choice as it is delivered instantaneously, and email….. email is just in case. Of course for these to work you must configure them in Domoticz settings, but it is not a big deal. Now if god forbid there is smoke in your house, Domoticz will message you.
If you find this article interesting maybe you should check on this one regarding building a sensors station for Domoticz. Thank you for reading, and if you have any questions, just post a comment.
P.S. I wanted to put the picture of a detector on the ceiling, but it kind of looks stupid. If angle is wide enough to get real impression that it is actually detector on the ceiling than it looks like a little spot, almost undetectable. If it is close enough to have a descent look at the detector than it looks same like on the table 🙂