Great service! Issue is fixed. Just seeing the connection status published each poll, which is expected. Probably don’t really need to see the Open/Close from my perspective. I haven’t subscribe to this topic yet, as it will add a lot of unnecessary noise to HA. The ‘error’ state will definitely be useful though. Any one else using the Open/Close state for tracking polling?
@David_M, I’m guessing you would want to know not only when the TCP connection is in “error” but also when it is not longer in that state. That’s the main reason I added the other 2 states so you know when it recovers from the error.
One option could be to split up the 3 states into their own topics which are either true or false. For you you could just subscribe to the connection/error/get topic so you know when it’s in error or not.
How does that sound?
EDIT: An alternative is to merge the open and closed states into a single one like ok which indicates that the TCP connection has no problems. This would be easier to implement
@Mantorok… Just some more feedback re v3.0.2. Woke up cold to see this error repeating throughout the night
[7/25/2020, 6:38:56 AM] [RinnaiTouchPlatform] MQTT: Publish Event: Scheduled Interval
[7/25/2020, 6:39:01 AM] [RinnaiTouchPlatform] Error: Failed to get new status
at QueueService.process (/homebridge/node_modules/homebridge-rinnai-touch-platform/src/services/QueueService.ts:135:15)
And this error when the set temperature was called
[7/25/2020, 7:30:06 AM] [RinnaiTouchPlatform] Sending Command: N000033{"HGOM":{"GSO":{"SP":"20"}}}
[7/25/2020, 7:30:06 AM] [RinnaiTouchPlatform] Error: Cannot write data as socket is undefined
at /homebridge/node_modules/homebridge-rinnai-touch-platform/src/services/TcpService.ts:101:17
at new Promise (<anonymous>)
at TcpService.write (/homebridge/node_modules/homebridge-rinnai-touch-platform/src/services/TcpService.ts:98:12)
at QueueService.process (/homebridge/node_modules/homebridge-rinnai-touch-platform/src/services/QueueService.ts:141:24)
at drainItem (/homebridge/node_modules/homebridge-rinnai-touch-platform/node_modules/concurrent-queue/index.js:96:21)
at Immediate.drain (/homebridge/node_modules/homebridge-rinnai-touch-platform/node_modules/concurrent-queue/index.js:77:84)
at processImmediate (internal/timers.js:456:21)
@David_M, do you know if the plugin encountered a TCP connection error during the night? I suspect that is what happened but the plugin wasn’t able to recover. I’ll try make the plugin handle this better.
Version 3.0.3 of the plugin has been released. It combines the MQTT connection states of open and closed to ok. It also changes the way the failed TCP connections are handled. A connection will attempt to be opened 3 times. If not successful the plugin will wait for 1 minute and try again. It will do this indefinitely until a connection can be opened.
Thanks again for the speedy response, @Mantorok. I don’t know when the errored occur, as the logs don’t tail for very long (I’ve been looking in to a way to send the logs to a syslog server without luck). However I’ve now got a sensor on the connection status, so I’ll be able to better detect when a timeout occurs.
I don’t suppose anyone got this working with the Rinnai Control-R Wifi Module? I know this was mentioned earlier in the thread, but wasn’t sure if anyone got any traction.
I’ve researched the mess out of this and would be willing to write a homekit plugin if anyone has information. I’ve sniffed the app traffic, but it looks like control directives are sent through Rinnai’s cloud.
Right now, there’s no good way to create automations (i.e. motion in kitchen starts recirculation). The 2 ways to control are app or Alexa skill, and the Alexa skill is tedious and rarely works (i.e. “Alexa, ask Rinnai to start recirculation” = “Welcome to Rinnai. Ok, stopping recirculation on hot water heater”).
I even bought a SmartThings hub because integration is advertised, but I quickly found out it stops working after a few hours (as mentioned here).
Can anyone point me to information on local communication with the Control-R? I’d greatly appreciate it.
Hi @aggiepilot04, someone earlier in this topic managed to obtain a copy of the Rinnai Touch API document from Rinnai. Perhaps you could try contacting Rinnai to see if they have the same thing for the Control-R
I just had my Rinnai WiFi module installed. I’ve read through most of this thread and still can’t find an answer to my question:
Will installing @Mantorok Homebridge plugin for the Rinnai module enable me to control my HVAC system via Home Assistant?
If yes, what’s the process of actually getting this plugin into HA? Do I need to install the Homebridge HA plugin first, and then the Rinnai component that @Mantorok developed?
Thank you, that helped a lot. Put me on the right track.
Initially I followed the guide to get Portainer/Homebridge working on HASS.IO to the letter. Couldn’t get Portainer to deploy the container though - it threw an obscure error about “object not found”.
After an hour of unsuccessfully trying to get that approach to work, I rethought my strategy. I run HASS as a generic Linux install in Proxmox… Homebridge runs on Linux… Hmmmm
Within 10 minutes I had Homebridge running in a Proxmox container and in another 10 minutes I had my Rinnai in HASS thanks to @Mantorok. Success!
So for those who can get Portainer to work:
Install Portainer
Install Homebridge container via Portainer
Install @Mantorok’s plugin (the “platform”) one into Homebridge
Confirm plugin works in HB and you can in fact control your Rinnai from HB
Add Homekit Controller Integration into HA.
HA should then find your HB instance automatically and new entities will be created for your Rinnai.
For those using Proxmox:
Spin up a generic Ubuntu LXC (I used 18.04)
Install Homebridge in your new LXC exactly following their GitHub install instructions
Follow steps 3 onwards as per above. Once you’ve got Homebridge running, the rest is the same.
Hey David, are you still getting these timeouts during the night with v3.0.3?
I’m having the same issue - plugin works fine during the day. At some point during the night it times out and I need to restart Homebridge. Happens pretty much every night.