I think Home Assistant 2023.12.2 core update need some chance to ouman code. Every measurements are unknow.
platform: command_line
name: Ouman_menopyyntö
command: ‘curl “http://192.168.0.98:60098/request?S_275_85” | cut -d “:” -f 2 | cut -d “;” -f 1 | cut -b 18-’
unit_of_measurement: “°C”
That old code is not works any more. What I must do. What I must chance.
Soooo long since I put this all up but my setup is working still, this is what I have (sorry if something is wrong, trying to remember it all on the fly)
Create a shell_command in /homeassistant/configuration.yaml
(replace ip, port, username & password with your values)
Again, this might not be the best or recommended way to do it but it works for me for now at least.
Like @honkkkis mentioned about a month ago, it might be a good time to start a new thread or somehow clean this one up or a github page or something to better keep track of everything.
If someone sees anything wrong with my setup please let me know but I think this is all I have.
Hi! I’ve been trying to implement Ouman EH-800 valve control to my Home Assistant instance and I have managed to get sensors working. For some reason, I am not able to get switches work. I have explored Ouman’s web interface via browsers devtool, but I haven’t found solution for this.
Here’s example from my command_line.yaml where sensors are working like a charm, but switch is not changing the state at all. What is wrong with my yaml?
One more thing, I have written everything I’ve done to this repo: https://github.com/mhumaloja/ouman_eh-800_HA/ is this potential way to develop this further in cooperation? I will open the repository to developers who would like to conribute.
Here are examples of my two working switches that controls the valve operational mode for the Ouman itself and the extra valve via EXU-800
The radiator one is the EXU-800
The 100% value in the name of the swtich is not changed by HA or this switch, the Ouman remembers the last value set in the GUI so it just goes back to that value when that operating mode is selected, I have not tried to control the % value via HA since I have not had any use for it, I guess it should not be to hard to fix it if needed.
Regarding Github I think that might be the best way forward when keeping track of everything, I have very little / no experience with maintaining a repository there but willing try try and learn how to @mhumaloja
One thing you want to include is the “state_class”, at least I think that is needed to automatically get the long term statistics working, I recently added this since I did not have it from the start, I noticed you did not have that one as well so hopefully it’s helpful information.
That one works for me to control home / away, have not tried the way you do it with the edited curl parts, try mine without any edits just to verify it works before you try it your way.
Regarding Github, I need to sit myself down some evening to look into how it works, I will try and create my own hidden repo first, then I can help edit yours when I know how to I will get back to you on that one, in the meantime feel free to copy and use all my examples on your repo.
Nope, doesn’t work. All request? type curl commands are working but update? are not. Login shoud be ok because requests are working. I have sensor and binary sensor for request?S_135_85 and I tried to disable them. No effect, still not working. I have a dead end with this…
Then I have no real clue what could be wrong, I checked in GUI on the Ouman when I used the switch and it changed there so it must be working, at least for me.
Maybe some difference between our Oumans? Mine is quite old I think. not sure how old without checking at home (at work now), I am quite sure tho it’s running software 2.0.4, in case you have something else I guess there’s a possibility it works differently from mine.
As a side note I tried to change the automation that runs the “shell_command.ouman_logon” to 20 minutes (instead of 2), no issues so far so the login timeout is at least 20+ minutes.
@mhumaloja - I checked again and noticed a small mistake in my code for the “command_state”… sorry for that, I have updated my previous post so please check it again.
Issue was “cut -b 17-” in the end needs to be “cut -b 18-” instead, mistake was made since I copied a switch for the “?S_59_85” value, there is 1 character less than in that than in “?S_135_85”… so the result was all messed up and therefore the “command_state” did not work, I was to quick when checking that yesterday… sorry for that.
I have now verified it works for me, if I update from HA by toggling the switch it updates in Ouman GUI and if I manually change in Ouman GUI it updates the switch also in HA after “scan_interval: 120” has triggered.
Something changed with this. Earlier if I toggled the switch in HA UI it switched back after a moment. Now switch keeps the state ONCE but if I toggle it back off it switches back on itself. And it does not change the setting in Ouman WebUI. This is very Weird. It looks like the curl command is not authorized or something…
Something changed with this. Earlier if I toggled the switch in HA UI it switched back after a moment.
Yes, this is due to the error I mentioned where I had “cut -b 17-” in the end but it needs to be “cut -b 18-”
To show what happens,
curl http://ip.ip.ip.ip:port/request?S_135_85 --output - | cut -d ';' -f 1 | cut -b 17-
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 20 0 20 0 0 3258 0 --:--:-- --:--:-- --:--:-- 3333
=0
If you look above I run with “cut -b 17-”, the reply on the last line is “=0”, so the value_template becomes false since the reply does not match the true statement
If I however use
curl http://ip.ip.ip.ip:port/request?S_135_85 --output - | cut -d ';' -f 1 | cut -b 18-
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 20 0 20 0 0 2911 0 --:--:-- --:--:-- --:--:-- 3333
0
You see the reply is now only “0” when I use “cut -b 18-” instead, so the reply now have a value which = true according to the if / else value_template, so the switch will stay on.
And it does not change the setting in Ouman WebUI. This is very Weird. It looks like the curl command is not authorized or something…
Have you checked in the Ouman GUI that the Home / Away boxes really does have “?S_135_85” as it’s register? Otherwise I can’t think of anything right now that could case the issue as long as you test with my example, I described here how I check the registers.
I understood this cut operation error. Register is right according to the Ouman webUI, it is showing 135_85 as an url request in dev tool network tab. I’m turning to think that my trial and error development approach has made something deeper thing to my Home Assistant database or entity structure. I will try to delete all 135_85 related sensors and switches out of my installation and then try to put the switch back again with your code.
Ok, good luck with that, hope you figure it out! I will be quite AFK this weekend but will check in now and then to see if you have any questions.
Made a short video just to show how the switch works for me, “wrong” language but “Hemma” means home and “Borta” means away, “Inte H/B -styrn.” is no home / away control.
You can’t see the cursor… but at first I click the button i HA, then I change in Ouman GUI and after some time the switch reflects the change.
I just went with @mhumaloja git repo and all seems good, great, thanks!
Then I started to debug a little that switch and got similar experience as Markus. First I noticed, that for some reason curl “{{ states(‘input_text.ouman_eh800_ip’)}}update?S_134_85=5;” notation doesn’t work, get error in the logs. Looks like it never expands that input_text.ouman part. But it does work with the sensors. Weird.
But anyway, I noticed the same odd behaviour and it seemed that double clicking the switch always worked. With single click every other command went through, and the switch in HA sometimes reverted back even the command went through.
Then I played little with the value_template, and ended up with this, and now it seems to work: (True / false → On / Off)
name: Ouman home-away switch
unique_id: Ouman home-away switch
command_on: curl "http://192.168.1.6/update?S_135_85=1;"
command_off: curl "http://192.168.1.6/update?S_135_85=0;"
scan_interval: 30
command_state: curl "http://192.168.1.6/request?S_135_85" | cut -d "=" -f2 | cut -d ";" -f1
value_template: >
{% if value == "0" %}
on
{% else %}
off
{% endif %}
type or paste code here
And thanks for the git repo, cleared things a lot!
Nice that it works! For me at least my example works just fine.
I have started to look some at Github, I have made my own repo just to learn how things work, I have not made it public yet but once I feel ready I will do that, if we decide to go for mine or @mhumaloja does not matter to me, I just wanted to learn a bit about Github at the same time before I maybe edit other peoples repo’s.
Good work @Belaial and @mhumaloja! This project definitely deserves some kind managed environment for maintenance and developmet, HA gets frequently changes that make pure forum impractical.
If someone has find out more complete register list, it might be worth publishing. Earlier lists are from maalampopumput.info etc, and it seems to be, that there might be partially incorrect information. Some members have been obviously able to find more registers, since they have extension units (EXU/EXP) and two circuits.
Here is my take on creating a Github repository for Ouman EH-800
Please have a look, let me know if you find anything horribly wrong… Translations under registers.txt might need some re-working… I added the registers I have personally found and reformatted the list to be in a more logical order than the original list, now sorted numerically instead of whatever the original list was
Thanks @Jusii for trying to solve my problem. I copied your code to my command_line.yaml and switch is still behaving like before. Can you help me debug this thing? Is there some tool or HA developer feature that I can debug switches behaviour? I’m starting to think that my database is having some garbage in this switch data or something deeper than just the yaml code…
I checked logs. I seems that switch command is timed out. If I set command_timeout 30 or more logs show error with return code 56. I will try to figure out what it is…