ebaauw / homebridge-otgw

Homebridge plugin for OpenTherm Gateway
Apache License 2.0
9 stars 0 forks source link

Plugin does not seem to initialize #3

Closed mrblond18 closed 4 years ago

mrblond18 commented 4 years ago

I installed the pluging (homebridge-otgw v0.0.33) and configured it to connect to my OTGW. It does seem to be able to connect to the gateway, but then stops...

Relevant part of logging (starts with a restart of the homebridge): [2/22/2020, 5:36:42 PM] Got SIGTERM, shutting down Homebridge... [2/22/2020, 5:36:42 PM] [OTGW] connection to OpenTherm Monitor closed[2/22/2020, 5:36:48 PM] Loaded plugin: homebridge-otgw [2/22/2020, 5:36:48 PM] Registering platform 'homebridge-otgw.OTGW' [2/22/2020, 5:36:48 PM] [OTGW] Initializing OTGW platform... [2/22/2020, 5:36:48 PM] [OTGW] homebridge-otgw v0.0.33, node 12.16.1, homebridge v0.4.50, homebridge-lib v4.5.2 [2/22/2020, 5:36:49 PM] [OTGW] connecting to OpenTherm Monitor... [2/22/2020, 5:36:49 PM] [OTGW] connected to OpenTherm Monitor at ws://192.168.1.94:8081/message.ws [2/22/2020, 5:36:49 PM] [OTGW] OpenTherm Gateway 4.2.5 [2/22/2020, 5:36:49 PM] [OTGW] Setting up - please be patient...

No accesoires are created and no more messages appear (at least not within 1 hour).

ebaauw commented 4 years ago

Indeed, homebridge-otgw did retrieve the version of the OpenTherm Gateway through the OpenTherm Monitor. Can you check that the Monitor is actually logging any messages? If not, can you send a PS=0 free format command in the miscellaneous configuration? If that doesn’t start the flow, try power cycling the Gateway.

Run homebridge -D to make homebridge-otgw log the communication with the Monitor.

Does the Monitor connect to the Gateway over the network (using a NodeMCU) or over a serial USB cable?

mrblond18 commented 4 years ago

I am already running a monitoring script in parallel which sends a PS=1 every minute, parses the data and sends it to domoticz. So that seems to be the reason the homebridge-otgw does not get any data. So I manually issued a PS=0 and then indeed data indeed starts flowing.

Next problem, the message format does not seem to match the expected format: [2/23/2020, 8:16:23 AM] [OTGW] warning: ignore unknown message - CH enable: enabled (1) [2/23/2020, 8:16:23 AM] [OTGW] warning: ignore unknown message - DHW enable: enabled (1) [2/23/2020, 8:16:23 AM] [OTGW] warning: ignore unknown message - Cooling enable: disabled (0) [2/23/2020, 8:16:23 AM] [OTGW] warning: ignore unknown message - OTC active: not active (0) [2/23/2020, 8:16:23 AM] [OTGW] warning: ignore unknown message - CH2 enable: disabled (0) [2/23/2020, 8:16:23 AM] [OTGW] warning: ignore unknown message - Summer/winter mode: winter (0) [2/23/2020, 8:16:23 AM] [OTGW] warning: ignore unknown message - DHW blocking: unblocked (0) [2/23/2020, 8:16:23 AM] [OTGW] warning: ignore unknown message - Fault indication: no fault (0) [2/23/2020, 8:16:23 AM] [OTGW] warning: ignore unknown message - CH mode: active (1) [2/23/2020, 8:16:23 AM] [OTGW] warning: ignore unknown message - DHW mode: not active (0) [2/23/2020, 8:16:23 AM] [OTGW] warning: ignore unknown message - Flame status: flame on (1) [2/23/2020, 8:16:23 AM] [OTGW] warning: ignore unknown message - Cooling status: not active (0) [2/23/2020, 8:16:23 AM] [OTGW] warning: ignore unknown message - CH2 mode: not active (0) [2/23/2020, 8:16:23 AM] [OTGW] warning: ignore unknown message - Diagnostic indication: no diagnostics (0) [2/23/2020, 8:16:23 AM] [OTGW] warning: ignore unknown message - Electricity production: not active (0) [2/23/2020, 8:16:23 AM] [OTGW] warning: ignore unknown message - CH enable: enabled (1) [2/23/2020, 8:16:23 AM] [OTGW] warning: ignore unknown message - DHW enable: enabled (1) [2/23/2020, 8:16:23 AM] [OTGW] warning: ignore unknown message - Cooling enable: disabled (0) [2/23/2020, 8:16:23 AM] [OTGW] warning: ignore unknown message - OTC active: not active (0) [2/23/2020, 8:16:23 AM] [OTGW] warning: ignore unknown message - CH2 enable: disabled (0) [2/23/2020, 8:16:23 AM] [OTGW] warning: ignore unknown message - Summer/winter mode: winter (0) [2/23/2020, 8:16:23 AM] [OTGW] warning: ignore unknown message - DHW blocking: unblocked (0) [2/23/2020, 8:16:23 AM] [OTGW] warning: ignore unknown message - Fault indication: no fault (0) [2/23/2020, 8:16:23 AM] [OTGW] warning: ignore unknown message - CH mode: active (1) [2/23/2020, 8:16:23 AM] [OTGW] warning: ignore unknown message - DHW mode: not active (0) [2/23/2020, 8:16:23 AM] [OTGW] warning: ignore unknown message - Flame status: flame on (1) [2/23/2020, 8:16:23 AM] [OTGW] warning: ignore unknown message - Cooling status: not active (0) [2/23/2020, 8:16:23 AM] [OTGW] warning: ignore unknown message - CH2 mode: not active (0) [2/23/2020, 8:16:23 AM] [OTGW] warning: ignore unknown message - Diagnostic indication: no diagnostics (0) [2/23/2020, 8:16:23 AM] [OTGW] warning: ignore unknown message - Electricity production: not active (0)

