Wiring a smoke detector

Hi guys,

Spend a lot of time the last year in developing contributions for Node-RED, but the wife gently reminded me it is time to start wiring instead of developing. And for the first time in our marriage I have to admit she is right. So here we go ...

I bought some time ago a series of smoke detectors (Abus RM1000). I selected in particular this device type, because it has an internal relay so it 'should' be easy to wire it to a GPIO pin.

So it has four pins: power / ground / two contact pins:


As soon as smoke is detected, the internal relay (inside the smoke detector closes). One of the problems is that the wires are quite long between the raspberry and the smoke detector (up to 40 meters). And the (existing) cables are not shielded...

What is the best way to do this? Just use the internal pull-up, or apply an external signal, or ...

For the wife-acceptancy, it would be nice if I could do it witout extra resistors, ... (in contrast to this older discussion). And other the other hand I don't want to pick up distortions from the environment. Don't know if that is possible. Most lovely would be some din-rail component in between!

Thanks !


Bart, I would put an ESP8266 board near the smoke alarm and broadcast over MQTT Direct connections over that distance are going to be a nightmare!

I would fit a 1k pullup to 3.3V on the GPIO pin and give it a go. If you get occasional spikes coming through then you can debounce in node red (so it has to stay down for 0.1 seconds for example before you accept it as real).
There is no harm using a 1k resistor as opposed to a more usual 4.7k as there is no current until the relay closes and even then it is only drawing 3.3mA which is negligible. The smaller the resistor the larger the noise injection has to be to overcome the pullup.
Why does a resistor at the pin cause disapproval from interested parties?

Garry, when I look at the price indeed I cut put such a separate board at every sensor location. Think that is what you mean (instead of wiring N sensors to a single board)? That might be a solid solution, but then again I come back to my 3 major problems: time, time and time. Is there some kind of ESP8266 software/firmware/... available that I can communicate and control it via MQTT from my Node-RED flow. That would nice, because then I could keep my main focus on Node-RED. Really don't have time to learn programming such a board. But looks interesting !

Colin, seems that wife firmware version 0.0 cannot handle external resistors. But you are right. I can at least try it. Will give it a try next week ...

If you are just reading the state of the relay in the smoke detector a relatively small bit of Arduino code will suffice. Sonoff Tasmota software is also available for the Wemos D1 mini, which will give you a multitude of controll possibilities over MQTT. I have some rough and ready (working) code that I am using on an ESP8266 connected to a motion sensor which would be easy to modify for your scenario.

If your soldering skills are moderate then you could tack it on the back of the board, so on the pins of the header where they project the other side of the board.

@ghayne is right though, if you have power at the detector then one of the ESP8266 boards running the Tasmotta software would save a lot of wiring.

Ok, I want to be abIe to have quick results but on the other hand I want to have more complex capabilities afterwards.

  1. I understand that I should use then Sonoff Tasmota software. Is that correct?
  2. If so, should I buy some Sonis device, a Wemos D1 mini, or a ESP8266 to run that software?
  3. Should I start with node-red-contrib-sonoff-tasmota or something else?
  1. I would recommend the Sonoff Tasmota route as it is well documented and, for use in a critical application like yours, can send regular status messages over MQTT. This is an important aspect, you need to check regularly that everything is working!

2 @Paul-Reed shared a link to an AlliExpress supplier which I am also using. They are cheap and ship reliably too:

3 I am just using an MQTT in node, I was not aware of node-red-contrib-sonoff-tasmota node.


Hi Bart,
I agree with Garry - using a WeMos D1 Mini or similar makes getting signals from remote devices/sensors very easy. Here's a link to an article I wrote about connecting an IR detector to my SMART Home. I suppose I should publish it on 'Share your projects'. The IR detector has a solid state relay that I used to switch a logic level on an input pin of the WeMos.
Page-5 explains the relay connections. I can send a sketch if you need it.


Hope you find this useful.


Hi Dave,
The man with the great tutorials... Thanks for sharing !
Are those Wemos always accessed via WIFI? I'm a bit old-fashioned, that's why the subject of this discussion is 'wiring a smoke detector'. :wink: If possible I would like to use an ethernet wire. But I assume I have to add an extra board in that case, which makes it again a bit less attractive to the eye.

Thanks for the comments.

The WeMos devices are WiFi only - I suppose you could add an ethernet 'hat' to them to make the link more robust especially in a safety critical situation like yours.

Most of my projects are really demos or challenges for my IoT students.

Or ESPeasy.

1 Like

You might be able to find an Arduino with built-in Ethernet. Power Over Ethernet would also make it easier to wire if you have a suitable switch (or use a POE injector) since you'd only need to install an ethernet cable. Though in this case, I'd then use a Pi Zero probably since they are cheap (ÂŁ5?). Max. length for cat 5/6 ethernet is 100m so more than enough for your use. Likely to be cheaper to get a roll, some connectors and a tool for attaching the plugs though.

I think that 50m is always going to be too long for conventional connections without some help. USB, for example, is about 5m max. I think.

Unfortunately the Pi Zero has no Ethernet connector!

Something like that would be better, since I could then stick to Node-RED all over the place. But a PI zero with an ethernat hat would be a bit to expensive to place at every sensor...

Oops, my bad. You are right of course, only WiFi.

Well, I wouldn't probably use Node-RED just to read some GPIO ports and push to MQTT, that's a bit overkill possibly.

But yes, adding an ethernet connector would indeed drive up the cost.

If you really are unhappy about the possible reliability of WiFi, the following seems to have sensible information. Sadly I'm not a wiring/electronics expert.


Also here:


I had to look at mine Julian! I wasn't sure either.

You are 100% right, since that is all it should do. So I will skip the distributed embedded Node-RED setup.

And I will also skip the setup with long wires to a central Node-RED, due to a number of disadvantages:

  • environment disturbance (noise, glitches, ...)
  • lots of wires
  • lots of gpio pins required at the central raspberry, so need of raspberry stack or extension boards (I2C....)
  • no backup hardware in case of failure, since such a wire can only be connected to a single gpio pin

So I will try the setup with Wemos D1 mini or ESP8266, combined with Sonoff Tasmota software or ESPeasy. Then I can get rid of the interference, and I can work with a backup raspberry (which starts processing mqtt messages as the other raspberry fails).

Which of both boards and which of both softwares should I use? I.e. which of both is best integrated in Node-RED?

1 Like

I've used Tasmota only on the SONOFF's. I've been seeing some good things people are doing with the latest version of ESPeasy but I don't use it myself at the moment. I've generally found that my sensor platforms are pretty specific so I've tended to use custom code. Really, it depends on how comfortable you are with any approach.

The D1 mini is an ESP8266 of course. I use them because of their good power interface, I had a lot of power problems with earlier versions of ESP8266 boards. With the D1 mini, I can simply shove a USB connector in and expect a reliable and consistent output. Just watch out for cheap USB cables - I generally try to over-spec my USB power plugs so that I have plenty of capacity. Wemos also have a pre-soldered battery shield - I have a couple but not tried them yet.

As you are getting into the realms of home security, reliability & resilience is going to be important. You've already identified the need for a backup Pi. I'd also say that you should make sure you have backup power to the Pi (mine are on a couple PC UPS's along with my switch, WiFi AP, NAS and router). I assume you will (eventually) have more than 1 smoke sensor too.

Of course, you will want to ensure that all of this is kept off the Internet as well. If your WiFi access point supports it, you might consider putting all of this on its own SSID with it locked down to the set of known devices. You might also want to consider a separate VLAN for the wired part of the network. That all helps to isolate the more sensitive parts of your communications.

Urm, I realise that may all seem a bit overkill - so just to say, you don't have to do everything at once :smile:

1 Like