Wiring a smoke detector

Since the interface with node-red is MQTT it doesn't make any difference which you choose.
I prefer the Tasmotta s/w as I think it is rather more flexible, though I think that ESPeasy might have a easier learning curve.

Bart,

EspEasy is far easier to use to start with - so i would go with that. Once you are comfortable then you could always reflash with Tasmota later. If you are only going to do a single input i would go for a sonoff basic - its all in one with power supply etc, has an easy to access single gpio

Craig

Sorry did not relaise you had 12v to it rather than 240v.

The sonoff SV is your friend then

Craig

Do you guys know if there is also something reliable with ethernet instead of wifi?

A bit expensive, as are their ESP8266 boards, which this will fit, this one does Power Over Ethernet (When I see POE I always think of Edgar Allen Poe).

I found this too:
Add Ethernet to a Pi Zero

1 Like

You can also use a usb to Ethernet adaptor.

Be careful if you bring wires out of a Sonoff Basic. The internal power supply is isolated from the mains, but the spacing distances between the mains and the internals are, I believe, not sufficient to meet European regulations. It is fine for something like your application where, presumable, there are going to be no exposed wires, but I would not be happy to what others do which is to bring wires out and take them to door contacts, temperature sensors and so on.

They are plenty as long as you don't try to use one anywhere near the max. rated wattage. They also don't pass through an earth wire so it is recommended to wire that through. However, since the smoke detector is 12v, you will need a power supply that can deliver 12v - presumably from mains and that can also deliver 5v for USB unless you use the separate V-in on the ESP8266. V-in can take between 4.75 and 10V as input. But there are plenty of instructions on the web for doing simple, regulated power supplies. If the smoke detector can use <12v, you might find an old, spare, laptop power supply that could deliver - say - 9v that might be used for both.

A lot is going to depend on how close you have wiring available and how much space you have.

Surely Wife v1.0 will need a project box anyway? Not for her of course, for the Pi and the wiring :smile:

I've just given ESPeasy Mega (their future version) a go on the sensor that I'm currently building. It is great for sensors as it is really easy to configure (via a simple web interface) and supports various different interfaces. You can even configure a direct InfluxDB interface which might be interesting.

Anyway, here is a D1 Mini with 2 sensors onboard, a DHT11 and an SI7021. This is output to MQTT.

image

MQTT messages (via mqtt-spy):
image

Took all of 20min to set up.

2 Likes

That looks good!

Assuming you are talking about the spacing then the reason the spacing should be greater is for unusual events on the mains. There can be spikes of 2kV or more on the mains from motor switches arcing, and so on. The spike would not kill you because there is not enough energy, but if you are touching something that has not got sufficient spacing from mains and a spike large enough to jump the gap occurs then once it is broken down it becomes temporarily low impedance and then the mains can follow the track and hit you. If you compare a Basic with a Sonoff TH10 you will see the reason the TH10 is much larger than the Basic is mostly the extra spacing and particularly the wide slots in the board to keep the mains away from the isolated circuitry. The TH10 needs it because it has a socket you can connect external sensors to. However this is all a bit moot for this thread as @BartButenaers hasn't got mains there anyway so not much chance of electrocution. :slight_smile:

1 Like

+1 for ESP8266 SOC proposals.
The module is cheap (about $2.5) and scalable for long distances and massive deployment.
For single unit, you could use NodeMCU board (about $5).
If size matters then this is your choice: Itead PSF-B85 14x14mm, ESP8255 1MB flash, with antenna, $2.1 https://www.itead.cc/psf-b85.html

If OS is preferred (overkill) The Raspi Zero W is the answer for $10.

As per software: either EspEasy, Tasmota or Espurna fit your needs.

Not forgetting an ESP32 if you want to split the difference between an ESP8266 and a Pi Zero W :slight_smile:

All good points re the Sonoff - but as per my 2nd post if he is happy with WIFI - then the SOnoff SV is the best option - power it from the same 12v that he is using for the Smoke detector and feed the output of the relay on the Smoke detector into one of the free inputs.

All supported easily in ESP Easy or tasmota.

Craig

All he wants to do is detect a relay closure (switch). I would just use a NodeMCU and Tasmota for this project since the NodeMCU will take a power supply of 5-12 Volts. Just put the relay contacts on a GPIO pin and ground then configure Tasmota to detect the switch state. When the switch (relay) changes state, Tasmota will publish a state topic that Node Red can detect.

This is actually a good first project. There's plenty of help available here
and once you get this working, you will be finding projects all over the house.

Hey Steve, have also been looking at the NodeMCU yesterday but I don't see a reliable and cheap solution to connect that one with a wire to an ethernet cable. After looking hours and hours last night, I have now the impression that you guys are being spoiled with cheap WIFI boards :wink:. But I haven't found a cheap ethernet board yet...

P.S. If anybody ever needs to be running Node-RED on a 'rather' cheap device, you can use - beside the Raspberry PI zero (which has only wifi) - the Orange PI zero which has both WIFI and on-board ethernet. But that is still too expensive for my solution, when I want to place such a device near every sensor in my home/garden...

Julian, indeed it seems that the ESP32 (as successor of the ESP-8266) has lots of extra stuff and also an Ethernet MAC. So it can be connected to ethernet like in this project, but that will cost me too much time... I really need something that can be used out of the box. Otherwise I cannot spoil Node-RED users meanwhile with new contributions :face_with_raised_eyebrow: And when my wife wants it to be wired 'soon', then she means 'soon'. :joy:

1 Like

Must admit I thought the built in relay was intended to be used to link alarms together so if one goes off they all go off, so they should be able to handle long lengths of suitable wire. I would wire them all together as alarms first, then just tap off one that was placed most suitably.