Coolcam wifi motion sensor PIR

Same problem here. What may be wrong?

I was able to flash this thing but had to use another flasher. My regular FTDI programmer simply didn’t work. I know for a fact it’s not broken since I continue to use it for other ESP8266 devices.

I bought this one and it flashed on the first try: https://www.aliexpress.com/item/32717057832.html?spm=a2g0s.9042311.0.0.27424c4dlqjS5g

I see. I 'll try with another flasher.
Is it working well with HA? Please tell us your experiences with this.

It does indeed work well with HA but I’m about to give up on it. Mine just eats up batteries like crazy.

I can see it going to sleep on the logs, but still the batteries only last a month.

Thank you.
I managed to flash it with another older flasher that could not flash newer devices! I had already forgotten that i had it in my desk. :grinning:
Now, i am stuck again as i do not know how i can integrate it in my HA setup. I can see that it connects and disconnects in my internal MQTT broker, but how can i create a sensor for this in HA? Is there a step by step guide to explain?
Any help is welcomed.

anyone managed to make it work on tasmota?
mine goes to sleep but never wake up by movement only when i remove the battery.

I can confirm flashing works (no soldering required) with tuya-convert for both motion and door sensors (received in late October 2019 and the installation of custom firmware still worked).

I had to press the pairing button several times during the flashing process to keep it from sleep.

After flashing i can not figure out how i can integrate it into HA.
Can anybody give a clue, please?

Many thanks to Petrica for helping me setup the device. It seems that there still are people here who share their time and skills to help beginners advance.
So, my choice of firmware is Tasmota now as it works flawlessly, considering the battery draining which is huge.
Is there any way to power this with any 12V or 5V source?

I also flashed this device, how can I integrate it into the home assistant now?

Hi, I recently got same PIR and flashed with my own firmware that uses ESP-NOW instead of regular WiFi. Original manual said that battery lasts “2500 times trigger”, I think this means ESP8266 is woken to send data 5000 times (once when movement is detected and again after there is no moment for a while).

My PIR is running for 12 days already with 2800 events received - this makes 1400 movements detected. Battery state is still reported as “high”. As ESP-NOW is way faster than regular wifi and should consume less battery power, then I expect it should last longer than original 2500 alerts.

Can anybody share their experience, how long (how many alerts/events transmitted) battery lasts with whatever custom firmware?

Hello again.
From the first time i read these posts, i was sure this sensor could be hardware modified to be improved. So i started researching and finally i modified that.
First, i used 3.3V DC power, buck converted from 12V via a step down regulator. Directly to the ESP8266 pins, bypassing the co-processor.
Then i connected another PIR sensor ideal for 3.3V. AM312 is the type. I also connected its power to 3.3V and the signal to GPIO2 on the board.
I also connected a blue led on TX and GND in order to replace LED functionality.
Now the PIR sensor responds rapidly and sends MQTT messages immediately as it is always on consuming about 80mA on 3.3V. I use Tasmota as the firmware choice and i attach also the template which is based on Sonoff Basic
I hope i helped a little.

@petslane

How have you been getting on with the PIR flashed with ESP-NOW?

How long have you gotten out of a battery? As I wouldn’t mind taking these sensors out of the junk draw if they work longer with ESP-NOW.

Is this your GitHub for the Gateway? https://github.com/petslane/esp-now-gateway

If so are you able to share the code that actually goes on the PIR Sensor as I haven’t used ESP-NOW before.

Sorry @wills106 for late response, for some reason I did not get notifications about this post nor post in GitHub.

I uploaded my firmware using serial pins, later I implemented OTA. In normal mode PIR used ESP-NOW and resetting PIR switched it into AP/STA mode that connected to my WiFi and this allowed OTA.

Yes, repository you pointed at is my ESP-NOW gateway that I used to receive ESP-NOW messages.

I did two tests with PIR on ESP-NOW. I put PIR somewhere with lot of movement as I wanted to see how long battery will last if there is lot of events to be transmitted. First test ran from 21.03 until 14.06 with total 24428 events (12214 events for movement detected and 12214 movement stopped). On average 284 events per day. For second test I replaced battery with Varta one and ran from 3.07 until 9.09. After that my network had some changes and after that I did not receive any data from ESP-NOW gateway. But based on battery data it lasted about 1 week longer until first “medium” battery level event.

As of firmware, I can share it. I will try to do it this week. It’s not complete code, it has hardcoded wifi and ESP-NOW mac address.

1 Like

Here is example code I used for testing - https://github.com/petslane/neo-coolcam-pir-esp-now

1 Like

Thanks, I will give it ago in the next couple of days and I will let you know how I get on!

image
resume
I’ve tried a lot from this tutorial. I succeeded with this connection on the picture and a CP2102 Usb

Can you share how you managed to integrate with HA?
I have also successfully flashed with following @brandond 's instructions.
If I look at the ESPHome logs, it says the sensor wakes up and connects to MQTT broker and then goes back to sleep.
However I’m not sure how I can integrate this to HA.
What is the broadcasted topic name?
I can check the topic {node_name}/debug and read the logs, but never figured out where the motion is broadcasted.

Thank you all for your research on this device. I bought a couple with Ener-J firmware and I thought I might be able to integrate into my HA. However, no such integration exists so far. I had independently looked at this board and soldered pins to the Ground, UART Rx/Tx but had not yet tried to see what it could do. I note that the complete device is low energy and has a shutdown (sleep) controller external to the ESP8266EX as explained by @simfun above. Armed with this information, I will attempt to flash Tasmota firmware.
Tony

Having looked at the datasheet for the Silabs Sleepybee, I see that it is a fully fledged Cygnal err Silabs 8051 core processor. With the Sleepybee crossbar port assignment, it will be very difficult to establish what does what and how without the source code - I havn’t the time and patience to reverse engineer the code even though I do have Silabs C2 kit for debugging in the attic. With battery operation requiring relatively frequent replacement I will give up on this device and cook my own with ESP devices with a microwave sensor, flashed with Tasmota and a 3D printed case.

Incidentally, I have come to the same conclusion with the Philips Wiz (battery operated) PIR sensor which has an ESP8266 but also has a co-processor (in this case a ST device) which shuts down even quicker than the Ener-J devices I bought.

A shame but I really do not want to use an external service monitoring the inside of my home. I do not want a plethora of apps on my phone all recording and sending my info back to base overseas. So into the scrap bin for these devices. :frowning: