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

INTRODUCTION
This how-to is all about using Ouman EH-800 heating controller with Home Assistant. Ouman EH-800 is versatile and very popular heating controller in Finland for heating systems using water as transfer medium, both for the radiators and floor heating.

Prerequisites:

  • Ouman EH-800 controller, connected to ethernet (EH-800B won’t do, it has no Ethernet)
  • IP address, user and password configured in EH-800
  • basic knowledge on Home Assistant configuration files and tools
  • your EH-800 is properly configured and working

My heating system uses low temp water, so it doesn’t even need thermostats, so thermostats are not included in config example, yet they work exactly same way by reading and writing registers usin curl and cut. Part of the information, mostly register functions, are based on the information on Finnish maalampofoorumi.fi (geothermal energy). I’m using split configuration files. Output for curl-commands are saved in three text files in HA \config directory and state is read using cut-command, which read proper bit location(s). You can save results in other directory than \config, but then, be prepared to mess with user rights (is it really worth it?).

First, make sure you can access your EH-800 management web-page. If you can’t, controlling it using HA doesn’t work! EH-800 uses simple login, which needs to be refreshed regularly, I use 5 min refresh interval using automation. This example has three functions, yet many more can be implemented using same principle:

  • temperature dropping using switch on HA (home/away-function, can be useful in summer)
  • show temp request for circulation water
  • show actual temp for circulation water
    My EH-800 has IP address 192.168.1.211 and web-server is configured to port 8090.

CODE
In config.yaml required shell commands are specified. Update-commands change setting (away/home), while request-commands read. Login results are piped to null, since there is no reason to save them, after you see them working. You can test all commands in terminal.

config.yaml
shell_command:
  ouman_logon: 'curl "http://192.168.1.211:8090/login?uid=username;pwd=password;" > /dev/null'
  ouman_ltp_kotona: 'curl "http://192.168.1.211:8090/update?S_135_85=0;" --output /config/oumanltp.txt'
  ouman_ltp_poissa: 'curl "http://192.168.1.211:8090/update?S_135_85=1;" --output /config/oumanltp.txt'
  ouman_ltp_kysely: 'curl "http://192.168.1.211:8090/request?S_230_85;" --output /config/oumanltp.txt'
  ouman_menovesi_kierto: 'curl "http://192.168.1.211:8090/request?S_259_85" --output /config/oumankierto.txt'
  ouman_menovesi_pyynto: 'curl "http://192.168.1.211:8090/request?S_275_85" --output /config/oumanpyynto.txt'

switch:
  - platform: command_line
    switches:
      eh800ltp:
        friendly_name: EH_lampotila_pudotus
        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
        command_state: >
          cut -b 17 /config/oumanltp.txt
        value_template: '{{ value == "1" }}'

sensor.yaml

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

- platform: command_line
  name: Oumanpyynto
  command: cut -b 18-21 /config/oumanpyynto.txt
  unit_of_measurement: "°C"

binary_sensors.yaml

- platform: command_line
  name: Oumanltptila
  command: cut -b 17 /config/oumanltp.txt
  payload_on: 1
  payload_off: 0

automations.yaml

- id: '1657895187329'
  alias: Ouman-toiminnot
  description: Automaattinen kirjautuminen Ouman EH800, kiertoveden lämpötila ja lämpötilapyyntö,
    5min välein
  trigger:
  - platform: time_pattern
    minutes: /5
  condition: []
  action:
  - service: shell_command.ouman_logon
    data: {}
  - delay:
      hours: 0
      minutes: 0
      seconds: 5
      milliseconds: 0
  - service: shell_command.ouman_menovesi_pyynto
    data: {}
  - delay:
      hours: 0
      minutes: 0
      seconds: 5
      milliseconds: 0
  - service: shell_command.ouman_menovesi_kierto
    data: {}
  mode: single

Automation is probably easiest to generate using HA Automation tool. Automation runs every 5 min, it calls first login, waits 5 seconds and calls other states to update, 5s wait between every call.

If you are having problem with files, create empty files in config editor and execute sudo -R 777 filename in terminal for every file beginning with ouman and ending to .txt

Other known registers (from maalampofoorumi.fi and this community) and settings:

  • S_259_85: L1 Menoveden lämpötila / Water temp to heater
  • S_227_85: Ulkolämpötila / Outdoor temp
  • S_261_85: L1 Huonelämpötila / Room temp
  • S_272_85: L1 Venttiilin asento / Valve position
  • S_102_85: Huonelämpötilan hienosäätö / Room temp offset (thanks Vivillik!)