I have an older OTGW which connects via a serial to usb cable to a raspberry pi, there the monitor is running. Homebdrige is running on another (Ubuntu) server.

ebaauw commented 4 years ago

I am already running a monitoring script in parallel which sends a PS=1 every minute

The PS=0 command disables the real-time notifications from the gateway. homebridge-otgw uses these notifications, instead of polling the gateway. Your script should issue a PS=0 after receiving the summary to resume the notifications.

What other commands does the script send? Does homebridge-otgw start when you disable the script?

I have an older OTGW

The gateway reports (firmware) version 4.2.5, which is the latest. What version of the monitor are you running? Does it log messages that look like these: http://otgw.tclcode.com/otmonitor.html?

It looks like it’s sending cooked messages, instead of the log messages. Did you specify the port of the monitor’s web server in config.json? Can you connect to the monitor from your web browser using the same hostname and port?

If so, could you please capture and attach a full debug log file, see https://github.com/ebaauw/homebridge-hue#debug-log-file.

mrblond18 commented 4 years ago

I configured the web sever in config.json as: { "name": "OTGW", "host": "192.168.1.94:8081", "otgw": "192.168.1.94:7686", "platform": "OTGW" }

I disabled the monitoring script, reloaded homebridge, see a few otgw messages and then nothing:

Gateway messages: 10:23:03.822870 Command (via websocket from 192.168.1.96:48536): PR=A 10:23:03.861021 PR: A=OpenTherm Gateway 4.2.5 10:23:03.895373 Command (via websocket from 192.168.1.96:48536): PM=6 10:23:03.909280 PM: 6

In homebridge the last message is: [2/23/2020, 10:23:03 AM] [OTGW] Setting up - please be patient...

If I issue a PS=0, the messages start flowing, but with the same incorrect format.

ebaauw commented 4 years ago

This is not helping. Please attach the full debug log file.

mrblond18 commented 4 years ago

Here the log file where homebridge is started with -D. homebridge.log.gz

What version of the monitor are you running?

How do I check this?

Does it log messages that look like these: http://otgw.tclcode.com/otmonitor.html?

No, there are no messages in the tab "statistics", but it does give an icon in the bottom right cornet that it is connected. If I deliberately state a wrong serverportit immediately complains that it can not connect, so it seems really connected.

Can you connect to the monitor from your web browser using the same hostname and port?

Yes, no problem: http://192.168.1.94:8081

ebaauw commented 4 years ago

Here the log file where homebridge is started with -D.

Thanks, very insightful.

