Wunda Smart Heating?

Many thanks to above: my thermostats are now being recorded. My next task is to try and integrate the sensor values into a climate entity (even if it doesn’t fully work, it looks prettier!)

For anyone who finds it useful, the configurations above create text strings for the temp and humidity, which means they can’t be tracked in a chart etc. An amendment as below brings them into Home Assistant as Degreec C and Percentages, with a “Unit of Measurement” entry:

sensor:
        - name: Wunda Master Bedroom Temperature
        unique_id: wunda_master_bedroom_temperature
        device_class: temperature
        value_template: >-
          {{ value_json.rooms | selectattr("i", "eq", 121) | map(attribute="t")
          | first }}
        unit_of_measurement: "°C"
      - name: Wunda Master Bedroom Humidity
        unique_id: wunda_master_bedroom_humidity
        device_class: humidity
        value_template: >-
          {{ value_json.rooms | selectattr("i", "eq", 121) | map(attribute="h")
          | first }}
        unit_of_measurement: "%"
1 Like

Anyone made any progress with climate entities or setting temps etc?

I’ve got most things working in my fork of @ob0t’s project here GitHub - tonyroberts/hawundasmart

I’m struggling with a problem where after some time (sometimes a few days, sometimes less) the hub starts behaving very strangely and simple requests that normally work just hang. When it gets into that state even the official app doesn’t behave properly and I have to restart the hub. If anyone has any ideas what might be causing that I’d love to know.

I found that it’s possible to get all device information and state using the syncvalues.cgi endpoint, without having to use cmd.cgi or getdevices.cgi. The app only uses syncvalues.cgi and I’ve removed the other calls from my fork. I’m hoping that the issues I was seeing with the hub behaving strangely were due to cmd.cgi being called too much and using only syncvalues.cgi lets it work more normally (since that’s the same was what the app does).

The latest code in GitHub - tonyroberts/hawundasmart appears to be working well. I’m using it with GitHub - ScratMan/HASmartThermostat: Smart Thermostat with PID controller for HomeAssistant to control some underfloor heating as wundasmart on its own massively overshoots.

@Masterchief the climate entities in this fork support setting the target temperature and hvac mode

1 Like

Amazing thanks for sharing. I’ll give this a go ASAP! :raised_hands::raised_hands:

WOW! You beauty :muscle: :muscle: :muscle:!

I’ve never managed to get the original library working - so far this is working like a treat. Nice clear instructions for setup too - thanks dude.

I’ll use it in anger over the next few weeks and report back.

I’ve done a bit more on this over the weekend and now there are sensor entities for getting temperature, humidity and battery levels for the room thermostats and TRVs, as well as the climate entities. As well as now being able to get the battery levels it’s a bit more convenient for dashboards etc instead of having to pull the attributes off the climate entity or create template sensors.

The unique ids had to be changed as previously they were not unique. I added a second smart hubswitch and that generated a load of duplicate ids. I also collected all the entities under one device per hubswitch which is much neater than having a device per entity.

After you get the latest version you’ll need to delete the previously created entities and devices, or hack your core.entity_registry and device regisitry files.

Hi,
Thanks for the library which I’m using ok except none of the entities update other than after first adding to a dashboard or restarting HA. Any pointers please?
Thanks
J

Hi @_jjjj,

Which version/fork of the code are you using? I had the same problem with the original repo, but it should be fixed in my fork (GitHub - tonyroberts/hawundasmart). I raised a PR to the original repo but it doesn’t seem like that’s active anymore. If you’re using my fork, make sure you have the latest version of the code.

Another thing you can do is enable debug logging for the integration by setting the following in your configuration file (in addition to any other log settings you already have)

logger:
  logs:
    custom_components.wundasmart: debug

You will need to restart HA after this change, then check your log file. You should see it logs when the integration polls the wundasmart hub every minute.

Hope that helps,
Tony

Hi Tony,
Thanks for the suggestion. I was using the original code but having read this thread binned it and replaced with your fork. The entities are pre-pended with “climate.” which I believe indicates it is using the fork.

I also enabled debugging and have entries every minute in the log
2023-11-09 17:02:59.566 DEBUG (MainThread) [custom_components.hawundasmart] Finished fetching hawundasmart data in 0.263 seconds (success: True)
2023-11-09 17:04:00.372 DEBUG (MainThread) [custom_components.hawundasmart] Finished fetching hawundasmart data in 1.070 seconds (success: True)
2023-11-09 17:05:00.520 DEBUG (MainThread) [custom_components.hawundasmart] Finished fetching hawundasmart data in 0.217 seconds (success: True)
2023-11-09 17:06:01.252 DEBUG (MainThread) [custom_components.hawundasmart] Finished fetching hawundasmart data in 0.949 seconds (success: True)
2023-11-09 17:07:03.243 DEBUG (MainThread) [custom_components.hawundasmart] Finished fetching hawundasmart data in 1.939 seconds (success: True)

I’m new to HA so not sure where next to look and could easily believe I’ve made a basic error somewhere.

Thanks

J

@tonyroberts Amazing stuff thank you. I’ve been playing around with a fork for a while and managed to get varous things working, but your’s is much more full featured. I have forked your repo and added in preset_modes, so you can set temp to the Reduced, Eco, Comfort settings provided within the wunda app. Okay if I PR?

Thanks! Yes PRs gratefully received (even more so if you could update the tests when adding new features as well :wink:)

(edit) I just took a quick look at your repo, and just a comment before you raise a PR to save you some time. Please can you separate any formatting changes and only raise a PR with the functional changes you want to make? I’m happy to take formatting changes as a PR when it makes sense (e.g. to fix some style that’s inconsistent with the rest of the project), but not as part of a functional change as that makes reviewing more difficult than it needs to be. Thanks!

The climate prefix is common to all HA climate entities, so its possible you are still using the old version of the code.

Check the version number in HACS. It should say “e68fa5e” if you’re on the latest version.

Thanks for the pointers. I think it is working now - I decided to remove the integration and re-add it.

1 Like

FYI I think I’ve been experiencing constant sensor unavailability issues since the last update.

I’ll try removing and re-adding the integration and if it persists then I’ll enable logging as mentioned above and report back.

Try power cycling your wundasmart hub too. I had problems where earlier versions of the code repeatedly called cmd.cgi and devices.cgi which seems to lead to problems where the hub became unreliable/unresponsive. The latest version only uses syncvalues.cgi, but if you’ve not rebooted it since upgrading you could be still seeing the same issue that I observed.

1 Like

This maybe the most stupid question known to man/woman/beyond the binary (so nobody gets offended). I have the integration up and running and it’s great that I can control things, just amazing work which is way beyond my understanding. But all the entities get logged to the same HA Area. Is there a way to change this or should the Hub be allocated to a Zone and then all the entities can be allocated to Areas along with lights and other entities in the same area. Sorry for the daft question.

@tonyroberts is it worth starting a new thread for your fork and linking it here? That way people searching for a Wunda integration can find it easier without sifting through 100s of messages + easier to track which integration people are talking about…

Hi @Bigjet,

if you use this fork GitHub - tonyroberts/hawundasmart: WundaSmart Integration for Home Assistant then it creates only one device per hub rather than lots of devices. You can then set the area per entity if you like, just uncheck ‘use device area’ in the settings for the entity you want to change

1 Like

Good idea. I think with your testing and feedback it’s almost ready for a v1 release, so I’ll create a new thread at the same time as that and post a link here. Might not be today but maybe later this week.

1 Like