L1 is heating circuit number 1 and always present, you may have circuit L2 too. In other language versions than Finnish these circuits are V1 and V2 (thanks Belaial!)

Edit: added some register / setting information discovered afterwards.

7 Likes

Thank you for this guide. I’m trying to setup S_272_85 register (venttiilin asento) to sensor.yaml. That needs different cut-command for valid numeric value. I trying to figure out the correct syntax for cutting between “=” and “;”. Do you already have a correct syntax for this?

1 Like

I made slightly different approach. I don’t write the response in a file, but format it right away after the curl command. In automations.yaml I have only the log on every five minutes (same as Honkkis). In configuration.yaml I have the sensors as below (valve 1 postion as an example). The first cut command cuts away the end of the string from “;” character onwards and the second cuts away the beginning leaving nothing but the value.

#automations.yaml

- id: '1664215269197'
  alias: Ouman
  description: Log on every 5 minutes
  trigger:
  - platform: time_pattern
    minutes: /5
  condition: []
  action:
  - service: shell_command.ouman_logon
    data: {}
  mode: single
#configuration.yaml

sensor:

  - platform: command_line
    name: Ouman_venttiiliL1
    command: curl "http://192.168.68.50/request?S_272_85" | cut -d ';' -f 1 | cut -b 18-
    unit_of_measurement: "%"  

There are a few registers still missing. I don’t have inside temp sensor yet, but I’m planning to add that later on.

S_227_85=8.7;     Ulkolämpötila	Outside temp
S_135_85=2;	     Kotona/poissa	home/away,0=home,1=away;2=not used
S_1000_0=L1 Käsiajo, sähköinen(1%);	   L1 ohjaustapa	Control mode H1 (e.g. automatic)
S_259_85=26.4;     L1 Menovesi	Supply water temp H1
S_275_85=20.9;     L1 Pyyntö	Requested temp H1
S_134_85=-1.0;	Huonelämpötilan hienosäätö L1	Room temp fine adjustment
S_1001_0=L2 Normaalilämpö;	L2 ohjaustapa	Control mode H12(e.g. automatic)
S_293_85=24.3;	L2 Menovesi	Supply water temp H2
S_310_85=24.5;	L2 Pyyntö	Requested temp H2
S_221_85=0.0;		
S_272_85=1; L1 %	        Venttiili L1 %	Valve position H1
S_306_85=16; L2 %	Venttiili L2 %	Valve position H2
S_26_85=600;	Trendin näytteenottoväli	Trend sampling interval
S_89_85=2.0;	        L1 Lämmönpudotus (menovesi)	Temp drop
S_90_85=6.0;	        L1 Suuri lämmönpudotus (menovesi)	Big temp drop
S_54_85=12.0;	L1 Menoveden minimiraja	Min water temp
S_55_85=35.0;	L1 Menoveden maksimiraja	Max water temp
S_61_85=33.0;	L1 säätökäyrä ala	Heating curve low
S_63_85=25.0;	L1 säätökäyrä keski	Heating curve mid
S_65_85=15.0;	L1 säätökäyrä ylä	Heating curve high
S_176_85=2.0;	L2 Lämmönpudotus (menovesi)	Temp drop
S_177_85=6.0;	L2 Suuri lämmönpudotus (menovesi)	Big temp drop
S_141_85=12.0;	L2 Menoveden minimiraja	Min water temp
S_142_85=35.0;	L2 Menoveden maksimiraja	Max water temp
S_148_85=31.0;	L2 säätökäyrä ala	Heating curve low
S_150_85=25.0;	L2 säätökäyrä keski	Heating curve mid
S_152_85=21.0;	L2 säätökäyrä ylä	Heating curve high
S_0_0=0.0;		
S_294_85=23.3;	L2 menovesi säätökäyrän mukaan	
S_292_85=0.0;	L2 lattialämm ennakoinnin vaikutus	
S_321_85=0.0;	?? hienosäädön vaikutus ??	
S_300_85=1.2;	Syyskuivauksen vaikutus menoveteen	
S_92_85=1;		
S_59_85=6;		
S_179_85=20;		
S_146_85=0;		

2 Likes

Great. Thanks for the tip. Curl command with cut commands is a great approach. Same result but I formatted command like this: | cut -d ‘=’ -f2 | cut -d ‘;’ -f1

1 Like

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.