Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple cards for a single physical device (thermostat) #25482

Closed
smockle opened this issue Jul 25, 2019 · 16 comments
Closed

Multiple cards for a single physical device (thermostat) #25482

smockle opened this issue Jul 25, 2019 · 16 comments

Comments

@smockle
Copy link

smockle commented Jul 25, 2019

Home Assistant release with the issue:
0.96.4

Last working Home Assistant release (if known):
Unknown

Operating environment (Hass.io/Docker/Windows/etc.):
I run Home Assistant 0.96.4 in a Docker container on a Raspberry Pi 2B+ using the homeassistant/raspberrypi3-homeassistant image. I use a Linear HUSBZB-1 USB Z-Wave Controller.

Component/platform:
Either Z-Wave or Climate.

Description of problem:
I included a HoneyWell T6 Pro Z-Wave Plus thermostat in my Z-Wave network. When I open the Home Assistant UI, I see four near-identical cards:

97821fcc1ac777828532c5c7668cf96d7beb62ed

I use the built-in HomeKit component to make Home Assistant entities available to HomeKit. In Apple’s Home app, I see five near-identical cards for this thermostat:

dae386a18fccb4cba753f23cdca46311ebcdfff4

I asked in the forums whether this is expected behavior, and @cgtobi asked me to file an issue here.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

I configured everything in the UI. Here is my entire configuration.yaml:

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
#   base_url: example.duckdns.org:8123

# Text to speech
tts:
  - platform: google_translate

# HomeKit
homekit:
  auto_start: false
  port: 51827
  filter:
    exclude_domains:
      - automation

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml

Traceback (if applicable):

Not applicable

Additional information:

  • Home Assistant 0.96 shipped a big rewrite of the climate component: https://www.home-assistant.io/blog/#climate.

  • A manufacturer-specific XML file for the Honeywell T6 Pro Z-Wave Plus thermostat was merged in upstream OpenZWave, but is not included in Home Assistant’s OZW fork: https://github.com/OpenZWave/open-zwave/pull/1757/files.

    After I observed this issue, I added the device-specific configuration XML to /usr/local/lib/python3.7/site-packages/python_openzwave/ozw_config/honeywell/ and added a reference in /usr/local/lib/python3.7/site-packages/python_openzwave/ozw_config/manufacturer_specific.xml (see this Dockerfile), but after excluding and re-including my thermostat (and restarting Home Assistant), I still saw four cards in the UI. The device-specific config file did not resolve this issue.

@ghost
Copy link

ghost commented Jul 25, 2019

Hey there @home-assistant/z-wave, mind taking a look at this issue as its been labeled with a integration (zwave) you are listed as a codeowner for? Thanks!

This is a automatic comment generated by codeowners-mention to help ensure issues and pull requests are seen by the right people.

@cgtobi cgtobi added the climate label Jul 25, 2019
@cgarwood
Copy link
Member

Depending on when the device xml file was written (before or after OZW released 1.6) it may not be compatible with HA's zwave implementation.

Could you share a screenshot of the zwave. entity or entities for the thermostat as well as the climate entities from the developer tools -> states page?

@dshokouhi
Copy link
Member

I have a honeywell zwave thermostat which gives me 4 entities which I believe is expected for all zwave thermostats. You should have 1 for cooling and 1 for heating each climate device is for the target temperature. You can't set the heating set point on the cooling climate entity it must be on the heating climate entity. You have 4 because the other 2 is for furnace and dry_air I think you can choose to hide the entities you don't want to see. But you do need cooling and heating in order to use your thermostat properly.

@smockle
Copy link
Author

smockle commented Jul 26, 2019

Thanks for following up @cgarwood!

Depending on when the device xml file was written (before or after OZW released 1.6) it may not be compatible with HA's zwave implementation.

I’d tested with the device XML file from the 1.4 branch: https://github.com/OpenZWave/open-zwave/blob/1.4/config/honeywell/th6320zw2003.xml. Currently, I am only using the OpenZWave device XML files that ship with Home Assistant.

Could you share a screenshot of the zwave. entity or entities for the thermostat as well as the climate entities from the developer tools -> states page?

Sure, here is zwave.*:
zwave

And the climate.* entities:
climate-cooling
climate-dry-air
climate-moist-air
climate-unused

(Note that I have two of these thermostats installed, so these entity names have _2 appended)

@smockle
Copy link
Author

smockle commented Jul 26, 2019

I have a honeywell zwave thermostat which gives me 4 entities which I believe is expected for all zwave thermostats. You should have 1 for cooling and 1 for heating each climate device is for the target temperature. You can't set the heating set point on the cooling climate entity it must be on the heating climate entity.

@dshokouhi I observe that the card for the “Cooling 1” entity has an “Operation” field where “Heat” can be selected:

IMG_1092

This suggests to me that a single card can be used to manage set points for multiple operation modes. Incidentally, this is similar to the HomeKit thermostat UI in Apple’s Home app:

homekit-thermostat

@dshokouhi
Copy link
Member

You can change the climate mode but not the heating target temperature, try it for yourself.

@smockle
Copy link
Author

smockle commented Jul 26, 2019

You can change the climate mode but not the heating target temperature, try it for yourself.

From within the “Cooling 1” card, I used the “Operation” dropdown to switch my thermostat from “Cool” to “Heat”, and the change was reflected on the physical thermostat device itself.

However, none of the four cards allow me to change the heat set point. All four continue to display 72°F (the cooling set point) in “Heat” mode, while the heat set point on my physical thermostat is 62°F.

@smockle
Copy link
Author

smockle commented Jul 26, 2019

Even if Home Assistant represents my thermostat’s functionality as multiple cards, does Home Assistant’s HomeKit component support a configuration that allows me to expose a single combined entity to HomeKit?

@dshokouhi
Copy link
Member

@smockle no you cannot set it to be a single device without losing some type of functionality, this is how zwave thermostat works. You need to control 2 entities for full control of heat and cool. Based on what you are saying and your screenshots it seems like you are missing the heating climate entity, the unused entity should be heating. I noticed in your screenshots the zwave device has unknown for the product name field. That suggests to me that maybe something went wrong during the pairing process since the name field should be filled in like mine. Typically when this happens removing and adding back to the zwave network will get the proper info filled in.

image

However the bug that you created is not a bug as this is how the implementation has been for a while.

image

image

notice how the temperature field is different between the 2 entities?

The only card I have seen in the home assistant interface that works for zwave thermostats is the dual thermostat card which enables us to set both entities. This does not work for home kit. You will need to manage both entities once you correct the issue of the missing heating entity.

@smockle
Copy link
Author

smockle commented Jul 26, 2019

@dshokouhi Thanks for taking the time to help me understand this. I appreciate it. 😊

I noticed in your screenshots the zwave device has unknown for the product name field.

@dshokouhi from your screenshots, you have a Honeywell TH8320ZW1000. Home Assistant ships with a device XML file for that model. I have a Honeywell TH6320ZW2003. A manufacturer-specific XML file for this model was merged in upstream OpenZWave, but is not included in Home Assistant’s OZW fork: https://github.com/OpenZWave/open-zwave/pull/1757/files.

This should be resolved when Home Assistant is updated to use OpenZWave 1.6: https://community.home-assistant.io/t/timeline-of-upgraded-openzwave/115780/3

it seems like you are missing the heating climate entity, the unused entity should be heating

Yes, makes sense. Is this a bug in Home Assistant (e.g. related to the missing device XML) or user-error on my part?

The only card I have seen in the home assistant interface that works for zwave thermostats is the dual thermostat card which enables us to set both entities.

Thanks for the tip! If I fix my heating entity, hide the “dry air” and “moist air” entities, and add this custom card, I think I will be happy with the result.

From the https://github.com/enriqg9/dual-thermostat README:

Heat and Cool entities are updated depending on the active thermostat mode…allowing you to use a single card for both entities.

This aligns with the UI on the physical thermostat device itself and with the UI in other home automation tools, like Apple’s Home app. Is there in-progress work to ship this in Home Assistant by default that I could contribute to?

This does not work for home kit.

That is unfortunate, since I use Home Assistant primarily to bridge unsupported devices into HomeKit. Apple’s Home app is my primary home automation interface. If I wanted to work on adding support for this, where would I start?

@dshokouhi
Copy link
Member

@dshokouhi from your screenshots, you have a Honeywell TH8320ZW1000. Home Assistant ships with a device XML file for that model. I have a Honeywell TH6320ZW2003. A manufacturer-specific XML file for this model was merged in upstream OpenZWave, but is not included in Home Assistant’s OZW fork: https://github.com/OpenZWave/open-zwave/pull/1757/files.

This should be resolved when Home Assistant is updated to use OpenZWave 1.6: https://community.home-assistant.io/t/timeline-of-upgraded-openzwave/115780/3

Try to update the OZW config files using zwave.update_config service call, see if that updates the XML

https://www.home-assistant.io/docs/z-wave/services/

Yes, makes sense. Is this a bug in Home Assistant (e.g. related to the missing device XML) or user-error on my part?

Possibly user error or possibly missing the configuration like you said above. Try to update config files and if that does not work after a HA restart try to remove the device and add it back to zwave. Sometimes that corrects the product name.

This aligns with the UI on the physical thermostat device itself and with the UI in other home automation tools, like Apple’s Home app. Is there in-progress work to ship this in Home Assistant by default that I could contribute to?

Thats up to the card developer honestly

That is unfortunate, since I use Home Assistant primarily to bridge unsupported devices into HomeKit. Apple’s Home app is my primary home automation interface. If I wanted to work on adding support for this, where would I start?

What needs to be done is the zwave integration needs to be updated to combine everything into 1 climate entity.

https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/zwave/climate.py

@smockle
Copy link
Author

smockle commented Jul 26, 2019

Try to update the OZW config files using zwave.update_config service call, see if that updates the XML

Thanks, will do.

NB: I’ve seen intimations that the zwave.update_config service does not work: #19893 (comment)

In fact, I’ve submitted a couple PRs which attempted to address those concerns: home-assistant/python-openzwave#4

@dshokouhi
Copy link
Member

Yea we need to update HA to 1.6 for OZW however that will involve a separate amount of changes, I see they mention this service call may cause issues and I was unaware of that. How come you closed your own PRs that were meant to fix the issue? was the code not working?

@smockle
Copy link
Author

smockle commented Jul 26, 2019

How come you closed your own PRs that were meant to fix the issue?

I closed home-assistant/python-openzwave#3 because it pulled files from master (i.e. the v1.6 files), which would not be compatible with Home Assistant (which forked from v1.4).

I closed home-assistant/python-openzwave#4 because a. no one reviewed the PRs in three months and b. the project’s Travis CI builds had never succeeded in its entire history. I assumed I had submitted a PR to the wrong project, or to one that had been abandoned in favor of work towards adopting 1.6.

@smockle
Copy link
Author

smockle commented Aug 6, 2019

In the past week, I read the Z-Wave climate code and followed some of the latest changes, e.g. #25537

I’ve concluded that modifying this code to make my Home-Assistant-included Z-Wave thermostat appear as a single device in HomeKit is beyond my abilities and available time.

I appreciate the time you both took to explain the present behavior and to point out the code responsible for it. I hope these pointers will help someone in the future.

I’m closing this issue, because it stemmed from my misunderstanding of the present behavior. Further valid enhancements (such as exposing a single device to HomeKit) are mentioned here too, but they are lost in my other confused statements and, since I cannot work on them at present, are best tracked elsewhere.

@smockle smockle closed this as completed Aug 6, 2019
@ericlathrop
Copy link

Here's a thread on the forums of others having a problem with this termostat. Someone reports getting the thermostat working correctly by adding the missing xml config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants