HOW-TO: Control your Ouman EH-800 heating controller using Home Assistant

IIMM, Keeman, thank you lot for your contributions! Before this thread, it seems pretty much no-one wrote anything about using EH-800 with Home Assistant and nothing about actual code. I know part of my original solution isn’t that elegant code, I’m by no means *nix expert and tried to avoid piping or other “complex” things in order to keep it more readable for me :laughing: And for me, I tried this in order to proof, that EH-800 and HA can be used together.

As the quite complete listing of parameters provided by IIMM proves, there’s plenty of potential for adjusting heating system based on EH-800 controller. Certain Home Assistant helpers (input number?) could be probably used for setting heating curve points etc. from HA GUI. Integrating EH800 with weather forecasts has great potential for energy saving, especially on systems with radiators.

Just moved to a house with a Ouman EH-800 unit installed so perfect to find this thread!

I have never manually edited files in HA before but I guess the “File Editor” add-on is the way to go? Better to take a “DD” copy of the SD card before I begin our would you say this is a low risk operation?

Regarding the automations.yaml and the “- id: ‘1664215269197’” is this something I should copy also or somehow generate my own?

And for the configuration.yaml I guess I just create a new sensor per value I want to read out and just replace the “S_xxx_xx” in the URL to match the value I want.

Sorry if these are all basic questions but better safe then sorry :smile:

FileEditor is The Tool for editing Home Assistant config files manually. You can edit automations.yaml manually, but builtin Automations-tool (Settings → Automations & scenes) is perfectly capable to generate required automations. If you use Automations-tool, it will generate automation id automatically.

Ahh ok! Thanks for the tip, at work now but will need to look into this once I get home.

(Quite “new” to HA, been playing around with it some months but now when moving to a new house I will go in for it 100%, been using Domoticz since around 2014 so not new to home automation at least)

Finally got some time to check this out however I did not come to far…

image

Getting the following error “Message malformed: extra keys not allowed @ data[‘0’]” when I try to add the automation? Am I missing something obvious?

Did you create automation in YAML-editor, or visual editor? HA is sometimes very picky about quotes, missing quotes, or incorrect quotation mark types to extent it drives one crazy. If you created automation in YAML-editor, try using visual editor, it’s actually very easy to use and helps avoiding errors. My guess is, error may have something to do with

data: {}

According to HA forums, it may have something to do with empty lines, this is maybe similar issue:
Message malformed: extra keys not allowed @ data[‘action’][0][‘message’] - Configuration - Home Assistant Community (home-assistant.io)

I did it in the YAML-editor, will try the visual editor instead, figured it was easier to just paste the code in the YAML-editor.

My guess is the same regarding the error, that it has to do with data: {}

Anyway will test the visual editor and let you all know how it goes.

Tonight I took the time to RTFM and back track my mistakes, was a bit of a guess work when I am quite new to this but at least it’s now working! (hopefully not to many mistakes made… please let me know if you spot any issues!)

First of I had to create the configuration under /config/configuration.yaml, I did this via the File editor tool, guess that is the correct way to do it.
(I had this part missing before… so no wonder I did not get it to work)

this is my configuration in case someone wants to know.

shell_command:
  ouman_logon: 'curl "http://ip.ip.ip.ip:port/login?uid=Username;pwd=Password;" > /dev/null'

sensor:

  - platform: command_line
    name: Ouman EH800 - Temperatur Ute
    command: curl "http://ip.ip.ip.ip:port/request?S_227_85" | cut -d ';' -f 1 | cut -b 18-
    unit_of_measurement: "°C"
    unique_id: sensor.ouman_eh800_temperatur_ute

  - platform: command_line
    name: Ouman EH800 - Temperatur Radiator
    command: curl "http://ip.ip.ip.ip:port/request?S_259_85" | cut -d ';' -f 1 | cut -b 18-
    unit_of_measurement: "°C"
    unique_id: sensor.ouman_eh800_temperatur_radiator

  - platform: command_line
    name: Ouman EH800 - Radiator Ventil
    command: curl "http://ip.ip.ip.ip:port/request?S_272_85" | cut -d ';' -f 1 | cut -b 18-
    unit_of_measurement: "%"
    unique_id: sensor.ouman_eh800_radiator_ventil

  - platform: command_line
    name: Ouman EH800 - Golvvärme Temperatur
    command: curl "http://ip.ip.ip.ip:port/request?S_293_85" | cut -d ';' -f 1 | cut -b 18-
    unit_of_measurement: "°C"
    unique_id: sensor.ouman_eh800_golvvarme_temperatur

  - platform: command_line
    name: Ouman EH800 - Golvvärme Ventil
    command: curl "http://ip.ip.ip.ip:port/request?S_306_85" | cut -d ';' -f 1 | cut -b 18-
    unit_of_measurement: "%"
    unique_id: sensor.ouman_eh800_golvvarme_ventil

