Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commands only working once - have to close telnet after every command #127

Open
ingel81 opened this issue Feb 28, 2023 · 0 comments
Open

Comments

@ingel81
Copy link

ingel81 commented Feb 28, 2023

Hi,

I recently installed vcontrold and found a strange behaviour when playing with telnet: Every first comand i send is working without any problems and is delivering the expected result. Every second command fails. If i close telnet and start over it is working again for a single time.

vclient (which, it think, is closing the connection after every execution by design) works flawlessly. Even multiple commands at once and JSON Output, etc.

Any ideas or suggestions?

Background/ problem is that i plan to use a iobroker adapter (iobroker.viessmann) to query vcontrold with, which i think is keeping the socket open and is also showing same behaviour as the telnet client. >> Only works for a single time. After that it is failing.

Telnet Output

pi@openv-pi:~ $ telnet localhost 3002

Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
vctrld>
vctrld>
vctrld>
vctrld>
vctrld>getOutsideTemp
2.800000 Grad Celsius
vctrld>
vctrld>
vctrld>
vctrld>
vctrld>
vctrld>getOutsideTemp
ERR: <RECV: read timeout
>FRAMER: read failure 1
Error in send, terminating
Error executing getOutsideTemp
vctrld>getOutsideTemp
ERR: >FRAMER: Error 0x05 != 0x06 (P300_INIT_OK)
Error in send, terminating
Error executing getOutsideTemp
vctrld>getOutsideTemp
ERR: >FRAMER: Error 0x05 != 0x06 (P300_INIT_OK)
Error in send, terminating
Error executing getOutsideTemp
vctrld>quit
good bye!

Connection closed by foreign host.

pi@openv-pi:~ $ telnet localhost 3002

Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
vctrld>getOutsideTemp
2.800000 Grad Celsius
vctrld>

vcontrold verbose output:

pi@openv-pi:~ $ /usr/sbin/vcontrold -n -x /etc/vcontrold/vcontrold.xml -l /var/log/vcontrold.log -v --debug
option -v

