esphome-tuya_pir icon indicating copy to clipboard operation
esphome-tuya_pir copied to clipboard

Additional device support

Open beardypig opened this issue 4 years ago • 5 comments

I have it running on a slightly different device, a LSC Smart Door Sensor, but the protocol appears to be the same. However, the reed switch state change is inverted and the event_type is 0x0101. I could submit a PR if you are interested in supporting the extra device.

I knew a few people are interested in the LSC Door Sensors because you can get them in the Dutch budget store Action for less than €10. You have done 99.9% of the work to support these devices too :)

beardypig avatar Jan 23 '20 09:01 beardypig

@beardypig : Hi, i flashed the same sensor. I am missing the door open and close mqtt messages. might that be because of the different event type you mention? If so, which line do i change in the sb1_uart.h file? enum SB1EventType : SB1_EVENT_TYPE_DOOR = 0x0104, SB1_EVENT_TYPE_MOTION = 0x6501, SB1_EVENT_TYPE_DOOR_RESET = 0x6504, SB1_EVENT_TYPE_MOTION_RESET = 0x6604

nicovankampen avatar Feb 10 '20 21:02 nicovankampen

obviously one of the two door lines...... ;-) or both?

nicovankampen avatar Feb 10 '20 21:02 nicovankampen

@nicovankampen my IDE messed up all the formatting on the file so I need to clean it up before I can PR the changes, but this gist has the complete file: https://gist.github.com/beardypig/38f9f2d6533ffd274b3b2aad0aa523a8

In the end it's only a couple of small changes.

beardypig avatar Feb 15 '20 17:02 beardypig

@beardypig : thanks ! Got i all working now. At first it didn't work but then i found that ESPhome makes copies of SB1_uart in 3 different folders! (very confusing). Replaced all 3 off them. Only thing left now is finding out how to make the binary_sensor always available showing one of two states always.

nicovankampen avatar Feb 16 '20 12:02 nicovankampen

The example door esphome config works pretty well. The important bit being that you use MQTT with empty birth, will and shutdown messages.

beardypig avatar Feb 17 '20 13:02 beardypig