Feb 23 12:13:27 NUC homebridge[29102]: [2/23/2020, 12:13:27 PM] [OTGW] message: T80000200  Read-Data   Status: 00000010 00000000
Feb 23 12:13:27 NUC homebridge[29102]: [2/23/2020, 12:13:27 PM] [OTGW] message:               - CH enable: disabled (0)
Feb 23 12:13:27 NUC homebridge[29102]: [2/23/2020, 12:13:27 PM] [OTGW] warning: ignore unknown message               - CH enable: disabled (0)
Feb 23 12:13:27 NUC homebridge[29102]: [2/23/2020, 12:13:27 PM] [OTGW] message:               - DHW enable: enabled (1)
Feb 23 12:13:27 NUC homebridge[29102]: [2/23/2020, 12:13:27 PM] [OTGW] warning: ignore unknown message               - DHW enable: enabled (1)
Feb 23 12:13:27 NUC homebridge[29102]: [2/23/2020, 12:13:27 PM] [OTGW] message:               - Cooling enable: disabled (0)
Feb 23 12:13:27 NUC homebridge[29102]: [2/23/2020, 12:13:27 PM] [OTGW] warning: ignore unknown message               - Cooling enable: disabled (0)
Feb 23 12:13:27 NUC homebridge[29102]: [2/23/2020, 12:13:27 PM] [OTGW] message:               - OTC active: not active (0)
Feb 23 12:13:27 NUC homebridge[29102]: [2/23/2020, 12:13:27 PM] [OTGW] warning: ignore unknown message               - OTC active: not active (0)
Feb 23 12:13:27 NUC homebridge[29102]: [2/23/2020, 12:13:27 PM] [OTGW] message:               - CH2 enable: disabled (0)
Feb 23 12:13:27 NUC homebridge[29102]: [2/23/2020, 12:13:27 PM] [OTGW] warning: ignore unknown message               - CH2 enable: disabled (0)
Feb 23 12:13:27 NUC homebridge[29102]: [2/23/2020, 12:13:27 PM] [OTGW] message:               - Summer/winter mode: winter (0)
Feb 23 12:13:27 NUC homebridge[29102]: [2/23/2020, 12:13:27 PM] [OTGW] warning: ignore unknown message               - Summer/winter mode: winter (0)
Feb 23 12:13:27 NUC homebridge[29102]: [2/23/2020, 12:13:27 PM] [OTGW] message:               - DHW blocking: unblocked (0)
Feb 23 12:13:27 NUC homebridge[29102]: [2/23/2020, 12:13:27 PM] [OTGW] warning: ignore unknown message               - DHW blocking: unblocked (0)

The ignored unknown messages are the bit field details. homebridge-otgw is happily ignoring these, as it decodes the bit fields itself. Actually, it ignores anything but the raw message T80000200. This is the only thing sent by the OpenTherm Gateway over the NodeMCU connection.
The connection to the OpenTherm Monitor is working just fine. To get rid of the warning messages, clear the Include details of bit fields checkbox in the Log settings of the OpenTherm monitor.

Feb 23 12:13:27 NUC homebridge[29102]: [2/23/2020, 12:13:27 PM] [OTGW] message: PR: A=OpenTherm Gateway 4.2.5
Feb 23 12:13:27 NUC homebridge[29102]: [2/23/2020, 12:13:27 PM] [OTGW] send command: PR=A, response: A=OpenTherm Gateway 4.2.5
Feb 23 12:13:27 NUC homebridge[29102]: [2/23/2020, 12:13:27 PM] [OTGW] OpenTherm Gateway 4.2.5
Feb 23 12:13:27 NUC homebridge[29102]: [2/23/2020, 12:13:27 PM] [OTGW] Setting up - please be patient...
Feb 23 12:13:27 NUC homebridge[29102]: [2/23/2020, 12:13:27 PM] [OTGW] send command: PM=6
Feb 23 12:13:27 NUC homebridge[29102]: [2/23/2020, 12:13:27 PM] [OTGW] message: Command (via websocket from 192.168.1.96:53404): PM=6
Feb 23 12:13:27 NUC homebridge[29102]: [2/23/2020, 12:13:27 PM] [OTGW] send command: PM=6, response: 6
Feb 23 12:13:27 NUC homebridge[29102]: [2/23/2020, 12:13:27 PM] [OTGW] message: PM: 6
...
Feb 23 12:13:57 NUC homebridge[29102]: [2/23/2020, 12:13:57 PM] Got SIGTERM, shutting down Homebridge...

homebridge-otwg asks the OpenTherm gateway to insert OpenTherm message 6 (PM-6) into the message stream to the boiler, to retrieve the boiler's remote parameters. It might take a while before the gateway finds an opportunity to do so:

Feb 23 12:13:28 NUC homebridge[29102]: [2/23/2020, 12:13:28 PM] [OTGW] message: T80385000  Read-Data   DHW setpoint: 80.00
Feb 23 12:13:28 NUC homebridge[29102]: [2/23/2020, 12:13:28 PM] [OTGW] message: R00060000  Read-Data   Remote parameter flags: 00000000 00000000
Feb 23 12:13:29 NUC homebridge[29102]: [2/23/2020, 12:13:29 PM] [OTGW] message: BF0060000  Unk-DataId  Remote parameter flags: 00000000 00000000
Feb 23 12:13:29 NUC homebridge[29102]: [2/23/2020, 12:13:29 PM] [OTGW] message: A40385000  Read-Ack    DHW setpoint: 80.00

Unfortunately, your boiler doesn't support OpenTherm message 6. homebridge-otgw doesn't recognise that the Unk-DataId message is actually a response to the priority message, and continues to wait for a response, ... until hell freezes over.

ebaauw commented 4 years ago

What version of the monitor are you running?

How do I check this?

Help | About in the OpenTherm monitor GUI on your Raspberry Pi.

Does it log messages that look like these: http://otgw.tclcode.com/otmonitor.html?

No, there are no messages in the tab "statistics", but it does give an icon in the bottom right cornet that it is connected. If I deliberately state a wrong serverportit immediately complains that it can not connect, so it seems really connected.

The messages appear in the Log tab.

I configured the web sever in config.json as:

"otgw": "192.168.1.94:7686",

This doesn't make sense, since you connect to the gateway over a serial USB cable. The otgw option is to connect directly to the NodeMCU on the gateway, as a backup in case the OpenTherm Monitor is down.

Does your boiler support CH Water Pressure and DHW Temperature (see the summary section in the OpenTherm Monitor)? Mine doesn't, so I haven't yet added support for these in homebridge-otgw.

ebaauw commented 4 years ago

Could you try v0.0.34-0? Install thru sudo npm -g i homebridge-otgw@beta.

mrblond18 commented 4 years ago

Could you try v0.0.34-0? Install thru sudo npm -g i homebridge-otgw@beta.

Hi Erik, thanks for all the quick help, really appreciated. I hope I will be able to try this out tomorrow night... (carnaval first :-) )

mrblond18 commented 4 years ago

Alright, progress. I installed the beta version. The plugin is receiving messages now. However, I get a lot of these types of messages: [2/25/2020, 20:58:45] [OTGW] warning: B40000200: ignore out of sequence OpenTherm message

If I look in the otmonitor messages, it are these messages (it think this are all the messages that the plugin complains about):

A40640000  Read-Ack    Remote override function: 00000000 AD0101400  Write-Ack   Room setpoint: 20.00 A40385000  Read-Ack    DHW setpoint: 80.00 AC0395A00  Read-Ack    Max CH water setpoint: 90.00 A401B0B00 AC0090000  Read-Ack    Remote override room setpoint: 0.00 B40000200  Read-Ack    Status: 00000010 00000000 T80000200  Read-Data   Status: 00000010 00000000 T80385000  Read-Data   DHW setpoint: 80.00 B70385000  Unk-DataId  DHW setpoint: 80.00 T80190000  Read-Data   Boiler water temperature: 0.00 T80190000  Read-Data   Boiler water temperature: 0.00 T00050000  Read-Data   Application-specific flags: 00000000 0 BC00500FF  Read-Ack    Application-specific flags: 00000000 255 BC0192900 T10010A00  Write-Data  Control setpoint: 10.00 BD0010A00  Write-Ack   Control setpoint: 10.00

Homebridge log attached. homebridge.log.gz

ebaauw commented 4 years ago

The good news: It looks like homebridge-otgw is working. Did you try and change the thermostat target temperature and check whether the OpenTherm monitor shows the Remote Override Room Setpoint?

It would seem your boiler doesn't supply hot water?

Your script polling the monitor with PS=1 still seems to be running. homebridge-otgw now monitors this, and issues a PS=0. It seems to do this before the script does as well.

Feb 25 21:26:43 NUC homebridge[11731]: [2/25/2020, 9:26:43 PM] [OTGW] message: Command (via websocket from 127.0.0.1:36690): PS=1
Feb 25 21:26:43 NUC homebridge[11731]: [2/25/2020, 9:26:43 PM] [OTGW] message: PS: 1
Feb 25 21:26:43 NUC homebridge[11731]: [2/25/2020, 9:26:43 PM] [OTGW] message: 00000010/00000000,10.00,00000000/00000000,100.00,0/0,20.00,0.00,1.30,20.00,55.00,0.00,5.00,0.00,0/0,0/0,0.00,0.00,0,0,0,0,0,0,0,0
Feb 25 21:26:44 NUC homebridge[11731]: [2/25/2020, 9:26:44 PM] [OTGW] message: Command (via websocket from 192.168.1.95:37748): PS=0
Feb 25 21:26:44 NUC homebridge[11731]: [2/25/2020, 9:26:44 PM] [OTGW] message: PS: 0
Feb 25 21:26:44 NUC homebridge[11731]: [2/25/2020, 9:26:44 PM] [OTGW] message: T80000200  Read-Data   Status: 00000010 00000000
Feb 25 21:26:44 NUC homebridge[11731]: [2/25/2020, 9:26:44 PM] [OTGW] message: B40000200  Read-Ack    Status: 00000010 00000000
Feb 25 21:26:44 NUC homebridge[11731]: [2/25/2020, 9:26:44 PM] [OTGW] message: T80000200  Read-Data   Status: 00000010 00000000
Feb 25 21:26:44 NUC homebridge[11731]: [2/25/2020, 9:26:44 PM] [OTGW] message: Command (via websocket from 127.0.0.1:36706): PS=0
Feb 25 21:26:44 NUC homebridge[11731]: [2/25/2020, 9:26:44 PM] [OTGW] message: PS: 0
Feb 25 21:26:45 NUC homebridge[11731]: [2/25/2020, 9:26:45 PM] [OTGW] message: B40000200  Read-Ack    Status: 00000010 00000000

ignore out of sequence OpenTherm message

The OpenTherm protocol states that the master (thermostat) sends a request (T) message and the slave (boiler) sends a response (B) message.
As I mentioned earlier, the OpenTherm gateway monitors these messages, recording which message IDs the boiler doesn't support. It will then replace the request (T) message from the thermostat which its own request (R) message, capture the boiler response (B) message, and return an Unk-DataId response (A) message to the thermostat.
So homebridge-otgw looks for a T/B sequence in the log, or a T/R/B/A sequence. The T and B, or T and A should have the same command ID; as should the R and B.
See http://otgw.tclcode.com/firmware.html#operation.

If the gateway starts logging (PS=0) in the middle of such a sequence, homebridge-otgw complains. That's to be expected and nothing to worry about. You do want to worry if messages get lost or mangled.

Feb 25 21:25:31 NUC homebridge[11731]: [2/25/2020, 9:25:31 PM] [OTGW] message: 00000010/00000000,10.00,00000000/00000000,100.00,0/0,20.00,0.00,1.30,20.00,55.00,0.00,5.00,0.00,0/0,0/0,0.00,0.00,PS: 0
Feb 25 21:25:31 NUC homebridge[11731]: [2/25/2020, 9:25:31 PM] [OTGW] warning: ignore unknown message 00000010/00000000,10.00,00000000/00000000,100.00,0/0,20.00,0.00,1.30,20.00,55.00,0.00,5.00,0.00,0/0,0/0,0.00,0.00,PS: 0

So here's an interesting one: the summary and the PS: 0 message get mixed.

Feb 25 21:25:31 NUC homebridge[11731]: [2/25/2020, 9:25:31 PM] [OTGW] message: T00395A00  Read-Data   Max CH water setpoint: 90.00
Feb 25 21:25:31 NUC homebridge[11731]: [2/25/2020, 9:25:31 PM] [OTGW] message: BF0395A00  Unk-DataId  Max CH water setpoint: 90.00
Feb 25 21:25:31 NUC homebridge[11731]: [2/25/2020, 9:25:31 PM] [OTGW] message: AC0395A00  Read-Ack    Max CH water setpoint: 90.00
Feb 25 21:25:31 NUC homebridge[11731]: [2/25/2020, 9:25:31 PM] [OTGW] warning: AC0395A00: ignore out of sequence OpenTherm message

The R message is missing. In fact, the only R messages I see are for the priority messages that homebridge-otgw sent for detecting the boiler's capabilities. Interestingly, the A and B message contain the same command ID, suggesting the gateway didn't replace the message to the boiler. I haven't seen this behaviour on my installation. Do you see the R messages in the OpenTherm Monitor? Did you just restart the OpenTherm gateway (and is it still learning which messages your boiler doesn't support)?

Do you have other scripts running against the Monitor? How did you set the outside temperature?

Could you try and:

If this is normal behaviour, I need to change the logic that handles the message sequence. This is no fun, because if both T/B and T/B/A are valid sequences, I need to wait for the next T before acting on B.

mrblond18 commented 4 years ago

It would seem your boiler doesn't supply hot water?

It sure does. However, I used to use this OTGW in my previous house in combination with "stadsverwarming"/district heating, where the heat exchanger and thermostat only took care of central heating, not warm water. So it seems OTGW once learend hot water was not supported and now discards/replaces all these messages. Can I let the OTGW learn again/reset the learnings this far?

Did you just restart the OpenTherm gateway (and is it still learning which messages your boiler doesn't support)?

No I haven'trestarted the gateway in half a year I guess.

Did you try and change the thermostat target temperature and check whether the OpenTherm monitor shows the Remote Override Room Setpoint?

I did and it worked, yeah! I also see the message in the monitor, perfect: 23:18:13.274509 Command (via websocket from 192.168.1.96:47674): TT=17 23:18:13.293197 TT: 17.00

How did you set the outside temperature?

I update the outside temp via a OT= command via a wget call from the same script.

Do you have other scripts running against the Monitor?

I have no other scripts running interacting with the monitor/otgw.

I did as you requested.

1 . Power cycled the OTGW.

  1. Disabled the script interacting with the monitor to update domoticz
  2. Reboot de rpi that is connected via a usb->serial adapter to the otgw.
  3. Restarted homebridge with the -D command.
  4. wait about 10 minutes
  5. power cycled OTGW
  6. restarted monitor
  7. waited about 30 minutes
  8. restarted homebridge without the -D command
  9. saved the log

Log attached.

homebridge.log.gz

ebaauw commented 4 years ago

Thanks. As far as I can tell homebridge-otgw is working as intended, except for the out of sequence OpenTherm messages. I think this is valid behaviour of the gateway, that just doesn't happen on the combination of my thermostat and boiler. I'll see if I can change homebridge-otgw to cope with this.

ebaauw commented 4 years ago

@mrblond18, could you try the latest beta, v0.0.34-1? It should handle the T / B / A sequence. Unfortunately, I cannot test this myself. Please capture a debug log file and attach that here, so I can verity that the beta runs as intended.

mrblond18 commented 4 years ago

thanks! I installed this one, and all the out of sequence messages are gone.

Is see a boiler accesory and a thermostat accesory now. I do not see a domestic hot water accesory.

I can set the thermostat target temperature, which I see immediately on my physical thermostat as well, nice. However, I always see a -40 deg current temperature.

I did the same routine as before: 1 . Power cycled the OTGW.

  1. Disabled the script interacting with the monitor to update domoticz
  2. Reboot de rpi that is connected via a usb->serial adapter to the otgw.
  3. Restarted homebridge with the -D command.
  4. wait about 10 minutes
  5. power cycled OTGW
  6. restarted monitor
  7. waited about 30 minutes
  8. restarted homebridge without the -D command
  9. saved the log

Log attached: homebridge.log.gz

ebaauw commented 4 years ago

However, I always see a -40 deg current temperature.

On the Thermostat accessory or on the Boiler accessory?

I did the same routine as before:

The whole restart routine isn’t needed. That was one time, to see if the sequence was structural. Just restarting homebridge with -D is enough.

ebaauw commented 4 years ago

However, I always see a -40 deg current temperature.

The summary message is still corrupted:

Mar 01 09:02:57 NUC homebridge[9911]: [3/1/2020, 9:02:57 AM] [OTGW] message: 00000011/00001010,37.00,00000000/00000000,100.00,0/0,20.00,0.00,1.60,19.56,40.00,0.00,PS: 0
Mar 01 09:02:57 NUC homebridge[9911]: [3/1/2020, 9:02:57 AM] [OTGW] warning: ignore unknown message 00000011/00001010,37.00,00000000/00000000,100.00,0/0,20.00,0.00,1.60,19.56,40.00,0.00,PS: 0

Not sure what's causing this, maybe the heartbeat is setting PS=0 too aggressively. Because of this, the accessories don't initialise, and the setting of Current Temperature is defaulted to -40°C. It should be updated when the thermostat sends OpenTherm message 0x18.

[3/1/2020, 10:15:17 AM] [OTGW] message: T1018150C  Write-Data  Room temperature: 21.05
[3/1/2020, 10:15:17 AM] [OTGW] message: BD018150C  Write-Ack   Room temperature: 21.05
[3/1/2020, 10:15:17 AM] [OTGW] BD018150C: {"room_temperature":21.05}

However, your boiler doesn't like the message, causing homebridge-otgw to ignore it:

Mar 01 08:40:54 NUC homebridge[26855]: [3/1/2020, 8:40:54 AM] [OTGW] message: T1018137D  Write-Data  Room temperature: 19.49
Mar 01 08:40:54 NUC homebridge[26855]: [3/1/2020, 8:40:54 AM] [OTGW] message: B7018137D  Unk-DataId  Room temperature: 19.49

I also see that the valve position is missing from the history entries, probably because of the same issue. Could you please attach a screenshot of the Statistics tab of the OpenTherm monitor?

I do not see a domestic hot water accesory.

homebridge-otgw will skip the detection when cached accessories are available. You need to delete ~/.homebridge/accessories/cachedAccessories after installing the new version and stopping homebridge, and before starting homebridge -D. This will delete any associations of your cached accessories to HomeKit rooms, scenes, groups, and automations. If you need to keep those, add {"platform": "Lib"} to the platforms array in config.json. This will delay the startup of homebridge until homebridge-otgw and homebridge-rpi have initialised.

Again, please provide a screenshot of the Statistics tab, so I can see which OpenTherm messages your boiler supports.

ebaauw commented 4 years ago

Could you try v0.0.34-2?

mrblond18 commented 4 years ago

Could you try v0.0.34-2?

Done that, plugin seems to work just fine now. Log attached. homebridge.log.gz

I think this is the Statistics overview you are looking for, it is called summary in my monitor... Screenshot 2020-03-03 at 20 26 12

ebaauw commented 4 years ago

plugin seems to work just fine now.

Cool. I'll release a proper version with less debug logging.

I think this is the Statistics overview you are looking for,

Yes, thanks. Your boiler reports the water pressure! (mine doesn't - I'm a bit jealous). It looks like you took the screenshot shortly after (re-)starting the monitor? Could you keep it running for a couple of days, restart homebridge once or twice during that time, and then take another screenshot?

it is called summary in my monitor...

That's the web interface of the monitor; in the GUI it's called Statistics.

It would seem your boiler doesn't supply hot water?

It sure does.

My bad, I meant: your boiler doesn't seem to support changing the hot water settings over OpenTherm. Can you set hot water comfort mode from your thermostat? Can you set the target temperature for hot water (the Domestic Hot Water (DWH) setpoint) from your thermostat? Your thermostat does seem to read the DHW setpoint (command 0x38), and the boiler replies with 80°C. That does seem rather high for hot water?
Could you try sending PR=W as a free format command and notice in the Messages tab what response you get? If that gives a valid response, could you try HW=1 to enable comfort mode; HW=0 to disable it, and HW=A to cancel the override (and let the thermostat control the setting)? Finally, could you try SW=65.00 and SW=40.00 to set the hot water setpoint? Please keep homebridge -D running when trying these.

So it seems OTGW once learend hot water was not supported and now discards/replaces all these messages.

The replaced messages would show up in the summary (as Unk (unknown)).

Can I let the OTGW learn again/reset the learnings this far?

As I understand, the gateway relearns the unsupported messages at each power cycle, see Obtaining additional information on http://otgw.tclcode.com/firmware.html#operation.

mrblond18 commented 4 years ago

It looks like you took the screenshot shortly after (re-)starting the monitor?

No it was running for about 20hrs.

Can you set hot water comfort mode from your thermostat?

No, it is a simple honeywell thermostat.

the boiler replies with 80°C. That does seem rather high for hot water?

Sounds high indeed, my boiler (Intergas Kompakt HRE) seems to indicate on its display that it is 60deg...

Could you try sending PR=W as a free format command and notice in the Messages tab what response you get? If that gives a valid response, could you try HW=1 to enable comfort mode; HW=0 to disable it, and HW=A to cancel the override (and let the thermostat control the setting)? Finally, could you try SW=65.00 and SW=40.00 to set the hot water setpoint? Please keep homebridge -D running when trying these.

22:00:20.034917  Command (via websocket from 192.168.1.105:53052): PR=W
22:00:20.040261  T00000300  Read-Data   Status: 00000011 00000000
22:00:20.049888  PR: W=A
22:03:18.731165  Command (via websocket from 192.168.1.105:53083): HW=1
22:03:18.744040  HW: 1
22:03:18.867935  T00000300  Read-Data   Status: 00000011 00000000
22:03:19.040175  BC000030A  Read-Ack    Status: 00000011 00001010
22:03:19.402662  T00000300  Read-Data   Status: 00000011 00000000
22:03:19.549923  BC000030A  Read-Ack    Status: 00000011 00001010
22:03:19.942157  T00000300  Read-Data   Status: 00000011 00000000
22:03:20.052019  BC000030A  Read-Ack    Status: 00000011 00001010
22:04:24.282295  Command (via websocket from 192.168.1.105:53083): HW=0
22:04:24.295101  HW: 0
22:04:24.367483  T00000300  Read-Data   Status: 00000011 00000000
22:04:24.378599  R80000100  Read-Data   Status: 00000001 00000000
22:04:24.573737  B4000010A  Read-Ack    Status: 00000001 00001010
22:04:24.584731  AC000030A  Read-Ack    Status: 00000011 00001010
22:04:52.056397  Command (via websocket from 192.168.1.105:53083): HW=A
22:04:52.070080  HW: A
22:04:52.191072  T00000300  Read-Data   Status: 00000011 00000000
22:04:52.304687  BC000030A  Read-Ack    Status: 00000011 00001010
22:04:52.727052  T00000300  Read-Data   Status: 00000011 00000000
22:04:52.914660  BC000030A  Read-Ack    Status: 00000011 00001010
22:04:53.261036  T00000300  Read-Data   Status: 00000011 00000000
22:04:53.417030  BC000030A  Read-Ack    Status: 00000011 00001010
22:05:39.290728  Command (via websocket from 192.168.1.105:53083): SW=65.00
22:05:39.301671  T00000300  Read-Data   Status: 00000011 00000000
22:05:39.314057  SW: 65.00
22:05:39.446317  BC000030A  Read-Ack    Status: 00000011 00001010
22:05:39.843819  T00000300  Read-Data   Status: 00000011 00000000
22:05:40.049936  BC000030A  Read-Ack    Status: 00000011 00001010
22:06:23.727349  Command (via websocket from 192.168.1.105:53083): SW=40.00
22:06:23.748584  SW: 40.00
22:06:23.933474  T00000300  Read-Data   Status: 00000011 00000000
22:06:24.068216  BC000030A  Read-Ack    Status: 00000011 00001010
22:06:24.470480  T00000300  Read-Data   Status: 00000011 00000000
22:06:24.670231  BC000030A  Read-Ack    Status: 00000011 00001010
22:06:25.008840  T00000300  Read-Data   Status: 00000011 00000000

Log attached.

homebridge.log.gz

ebaauw commented 4 years ago

No, it is a simple honeywell thermostat.

That might explain why I the summary only shows a limited number of message types. Still, I'm missing messages which do appear in the log. Are you sure you captured all lines in the screen shot? Could you capture a screenshot from the GUI?

Setting the DHW setpoint doesn't seem to work. Your thermostat tries to read the value; the boiler doesn't support the message, and the gateway returns a fake response to the thermostat. That seems to explain the 80°C. I see no message where the gateway tries to write the value to the boiler.

Setting comfort mode seems to work, from a gateway perspective, but I see neither proof nor disproof that the boiler has accepted it. You would have to check the graph in the monitor to see if it has effect. When comfort mode is enabled, but the heating is off (thermostat set so low, that the heating doesn't get triggered), you should see a periodic start of the flame to keep the water hot. With comfort mode disabled, you should no longer see it.

mrblond18 commented 4 years ago

That might explain why I the summary only shows a limited number of message types. Still, I'm missing messages which do appear in the log. Are you sure you captured all lines in the screen shot? Could you capture a screenshot from the GUI?

Screenshot 2020-03-04 at 20 21 15

ebaauw commented 4 years ago

Cool. I'll release a proper version with less debug logging.

Just released v0.0.34.

sjuut commented 4 years ago

For me, this update does indeed work and the plugin exposes the boiler and thermostat accessories properly now! Thank you @ebaauw !