Just to add my thanks to @ob0t for creating this - and am keeping a watching eye on developments - great work
So an update from my side… I managed to get it all installed. Using the hub IP and the root and root. It pulls through my screenless thermostats… and shows the set temp, current temp and a status of heat or not and schedule or not.
Those are the good bits…
The issues are it doesnt seem to update when the hub makes an update…the values are all just as they were when I set it up.
Also trying to change any of the values results in the error “failed to call service climate/set_hvac_mode.”
Any ideas?
Much appreciated for you efforts ob0t.
I managed to get the integration installed & connected.
The default login of root/root didn’t work for me, but I used the Packet Capture app to analyise what the Wunda app was sending to the hub from my phone.
From here I could see there is a field ‘auth_root’ which contains a base 64 value which decodes to root:password
I set the user to root & password from the above and it works! I haven’t tested it to any level yet though.
Fantastic! Which app did you use (is this iOS or Android) ?
I finally worked out how to grab the password, thanks for the info on auth_root. Integration now added.
Hi I would also like to connect Wunda to my HA but… What the last point means?
- Add the wundasmart integration via your configuration page
What did the author have in mind? Is it about configuration.yaml - if yes, what is the name of the keys you need to provide (for example: login, password, ip) Please help. I am very pleased to see a example configuration.
Edit (Update): I finally figured out how to add this integration (I’m writing this as information for the rest who are also beginners) - how to install [extended description version]
- Download the files from the GitHub repo into your custom_components folder
- Restart HA
- Go to Settings > Integrations > Click on + button in right corner > Search wundasmart and click on it
Can you share information how to obtain the login and password? In my case also does not work standard root:root or root:password
I would very much to use this integration - thank you for help
I used a convoluted approach. Install Xcode, using Airtool (trial) to capture packets being sent between iPhone and WundaSmart app. One you start capturing packets you can then search for the auth_root data. Then google base64 to text to get the root:****** password in usable format.
I managed to get the password for the application thanks to @sgilliAm91ba and @degreecy for the information.
Here are the instructions on how to get the credentials for integration. I hope it will be helpful to others - when we know step by step what to do the whole thing should take 3 minutes.
(Instructions for an Android)
- Step 1: Install the PCAPdroid Application on your mobile
- Step 2: Connect to your network WiFi (it’s important)
- Step 3: Launch the PCAPdroid app (allow everything)
- Step 4: Follow the instructions in the picture (After step 2 when you click “Ready” minimize the app and launch WundaSmart, log in to your system and return to PCAPdroid
- Step 5: Once you have the Base64 encrypted password, you need to decrypt it. You can use any online site for this by typing “Base64 Decode” into google
Done
Hey - I’m in the process of deciding which underfloor heating controls to go for. Local control is a huge plus for me.
Looks like you’ve made great progress so far with the read-only access. I would love to get an update on your thoughts on the likelihood of being able to control Wundasmart through Hass. This will help with my decision-making process.
Thank you!
Also managed to get the creds using PCAPDroid- however ehen starting the inetgration:
Logger: homeassistant.config_entries
Source: custom_components/hawundasmart-main/__init__.py:43
Integration: hawundasmart-main
First occurred: 3:02:00 PM (2 occurrences)
Last logged: 3:03:15 PM
Error setting up entry Wundasmart for hawundasmart
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/config_entries.py", line 327, in async_setup
result = await component.async_setup_entry(hass, self)
File "/home/homeassistant/.homeassistant/custom_components/hawundasmart-main/__init__.py", line 43, in async_setup_entry
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
AttributeError: 'ConfigEntries' object has no attribute 'async_forward_entry_setups'
Is this a known issue?
Thanks @lianliu3 instructions worked a treat to extract the username & password.
Looking forward to any updates on this library to set/edit temperatures etc. Happy to help with testing etc.
For some reason the custom component isn’t properly working for me. It loaded all of the configured rooms but some of them just show as unavailable. It also wasn’t updating for me.
I can’t help with improving the integration library, so in the meantime I’ve created a workaround to get read-only temperature & humidity readings which I’ll share below. This was made possible by all the info @ob0t provided above (e.g. the link to the Polish resource and oB0t’s python code). So a big thank you @ob0t !
Below is the YAML for a REST sensor that polls the Wunda Hub every 60 sec for the temperature & humidity values. It relies on manually inputting the room ID for each temp & humidity sensor.
sensor:
- platform: rest
authentication: basic
username: root
password: root # Your password here
scan_interval: 60
resource: 'http://[HUB IP ADDRESS]/cmd.cgi'
sensor:
- name: Bedroom Temperature
unique_id: bedroom_temperature
device_class: temperature
value_template: >-
{{ value_json.rooms | selectattr("i", "eq", 121) | map(attribute="t")
| first }} # Room ID = 121
- name: Bedroom Humidity
unique_id: bedroom_humidity
device_class: humidity
value_template: >-
{{ value_json.rooms | selectattr("i", "eq", 121) | map(attribute="h")
| first }}
- name: Living Room Temperature
unique_id: living_room_temperature
device_class: temperature
value_template: >-
{{ value_json.rooms | selectattr("i", "eq", 122) | map(attribute="t")
| first }} # Room ID = 122
- name: Living Room Humidity
unique_id: living_room_humidity
device_class: humidity
value_template: >-
{{ value_json.rooms | selectattr("i", "eq", 122) | map(attribute="h")
| first }}
- name: Kitchen Temperature
unique_id: kitchen_temperature
device_class: temperature
value_template: >-
{{ value_json.rooms | selectattr("i", "eq", 123) | map(attribute="t")
| first }} # Room ID = 123
- name: Kitchen Humidity
unique_id: kitchen_humidity
device_class: humidity
value_template: >-
{{ value_json.rooms | selectattr("i", "eq", 123) | map(attribute="h")
| first }}
Thats brilliant - I now have all my Wunda thermostats reporting into HA and have built climate entities. Would you also happen to know what the URL would be for the rest api to use post requests?
Many thanks - thats exactly what I needed
Do you have anything you can share? Sounds like you’ve made some progress with climate entities?
Thanks @ob0t for the integration, got this to work (after getting the password as described above) without a hitch and can now see all rooms and their temperatures in HA.
Does someone have any pointers on how to go about setting the temperature? Happy to contribute where I can and I’m somewhat familiar with Python but am struggling with the syntax for getting the homeassistant integration to work.
My understanding is that the homeassistant integration is requiring pywundasmart 0.04, and specifically get_devices
. But version 0.0.5 already has a function called put_state
which usese the setregister.cgi endpoint mentioned above.
If anybody can point me towards a resource explaining HA HVAC integrations / syntax I’m happy to have a go and create a fork or pull request!
Thanks to those above that did a lot of the hard work on this. I just thought it might be useful to update my experience of getting this working afterinstalling a new Wunda Smart underfloor heating system, using some of the new templating style - this is what worked for me in my configuration file:
rest:
authentication: basic
username: root
password: *** # Your password here
scan_interval: 500
resource: "http://[IP here]/cmd.cgi"
sensor:
- name: Kitchen Wunda Temperature
unique_id: kitchen_temperature
device_class: temperature
unit_of_measurement: °C
value_template: >-
{{ value_json.rooms | selectattr("i", "eq", 121) | map(attribute="t") | first }}
- name: Kitchen Wunda Humidity
unique_id: kitchen_humidity
device_class: humidity
unit_of_measurement: "%"
value_template: >-
{{ value_json.rooms | selectattr("i", "eq", 121) | map(attribute="h") | first }}
Wondered if there was any further progress on the ability to set the target temperature?
I’d like to use the Yaml for a sensor above: how did you get the room ID’s out of the Wundasmart system?
Lafite
Thought I would just share details of the (basic) way I found to set the target temperature on my Wunda SmartHub underfloor heating by experimenting with the API commands linked above
I wanted a way to set the target temperature down (so I could create an automation when away from home), but also a way to switch it back to following the schedule in the Wunda app. I couldn’t fully figure out what setting the parameter temp_pre did, as it didn’t seem to just set the predefined states as suggested in the API documentation above - however with some playing I found out if it is used in conjunction with ‘temp’, then I could get it to set a target temperature and return to schedule:
In my configuration.yaml I added the below - then these can be used in a service call:
> rest_command:
> set_kitchen_wunda_temp:
> url: "http://[Ipaddress]/setregister.cgi?121@temp=15&121@temp_pre=16" #121 is room ID for kitchen, temp_pre=16 sets it until next schedule change?
> method: GET
> username: root
> password: [Wunda password]
> resume_kitchen_wunda_schedule:
> url: "http://[ip address]/setregister.cgi?121@temp_pre=4" #121 is room ID for kitchen, temp_pre=4 resumes schedule? temp_pre=16 sets it until next schedule change?
> method: GET
> username: root
> password: [Wunda password]
The room IDs I found by interrogating the Rest api in the browser; i.e. [ipaddress]/syncvalues.cgi
Log in with the password discovered as per earlier posts, and it will list out all devices/rooms - the ID is the first number in the row - I only had one room so it was obvious as it was the only ID with other data in the row.