Seems like you have no groups/zones setup in the application or maybe it could not login using username/password supplied. There should be a file called data.json in the /opt/home-assistant folder that should contain a dump of the current configuration of all zone/thermostats associated with your account.
I tried this, because the Node-Red one is still not working for me. Even with the info in de debug prints not.
Now I put all the files in custom components, edit the files mentioned in the readme. When I try restart HA, it gaves me the message: Platform error climate.mwd5 - Integration ‘mwd5’ not found. Please can u check if I made a mistake?
Information in the logs gives me the following info, but I checked everything and found nothing strange. Other custom components are working fine, with and without HACS.
Logger: homeassistant.components.websocket_api.http.connection
Source: components/hassio/init.py:529
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 21:57:40 (1 occurrences)
Last logged: 21:57:40
[140468305899056] The system cannot restart because the configuration is not valid: Platform error climate.mwd5 - Integration ‘mwd5’ not found.
Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py”, line 200, in handle_call_service await hass.services.async_call( File “/usr/src/homeassistant/homeassistant/core.py”, line 1745, in async_call task.result() File “/usr/src/homeassistant/homeassistant/core.py”, line 1782, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File “/usr/src/homeassistant/homeassistant/components/hassio/init.py”, line 529, in async_handle_core_service raise HomeAssistantError( homeassistant.exceptions.HomeAssistantError: The system cannot restart because the configuration is not valid: Platform error climate.mwd5 - Integration ‘mwd5’ not found.
@0xi3
Maybe I made a mistake in the README.
In the development environment, there is the config/custom_components folder.
Normally, this config folder will not exist in a non-development environment.
Instead this is how it looks like on my PI, where HA runs in a docker container:
pi@raspberrypi:/opt/home-assistant/custom_components/mwd5 $ ls
climate.py config_flow.py const.py __init__.py manifest.json __pycache__ strings.json translations
pi@raspberrypi:/opt/home-assistant/custom_components/mwd5 $
Did you deploy it like above ?
Yes, it is indeed in config/custom_components. There are more custom components in there.
I put the mwd5 folder in it, restart without problems. Add the climate config to configuration.yaml, then restart and the error came. Comment the config with #, save and restart without problems. So looks like it won’t see the mwd5 folder.
@0xi3
I got curious and tested the code on the latest dev branch of home assistant. Sure enough the integration was not loaded by home assistant, showing the following in the error log:
The custom integration ‘mwd5’ does not have a version key in the manifest file and was blocked from loading. See Custom integration changes | Home Assistant Developer Docs for more details
I’m running an older version of HA on my PI, due to some dependencies I didn’t have time to iron out so I didn’t catch this issue on my setup.
Nevertheless, I made a small update to the code an now it seems to work with the latest HA. It’s already on github, so maybe give it a try.
You are a hero! That was the missing line. It is working fine on my HA now!
Thanks for the help!
P.S. thermostat is branded as “Speedheat”, so confirmed that that is working too.
I have a zone defined, and i have checked the user/password. Do i need to do something with the api-key? Also added the versioning before the last post. I dont have a folder in called home-assistant in my opt. ha runs on a raspberry pie
Ant tip on where to find the logfile you refering to?
The API key should be fine as it is.
It seems to me you need to find the configuration directory (same where configuration.yaml
is stored).
Inside that configuration directory you can create the custom_components
folder if it is not already existing.
Here’s how it looks on my side:
pi@raspberrypi:/opt/home-assistant $ ls
automations.yaml deps influx.yaml
binary_sensors.yaml groups.yaml scenes.yaml
blueprints home-assistant.log scripts.yaml
certs home-assistant.log.1 secrets.yaml
configuration.yaml home-assistant.log.fault sensors.yaml
core home-assistant_v2.db template_sensors.yaml
custom_components home-assistant_v2.db-shm tts
data.json home-assistant_v2.db-wal
pi@raspberrypi:/opt/home-assistant $ ls custom_components/mwd5/
climate.py const.py manifest.json strings.json
config_flow.py __init__.py __pycache__ translations
pi@raspberrypi:/opt/home-assistant $
Inside the custom_components
folder you should place the mwd5
folder from gtihub.
Some more info here: Integration File Structure | Home Assistant Developer Docs
Sorry didn´t realise you where talking about the home assistant root_folder.
I think I have set it up just like you. HA starts the component, but i don´t have the data.json file. Maybe my thermostat is not compatible.
It could be.
I see above that some people use a different hostname for the API:
I have ocd5.azurewebsites.net:443
vs owd5-mh015-app.ojelectronics.com
menitoned by others above.
The API looks similar, but there are some differences:
In my code I have:
"CustomerId": "99",
"ClientSWVersion": "1060",
but above, I see
"ClientSWVersion": 1,
"CustomerId": 111,
I’ve added a basic test file in the repositoy it should at least allow you to test if your thermostat is compatible with this code, independent of HA.
You can use it like this:
- edit
mwd5_test.py
add your username/password - install dependencies:
pip install requests
- Run the script:
python .\mwd5_test.py
For me, it looks like this:
python .\mwd5_test.py
Logged in with username xxxxxxx
Session ID: xxxxxxxxxxxxxxxxxxxx
G: Living si Bucatarie : Setpoint: 22.11 : AUTO
Living si bucatarie : Heating OFF : 21.9/18.0 : MANUAL : ONLINE
If you get something like above then it should work with HA also.
Hope this helps
Thanks for your help. I made it work with the node-red example above. Will explore a bit more at a later date. Would have been fun to get this addon working
radub, great work! I didn’t try the integration yet, but the code looks promising to me.
One thing that needs to be customisable is the customerId. This thermostat is used by several brands. For me, customerId = 3 (SCHLUTER DITRA) is required.
The hostname url looks ok for me. https://owd5-sl003-app.ojelectronics.com redirects to https://ocd5.azurewebsites.net:443 - Maybe it would be better to use https://owd5-sl003-app.ojelectronics.com because the azure cloud hostname might change sometimes in the future.
@MeisterMauzi thanks for the hints !
If you do give it a try, it’s worth to share the results. If nothing else, maybe others will get some info about what works/doesn’t work.
@radub thanks for the last update regarding customerId. I was able to make it work with my Schluter Ditra branded thermostat. Still some minor improvements I guess (disabled mode has no effect and I don’t have vacation mode) but good work!
Hi @radub, coincidentally i’m working on my own python integration for the OWD5, the API calls are pretty similar
However im having trouble with the boost mode, I think I did the time calculation right, but it jumps back to the schedule after a few seconds. Did you experience this as well?
Hi, I also had the same issue. I live in a GMT+2 time zone so I would set the boost end time accoring to my time zone. It would immediately disable but when I queried the server I saw boost end time was 2 hours in the past. For me, I add 2h to the desired end time (so it’s 30m + 120m in the code).
Something is not quite right with the TZ handling serverside, or I just don’t get what’s supposed to be in the API.
There is a "TimeZone": 7200,
entry in the request inside my code. This looks an awfull lot like 2*3600s so maybe it’s related.
I see, for me the fix was updating the group using /api/Group/UpdateGroup
instead of updating a single thermostat. I don’t know why but after updating the group the thermostat no longer switches off after a few seconds.
Thanks for the info!
Working on a HACS integration
Looking good so far, haven’t done anything with the energy endpoints though… not sure if I will
Hi robbin, maybe you can share your code repository and whoever is interested (and capable) can work together with you on the integration?
Sure, but it is still in development and I don’t recommend using it yet.
For example when a timeout occurs at one point the whole device becomes unavailable in home assistant and you have to reload the integration. You can try it in home assistant by adding this repo as a custom repository in HACS: