uhppoted / uhppote-cli

Go CLI for the UHPPOTE UT0311 TCP/IP access controller boards
MIT License
8 stars 4 forks source link

Comunication error #9

Closed Uzzi closed 1 year ago

Uzzi commented 1 year ago

Hi when I've lunched ./uhppote-cli set-door-delay SERIAL 1 0--->ERROR: Timeout waiting for reply

Can you help me to fix it? Thank you regards

uhppoted commented 1 year ago

Can you run the command in debug mode and attach the output?

./uhppote-cli --debug set-door-delay SERIAL 1 0

(and also attach your uhppoted.conf file please)

Uzzi commented 1 year ago

uhppoted.conf: UT0311-L0x.125042559.Ced = yyyyyyyy UT0311-L0x.125042559.address = 10.162.34.210:60001 UT0311-L0x.125042559.door.1 = Ced

UT0311-L0x.125046859.Ufficio = xxxxxxxxx UT0311-L0x.125046859.address = 10.162.34.210:60002 UT0311-L0x.125042559.door.1 = Lenarduzzi

... using default configuration from /etc/uhppoted/uhppoted.conf ... sent 64 bytes to 10.162.34.210:60001

... request ... 00000000 17 82 00 00 7f ff 73 07 01 00 00 00 00 00 00 00 |......s.........| ... 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 |................| ...

ERROR: Timeout waiting for reply

uhppoted commented 1 year ago

Ok, there are two things:

  1. Unless it's something to do with your network routing tables, the 10.162.34.210:60001 address looks unusual - the UHPPOTE controllers almost always use port 60000.

  2. The command is setting a door delay of 0s - as far as I remember the controllers don't accept a zero delay. Try:

    ./uhppote-cli --debug set-door-delay SERIAL 1 5
Uzzi commented 1 year ago

xxxxx and xxxx controllers have a pingable ip from uhppote-cli vm

Uzzi commented 1 year ago

now I've fixed uhppoted.conf: UT0311-L0x.125042559.Ced = yyyyyyy UT0311-L0x.125042559.address = 10.162.34.6:60000 UT0311-L0x.125042559.door.1 = Ced

UT0311-L0x.125046859.Ufficio = xxxxxxxx UT0311-L0x.125046859.address = 10.162.34.5:60000 UT0311-L0x.125042559.door.1 = Lenarduzzi

Now I've to set listener for xxxxx and yyyy: ./uhppote-cli set-listener xxxxxx 10.162.34.5:60000 ./uhppote-cli set-listener yyyyy 10.162.34.6:60000

Is it right?

uhppoted commented 1 year ago

Getting there :-) .. the controller addresses look correct:

These are the addresses the controllers listen on and almost always use port 60000 so the above looks correct.

The listener address is the address the controllers send events to - so it's the IPv4 address of the host machine i.e. the IPv4 address of the VM you're running uhppote-cli on (and the default port is 60001). So if your host machine IP address is 10.162.34.100 you'd want to set it as follows:

./uhppote-cli set-listener xxxxxx 10.162.34.100:60001
./uhppote-cli set-listener yyyyy   10.162.34.100:60001
uhppoted commented 1 year ago

Quick test:

./uhppote-cli --debug get-devices

That should give you a list of all controllers on your LAN

Uzzi commented 1 year ago

Thank you now works fine. Can you help me about open door notfy by magnetic sensor?

uhppoted commented 1 year ago

Umm - I think you mean get door open/close events? if your magnetic sensor is wired to the door inputs on the controller then you need to enabled record special events, e.g.

./uhppote-cli record-special-events 125042559 true

The default controller configuration has door open/close events disabled. You can then see the events using the listen command:

./uhppote-cli listen
Uzzi commented 1 year ago

Thank you so much!

Uzzi commented 1 year ago

Now I'have tro study how telgram notify when someone manually open door without rfid id

uhppoted commented 1 year ago

Happy to help :-). One of these days I'm going to have draw this out - it seems to confuse a lot of people.

re. telegram. Good luck! I'd be surprised if there wasn't a NodeRED or NodeJS component for the Telegram API that you could use to get started.

uhppoted commented 1 year ago

Closing this (looks like it's resolved) - feel free to reopen it if necessary.