Connecting OJ Microline Floor Heat Thermostat

Has anyone been able to integrate one of these wifi thermostats (OJ Microline UWG4 / AWG 4) ? They are very common and rebranded for the major companies (ex. Warmly Yours nSPire touch). There is an app to control them and browser access (mythermostat.info), but no formal API. Integration with Google etc has been “coming” for some time. After capturing the network traffic I can make adjustments and read the temperature using POST/GET commands, but there is a changing session ID in the URL that seems like it has to be renewed randomly. Thanks

Google Home integration for this thermostat has been ‘coming’ for quite some time. I didn’t have much success with using POST to make frequent changes from HA (the thermostat’s scheduler would randomly revert to control). I’ve compromised by using the thermostat scheduler for day to day use, then sending a POST command from Node Red to switch to Manual and turn the temp down to 12 C (RegulationMode : 3 , ManualTemperature: 1200) when away from home, then another POST to resume the schedule (RegulationMode : 1) when returning. My primary need for control was to have all the house thermostats go down and come back up together so at least it does that now, rather than having to go to each thermostat or open up the separate app.

You will need the Serial number of the thermostat, Login Email and Login Password from mythermostat.info (substitute into the fields marked in bold)

Flow to switch to Manual and turn down to 12 C:

[{“id”:“85ea379.8ebfbc8”,“type”:“function”,“z”:“7d5b80eb.d7262”,“name”:“Bath Floor Away On”,“func”:"//Format the HTTP Post request to send to Mythermostats.info\n\nmsg.url=‘https://mythermostat.info/api/thermostat?sessionid=’+flow.get(“SessionId”) +’&serialnumber=SERIAL NUMBER’;\nmsg.payload={“RegulationMode”:3,“ManualTemperature”:1200}\nmsg.headers=‘Content-type: application/json’;\n\nreturn msg;",“outputs”:1,“noerr”:0,“x”:200,“y”:200,“wires”:[[“ede7894b.daff68”]]},{“id”:“ede7894b.daff68”,“type”:“http request”,“z”:“7d5b80eb.d7262”,“name”:“Change thermostat setting”,“method”:“POST”,“ret”:“txt”,“url”:"",“tls”:"",“x”:520,“y”:200,“wires”:[[]]},{“id”:“af46e096.5029a”,“type”:“http request”,“z”:“7d5b80eb.d7262”,“name”:“Mythermostat.info login page”,“method”:“POST”,“ret”:“obj”,“url”:“https://mythermostat.info/api/authenticate/user",“tls”:"",“x”:200,“y”:140,“wires”:[[“c6be968b.a443f8”]]},{“id”:“2c4db6de.adaf3a”,“type”:“function”,“z”:“7d5b80eb.d7262”,“name”:"Set the HTTPS Request for the Mythermostats.info login page”,“func”:“msg.payload={“Email”:“LOGIN EMAIL”,“Password”:“LOGIN PASSWORD”,“Application”:0};\nmsg.headers=‘Content-type: application/json’;\nreturn msg;”,“outputs”:1,“noerr”:0,“x”:310,“y”:80,“wires”:[[“af46e096.5029a”]]},{“id”:“c6be968b.a443f8”,“type”:“change”,“z”:“7d5b80eb.d7262”,“name”:“Set the Session ID from Mythermostat.info”,“rules”:[{“t”:“set”,“p”:“SessionId”,“pt”:“flow”,“to”:“payload.SessionId”,“tot”:“msg”}],“action”:"",“property”:"",“from”:"",“to”:"",“reg”:false,“x”:560,“y”:140,“wires”:[[“85ea379.8ebfbc8”,“4143ff58.20109”]]}]

Flow to resume schedule:

[{“id”:“1f98cfde.615bf”,“type”:“function”,“z”:“e3d25904.39d5b8”,“name”:“Set the HTTPS Request for the Mythermostats.info login page”,“func”:“msg.payload={“Email”:“LOGIN EMAIL”,“Password”:“LOGIN PASSWORD”,“Application”:0};\nmsg.headers=‘Content-type: application/json’;\nreturn msg;”,“outputs”:1,“noerr”:0,“x”:310,“y”:80,“wires”:[[“fba4cca8.5328e”]]},{“id”:“fba4cca8.5328e”,“type”:“http request”,“z”:“e3d25904.39d5b8”,“name”:“Mythermostat.info login page”,“method”:“POST”,“ret”:“obj”,“url”:“https://mythermostat.info/api/authenticate/user",“tls”:"",“x”:200,“y”:140,“wires”:[[“7b63213f.433db”]]},{“id”:“7b63213f.433db”,“type”:“change”,“z”:“e3d25904.39d5b8”,“name”:"Set the Session ID from Mythermostat.info”,“rules”:[{“t”:“set”,“p”:“SessionId”,“pt”:“flow”,“to”:“payload.SessionId”,“tot”:“msg”}],“action”:"",“property”:"",“from”:"",“to”:"",“reg”:false,“x”:560,“y”:140,“wires”:[[“42d14584.eaff8c”,“39277401.f0f16c”]]},{“id”:“42d14584.eaff8c”,“type”:“function”,“z”:“e3d25904.39d5b8”,“name”:“Bath Floor Away Off”,“func”:"//Format the HTTP Post request to send to Mythermostats.info\n\nmsg.url=‘https://mythermostat.info/api/thermostat?sessionid=’+flow.get(“SessionId”) +’&serialnumber=SERIAL NUMBER’;\nmsg.payload={“RegulationMode”:1}\nmsg.headers=‘Content-type: application/json’;\n\nreturn msg;",“outputs”:1,“noerr”:0,“x”:200,“y”:200,“wires”:[[“4345b00.8078b5”]]},{“id”:“4345b00.8078b5”,“type”:“http request”,“z”:“e3d25904.39d5b8”,“name”:“Change thermostat setting”,“method”:“POST”,“ret”:“txt”,“url”:"",“tls”:"",“x”:520,“y”:200,“wires”:[[]]}]

@blackshoals, Nice finding. Thank you for your posting!
I specifically chose the OWD5 from OJ Microline (oj.dk), because it was the only WiFi thermostat at the time that integrates nicely in ABB(reflex SI) home switching devices and had the promice of domotica integration. That was back in 2013! I even directly contacted OJ factory in Danmark, but although very friendly people they can not give support to end users.
They did tell me that they were looking for possibilities, but that they could not figure out a business model to open it up to the cloud. But my wish was for opening up to local network only, but it is end 2020 and nothing changed.
Anyway, your comment gives me hope.
I tried to login mythermostat.info, but I have a user account and password only. So no email address.
How did you get an account on mythermostat.info ?
Ultimately I would like to have it work without going through internet(service). In the first post you mentioned that you captured the network traffic (locally). Wouldn’t it than possible to fire the post cammands locally to the IP address of the thermostats?

Hi, if you have a user account and password you should be able to sign straight into mythermostat.info or identity.mythermostat.info. The account activation is done from the device itself - ie the actual thermostat has to call back to OJ Microline and identify itself.

I wasn’t able to control the devices from the static, local IP, but I may have been on the wrong track. It seems like they need the unique Session ID from mythermostat.info. My HA setup uses DuckDNS so local control was not critical to me.

If you have not checked it out there is a NuHeat integration written in the last year or so that uses the same rebranded OWD5. The developer used a custom Python library to sign into NuHeat that I think could be adapted to point other than the NuHeat cloud, but I have not investigated it. NuHeat recently released Google/Apple home control support and I hoped that would roll out across the OWD5 resellers, but it sounds like from your update that is unlikely. Good Luck.

1 Like

I completely reset the thermostat to factory default, because I had forgotten how I registered. Even after reregistering I end up with a username password. No email address.
I tried to login with the new credentials created while registering/linking the OWD5 app to the thermostat, but identity.mythermostat.info keeps saying invalid username or password. I guess my thermostat uses another service. I’m in the Netherlands.

I don’t fully understand what you mean with the NuHeat integration. Would that require different software on the thermostat or (just) other app?

I think activation is specific to the floor heat manufacturer you are using. OJ Microline seems to provide a the cloud backend to the manufacturers. In my case, using WarmlyYours, they serve up a website branded that way on mythermostat.info. The reason I suggested looking at NuHeat is that customers of that manufacturer get exactly the same page, just different branding, logos, etc.

Hi @blackshoals,
Did you have any further luck? Can you share you project with me?
I tried logging in to mythermostat.info website and I don’t have a userID. I sign into the SWATT app to change settings when out.

I am hoping to get a Control4 integration driver.
Any assistance would be appreciated.
Thanks

Hi, my Node Red flow shown above that switches the schedule on and off has been working well enough so I have not made further changes. Without an API adding more functions would increase their website traffic. The portal served from OJ Microline (in my case the brand is Warmly Yours --> mythermostat.info) may be different for you. You should get a User ID automatically when you activate your thermostat.

Interesting. On their website “Is this your first time here? If you do not have a User ID, please contact your Sales Manager / Key Account Manager.”

No idea who to contact.

Will dig

FWIW I wrote an integration for the UWG4/AWG4. It is working quite well for me. It creates thermostats as Home Assistant climate entities and lets you change their setting through the UI. It supports Auto mode, as well as changing the temp setting either permanently or for a 90 minute (customizable) duration. Manual installation is required.

This is my first time hacking HA. Enjoy!! I promise nothing (though I think this is working well). And any feedback is appreciated.

1 Like

This is a useful looking port. My original solution of switching between scheduled and off has worked well for a few years, but having more control combined now with nielsfaber’s scheduler component is better. So far this has been working for a few days. If the server cuts off access I’ll report back. Thanks for the effort.

1 Like

Today I’m so happy after such a long time fighting to get the OJ Microline OWD5 thermostat really a smart device…
I want to share the way it works now. Thank you @blackshoals and @oppigard and ofcourse @robbinjanssen for the HACS Integration!

  • Downloaded the ‘OJ Microline thermostat’ HACS integration.
  • Read the Customer ID from the thermostat information panel(in OWD5 Apple App)
  • Copied the API key from #oppigard’s post 'WMD5 Wifi Thermostat
  • Clicked the “Add integration to My…” from the integration download page
  • Followed the configuration and supplied; Customer ID(Customer ID from above. Tried 99 and 111, but did not authenticate), API key from #oppigard, and username(not an email address) and password.
    And Whopa!:heavy_check_mark::+1::smiley:

-url to oppigard’s post(for API key): MWD5 WiFi thermostat (OJ Electronics/Microtemp)
-url to github source #robbinjanssen HACS integration; GitHub - robbinjanssen/home-assistant-ojmicroline-thermostat: Home Assistant integration for an OJ Microline Wifi Thermostat

1 Like

I found that my uwg4 integration broke with the latest climate changes in 2024.1 core. So I just updated it. If you pull the latest changes, it will work again.

Dave

I recently purchased the new UWG5 thermostat. Any plans to add this to the list of compatible thermostats?

Thanks!

Someone would need to have one of these to begin the process. Have you tried using either the UWG4 integration or the OWD5 integration to see if they work? If not, then you might need to reverse engineer the protocol differences and write your own.