Coolcam wifi motion sensor PIR

Is this an interesting device?
check: https://www.aliexpress.com/item/Coolcam-Wifi-Motion-Sensor-Alarm-Detector-PIR-Motion-Dectector-For-Smart-Home-Automation-and-App-Notification/32858092472.html
How to integrate in Home Assistant?

Looks like a Fibaro motion sensor knockoff. It doesn’t say whether it has an API or not so if you buy one you’ll probably have to RE it.

I’ve got 6 of them but in z-wave version, to control motion detection at my house. They’re all working fine with HA although they’re a bit tricky (first time) to get included on the z-wave net.

RE? what does it mean?

Reverse engineer

1 Like

Received them today. Only work with the tuya app. But found up and they use port 6668. Also use esp chip. Any change new firmware is flashable? Or ideas how to use them?


@caramel any luck with these?

I just got a similar in the other day and just realized its not going to work as-is, thus i’m in this thread looking for answers.

So far, this is the only thing i’ve found

I am also going to see if I can just use my firewall to NAT mqtt traffic going out to Tuya and send it to the HA mqtt…

1 Like

So i took this thing apart. Looks like nothing more but a regular Arduino board. I’ll try to flash it this week and see how far I get.

1 Like

@pruchai how far did you get? :smiley:

Was about to start working on it couple of days, but then saw and squirrel and got completely distracted. haha

I did receive the FTDI programmer the other day, so i just need to figure out the GPIO pin situation on that thing. Really don’t see the need for anything other than 4 pins to program this thing

keep me posted

Hit a snag… FTDI adpter i received turned out to be a complete junk. it was literally missing solder points and had damaged wires. (I bought one that looked like a cut-off USB cord with a plug on one end and wires on the other). A new one is on its way and should be here this Wednesday.

Deep sleep is probably enabled since battery can last longer than expected I presume.
Any updates on this? From the first image it seems rx, tx and gnd to be the bottom 3 pins and 3v3 being the top second pin (right to left).

Can’t flash

Well I have made a bit more progress on the WiFi PIR Sensor.

I have managed to flash the Chip but I had to remove the SPI flash chip and program it in my programmer though. I can get Tasmota web interface up long enough to get it to connect to my WiFi. But it seems to shut it’s self down / go into low power mode? I have to hold down the button for about 10s or so for it to come alive again. I need to look to see if I can issue a command in the console to get it to stay alive.

I haven’t fully traced the circuit yet though. But there is a PIR interface chip on board it’s a E931.96B
According to the datasheet yo can program it and then listen on a pin which gives an interrupt signal when motion is detected. There is also a 3rd chip on the board (bottom of picture) which has the markings SB10F8G. I don’t know if that’s referring to a EFM8SB10F8G-QFN20?

I did download the original firmware if anyone wants to take a look at it and figure out how this device works?

Has anybody managed to get this device flashed? I got 2 units waiting to be used :slight_smile:

I simply connected the marked PIN’s to my USB to TTL converter. Bring it to flash mode with connecting GPIO0 to GND while plugging in. And remember to crossover RXD and TXD.

But I have the same problem as wills106, It is going to deep sleep after approximately 40 seconds and not waking up again. Side note, continuous pinging isn’t keeping it alive.

thats my esphomelib yaml so far:

 esphomeyaml:
   name: pir2
   platform: ESP8266
   board: esp01_1m
   board_flash_mode: dout
 #  esphomelib_version: dev
   arduino_version: latest
 
 wifi:
   ssid: '!ssid'
   password: '!wifi_pwd'
## power_save mode has no effect on deep_sleep so far
#   power_save_mode: light
 
mqtt:
   broker: '!broker_ip
   username: '!mqtt_user'
   password: '!mqtt_pwd'
 
 # Enable logging
 logger:
   level: VERY_VERBOSE
 ota:
   password: '!some_pwd'
## not found out any pins yet
 binary_sensor:
#  - platform: gpio
#    pin: 
#       number: GPIO14
#     name: "esp_xxx_pir"
#     device_class: motion
   ## https://esphomelib.com/esphomeyaml/components/binary_sensor/status.html
   - platform: status
     name: "esp_xxx_pir_system_status"
     id: "esp_xxx_pir_system_status"
 
 sensor:
   ## https://esphomelib.com/esphomeyaml/components/sensor/uptime.html
   - platform: uptime
     name: "esp_xxx_pir_system_uptime"
     id: esp_xxx_pir_system_uptime
 
   ## https://esphomelib.com/esphomeyaml/components/sensor/wifi_signal.html
   - platform: wifi_signal
     name: "esp_xxx_pir_system_wifi_signal"
     id: esp_xxx_pir_system_wifi_signal
     update_interval: 15s

I’m interested too to understand if it is possibile flash the PIR device with new firmware :smiley:

Someone who know a bit about programming needs to figure out what that EFM8 Sleepy Bee is doing as I think that’s what’s putting it to sleep.

The other option is to change the mqtt address in the stock ROM. But I don’t know how to work out if there is some kind of hash check or some other security in there as I am not a programmer.