Closed AriZuu closed 5 years ago
lgtm. I'm still hoping to have some time to move this into core at some point.
@AriZuu can I ask how you flashed your door sensor? I'm unable to get mine to talk to my USB/TTL adapter. Hooking it up to a scope shows that the CH340-based adapter I'm using isn't pulling the serial line low enough; I never had any problems with my old CP2102 board but I accidentally fried it a week or two ago.
@brandond I just soldered thin wires to sensor (RX, TX, GPIO0 and GND) and used FTDI -based adapter to flash. I flashed four sensors. Three of those were flashed without problems, one was more difficult but eventually after several power ups it surrendered also. So it might be that sometimes the adapter has difficulties in pulling down the line. I tried my CP210 adapter also with the problematic one, but it didn't work any better.
I connected the RX & TX lines after sensor was powered up in flash mode.
@brandond The cable I was using to flash was this one:
Thanks - that's helpful! I've got another on order but was able to get it working temporarily with a PNP transistor on the TX line from the TTL converter pulling things down to ground.
Offtopic, but there seems to be now also a water leak sensor and a smoke sensor. I'm a bit curious to check those out. Maybe there is similar hardware inside.
I might check those out. Don't have much need for them really, but if they're cheap I do enjoy tinkering.
This PR adds handling for door/window sensor messages. It also changes event type comparison to use two bytes instead of just first byte, to be able to separate door sensor first boot message from motion event.
Tested with Neo Coolcam door/window server (board V5).