Coolcam wifi motion sensor PIR

I think it is only necessary finding the PIN connecting the PIR to the ESP. That one should do the trick with a wakeup signal to the whole thing.

So far no news from my side.
I tried all GPIOā€™s. GPIO1-15 for the motion sensor in INPUT mode with esphomelib. No luck so far.
But it is flashable and WIFI OTA is working if you do it before it goes back into deep sleep.
after booting and connecting deep sleep occurs after 60 seconds.
I reflashed the original firmware and now it is back to normal.
Normal behaviour seems to be that a movement is waking up the PIR from deep sleep and it is sending a continuous signal for round about 20 seconds. than it is back to deep sleep after 60 seconds.

anyone any ideas how to figure out the output pin?

Are you trying to trace the PIR to the ESP or the PIR to the E931.96B and then the E931.96B to the ESP?

Iā€™m trying to getr the connections to the esp right.
deep sleep mode semms a hardware implementation. if I put my ear next to the board I can hear some electric coil or inductor. after 60 seconds the board is in deep sleep again.
GPIO16 has to be the PIN the PIR is connected to. If the signal goes through other chips before doesnā€™t matter I think, because deep sleep reset is only working by triggering GPIO16 with this esp model.
after booting is completed the PIR seems to blink the two LEDā€™s, so both of them must be connected to the same GPIO. I couldnā€™t figure out which one yet and donā€™t now if itā€™s inverted or not.

So it is not possible reflash this devices?
Thanks

I found this sotfware that could be usefull

I was unable to get my variant of this same device working with tuya-convert. I theorize that my vendor Waserstein (https://www.amazon.com/gp/product/B07FXBB2HP) might have their own tuya ā€˜serversā€™ making tuya-convert in itā€™s current form unusable.

In any case, I flashed the board directly by connecting to the helpfully labeled vias. BrandonD (https://github.com/brandond/esphome-tuya_pir) created a custom component for esphome that seems to work well. Heā€™s also documented a lot of the specifics about sensors using this board in the README.

This work was the result of an issue born out of this specific esphome issue #306 created by Styx85 Thanks!

Does anyone have any tips with flashing this thing? I tried the pins and instructions from both @brandond and @Styx85 but keep getting:

INFO Running:  esptool.py --before default_reset --after hard_reset --chip esp8266 --port /dev/cu.usbserial-A9M9DV3R write_flash 0x0 .build/.pioenvs/ha_pir/firmware.bin
esptool.py v2.5.1
Serial port /dev/cu.usbserial-A9M9DV3R
Connecting........_____....._____....._____....._____....._____....._____....._____

A fatal error occurred: Failed to connect to ESP8266: Timed out waiting for packet header

The FTDI adapter Iā€™m using has flashed dozens of other ESPā€™s, so that canā€™t possibly be it.

Anyone run into problems flashing these?

I just followed @brandond instructions from here: https://github.com/brandond/esphome-tuya_pir and can confirm I was able to flash ESPHome on 2 of these devices. Thanks!

I have this sensor and it doesnā€™t seem to detect well. Am I doing something wrong? Mine is coccoon brand and I have to use the coccoon app which I canā€™t seem to get any notification that the sensor is detecting.
Any help would be greatly appreciated.

Where is the original firmware uploaded?

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?