My OTGW stopped working a few weeks ago as well. I have tried removing and re-adding the OTGW hardware in Domoticz. I also switched from using it via serial (rpi /dev/ttyS0) to using it via TCP/IP with the otmonitor-ahf in daemon mode. This allows me to monitor what is going on.
I can now see Domoticz fire 4 serial commands shortly after one another:
Code: Select all
...
10:09:17.579677 T80190000 Read-Data Boiler water temperature: 0.00
10:09:17.633941 Command (via relay server, from 127.0.0.1:43940): SC=10:09/6
10:09:17.654134 PR: SE
10:09:17.656664 Command (via relay server, from 127.0.0.1:43940): PR=G
10:09:17.657762 Command (via relay server, from 127.0.0.1:43940): PR=I
10:09:17.658819 Command (via relay server, from 127.0.0.1:43940): PR=O
10:09:17.659742 Command (via relay server, from 127.0.0.1:43940): PS=1
10:09:17.672535 PR: G=00
10:09:17.682711 PR: I=00
10:09:17.715439 B40192319 Read-Ack Boiler water temperature: 35.10
...
This generates at least one error (PR: SE) and the response to PS=1 seems to be skipped all together.
If I manually send PS=1 I get this, the SC command works but still no response to PS=1:
Code: Select all
...
10:15:17.993516 Command (via relay server, from 127.0.0.1:43940): SC=10:15/6
10:15:18.019017 SC: 10:15/6
10:15:18.021416 Command (via relay server, from 127.0.0.1:43940): PR=G
10:15:18.022423 Command (via relay server, from 127.0.0.1:43940): PR=I
10:15:18.023306 Command (via relay server, from 127.0.0.1:43940): PR=O
10:15:18.025792 Command (via relay server, from 127.0.0.1:43940): PS=1
10:15:18.037310 PR: G=00
10:15:18.047549 PR: I=00
...
I noticed the first time I send a command after Domoticz has pushed its quartet of commands I get an error. This seems to be the case every interval. See my annotations using >>>> (x):
Code: Select all
0:15:01.205038 Command (via websocket): PS=1
10:15:01.217685 PS: 1 >>>> (1) Manual PS=1
10:15:01.390263 00000010/00000000,10.00,00000011/00000011,100.00,0/0,20.00,0.00,0.00,20.00,34.30,0.00,0.00,33.30,60/40,61/20,60.00,61.00,65535,42528,45504,28720,6656,21088,56016,832
10:15:17.993516 Command (via relay server, from 127.0.0.1:43940): SC=10:15/6
10:15:18.019017 SC: 10:15/6 >>>> (2) SC command - first one - succeeds
10:15:18.021416 Command (via relay server, from 127.0.0.1:43940): PR=G
10:15:18.022423 Command (via relay server, from 127.0.0.1:43940): PR=I
10:15:18.023306 Command (via relay server, from 127.0.0.1:43940): PR=O
10:15:18.025792 Command (via relay server, from 127.0.0.1:43940): PS=1
10:15:18.037310 PR: G=00
10:15:18.047549 PR: I=00
10:15:47.999630 Command (via relay server, from 127.0.0.1:43940): SC=10:15/6
10:15:48.019857 PR: SE >>>> (3) SC command - first one - failes
10:15:48.022457 Command (via relay server, from 127.0.0.1:43940): PR=G
10:15:48.023707 Command (via relay server, from 127.0.0.1:43940): PR=I
10:15:48.024607 Command (via relay server, from 127.0.0.1:43940): PR=O
10:15:48.025670 Command (via relay server, from 127.0.0.1:43940): PS=1
10:15:48.038358 PR: G=00
10:15:48.048739 PR: I=00
10:16:18.004395 Command (via relay server, from 127.0.0.1:43940): SC=10:16/6
10:16:18.024584 PR: SE >>>> (4) SC command - first one - failes
10:16:18.026828 Command (via relay server, from 127.0.0.1:43940): PR=G
10:16:18.027878 Command (via relay server, from 127.0.0.1:43940): PR=I
10:16:18.028929 Command (via relay server, from 127.0.0.1:43940): PR=O
10:16:18.029846 Command (via relay server, from 127.0.0.1:43940): PS=1
10:16:18.042660 PR: G=00
10:16:18.052879 PR: I=00
10:16:43.972699 Command (via websocket): PS=1
10:16:43.986527 PR: SE >>>> (5) Manually submits PS=1, first attempt fails
10:16:45.974271 Command (via websocket): PS=1
10:16:45.987166 PS: 1 >>>> (6) Manually submits PS=1, second attempt succeeds
10:16:46.159749 00000010/00000000,10.00,00000011/00000011,100.00,0/0,20.00,0.00,0.00,20.00,34.10,0.00,0.00,33.00,60/40,61/20,60.00,61.00,65535,42528,45504,28720,6656,21088,56016,832
10:16:48.015357 Command (via relay server, from 127.0.0.1:43940): SC=10:16/6
10:16:48.040782 SC: 10:16/6 >>>> (7) SC command - first one - succeeds
10:16:48.043230 Command (via relay server, from 127.0.0.1:43940): PR=G
10:16:48.044284 Command (via relay server, from 127.0.0.1:43940): PR=I
10:16:48.045204 Command (via relay server, from 127.0.0.1:43940): PR=O
10:16:48.046130 Command (via relay server, from 127.0.0.1:43940): PS=1
10:16:48.059164 PR: G=00
10:16:48.069485 PR: I=00
10:17:18.020029 Command (via relay server, from 127.0.0.1:43940): SC=10:17/6
10:17:18.040252 PR: SE >>>> (6) SC command - first one - failes
10:17:18.042905 Command (via relay server, from 127.0.0.1:43940): PR=G
10:17:18.044184 Command (via relay server, from 127.0.0.1:43940): PR=I
10:17:18.045199 Command (via relay server, from 127.0.0.1:43940): PR=O
10:17:18.046266 Command (via relay server, from 127.0.0.1:43940): PS=1
10:17:18.058943 PR: G=00
10:17:18.069089 PR: I=00
Annotation:
- My manually submitted PS=1 works fine
- The first command from Domoticz (SC) works fine
- The first command after a the previous Domoticz quartet failes
- Again...
- My first manually submitted PS=1 just after Domoticz's quartet failes
- My second command succeeds
- And again the first SC command succeeds
- And again the first SC command failes right after Domoticz's quartet
I haven't looked in this detail to the OTGW communication before (since it worked fine) but it seems the four commands from Domoticz generate a problem in either the otmonitor (as conduit) or in the OTGW hardware itself (I suspect the latter since the direct serial connection didn't work eiter). I could not find anything about command queueing on the otgw pages.
My next experiment would perhaps be to compile Domoticz and change the rate at which the commands are fired. But that would be a long route for me.