Local controlled Neo Coolcam Wifi (motion, door/window) sensors with Tuya firmware in Home Assistant without soldering

Tags: #<Tag:0x00007f7806f69cf0> #<Tag:0x00007f7806f69bd8> #<Tag:0x00007f7806f69b10>

These Fibaro clones are quite cheap and (most of them) reliable products with both Z-Wave and Wifi flavors.

Whilst Z-Wave versions are in the 20 - 30 USD range, their Wifi counterparts go for less than half (that is on the Chinese sites).

For Wifi range of products the controls used are based on Tuya ecosystem. However, as it is almost the case for good ol’ cloud controlled devices, it is unlikely to meet the privacy and security taste of working class.

Here come alternative DIY projects such as Tasmota that can remove the evil cloud and bring local controls.

The downside?
As the Tuya device has been highly engineered for fast response and reasonable battery life, with an alternative firmware the trade off (at least in the early stages of development) is that both response time and battery life will be worse than using native Tuya.

How much worse?

  • There’s a 5-7 seconds delay for the Tasmota flashed unit until Home Assistant receives payload from offline state;
  • After initial flashing battery for door/window sensor dropped from 3.2 V to 3.1 V. Four weeks of (relatively) low usage have decreased the battery capacity to 3 V (probably works for some additional 3-4 months).

I. Flash alternative firmware (Tasmota); process is similar for both PIR and door/window sensors
Although flashing alternative firmware over FTDI (aka soldering involved) is possible, Tuya Convert (https://github.com/ct-Open-Source/tuya-convert) can flash the Coolcam products without any soldering (just need to follow the tutorial and keep pressing the button on the sensor to keep the device online during the flashing process).

Latest version of Tasmota (8.1) should work for flashing directly from Tuya Convert, but went with the default Tasmota (v. and then upgraded to 8.1 (first flashed minimal Tasmota firmware, then full firmware). This has probably wasted a significant amount of battery life.

II. Setup sensor
Setup of Tasmota is included at https://templates.blakadder.com/TYMC-1.html, same for both motion and door/window sensor.

II. Home Assistant setup
Setup for Home Assistant binary sensor in regard of the door/window sensor (for motion the payload would be 6604000100/6604000101; also publishes battery life) if going with the default options (change the name of the unit for additional sensors):

#Binary sensors
- platform: "mqtt"
  name: "open_door_sensor"
  state_topic: "tele/tasmota/RESULT"
  value_template: "{{value_json.TuyaReceived.CmndData}}"
  payload_on: '0104000100'
  payload_off: '0104000101'
  json_attributes_topic: "tele/tasmota/RESULT"
  json_attributes_template: "{{ value_json.TuyaReceived | tojson }}"
  force_update: true

Does it work (with Home Assistant, using local controls)? Yes
Would I recommend it? Hell, no! (neither with Tuya official firmware or with custom firmware)

(much) better options with stellar battery life, local controls and (reasonable) range:

  • 433 Mhz: cheapest, longest range
    P819 and P829 for motion sensors (there are different Chinese brands for each sensor type but seems that all of them have the same product range :smile: ); new Digoo (https://www.aliexpress.com/item/33050094957.html) for door/window sensor; although the 433 Mhz protocol is inherently insecure, it still a good option for this type of sensors (as long as the alarm is not armed/disarmed by 433 Mhz devices which can be copied very easy);

  • Zigbee: still in the budget, requires routing devices to reach farther areas
    Use Zigbee2MQTT - https://www.zigbee2mqtt.io/ (gone through the Xiaomi Gateway but got annoyed of its home calling abilities) mostly with Xiaomi sensors. The options for Zigbee2MQTT gateway have diversified from CC2530/CC2531 (budget boards) to CC26X2R1 and CC1352P-2 (quite expensive; but, with a CC26X2R1, it took less than 10 minutes to re-pair about 40 devices at approx. 5-8 meters away, all pairing worked flawlessly on the first try; it’s not even in the same ballpark with the CC2531 as it was sometimes throwing errors even at 15 cm from the Zigbee device; actually the issue with CC2531 wasn’t the range but rather the processing power).
    CC2530/CC2531 with coordinator and router firmware are still solid options; however, if it falls in the budget… go straight to number one!

  • Zwave: more expensive (at least where I live) than the other two options but they do have the most solid performance (no issue whatsoever in over 3 years)

1 Like

I’ve been watching these various wifi battery devices to see what would come of the tasmota FW for them. Interesting to see that the response is so slow. I imagine that this could be improved with static IP addresses, but you’re still at the mercy of the device connecting back to the wifi.