ok - My config is here: https://pastebin.com/uyg6Una7
And I enabled Debug mode in HomeBridge… the logs are here: https://pastebin.com/XD57ePc0
ok - My config is here: https://pastebin.com/uyg6Una7
And I enabled Debug mode in HomeBridge… the logs are here: https://pastebin.com/XD57ePc0
As for the only settings I can use…it SHOWS me the other settings, and I can SELECT them, but the only ones it will SAVE is “Thermostat” and “Switch”… If I choose anything other than them, when I go back into the settings after a restart, they’ve defaulted to …
Given I have a heater and refrigerated a/c - Heater/Cooler would have been my first choice too…
Did you click on Save after selecting the options? If so then maybe its a permissions issue with the config.json file. You can manually edit the file and change controllerType
from "T"
to "H"
Be careful though as I think HA doesn’t support the Heater Cooler service.
Looking at the logs there seems to be a connectivity issue between Homebridge and the module. Can you try restarting your router.
Stupid question - do you mean the WiFi router or the Rinnai unit?
And given I am using a PC which is talking on the WiFi now, and I can use my phone (via WiFi) to talk to the Rinnai unit via the App and that works - I’m unsure what advantage that will give me…
…also - the Rinnai unit is in the roof and I’m being lazy and don’t want to get the ladder out of the garage
Sorry, yes I meant the WiFi router (not the Rinnai module). There was a case that someone else had which sounds just like what you are getting and a router reboot fixed it.
Before doing that can you check the Rinnai app on your phone and in the bottom right (I think) of the screen there is either a cloud or WiFi icon. It’s possible the app is connected via the cloud not WiFi giving the impression its connecting ok.
One last thing, ensure the Phone app is not not running (even in the background) when you are using the plugin as you’ll end up getting a Connection Refused error.
OK - while you were typing - I got the ladder out and jumped up in the ceiling and power-cycled the Rinnai anyway…
BUT - we might be getting somewhere…The Phone App DOES have the cloud lit up…!
So the Rinnai unit is talking to the cloud, then to the App??? How do you tell it NOT to do that?
And I just did a FORCE STOP on the app on my phone… Now I’ll reboot the WAP/Router…
So WAP/Router has also been reset now…
New Logs: https://pastebin.com/P5t5f4NT
tldr; not much change…
Very odd. The plugin seems to be able to connect ok but there’s no status message being emitted from the module
I take it the app is still showing the cloud icon?
Yeah, sounds odd. @Rusti-gotrage - Is your WiFi network restricted in anyway? Are you using a VLAN, that is blocking broadcasts (UDP/mDNS, etc)? The initial UDP discovery seems to work but then subsequent communications time-out.
Try seeing if the module port is open from HomeBridge. Open and terminal from the top right menu and type curl http://moduleIP:27847 - The response should be ‘curl: (1) Received HTTP/0.9 when not allowed’ if it is open.
@David_M - Doing the Curl command in HomeBridge terminal have me no reply… it just locked up and kinda did nothing till I Ctrl-C’d out of it…
As for the WiFi network - I’m not running anything restricted… I’m running a TP-Link Archer C120 Wireless Router connecting to NetGear JGS516PE switches. The Homebridge container is running under Portainer on my R-Pi-3B.
Now - I DID have issues getting HomeBridge talking to HA when HomeBridge was running as a docker container on my NAS… don’t know why, but we did… I thought it might be due to the Pi running of a switch at the FRONT of the house and the NAS running of the switch at the BACK of the house - but… when I had the Pi plugged into the same switch as the NAS - it didn’t work then either…
But I’ve followed the instructions I found for allowing mDNS to work on the switches and still couldn’t get it to work, which is why I switched to running HomeBridge in a portainer session on the Hass-Pi setup…
@Mantorok - interestingly - since rebooting the route - the Phone App is no longer showing a cloud icon, but a WiFi icon…
Still doesn’t seem to have helped HomeBridge though…
Sounds like something is up with your docker network settings. Is the docker homebridge container network set to ‘host’ so it’s not NATing? Make sure you’ve fellow this fellow’s guide: Tutorial: add Homebridge to Hass.io using Portainer
There was - which is why I moved the HomeBridge set-up over onto the HASS-Pi using Portainer.
Once I did that, HA and HomeBridge were quite happy talking to each other - but now I have this issue with HomeBridge not talking properly to the Rinnai WiFi unit…
Another thing you could try is use my client command line tool to test connectivity to the module. See https://github.com/mantorok1/RinnaiTouchClient. I wrote this some time before the plugin and it uses similar connectivity. Don’t worry about reading all the crap I wrote, just clone the repo and then focus on the “Demo - Simple Command Line tool” bit.
Perhaps try using it first from a PC and see if you can retrieve the status. Then try from the Homebridge command prompt.
Not had the chance to play with your script yet today @Mantorok
Hoping to get to it shortly. In the interim - I made the mistake of logging into the web interface for the unit, and now HomeBridge says THIS:
[8/25/2020, 1:53:11 PM] [RinnaiTouchPlatform] QueueService process { type: 0 }
[8/25/2020, 1:53:11 PM] [RinnaiTouchPlatform] QueueService connect
[8/25/2020, 1:53:11 PM] [RinnaiTouchPlatform] TcpService connect
[8/25/2020, 1:53:11 PM] [RinnaiTouchPlatform] TCP Connection: Failed. connect ECONNREFUSED xxx.xxx.xxx.xxx:27847. Attempt 1 of 3
[8/25/2020, 1:53:11 PM] [RinnaiTouchPlatform] TcpService connect
[8/25/2020, 1:53:12 PM] [RinnaiTouchPlatform] TCP Connection: Failed. connect ECONNREFUSED xxx.xxx.xxx.xxx:27847. Attempt 2 of 3
[8/25/2020, 1:53:12 PM] [RinnaiTouchPlatform] TcpService connect
[8/25/2020, 1:53:12 PM] [RinnaiTouchPlatform] TCP Connection: Failed. connect ECONNREFUSED xxx.xxx.xxx.xxx:27847. Attempt 3 of 3
[8/25/2020, 1:53:13 PM] [RinnaiTouchPlatform] Unable to connect to Rinnai Touch Module. Will try again in 1 minute
So - you know… it’s something new
Will download nodejs shortly…
Ah yes, the dreaded ECONNREFUSED error.
To fix it you have 3 options (that I’m aware of):
BTW, to avoid the ECONNREFUSED error make sure nothing else is trying to connect to the Rinnai module via WiFi. This is why I said shut down the Phone app.
Also, make sure Homebridge is shut down before using my NodeJS client tool
I find restarting the HomeBridge container seems to resolve the dreaded ECONNREFUSED error for me.
btw. THANK YOU Mantorok for your brilliant work on this !!
Loving it !!
Morning @Mantorok,
Sadly no - and then work intervened and I had to take a break from working on it…
Should have some time this week to work on it.
As of this morning, I had to do a full restart of my HASS R-Pi3B due to a lock-up at around 2.18am for some reason. When it came back online, no more ERRCON messages, but I’m back to the TCP Connection Timeout messages…
And being a n00b, I’m unsure how to run your raw scripts
I’m suspiciously certain that the issue may have to do MORE with mDNS working on my network than with your module itself… Given the HomeBridge initial connections seem to begin there, rather than being straight layer3 TCP/IP traffic…?
Especially given the issues I had getting HomeBridge to talk to Home-Assistant when HB was running from the NAS docker, talking to HA on the R-Pi3B… which I resolved by moving HB to the HASS-Pi in Portainer, thus removing my network equipment from the equation!
I’ve gone through all the documentation I can find for both my TP-Link Archer 1200 Router/WAP as well as the NetGear JGS516PE Switch and it SHOULD be allowing mDNS to pass through the equipment - and yet - here we are…
Interestingly enough, using mDNS Browser app in Chrome, I DON’T see ANYTHING from the IP the Rinnai unit is running on…
[Edit: I AM a stupid person - my original post was looking at the IP the HASS-Pi/HB unit is running from! Sigh! Corrected!]