Changes I made here are that I added the degree symbol to the “unit_of_measurement” and also added the “unique_id” to be able to change the icon, just minor changes to “make it pretty” so to speak, looks like this now.

image

Names are in Swedish but a quick translation of the words that might be hard to guess are.

Golvvärme = Floor heating
Ventil = Valve
Ute = Outside

Also in my automation under Settings → Automation & Scenes → Automations looks like this
(I added it in the visual way but posting in YAML makes more sense I think.

alias: Get data from Ouman-EH800
description: Script runs every 2 minutes
trigger:
  - platform: time_pattern
    minutes: "2"
    alias: Log on every 2 minutes
condition: []
action:
  - service: shell_command.ouman_logon
    data: {}
mode: single

Again, thanks for all the help and for sharing this project! Really awesome work.

1 Like

Bad news, current implementation will break with HA 2023.8.0

image

Anyone have a working solution? I tried some but can’t get the formatting right…

EDIT

After hitting my head some more, this seems to work, at least the warning is now gone for me

command_line:
# Ouman EH800
  - sensor:
        name: Ouman EH800 - Temperatur Ute
        command: 'curl "http://ip:ip:Ip:ip:port/request?S_227_85" | cut -d '';'' -f 1 | cut -b 18-'
        unit_of_measurement: "°C"
        unique_id: sensor.ouman_eh800_temperatur_ute

  - sensor:
        name: Ouman EH800 - Temperatur Radiator
        command: 'curl "http://ip:ip:Ip:ip:port/request?S_259_85" | cut -d '';'' -f 1 | cut -b 18-'
        unit_of_measurement: "°C"
        unique_id: sensor.ouman_eh800_temperatur_radiator

  - sensor:
        name: Ouman EH800 - Radiator Ventil
        command: 'curl "http://ip:ip:Ip:ip:port/request?S_272_85" | cut -d '';'' -f 1 | cut -b 18-'
        unit_of_measurement: "%"
        unique_id: sensor.ouman_eh800_radiator_ventil

  - sensor:
        name: Ouman EH800 - Golvvärme Temperatur
        command: 'curl "http://ip:ip:Ip:ip:port/request?S_293_85" | cut -d '';'' -f 1 | cut -b 18-'
        unit_of_measurement: "°C"
        unique_id: sensor.ouman_eh800_golvvarme_temperatur

  - sensor:
        name: Ouman EH800 - Golvvärme Ventil
        command: 'curl "http://ip:ip:Ip:ip:port/request?S_306_85" | cut -d '';'' -f 1 | cut -b 18-'
        unit_of_measurement: "%"
        unique_id: sensor.ouman_eh800_golvvarme_ventil

Just needed to get all the ‘’’’’’ in the correct places, not the easiest when you don’t know what you are doing :grinning_face_with_smiling_eyes:

1 Like

This change is real PITA. I’m using split configuration, that is, separate files for switches, sensors etc. Now I needed to create separate command_line.yaml and move everything there.

New command line implementation isn’t that well documented, by trial and error I have some parts working, but logon needs some work, since it’s not switch, sensor or cover… :rage:

I use the login method from this post,

Still works for me after I just changed my sensors to the new command line YAML.

shell_command:
  ouman_logon: 'curl "http://192.168.1.211:8090/login?uid=mysecretuserid;pwd=mytopsecretpassword;" > /dev/null'

This seems to work for login, no errors on user interface or logs. I have automation, that runs ouman_logon every five minutes. Rest of the changes were pretty much same Belaial has made, that is, formatting, and since it’s split config, I have:

command_line: !include command_line.yaml

in configuration.yaml and sensors and switches in command_line.yaml look like this now:

- switch:
    name: eh800ltp
    command_on: >
      curl "http://192.168.1.211:8090/update?S_135_85=1;" --output /config/oumanltp.txt
    command_off: >
      curl "http://192.168.1.211:8090/update?S_135_85=0;" --output /config/oumanltp.txt
      
- sensor:
    name: ouman_ltp_kysely
    command: 'curl "http://192.168.1.211:8090/request?S_230_85;" --output /config/oumanltp.txt'

- sensor:
    name: ouman_menovesi_kierto
    command: 'curl "http://192.168.1.211:8090/request?S_259_85" --output /config/oumankierto.txt'

- sensor:
    name: ouman_menovesi_pyynto
    command: 'curl "http://192.168.1.211:8090/request?S_275_85" --output /config/oumanpyynto.txt'

- sensor:
    name: Oumankierto
    command: 'cut -b 18-21 /config/oumankierto.txt'
    unit_of_measurement: "°C"

- sensor:
    name: Oumanpyynto
    command: 'cut -b 18-21 /config/oumanpyynto.txt'
    unit_of_measurement: "°C"
  
- binary_sensor:
    name: Oumanltptila
    command: 'cut -b 17 /config/oumanltp.txt'
    payload_on: ON
    payload_off: OFF

I know this isn’t as streamlined solution as possible, but it works well, no more update reminders. Next thing, I have to clean this using *nix pipes ( | ) :laughing:

Hi @honkkkis,

Your post let me think about my needs (Generic Temperature setting point · home-assistant/frontend · Discussion #17028 · GitHub).
However it doesn’t answer it :sweat_smile:

1 Like

Done some preliminary testing with request codes sending them via browser URL to Ouman, like e.g.

http://192.168.1.8/request?S_227_85

…to get the outside temp in this case.

The format very much look like GET, however Ouman responds by offering a file to be downloaded??? Why is this?

The file contains the right information, though:

request?S_227_85=13.3;

@Hyacinthe,
I guess this would be next step :grin: I have floor heating and as such, system doesn’t really need room thermostats. If you have traditional water-radiators, more fine-grained adujstment would be useful. Ouman itself offers all the needed commands and responses. There is no technological barrier for example, adjusting heating curve for EH800 from Home Assistant.

Ouman seems to be such popular device (even outside Finland), that it’s worth studying some more. My current project is creating power meter for my Jäspi Econature 40 wood fired heater. It will work with other heaters too, and it’s based on M5Stack Core2 ESP32-unit. When it’s ready, time to do more Ouman.

@mekanics,
it might be possible to parse responses in the fly, but my *nix-skills are too limited. It would be definitely more elegant way of handling responses. IIRC, you can request / set multiple variables at once, which makes number of separate files smaller.

@honkkkis thanks for the initial setup for this!

I have made some additional call for the Ouman to be able to plot the temperature graph. Here is the bit for that on command_line.yaml file:

# Gathering heating curve data

- sensor:

      name: Ouman EH800 - Heating curve low req

      command: 'curl "http://ip_address_ouman_eh800:port/request?S_67_85" | cut -d '';'' -f 1 | cut -b 17-'

      unit_of_measurement: "°C"

      unique_id: sensor.ouman_eh800_heat_crv_low_req

- sensor:

      name: Ouman EH800 - Heating curve low req 2

      command: 'curl "http://ip_address_ouman_eh800:port/request?S_69_85" | cut -d '';'' -f 1 | cut -b 17-'

      unit_of_measurement: "°C"

      unique_id: sensor.ouman_eh800_heat_crv_low_2_req

- sensor:

      name: Ouman EH800 - Heating curve mid req

      command: 'curl "http://ip_address_ouman_eh800:port/request?S_71_85" | cut -d '';'' -f 1 | cut -b 17-'

      unit_of_measurement: "°C"

      unique_id: sensor.ouman_eh800_heat_crv_mid_req

- sensor:

      name: Ouman EH800 - Heating curve high req 2

      command: 'curl "http://ip_address_ouman_eh800:port/request?S_73_85" | cut -d '';'' -f 1 | cut -b 17-'

      unit_of_measurement: "°C"

      unique_id: sensor.ouman_eh800_heat_crv_high_2_req

- sensor:

      name: Ouman EH800 - Heating curve high req

      command: 'curl "http://ip_address_ouman_eh800:port/request?S_75_85" | cut -d '';'' -f 1 | cut -b 17-'

      unit_of_measurement: "°C"

      unique_id: sensor.ouman_eh800_heat_crv_high_req

- sensor:

      name: Ouman EH800 - Minimum water temperature

      command: 'curl "http://ip_address_ouman_eh800:port/request?S_54_85" | cut -d '';'' -f 1 | cut -b 17-'

      unit_of_measurement: "°C"

      unique_id: sensor.ouman_eh800_minimum_water_temperature

- sensor:

      name: Ouman EH800 - Maximum water temperature

      command: 'curl "http://ip_address_ouman_eh800:port/request?S_55_85" | cut -d '';'' -f 1 | cut -b 17-'

      unit_of_measurement: "°C"

      unique_id: sensor.ouman_eh800_maximum_water_temperature

This then lets me to plot the graph using plotly:

Here is the card code:

type: custom:plotly-graph
layout:
  xaxis:
    type: number
    showlegend: false
  yaxis:
    fixedrange: true
    range:
      - 0
      - 60
entities:
  - entity: ''
    x:
      - -20
      - -10
      - 0
      - 10
      - 20
    'y':
      - $ex hass.states["sensor.ouman_eh800_heating_curve_low_req"].state
      - $ex hass.states["sensor.ouman_eh800_heating_curve_low_req_2"].state
      - $ex hass.states["sensor.ouman_eh800_heating_curve_mid_req"].state
      - $ex hass.states["sensor.ouman_eh800_heating_curve_high_req_2"].state
      - $ex hass.states["sensor.ouman_eh800_heating_curve_high_req"].state
    line:
      shape: spline
raw_plotly_config: true

As you see, I have configured the Ouman EH-800 to use 5-point adjustment. Also the graph is ‘‘inverted’’, but that can be adjusted according to one’s preferences.

My goal would be to make the Ouman to adjust for forecast info, here are couple of articles how to do it on generally any weather based system:
https://www.sciencedirect.com/science/article/pii/S0959652622012227
https://www.sciencedirect.com/science/article/abs/pii/S0378778821000505

I’m planning to use the adjusting algorithm by changing the adjustable room-temperature offset value on register:

S_134_85 Room temp fine adjustment

Also it would be great to make the Ouman Graph interactive, I think that’s doable by some default integrations. With this, you wouldn’t have to go to the device to adjust, and can see the loop working remotely. I’m also polling data from the valve position etc.

1 Like

Nice work @Atomicsickness!

I was dong some comparison on energy use between years and found that degree day-measurement can be implemented quite easily in Home Assistant:
Track your degree days using HA and benchmark your gas consumption - Share your Projects! - Home Assistant Community (home-assistant.io)

By using Ouman collected data and having energy consumption numbers, I think one could collect easily all the data needed for those weather based adjustments, as degee day is indicator for “heating need”. In previous example they are using gas measured in cubic meters, but it can be adapted for whatever energy source.

Last winter I did almost all heating with electricity and my utility company provides hourly temp with consumption in their site in Excel form, using it I can calculate heat losses quite accurately. If utility company provides that kind of data, it will help making better prediction (and saves one year for collecting data!)

1 Like

Did you ever find out the register for the inside temp sensor?

I just ordered this and waiting for it to arrive later this week.

EDIT

Used Google translate now on a previous post, “S_261_85: L1 Huonelämpötila” I guess that might be the inside temp sensor register, will test it once I have the sensor installed.

Yes, S_261_85 register is indoor temperature.