uhppoted/uhppote-core

Door open or closed event not generated.

Closed this issue · 7 comments

Hi,

Thanks so much for the effort you have put into this! I was blown away when I found this project.

One issue I have noticed while testing the uhppote-cli is that opening or closing a door (fitted with a magnetic reed switch) does not seem to generate an event within the cli, however it does with the OEM windows program.

On the board the terminals for the switch is "S1, Grnd", "S2, Grnd" etc. Simply shorting the terminals with a wire generates the event when "monitoring" a door in the OEM software.

Am I missing something in the uhppote-cli, or is it not a supported feature?

P.S I made a github account for this comment, so hope it's in the right spot.

Thanks again!

Hi,

Am very happy to hear it's of some use to you!

I've done some investigation and it looks like the door events may have to be specifically enabled using the set record special events function (0x8E), which I hadn't got round to implementing as yet.

I'll add support for it to the CLI for now at least and add it to the TODO list for the other modules - give me a couple of days?

Hi,

I've pushed a provisional implementation to theuhppote-cli master branch. It seems to work as expected (hoped ? :-)):

./bin/uhppote-cli --debug record-special-events 423187757 true

... request
... 00000000 17 8e 00 00 2d 55 39 19 01 00 00 00 00 00 00 00 |....-U9.........|
... 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
... 00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
... 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
...
... sent 64 bytes to 192.168.1.255:60000
... received 64 bytes from 192.168.1.101:60000
... response
... 00000000 17 8e 00 00 2d 55 39 19 01 00 00 00 00 00 00 00 |....-U9.........|
... 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
... 00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
... 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
...
423187757 true

./bin/uhppote-cli listen
Listening...
423187757 202 2 false 4 1 9 2020-12-15 13:51:37 24 true true true false false false false false 0 2020-12-15 13:51:37 0 0 00 00
423187757 203 2 false 4 1 8 2020-12-15 13:51:37 23 true true true true false false false false 0 2020-12-15 13:51:37 0 0 00 00

There's still some tidying up to be done in the CLI and it needs to be added to the REST, MQTT and NodeRED sub-projects and the documentation needs to be updated, so am going to keep this issue open and hold off on creating a release until that is done if that's ok?

You should be able to build the development version from uhppote-cli - if not, let me know and I'll figure something out.

I tested the new CLI and it worked perfectly. Legend!

Awesome! Thanks for letting me know :-)

Whew! Finally closing this out - support for record special events has been implemented across the board and released as v0.6.7. Thanks for bringing it up!