[2698] Tue Feb 28 18:02:23 2023 : started vcontrold version 0.98.12-4-g70ef62b
[2698] Tue Feb 28 18:02:23 2023 : 1 XInclude performed
========================
......
========================
2698] Tue Feb 28 18:02:23 2023 : TCP socket 0.0.0.0:3002 opened
[2698] Tue Feb 28 18:02:23 2023 : Not started as root, username/groupname settings ignored
[2698] Tue Feb 28 18:02:26 2023 : Client connected 127.0.0.1:48208 (FD:6)
========================
1st command below !!!!!!
========================
[2698] Tue Feb 28 18:02:31 2023 : Command:
[2698] Tue Feb 28 18:02:31 2023 : Command:
[2698] Tue Feb 28 18:02:31 2023 : Command:
[2698] Tue Feb 28 18:02:31 2023 : Command:
[2698] Tue Feb 28 18:02:36 2023 : Command: getOutsideTemp
[2698] Tue Feb 28 18:02:36 2023 : Process 2698 tries to aquire lock
[2698] Tue Feb 28 18:02:36 2023 : Process 2698 got lock
[2698] Tue Feb 28 18:02:36 2023 : >FRAMER: open device /dev/ttyUSB0 ProtocolID 41
[2698] Tue Feb 28 18:02:36 2023 : Configuring serial interface /dev/ttyUSB0
[2698] Tue Feb 28 18:02:36 2023 : >SENT: 04
[2698] Tue Feb 28 18:02:36 2023 : <RECV: len=1 05 (130.0 ms)
[2698] Tue Feb 28 18:02:36 2023 : <RECV: received 05
[2698] Tue Feb 28 18:02:36 2023 : >FRAMER: framer_reset_actaddr framer_current_addr = FRAMER_LINK_STATUS(05) (was FFFF)
[2698] Tue Feb 28 18:02:36 2023 : >FRAMER: closed
[2698] Tue Feb 28 18:02:36 2023 : >SENT: 16
[2698] Tue Feb 28 18:02:36 2023 : >SENT: 00
[2698] Tue Feb 28 18:02:36 2023 : >SENT: 00
[2698] Tue Feb 28 18:02:36 2023 : <RECV: len=1 06 (90.0 ms)
[2698] Tue Feb 28 18:02:36 2023 : <RECV: received 06
[2698] Tue Feb 28 18:02:36 2023 : >FRAMER: framer_reset_actaddr framer_current_addr = FRAMER_NO_ADDR (was FE05)
[2698] Tue Feb 28 18:02:36 2023 : >FRAMER: opened
[2698] Tue Feb 28 18:02:36 2023 : >SENT: 41
[2698] Tue Feb 28 18:02:36 2023 : >SENT: 05
[2698] Tue Feb 28 18:02:36 2023 : >SENT: 00
[2698] Tue Feb 28 18:02:36 2023 : >SENT: 01
[2698] Tue Feb 28 18:02:36 2023 : >SENT: 08
[2698] Tue Feb 28 18:02:36 2023 : >SENT: 0E
[2698] Tue Feb 28 18:02:36 2023 : >SENT: 02
[2698] Tue Feb 28 18:02:36 2023 : >SENT: 1E
[2698] Tue Feb 28 18:02:36 2023 : <RECV: len=1 06 (60.0 ms)
[2698] Tue Feb 28 18:02:36 2023 : <RECV: received 06
[2698] Tue Feb 28 18:02:36 2023 : >FRAMER: framer_set_actaddr framer_current_addr = 0E08 (was FFFF)
[2698] Tue Feb 28 18:02:36 2023 : >FRAMER: Command send
[2698] Tue Feb 28 18:02:36 2023 : >FRAMER: no preset result
[2698] Tue Feb 28 18:02:36 2023 : <RECV: len=1 41 (10.0 ms)
[2698] Tue Feb 28 18:02:36 2023 : <RECV: len=1 07 (0.0 ms)
[2698] Tue Feb 28 18:02:36 2023 : <RECV: received 41 07
[2698] Tue Feb 28 18:02:36 2023 : <RECV: len=1 01 (0.0 ms)
[2698] Tue Feb 28 18:02:36 2023 : <RECV: len=1 01 (0.0 ms)
[2698] Tue Feb 28 18:02:36 2023 : <RECV: len=1 08 (0.0 ms)
[2698] Tue Feb 28 18:02:36 2023 : <RECV: len=1 0E (10.0 ms)
[2698] Tue Feb 28 18:02:36 2023 : <RECV: len=1 02 (0.0 ms)
[2698] Tue Feb 28 18:02:36 2023 : <RECV: len=1 1C (0.0 ms)
[2698] Tue Feb 28 18:02:36 2023 : <RECV: len=1 00 (10.0 ms)
[2698] Tue Feb 28 18:02:36 2023 : <RECV: len=1 3D (0.0 ms)
[2698] Tue Feb 28 18:02:36 2023 : <RECV: received 01 01 08 0E 02 1C 00 3D
[2698] Tue Feb 28 18:02:36 2023 : >FRAMER: framer_reset_actaddr framer_current_addr = FRAMER_NO_ADDR (was 0E08)
[2698] Tue Feb 28 18:02:36 2023 : Typ: short (in float: 28.000000)
[2698] Tue Feb 28 18:02:36 2023 : (FLOAT) Exp: V/10 [B0:1C B1:00 B2:00 B3:00 B4:00 B5:00 B6:00 B7:00 B8:00 B9:00 BA:00 BB:00 BC:00 BD:00 BE:00 BF:00 ]
[2698] Tue Feb 28 18:02:36 2023 : 2.800000 Grad Celsius
========================
2nd command below !!!!!!
========================
[2698] Tue Feb 28 18:02:43 2023 : Command:
[2698] Tue Feb 28 18:02:43 2023 : Command:
[2698] Tue Feb 28 18:02:44 2023 : Command:
[2698] Tue Feb 28 18:02:44 2023 : Command:
[2698] Tue Feb 28 18:02:44 2023 : Command:
[2698] Tue Feb 28 18:02:50 2023 : Command: getOutsideTemp
[2698] Tue Feb 28 18:02:50 2023 : >SENT: 41
[2698] Tue Feb 28 18:02:50 2023 : >SENT: 05
[2698] Tue Feb 28 18:02:50 2023 : >SENT: 00
[2698] Tue Feb 28 18:02:50 2023 : >SENT: 01
[2698] Tue Feb 28 18:02:50 2023 : >SENT: 08
[2698] Tue Feb 28 18:02:50 2023 : >SENT: 0E
[2698] Tue Feb 28 18:02:50 2023 : >SENT: 02
[2698] Tue Feb 28 18:02:50 2023 : >SENT: 1E
[2698] Tue Feb 28 18:02:55 2023 : <RECV: read timeout
[2698] Tue Feb 28 18:02:55 2023 : <RECV: received
[2698] Tue Feb 28 18:02:55 2023 : >FRAMER: read failure 1
[2698] Tue Feb 28 18:02:55 2023 : Error in send, terminating
[2698] Tue Feb 28 18:02:55 2023 : Error executing getOutsideTemp
========================
3rd command below !!!!!!
========================
[2698] Tue Feb 28 18:03:11 2023 : Command: getOutsideTemp
[2698] Tue Feb 28 18:03:11 2023 : >SENT: 41
[2698] Tue Feb 28 18:03:11 2023 : >SENT: 05
[2698] Tue Feb 28 18:03:11 2023 : >SENT: 00
[2698] Tue Feb 28 18:03:11 2023 : >SENT: 01
[2698] Tue Feb 28 18:03:11 2023 : >SENT: 08
[2698] Tue Feb 28 18:03:11 2023 : >SENT: 0E
[2698] Tue Feb 28 18:03:11 2023 : >SENT: 02
[2698] Tue Feb 28 18:03:11 2023 : >SENT: 1E
[2698] Tue Feb 28 18:03:12 2023 : <RECV: len=1 05 (1160.0 ms)
[2698] Tue Feb 28 18:03:12 2023 : <RECV: received 05
[2698] Tue Feb 28 18:03:12 2023 : >FRAMER: Error 0x05 != 0x06 (P300_INIT_OK)
[2698] Tue Feb 28 18:03:12 2023 : Error in send, terminating
[2698] Tue Feb 28 18:03:12 2023 : Error executing getOutsideTemp
[2698] Tue Feb 28 18:03:21 2023 : Command: getOutsideTemp
[2698] Tue Feb 28 18:03:21 2023 : >SENT: 41
[2698] Tue Feb 28 18:03:21 2023 : >SENT: 05
[2698] Tue Feb 28 18:03:21 2023 : >SENT: 00
[2698] Tue Feb 28 18:03:21 2023 : >SENT: 01
[2698] Tue Feb 28 18:03:21 2023 : >SENT: 08
[2698] Tue Feb 28 18:03:21 2023 : >SENT: 0E
[2698] Tue Feb 28 18:03:21 2023 : >SENT: 02
[2698] Tue Feb 28 18:03:21 2023 : >SENT: 1E
[2698] Tue Feb 28 18:03:22 2023 : <RECV: len=1 05 (1160.0 ms)
[2698] Tue Feb 28 18:03:22 2023 : <RECV: received 05
[2698] Tue Feb 28 18:03:22 2023 : >FRAMER: Error 0x05 != 0x06 (P300_INIT_OK)
[2698] Tue Feb 28 18:03:22 2023 : Error in send, terminating
[2698] Tue Feb 28 18:03:22 2023 : Error executing getOutsideTemp
@ingel81 ingel81 changed the title Comands only working once - have to close telnet after every command Commands only working once - have to close telnet after every command Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant