Rinnai Heating/Cooling Wifi Module

Hey @FrontBottom, just wondering if you could help me out. I’m working on a new version of my Homebridge plugin and want to cater for as many configs as possible.

In an earlier post you said you had a single controller with 4 switchable zones and it supports heating and evaporative cooling, is that correct?

Are the zones switchable in both heating & cooling modes? The Evap statuses you posted earlier seem to indicate that there’s just a single “universal” zone. I’m looking at:

{"ECOM": { "CFG": {"ZUIS": "Y", "ZAIS": "N", "ZBIS": "N", "ZCIS": "N", "ZDIS": "N" ...

If you don’t mind could you post your statuses when in heating mode and OFF and in heating mode and ON.

Thanks

Hey @Mantorok - spot on. The Zones only apply to heating mode.
Here’s a dump from my status script.
Mode=Heat, Off

[
    {
        "SYST": {
            "CFG": {
                "MTSP": "N",
                "NC": "00",
                "DF": "N",
                "TU": "C",
                "CF": "1",
                "VR": "0183",
                "CV": "0010",
                "CC": "043",
                "ZA": "                ",
                "ZB": "                ",
                "ZC": "                ",
                "ZD": "                "
            },
            "AVM": {
                "HG": "Y",
                "EC": "Y",
                "CG": "N",
                "RA": "N",
                "RH": "N",
                "RC": "N"
            },
            "OSS": {
                "DY": "SAT",
                "TM": "10:27",
                "BP": "Y",
                "RG": "Y",
                "ST": "N",
                "MD": "H",
                "DE": "N",
                "DU": "N",
                "AT": "999",
                "LO": "N"
            },
            "FLT": {
                "AV": "N",
                "C3": "000"
            }
        }
    },
    {
        "HGOM": {
            "CFG": {
                "ZUIS": "Y",
                "ZAIS": "Y",
                "ZBIS": "Y",
                "ZCIS": "Y",
                "ZDIS": "Y",
                "CF": "Y",
                "PS": "Y",
                "DG": "W"
            },
            "OOP": {
                "ST": "F",
                "CF": "N",
                "FL": "00",
                "SN": "N"
            },
            "GSS": {
                "HC": "N",
                "FS": "N",
                "GV": "N",
                "PH": "N"
            },
            "APS": {
                "AV": "N"
            },
            "ZUS": {
                "AE": "N",
                "MT": "999"
            },
            "ZAS": {
                "AE": "N",
                "MT": "999"
            },
            "ZBS": {
                "AE": "N",
                "MT": "999"
            },
            "ZCS": {
                "AE": "N",
                "MT": "999"
            },
            "ZDS": {
                "AE": "N",
                "MT": "999"
            }
        }
    }
]
We are in HEAT mode
Heater is OFF
{"Status": { "System": { "CoolingMode":false,"CurrentMode":"HEATING","EvapMode":false,"HeaterMode":true,"SystemOn": false },"Heater": { "HeaterOn":false,"FanSpeed": 0,"CirculationFanOn": false,"AutoMode": false,"ManualMode": false,"SetTemp": 0,"ZA": false,"ZB": false,"ZC": false,"ZD": false}}}

And
Mode=Heat, On

[
    {
        "SYST": {
            "CFG": {
                "MTSP": "N",
                "NC": "00",
                "DF": "N",
                "TU": "C",
                "CF": "1",
                "VR": "0183",
                "CV": "0010",
                "CC": "043",
                "ZA": "                ",
                "ZB": "                ",
                "ZC": "                ",
                "ZD": "                "
            },
            "AVM": {
                "HG": "Y",
                "EC": "Y",
                "CG": "N",
                "RA": "N",
                "RH": "N",
                "RC": "N"
            },
            "OSS": {
                "DY": "SAT",
                "TM": "10:28",
                "BP": "Y",
                "RG": "Y",
                "ST": "N",
                "MD": "H",
                "DE": "N",
                "DU": "N",
                "AT": "999",
                "LO": "N"
            },
            "FLT": {
                "AV": "N",
                "C3": "000"
            }
        }
    },
    {
        "HGOM": {
            "CFG": {
                "ZUIS": "Y",
                "ZAIS": "Y",
                "ZBIS": "Y",
                "ZCIS": "Y",
                "ZDIS": "Y",
                "CF": "Y",
                "PS": "Y",
                "DG": "W"
            },
            "OOP": {
                "ST": "N",
                "CF": "N",
                "FL": "00",
                "SN": "N"
            },
            "GSO": {
                "OP": "M",
                "SP": "18",
                "AO": "N"
            },
            "GSS": {
                "HC": "N",
                "FS": "N",
                "GV": "N",
                "PH": "N",
                "AT": "W",
                "AZ": "W"
            },
            "APS": {
                "AV": "N"
            },
            "ZUO": {
                "UE": "Y"
            },
            "ZAO": {
                "UE": "N"
            },
            "ZBO": {
                "UE": "Y"
            },
            "ZCO": {
                "UE": "N"
            },
            "ZDO": {
                "UE": "N"
            },
            "ZUS": {
                "AE": "N",
                "MT": "999"
            },
            "ZAS": {
                "AE": "N",
                "MT": "999"
            },
            "ZBS": {
                "AE": "N",
                "MT": "999"
            },
            "ZCS": {
                "AE": "N",
                "MT": "999"
            },
            "ZDS": {
                "AE": "N",
                "MT": "999"
            }
        }
    }
]
We are in HEAT mode
Heater is ON
Fan Speed is: 00
Circulation Fan is: N
Heat OpMode is: M
Heat set temp is: 18
{"Status": { "System": { "CoolingMode":false,"CurrentMode":"HEATING","EvapMode":false,"HeaterMode":true,"SystemOn": true },"Heater": { "HeaterOn":true,"FanSpeed": 0,"CirculationFanOn": false,"AutoMode": false,"ManualMode": true,"SetTemp": 18,"ZA": false,"ZB": true,"ZC": false,"ZD": false}}}

Awesome. Thanks for that. It makes sense now. But it does make my job harder though

Have you got my Status reading script gist above? Dunno if that would help you or not …

@FrontBottom, your heating status shows the measured temperature as 99.9 degrees which seems a little high. This is based on figure in HGOM.ZUS.MT (ie. “999”)

When you use the TouchApp on your phone what does it show as the current temp?

Or am I looking in the wrong part of the status to get the current temp? HGOM.ZUS.MT is where it shows the current temp for me.

BTW, what model of controller do you have?

It has been a bit warm inside lately … :stuck_out_tongue_winking_eye: That value is always 999; never changes.

The app doesn’t show a current teamperature. I think what is happening is that with the Gas Heater, the controller (Networker NC-3 i think) does all the control, so it reads current temp and then turns on/off based on what it reads “locally”.

@FrontBottom, one more (hopefully last) question for you. Many years ago I had an Brivis evap system at my old house and from memory I could control the fan speed but not set a temperature. Is this how your Evap system works? Can you only set the fan speed on the app?

Happy to answer questions! Yep - Basically on 2 things that can be controlled - Fan Speed, and Water Pump.

Thanks, it looks like the Water Pump is a simple switch (On/Off). Is that correct?

Yep, that’s it.

For those that are interested I’ve just released a major update to my HomeKit plugin. It is now a dynamic platform which automatically adds various accessories based on your Rinnai Touch status. No config is required unless you need to. See the README for all the changes in this release: homebridge-rinnai-touch-plugin

NOTE: As this is a major update you need to upgrade the old version with the following command:

npm install -g homebridge-rinnai-touch-plugin@latest

Please let me know if it works ok for you (or not). I can only test this with my own Rinnai Touch so it may not work for everyone.

1 Like

WOW this works perfectly!! I have it connected to the Home App on my family’s iPhones, my Android Google Home app, and the Google Home for voice control. Amazing work!!

Thanks for the feedback @mitchmario and thank you for your help and input too. Glad to hear it’s working for you and with Google Home as I wasn’t able to test that it would work with it.

Can you now assign the thermostats to different rooms?

Also, did it just work “out of the box” or did you need to add the platform to the config.json file and tweak some things?

Yep I can assign my two thermostats to different rooms. The status makes sense now - ‘Downstairs is 18C heating to 22C. Upstairs is 20C heating to 22C’

It worked out of the box for me. I just added “showAdvanceSwitch”: false as I don’t use programs on my NC-6.

The only thing that I can imagine improving is the response times, but I imagine it’s the Brivis Wifi Module that’s the bottleneck. I wish instead of polling each time it supported a constant connection. I’ve noticed my Home Assistant switches and sensors update instantly in Homekit. Does Home Assistant have any advantage over Homebridge with their Homekit implementation?

I went for stability over speed so tried to keep the TCP connection open as short as possible which means it does open/close connections a lot. It also waits 0.5 sec between sending commands and 1.1 secs after closing the connection before attempting to open it again. If I didn’t do this I found the module stopped responding altogether.

I know next to nothing about HA so not sure why it would be more responsive than Homebridge. I’m finding Homebridge is updating my Home app quicker in ver 2.0 than 1.x. Do you install my plugin in both HA and Homebridge at your place, so there are 2 instances running?

The “Advance Period” switch was a last minute addition for my own benefit but wasn’t sure how useful it would be to others so I provided that config option to turn it off. What I should do it hide the switch when it’s in “Manual” mode.

BTW, as you have 2 controllers do you have 2 seperate programmes? eg. You could set one programme for upstairs and a different one for downstairs? My plugin doesn’t support that. Perhaps a future enhancement.

Yep that makes total sense, and it’s faster than the Brivis App anyway so thats great. I have found while I was messing around with it, turning the heater and cooler on/off in quick succession, that the module would stop responding and I’d have to restart it. But I haven’t found that to happen with normal use.

Actually comparing the speed of Home Assistant to Homebridge probably wasn’t fair as I just have a single switch in HASS. But I do notice there is never any ‘updating’ in the Home app for the switch, it’s just always ready to go. Where as my Homebridge devices would always take a second of ‘updating’ to be ready. I think I need further testing on this one.

I only have one instance of your plugin running, I’m not sure how I would run it in Home Assistant?

I tried to set a programme on my NC-6 but it’s too old and un-intuitive for it be useful. I’m not sure if multi-zone programmes are possible.

I realised my family and I only ever turn the heater or cooler on or off so I just set the temperatures once and made these scenes. Works great!

I have some other Homebridge plugins and they also show “Updating…” for a second or two so it’s probably a Homebridge thing. When my phone is on 4G it takes even longer.

I know what you mean about the NC-6 being non-intuitive. I used to have one too before upgrading to the Touch. We tend to use the programme for heating as living in Melbourne it’s on for 9 months of the year. For cooling we don’t really use the programme and like you just have it on manual and switch on/off as needed.

Looking at the sample status you posted it appears as if it might be possible to have individual programmes for each zone. Each zone has it’s own period (Wake, Leave etc) and the option to advance to the next one.

Are you able to set the temperature for one zone from the controller of the other zone? eg. Set the Upstairs temp from the downstairs controller. If so I suspect you can also adjust the programme of the other zone too.

Awesome work guys! I’ve been trying to get this up and running in HA for while, and now I’m one step closer.

I loaded up a HomeBridge docker container on Hassio (using this guide: https://community.home-assistant.io/t/tutorial-add-homebridge-to-hass-io-using-portainer/140423/4) and installed your plugin, which automatically found my Rinnai Touch, with 3 zones+fan+advperiod. It works perfectly in Homebridge, and Apple devices. There’s only a minor delay, and the only suggestion I have is automatically turning the circulation fan off when the heater/cooler is turned on, and vice versa. Looks like you need to turn the active one off first.

Now when HA automatically detects the new HomeBridge device and you select configure, it pulls the thermostat device in okay and works, however it has trouble importing the fan and zones.

Logs from HA below. Any suggestions??

David

2020-04-13 19:26:32 ERROR (MainThread) [homeassistant.components.switch] Entity id already exists - ignoring: switch.zoneswitch_a. Platform homekit_controller does not generate unique IDs
2020-04-13 19:26:32 ERROR (MainThread) [homeassistant.components.switch] Entity id already exists - ignoring: switch.zoneswitch_a. Platform homekit_controller does not generate unique IDs
2020-04-13 19:26:32 ERROR (MainThread) [homeassistant.components.switch] Entity id already exists - ignoring: switch.zoneswitch_a. Platform homekit_controller does not generate unique IDs
2020-04-13 19:26:32 ERROR (MainThread) [homeassistant.components.fan] Error while setting up homekit_controller platform for fan
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 186, in _async_setup_platform
    await asyncio.gather(*pending)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 295, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 447, in _async_add_entity
    await entity.async_update_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 284, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 327, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/fan/__init__.py", line 181, in state_attributes
    if not hasattr(self, prop):
  File "/usr/src/homeassistant/homeassistant/components/homekit_controller/fan.py", line 91, in current_direction
    return HK_DIRECTION_TO_HA[direction]
KeyError: None
2020-04-13 19:26:33 ERROR (MainThread) [homeassistant.util.logging] Exception in async_write_ha_state when dispatching 'homekit_controller_0E:A4:6A:A9:B2:0A_state_updated': ()
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 297, in async_write_ha_state
    self._async_write_ha_state()  # type: ignore
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 327, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/fan/__init__.py", line 181, in state_attributes
    if not hasattr(self, prop):
  File "/usr/src/homeassistant/homeassistant/components/homekit_controller/fan.py", line 91, in current_direction
    return HK_DIRECTION_TO_HA[direction]
KeyError: None

Thanks @David_M, it should be easy enough to add your suggestion to turn off the heater/cooler when turning on the fan and vice versa.

Not sure about those HA errors. It looks like the 3 zone switches are all named zoneswitch_a but I’m not sure where it’s getting those names from. The plugin names the accessories as "ZoneSwitch A", "ZoneSwitch B", ... and the switch services are named "Zone A", "Zone B", ... unless you’ve assigned them names in the Touch Controller (if you have this type of controller).

As for the fan error it looks like HA is expecting the fan rotation direction to be defined which the plugin doesn’t do as it’s an optional characteristic of the Fan service. I could try hard coding a value to see if that helps.

Are you able to post samples of your module’s status when the unit is OFF and ON (both heating & cooling). It might provide some clues as to what is going on.

Hey @Mantorok,

HA automatically replaces all spaces and capitals when it creates its own entities, so that is why we see zoneswitch_a.

On a closer look, it looks like it tries to create a ‘Fan’ device, with three associated sub-entities.

‘Thermostat A’ sub-entity, which does appear to work for controlling Heat/Cool/TempSet.
‘ZoneSwitch A’ sub-entity, which also appears to toggle Zone A on/off.
‘fan.fan’ sub-entity, which is a corrupt object, which is generating the continous exception in the logs.

The HA status screenshots are below. Thanks in advance.

David