Rheem Hotwater heater, econet?

Thanks for the feedback. So for the usage I am thinking about accumulating everything under “hours” for the entire day. So as usage increases for the day, and attribute on the heater will increase as well. Then that value will be maxed at midnight and the API (Rheem on their end) will reset the values. That seems like the easiest way to get that data in to Home Assistant. I could probably come up with some sort of service that could be called to output all usage somewhere. Maybe a local file? like a csv or something? Other than that I don’t see a way in Home Assistant to display this type of dynamic data.

Everyone knows when I’m taking a shower now! …kidding. No problems from me. Glad I could help. 7-8pm is about right for big usage.

As for water usage, I dont know if you are using the android app or not, but on mine, If I select the usage reports I get a quick flash of “Hot water usage reports” before it switches to the energy report. I’ve never been able to select it to view…but something does pop up quick.

I have the iPhone app and get no reports/ usage at all. If Rheem has this but decided not to display it on the iPhone app, it would be nice to get it in HA or exported to a sheet somehow for reviewing the last year or usage, especially during the summer when I have Hybrid Only on and how much money it really saves.

Everyone good news! I finally got some time to mess with this some more. I have a working Home Assistant component using Rheem’s undocumented mobile API.

It should be pretty easy for everyone to test this out. Steps are blow.

  1. Create a the following directories YOUR_HA_CONFIG_DIR/custom_components/climate/
  2. Download this file https://hastebin.com/ikegubagag.py name it econet.py and place it in the folder above.
  3. Add this to your config.
climate:
  - platform: econet
    username: your econet email
    password: PASSWORD

Reboot!

You should end up with a fully functional water heater in HA you can adjust mode and temp and updates are pulled every 5 minutes, unless you make a state change like change the temp in which case it should update within 60 seconds.

There are also 2 services at the moment create a vacation and delete vacation. The create is a bit of a pain in the ass because it takes a start date and an end date. I figured if someone wanted to use that, they would use https://home-assistant.io/components/input_datetime/ to get their start and end date and pull the timestamp from that.

Example service call JSON for create is below.

{"end_date": 1513445520, "start_date": 1513444400}

There is still a decent amount to be done, I need to create HA test cases the vacation stuff is still kinda wonky because of the service using UTC time and HA using whatever timezone you are in. So… I think those vacations might be off by a few hours.

Not sure how we should handle the usage reports? Any ideas? I could make a service, but where would that data go?

Let me know how things go.

So I got this installed last night. Played around with it and it seemed to work ok. However this morning when I went to check it it component shows as “Unavailable”

I’ve restarted HA, and it came back. I unfortunately forgot to check the logs first, so they were over written.

Other than that. It appears to be working.

Unavailable shows when the water heater is reported as offline by their API if it happens again just let it sit for like 15 minutes and see if it comes back.

Getting an error today after a reboot

https://hastebin.com/ivafoqupix.rb

Ahh interesting I didn’t know the custom component setup worked like that. You can ignore that for now, I’ll send you a link to a .yaml file you need to add into that custom components folder when I get home.

Place this file into the custom_components/climate directory https://hastebin.com/adazefecoh.pas and name it services.yaml

sorry for the delay. Its working.

1 Like

Seen any other issues? If not I think I’ll try to get this added in officially this week.

Appears to be working correctly now.

Doesn’t look like pyeconet works for natural gas water heaters. Usage stats aren’t’ available for those and pyeconet doesn’t catch the exception.

water_heater_usage=econet.api_interface.get_usage(device.get(“id”))
Traceback (most recent call last):
File “”, line 1, in
File “/srv/homeassistant/lib/python3.5/site-packages/pyeconet/api.py”, line 80, in get_usage
return arequest.json()
File “/srv/homeassistant/lib/python3.5/site-packages/requests/models.py”, line 892, in json
return complexjson.loads(self.text, **kwargs)
File “/usr/lib/python3.5/json/init.py”, line 319, in loads
return _default_decoder.decode(s)
File “/usr/lib/python3.5/json/decoder.py”, line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python3.5/json/decoder.py”, line 357, in raw_decode
raise JSONDecodeError(“Expecting value”, s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

After the following dirty fixes, I was able to load the component:

edit /srv/homeassistant/lib/python3.5/site-packages/pyeconet/api.py
LINE 189
#water_heater_usage = self.api_interface.get_usage(device.get(“id”))
water_heater_usage =
edit econet.py
LINE 158
data[ATTR_TODAYS_ENERGY_USAGE] = 0

Here is the data that is available (basically temp settings and vacation mode) which I think is all econet provides for these:

friendly_name: Gas Water Heater [WiFi]
temperature: 128
operation_mode: unknown
unit_of_measurement: °F
in_use: false
min_temp: 90
todays_energy_usage: 0
max_temp: 131
on_vacation: false
current_temperature: null

Awesome! Thanks for the update I am currently working on the PR to get this officially added to HA so I’ll make this change before getting it added.

Can you update your files to the newest ones here https://github.com/home-assistant/home-assistant/pull/11260 ?

I have update pyeconet to 0.0.4 which addresses the usage issue your indicated and it also makes a change in the Home Assistant code to hide the usage if you don’t have it.

Working much better now with the updated version. Thanks.

1 Like

This will be officially in the next release so anyone using it via a custom component make sure you delete the custom component files after upgrading. :+1:

I just updated to the new version 0.61.0 and I am trying this out. I am getting the following error in my logs:

ERROR (MainThread) [homeassistant.components.climate.econet] Invalid operation mode mapping. Performance doesn’t map. Please report this.

I get this error twice every minute in the log.

not sure what it means, I also only see “eco” as a mode, it doesn’t seem to list any others to change it too.

Dang, kinda figured this would happen that is why I added the logging in. Can you test out a fix?

Create the following folders in your HA config dir custom_components/climate/ and place this file https://hastebin.com/uzaheqafel.py in there with a name of econet.py and restart. Hopefully that will fix it.

So I tried this, first, there seems to be a typo on line 65

STATE_PERFORMANCE, ‘Performance’

which I changed to

STATE_PERFORMANCE: ‘Performance’

That allowed me to load home assistant and I see the water heater and operation lists both eco and performance.

When hass starts I am getting this error now, but it only shows up on start after that it all seems fine.

> 2018-01-16 12:46:41 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform econet
> Traceback (most recent call last):
>   File "/srv/homeassistant/lib64/python3.6/site-packages/homeassistant/config.py", line 297, in load_yaml_config_file
>     conf_dict = load_yaml(config_path)
>   File "/srv/homeassistant/lib64/python3.6/site-packages/homeassistant/util/yaml.py", line 67, in load_yaml
>     with open(fname, encoding='utf-8') as conf_file:
> FileNotFoundError: [Errno 2] No such file or directory: '/opt/homeassistant/custom_components/climate/services.yaml'
> 
> During handling of the above exception, another exception occurred:
> 
> Traceback (most recent call last):
>   File "/srv/homeassistant/lib64/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 171, in _async_setup_platform
>     SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
>   File "/usr/lib64/python3.6/asyncio/tasks.py", line 358, in wait_for
>     return fut.result()
>   File "/usr/lib64/python3.6/asyncio/futures.py", line 245, in result
>     raise self._exception
>   File "/usr/lib64/python3.6/concurrent/futures/thread.py", line 56, in run
>     result = self.fn(*self.args, **self.kwargs)
>   File "/opt/homeassistant/custom_components/climate/econet.py", line 113, in setup_platform
>     path.join(path.dirname(__file__), 'services.yaml'))
>   File "/srv/homeassistant/lib64/python3.6/site-packages/homeassistant/config.py", line 300, in load_yaml_config_file
>     getattr(err, 'filename', err)))
> homeassistant.exceptions.HomeAssistantError: Config file not found: /opt/homeassistant/custom_components/climate/services.yaml