Local First, Cloud Assisted ☁ MultiSensor

623 words4 min read

Download audio
Flash MultiSensor with Tasmota
Flash MultiSensor with Tasmota

Guide for flashing a NEO Coolcam Siren with Temperature and Humidity Multisensor with Tasmota for local network first setup.

Components

Component Purpose Buy
NEO Coolcam Siren Multisensor The device being flashed —
Serial-to-USB Adapter Connects the ESP8266 to your PC for flashing Amazon

Neo Coolcam Siren Multisensor Wiring for Tasmota Flashing (ESP8266)

This is a condensed guide on flashing with tasmota. A full guide/getting started can be found in the official documentation.

In order to flash this device, soldering onto the PCB will be required. There is a plate in the back that needs to be rotated to expose the battery holder. Once that is open, go ahead and remove the three screws. The tricky part is soldering onto the all connections. A Serial-to-USB Adapter is required. All connections must be made. GPIO0 must be connected to ground (GND) in order to on boot in flash mode.

Device - Neo Coolcam Flasher
GPIO0 GND
GND GND
TX RX
RX TX
3.3v 3.3v

Soldering points

Finalized soldering

Wired to flasher

Flashing Tasmota on the ESP8266 with esptool

Install esptool. PyPi was quick for this: https://pypi.org/project/esptool/

pip install esptool

Time to flash. Change the port then run this command in the terminal. Doesn’t matter if your Mac, Linux, or Windows when using PyPi.

esptool --port COM3 write_flash -fs 1MB -fm dout 0x0 tasmota-sensors.bin

Flashing Neo Coolcam Multisensor

Alternative, you can use a GUI version Tasmotizer

Connect to the access point to configure the default WiFi to connect to your local wifi.

Configuration

Apply Template in “Configure Other” found here {"NAME":"Neo Siren 3in1","GPIO":[255,107,255,108,255,255,0,0,255,255,255,255,255],"FLAG":0,"BASE":54}

Tasmota Console Commands

Command Reason
Backlog SetOption65 1; SetOption66 1; Module 54 Fast power cycle and register as a Tuya module
TuyaMCU 11,104 Map alarm siren/led to toggle switch
TuyaMCU 71,105 Map indoor temperature
TuyaMCU 73,106 Map indoor humidity
TempRes 1 Instead of 291 it will be 29.1 for temperature
TuyaSend2 113,0 Disable temperature alarm. Do with a rule instead
TuyaSend2 114,0 Disable humidity alarm. Do with a rule instead

All of this assumes there is a MQTT configured. The temperature and humidity data wont show unless this is configured. To undo this, use SetOption66 0. Optional, ensure dpId states were set by running TuyaSend0. Now that everything is hooked up, the data will be polled and reported every so often. The caveat is not always temperature and humidity. This must be accounted for later.

01:42:21.463 MQT: tele/tasmota_111111/SENSOR = {"Time":"2021-04-08T01:42:21","TuyaSNS":{"Temperature":28.5,"Humidity":4.3},"TempUnit":"C"}

Tasmota Web UI with Tuya temperature, humidity, and siren led power toggle

I’ve also considered using rules to catch the Tuya event then publish the MQTT in that rule.

NodeRed and other smart logic

Setup a MQTT node with tele/tasmota_REPLACEWITHID/SENSOR in NodeRed. Replace the MQTT ID from the Tasmota information screen (Information > MQTT Full Topic).

Add a function node that can handle temperature and/or humidity being undefined. Optional to add information such as measurement for Graphana.

msg.measurement = 'siren-tv';
try {
    var payload = JSON.parse(msg.payload);
    if(payload.TuyaSNS){
        msg.payload = {};
        if(payload.TuyaSNS.Temperature){
            msg.payload.Temperature = payload.TuyaSNS.Temperature;
        }
        if(payload.TuyaSNS.Humidity){
            msg.payload.Humidity = payload.TuyaSNS.Humidity * 10;
        }
    }
} catch(ex) {
    node.error("unable to get temp and humidity", msg);
    return;
}
return msg;

To turn on the siren remotely. Send either ON or OFF to the MQTT topic cmnd/tasmota_REPLACEWITHID/POWER A return MQTT message returns with stat/tasmota_REPLACEWITHID/POWER

Resources

FAQ

How do you flash Tasmota on a Neo Coolcam siren multisensor?

Open the case, remove three screws, and solder a Serial-to-USB adapter to the ESP8266 pads: GPIO0 to GND to boot in flash mode, GND to GND, TX to RX, RX to TX, and 3.3V to 3.3V. Then run esptool --port COM3 write_flash -fs 1MB -fm dout 0x0 tasmota-sensors.bin after pip install esptool. The GUI alternative is Tasmotizer; afterwards connect to the access point to set up your local WiFi.

What Tasmota commands configure the Tuya Neo Coolcam multisensor?

First apply the Neo Siren 3in1 template (BASE 54) in Configure Other. Then: Backlog SetOption65 1; SetOption66 1; Module 54 registers it as a Tuya module; TuyaMCU 11,104 maps the alarm siren/LED to a toggle; TuyaMCU 71,105 maps temperature; TuyaMCU 73,106 maps humidity; TempRes 1 shows 29.1 instead of 291. MQTT must be configured or temperature and humidity data won't show. Undo with SetOption66 0.

How do you turn a Tasmota siren on and off over MQTT?

Send ON or OFF to the topic cmnd/tasmota_REPLACEWITHID/POWER; the state returns on stat/tasmota_REPLACEWITHID/POWER. Temperature and humidity are published to tele/tasmota_REPLACEWITHID/SENSOR — subscribe there in Node-RED with a function node that tolerates undefined values, since updates do not always include both readings. Replace the ID with the MQTT Full Topic from Tasmota's Information screen.