Closed frankvandenhurk closed 7 years ago
Hi Frank,
The commands you show are normally only sent on startup. If you see them once a minute, it means the app restarts every minute. That should not happen. If no messages are received from the OTG once a minute, the assumption is that the wireless connection is broken. Hence the app will close the connection and start over. I guess this is happening in your case.
To see what is exactly going on, we need to enable debug logging.
On line 20 of /node_modules/otg-api/index.js
change false to true (debugOn = true
) and run the app via the CLI (athom project --run
).
Can you provide that debug output?
Hi,
Tnx for your quick response. The output I got is:
root@odroid:~/com.tclcode.otgw-master# athom project --run
Hey developer, we're hiring! View our open position at
https://go.athom.com/jobs
1/4 - Archiving...
2/4 - Uploading to Homey @ 192.168.160.69:80...
3/4 - Running com.tclcode.otgw
, press CTRL+C to abort...
4/4 - Debugging...
Starting OTG app 14:17:27.696 Starting search on 192.168.160.4:7100 14:17:27.838 Connected to 192.168.160.4:7100 14:17:27.845 Sent command PR=A 14:17:27.851 Search attempt 1 14:17:27.902 Setting read: FirmwareVersion = 4.2.5 14:17:27.921 Found OpenTherm Gateway firmware version 4.2.5 (major=4) 14:17:27.930 Sent command PS=0 14:17:27.951 Sent command PR=M 14:17:27.971 Setting read: GatewayMode = 1 14:17:27.979 Gateway mode is now true 14:17:28.037 Sent command PR=L 14:17:28.089 Setting read: LEDFunctions = FXOMPC 14:17:28.104 Sent command PR=T 14:17:28.134 Setting read: IgnoreTransitions = 1 14:17:28.150 Sent command PR=T 14:17:28.183 Setting read: ROFInBothBytes = 1 14:17:28.200 Sent command PR=V 14:17:28.227 Setting read: ReferenceVoltage = 3 14:17:28.242 Sent command PR=S 14:17:28.267 Setting read: SetbackTemperature = 16.00 14:17:28.282 Sent command PR=W 14:17:28.304 Setting read: DHWSetting = A 14:17:28.318 Sent command PR=G 14:17:28.342 Setting read: GPIOConfiguration = 00 14:17:28.367 Sent command PR=P 14:17:28.389 Setting read: PowerLevel = L 14:17:28.417 Sent command CR=70 14:18:28.442 Connecion timed out. 14:18:28.455 Connecion closed (found = true) 14:18:28.463 Starting search on 192.168.160.4:7100 14:18:28.606 Connected to 192.168.160.4:7100 14:18:28.611 Sent command PR=A 14:18:28.615 Search attempt 1 14:18:28.785 Setting read: FirmwareVersion = 4.2.5 14:18:28.807 Found OpenTherm Gateway firmware version 4.2.5 (major=4) 14:18:28.819 Sent command PS=0 14:18:28.967 Sent command PR=M 14:18:29.008 Setting read: GatewayMode = 1 14:18:29.021 Gateway mode is now true 14:18:29.030 Sent command PR=L 14:18:29.056 Setting read: LEDFunctions = FXOMPC 14:18:29.104 Sent command PR=T 14:18:29.114 Setting read: IgnoreTransitions = 1 14:18:29.128 Sent command PR=T 14:18:29.180 Setting read: ROFInBothBytes = 1 14:18:29.203 Sent command PR=V 14:18:29.226 Setting read: ReferenceVoltage = 3 14:18:29.251 Sent command PR=S 14:18:29.286 Setting read: SetbackTemperature = 16.00 14:18:29.300 Sent command PR=W 14:18:29.319 Setting read: DHWSetting = A 14:18:29.334 Sent command PR=G 14:18:29.361 Setting read: GPIOConfiguration = 00 14:18:29.388 Sent command PR=P 14:18:29.404 Setting read: PowerLevel = L 14:18:29.418 Sent command CR=70
Op 14-8-2017 om 12:45 schreef nlrb:
Hi Frank,
The commands you show are normally only sent on startup. If you see them once a minute, it means the app restarts every minute. That should not happen. If no messages are received from the OTG once a minute, the assumption is that the wireless connection is broken. Hence the app will close the connection and start over. I guess this is happening in your case.
To see what is exactly going on, we need to enable debug logging. On line 20 of |/node_modules/otg-api/index.js| change false to true (|debugOn = true|) and run the app via the CLI (|athom project --run|).
Can you provide that debug output?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nlrb/com.tclcode.otgw/issues/11#issuecomment-322159327, or mute the thread https://github.com/notifications/unsubscribe-auth/ALT0ew3psPVVm9fgSyo2UOfYX_gh6XFRks5sYCVlgaJpZM4O2A99.
Ok, that confirms my suspicion. No data received. Your OTG does not respond to the message 'CR=70'. This is related to ventilation. You can try to set the option to fake ventilation support to 'true'. Maybe that helps.
14:17:28.417 Sent command CR=70
14:18:28.442 Connecion timed out.
14:18:28.455 Connecion closed (found = true)
Op 14-8-2017 om 15:24 schreef nlrb:
Ok, that confirms my suspicion. No data received. Your OTG does not respond to the message 'CR=70'. This is related to ventilation. You can try to set the option to fake ventilation support to 'true'. Maybe that helps.
|14:17:28.417 Sent command CR=70 14:18:28.442 Connecion timed out. 14:18:28.455 Connecion closed (found = true) |
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nlrb/com.tclcode.otgw/issues/11#issuecomment-322188869, or mute the thread https://github.com/notifications/unsubscribe-auth/ALT0e8wkI2-QchHd29O69tuoeuMibKRzks5sYEqJgaJpZM4O2A99.
Unfortunately:
root@odroid:~/com.tclcode.otgw-master# athom project --run
Hey developer, we're hiring! View our open position at
https://go.athom.com/jobs
1/4 - Archiving...
2/4 - Uploading to Homey @ 192.168.160.69:80...
3/4 - Running com.tclcode.otgw
, press CTRL+C to abort...
4/4 - Debugging...
Starting OTG app 18:29:22.859 Starting search on 192.168.160.4:7100 18:29:22.902 ventilation= 18:29:22.907 1 18:29:23.008 Connected to 192.168.160.4:7100 18:29:23.018 Sent command PR=A 18:29:23.026 Search attempt 1 18:29:24.032 Search attempt 2 18:29:24.053 Setting read: FirmwareVersion = 4.2.5 18:29:24.074 Found OpenTherm Gateway firmware version 4.2.5 (major=4) 18:29:24.085 Sent command PS=0 18:29:24.103 Sent command SR=70:0,0 18:29:24.130 Sent command PR=M 18:29:24.150 Setting read: GatewayMode = 1 18:29:24.156 Gateway mode is now true 18:29:24.168 Sent command PR=L 18:29:24.183 Setting read: LEDFunctions = FXOMPC 18:29:24.198 Sent command PR=T 18:29:24.222 Setting read: IgnoreTransitions = 1 18:29:24.239 Sent command PR=T 18:29:24.261 Setting read: ROFInBothBytes = 1 18:29:24.276 Sent command PR=V 18:29:24.298 Setting read: ReferenceVoltage = 3 18:29:24.309 Sent command PR=S 18:29:24.379 Setting read: SetbackTemperature = 16.00 18:29:24.391 Sent command PR=W 18:29:24.410 Setting read: DHWSetting = A 18:29:24.422 Sent command PR=G 18:29:24.443 Setting read: GPIOConfiguration = 00 18:29:24.462 Sent command PR=P 18:29:24.493 Setting read: PowerLevel = L 18:29:24.505 Sent command PR=A 18:29:24.548 Setting read: FirmwareVersion = 4.2.5 18:29:24.555 Found OpenTherm Gateway firmware version 4.2.5 (major=4) 18:29:24.597 Sent command PS=0 18:29:24.606 Sent command PR=M 18:29:24.630 Setting read: GatewayMode = 1 18:29:24.643 Gateway mode is now true 18:29:24.650 Sent command PR=L 18:29:24.674 Setting read: LEDFunctions = FXOMPC 18:29:24.685 Sent command PR=T 18:29:24.718 Setting read: IgnoreTransitions = 1 18:29:24.931 Sent command PR=T 18:29:24.936 Setting read: ROFInBothBytes = 1 18:29:24.951 Sent command PR=V 18:29:24.970 Setting read: ReferenceVoltage = 3 18:29:24.982 Sent command PR=S 18:29:25.001 Setting read: SetbackTemperature = 16.00 18:29:25.012 Sent command PR=W 18:29:25.033 Setting read: DHWSetting = A 18:29:25.050 Sent command PR=G 18:29:25.068 Setting read: GPIOConfiguration = 00 18:29:25.079 Sent command PR=P 18:29:25.107 Setting read: PowerLevel = L 18:29:25.117 Sent command SR=70:0,0 18:30:25.151 Connecion timed out. 18:30:25.164 Connecion closed (found = true) 18:30:25.173 Starting search on 192.168.160.4:7100 18:30:25.192 Connected to 192.168.160.4:7100 18:30:25.199 Sent command PR=A 18:30:25.206 Search attempt 1 18:30:25.243 Setting read: FirmwareVersion = 4.2.5 18:30:25.256 Found OpenTherm Gateway firmware version 4.2.5 (major=4) 18:30:25.265 Sent command PS=0 18:30:25.282 Sent command PR=M 18:30:25.302 Setting read: GatewayMode = 1 18:30:25.316 Gateway mode is now true 18:30:25.323 Sent command PR=L 18:30:25.375 Setting read: LEDFunctions = FXOMPC 18:30:25.387 Sent command PR=T 18:30:25.404 Setting read: IgnoreTransitions = 1 18:30:25.414 Sent command PR=T 18:30:25.431 Setting read: ROFInBothBytes = 1 18:30:25.451 Sent command PR=V 18:30:25.470 Setting read: ReferenceVoltage = 3 18:30:25.481 Sent command PR=S 18:30:25.506 Setting read: SetbackTemperature = 16.00 18:30:25.520 Sent command PR=W 18:30:25.539 Setting read: DHWSetting = A 18:30:25.563 Sent command PR=G 18:30:25.570 Setting read: GPIOConfiguration = 00 18:30:25.582 Sent command PR=P 18:30:25.610 Setting read: PowerLevel = L 18:30:25.656 Sent command SR=70:0,0
Anything else I cab do?
You need to figure out why communication stops/the connection breaks. Are there other clients connected to the OTG? Do you use a wifi interface? If so, which one?
Op 14-8-2017 om 18:35 schreef nlrb:
You need to figure out why communication stops/the connection breaks. Are there other clients connected to the OTG? Do you use a wifi interface? If so, which one?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nlrb/com.tclcode.otgw/issues/11#issuecomment-322240449, or mute the thread https://github.com/notifications/unsubscribe-auth/ALT0e02uG9fRLszjuX_q7GDfO6NUZ7NCks5sYHdSgaJpZM4O2A99.
Just to be shure: should I use otmonitor (like I do now) or should I just connect the /dev/ttyUSB0 device to a TCP/IP-port?
It works! I removed otmonitor and replaced it with ser2net! Tnx for the quick response!
I have another question, but i'll open a new threat for that.
Good to hear it works!
Hi Ramón Baas,
First of all, thank you for taking the time to publish this app, it looks awesome and was one of the reasons for me to order the Thom Homey.
I added my OTGW (connected to Remea iSense) to my Homey 1.3.1 and the app connects:
Tapwater verwarmen: Volgt thermostaat Gateway firmware versie: 4.2.5 GPIO configuratie A: Geen GPIO configuratie B: Geen Bedrijfsmodus: Gateway Negeer transitites mid-bit: Negeer Functie van LED A: Vlam is aan Functie van LED B: Verzenden van een OpenTherm boodschap aan de thermostaat of ketel Functie van LED C: Doeltemperatuur wordt overschreven Functie van LED D: Ketel heeft onderhoud nodig Functie van LED E: Thermostaat vraagt meer stroom Functie van LED F: Comfort mode (tapwater vraag) is aan Huidig stroomniveau: Laag Remote Override Functie in beide bytes: Ja, in hoge en lage byte Referentie voltage: 1.250V Setback temperatuur: 16.00
It has been running more than a day now, but still no values in the "Selecteer welke OpenTherm waardes bijgehouden worden in Inzichten." section.
In the logging at the OTGW I can see that it sends commands about every minute:
07:12:06.957989 Command (via relay server, from 192.168.160.69:54178): PR=A 07:12:07.032409 Command (via relay server, from 192.168.160.69:54178): PS=0 07:12:07.050027 Command (via relay server, from 192.168.160.69:54178): PR=M 07:12:07.077167 Command (via relay server, from 192.168.160.69:54178): PR=L 07:12:07.106036 Command (via relay server, from 192.168.160.69:54178): PR=T 07:12:07.130971 Command (via relay server, from 192.168.160.69:54178): PR=T 07:12:07.155339 Command (via relay server, from 192.168.160.69:54178): PR=V 07:12:07.183343 Command (via relay server, from 192.168.160.69:54178): PR=S 07:12:07.211569 Command (via relay server, from 192.168.160.69:54178): PR=W 07:12:07.238953 Command (via relay server, from 192.168.160.69:54178): PR=G 07:12:07.264413 Command (via relay server, from 192.168.160.69:54178): PR=P 07:12:07.296888 Command (via relay server, from 192.168.160.69:54178): CR=70
And that there is al lot of other traffic on the OT-devices:
07:13:08.264709 T00000000 Read-Data Status: 00000000 00000000 07:13:08.414756 BC0000000 Read-Ack Status: 00000000 00000000 07:13:09.272674 T10010600 Write-Data Control setpoint: 6.00 07:13:09.412707 BD0010600 Write-Ack Control setpoint: 6.00 07:13:10.279163 T00110000 Read-Data Relative modulation level: 0.00 07:13:10.410460 BC0110000 Read-Ack Relative modulation level: 0.00 07:13:11.285843 T80190000 Read-Data Boiler water temperature: 0.00 07:13:11.409536 B40191680 Read-Ack Boiler water temperature: 22.50 07:13:12.293812 T90100D00 Write-Data Room setpoint: 13.00 07:13:12.407744 B50100D00 Write-Ack Room setpoint: 13.00 07:13:13.299755 T00000000 Read-Data Status: 00000000 00000000 07:13:13.407109 BC0000000 Read-Ack Status: 00000000 00000000 07:13:14.307404 T10010600 Write-Data Control setpoint: 6.00 07:13:14.403696 BD0010600 Write-Ack Control setpoint: 6.00 07:13:15.312433 T00110000 Read-Data Relative modulation level: 0.00 07:13:15.404495 BC0110000 Read-Ack Relative modulation level: 0.00 07:13:16.319863 T80190000 Read-Data Boiler water temperature: 0.00 07:13:16.413090 B40191680 Read-Ack Boiler water temperature: 22.50 07:13:17.327029 T10181521 Write-Data Room temperature: 21.13 07:13:17.419536 BD0181521 Write-Ack Room temperature: 21.13 07:13:18.333543 T00000000 Read-Data Status: 00000000 00000000 07:13:18.497346 BC0000000 Read-Ack Status: 00000000 00000000 07:13:19.340717 T10010600 Write-Data Control setpoint: 6.00 07:13:19.496994 BD0010600 Write-Ack Control setpoint: 6.00 07:13:20.347356 T00110000 Read-Data Relative modulation level: 0.00 07:13:20.495028 BC0110000 Read-Ack Relative modulation level: 0.00 07:13:21.354636 T80190000 Read-Data Boiler water temperature: 0.00 07:13:21.493559 B40191680 Read-Ack Boiler water temperature: 22.50 07:13:22.363044 T00300000 Read-Data DHW setpoint boundaries: 0 0 07:13:22.491956 B60300000 Data-Inv DHW setpoint boundaries: 0 0 07:13:23.368577 T00000000 Read-Data Status: 00000000 00000000 07:13:23.491110 BC0000000 Read-Ack Status: 00000000 00000000 07:13:24.375727 T10010600 Write-Data Control setpoint: 6.00 07:13:24.490906 BD0010600 Write-Ack Control setpoint: 6.00
What can I do to make this work?