Closed broyuken closed 4 years ago
@broyuken Unfortunally I can't help with this, I think it's more likely a bug with hass configuration not something strinctly related to z2m but I'm not an Hass user so I don't know.
@chilicheech Do you have any idea?
Is there something in the mqtt object that needs to be created to send the transition flag?
@broyuken Transition doesn't exists on set values in OZW so I dunno what are you speaking about
I think you are confusing an hass feature with zwave feature
I’m not sure which side it has to be done on, I just know that there is a feature where you can change a lights brightness from off to say 100% over 30 seconds. That is not working and I’m trying to figure out why. It works on my zigbee bulbs but isn’t working on my zwave light switches.
Transition is supported on mqtt lights in HA, in the Json and template schemas
https://www.home-assistant.io/integrations/light.mqtt#json-schema---configuration
@broyuken As I told you there is no transition on Openzwave side. If hass has I don't know and I also don't know how it works. If hass handles it by sending messages at specified intervals with values for transiction it should work, otherwise not, you should check what messages are sent from hass via mqtt
There should be a "Duration" value ID exposed. That needs to be set to the desired time before changing the "Level" value.
This is a device feature, OZW just transmits the transition (or duration) value to the device with the set message.
That’s the issue, my light supports it, but the auto discovered mqtt device doesn’t seem to be sending it to ozw
I checked in mqtt explorer and I see that it is being updated constantly, but the value is always 0, even after I push a transition from HA developer tools.
{"value_id":"5-43-1-1","node_id":5,"class_id":43,"type":"int","genre":"user","instance":1,"index":1,"label":"Duration","units":"","help":"","read_only":true,"write_only":false,"min":-2147483648,"max":2147483647,"is_polled":false,"value":0,"lastUpdate":1588258124893}
@broyuken The auto-discovered device will never send it. Based on what @Fishwaldo said that you should hace another valueId exposed called duration where you set the duration, when you send the set command OZW will check if there is a duration and if so will use that
Can I modify the auto created device to include it? Would this be something added to the device in HA? I’m sorry, I don’t understand how or what to modify to get this working.
Just go to hass devices table. Check readme for more info
I looked over the readme, but I'm still not understanding. Do I need to create a "duration_topic" and "duration_template"?
This is what I have currently.
{
"type": "light",
"object_id": "dimmer",
"discovery_payload": {
"schema": "template",
"brightness_template": "{{ (value_json.value / 99 * 255) | round(0) }}",
"state_topic": "homeassistant/Chandelier/38/1/0",
"state_template": "{{ \"off\" if value_json.value == 0 else \"on\" }}",
"command_topic": "homeassistant/Chandelier/38/1/0/set",
"command_on_template": "{{ ((brightness / 255 * 99) | round(0)) if brightness is defined else 255 }}",
"command_off_template": "0",
"device": {
"identifiers": [
"zwave2mqtt_0xc67d8b46_node2"
],
"manufacturer": "GE (Jasco Products)",
"model": "14294 In-Wall Smart Dimmer (0x3038)",
"name": "Chandelier",
"sw_version": "5.29"
},
"name": "Chandelier_dimmer",
"unique_id": "zwave2mqtt_0xc67d8b46_2-38-1-0"
},
"discoveryTopic": "light/Chandelier/dimmer/config",
"values": [
"38-1-0"
],
"persistent": true,
"id": "light_dimmer"
}
I updated the values but that didn't seem to do it. I'm assuming I need to create a topic for it, but I'm not sure how to format it, or what name it's supposed to be. I don't understand what the value_json.value means. Would I set it to something like the following?
"duration_template": "{{ (value_json.value / 99 * 255) | round(0) }}",
"values": [
"38-1-0",
"38-1-5"
],
@broyuken you should try to use the topic of the duration valueid and add it to values array like you did
If in your settings you have set valueid topics
it would be
prefix/commandclass/instance/index/
I set it to the following but it's not working. Is my naming wrong, I'm sorry I'm not a coder so I don't understand fully how exactly all these things have to be configured.
{
"type": "light",
"object_id": "dimmer",
"discovery_payload": {
"schema": "template",
"brightness_template": "{{ (value_json.value / 99 * 255) | round(0) }}",
"duration_template": "homeassistant/Chandelier/38/1/5",
"state_topic": "homeassistant/Chandelier/38/1/0",
"state_template": "{{ \"off\" if value_json.value == 0 else \"on\" }}",
"command_topic": "homeassistant/Chandelier/38/1/0/set",
"command_on_template": "{{ ((brightness / 255 * 99) | round(0)) if brightness is defined else 255 }}",
"command_off_template": "0",
"device": {
"identifiers": [
"zwave2mqtt_0xc67d8b46_node2"
],
"manufacturer": "GE (Jasco Products)",
"model": "14294 In-Wall Smart Dimmer (0x3038)",
"name": "Chandelier",
"sw_version": "5.29"
},
"name": "Chandelier_dimmer",
"unique_id": "zwave2mqtt_0xc67d8b46_2-38-1-0"
},
"discoveryTopic": "light/Chandelier/dimmer/config",
"values": [
"38-1-0",
"38-1-5"
],
"persistent": true,
"id": "light_dimmer"
}
@broyuken Sorry but by checking hass docs: https://www.home-assistant.io/integrations/light.mqtt/
Seems duration isn't supported by mqtt autodiscovery. The only option is to manually create that dimmer, check this tutorial: https://selfhostedhome.com/migrating-to-zwave2mqtt-for-home-assistant/
I created in manually, but transition still isn't working.
platform: mqtt
name: "Chandelier"
schema: template
brightness_template: "{{ (value_json.value / 99 * 255) | round(0) }}"
state_topic: "homeassistant/Chandelier/38/1/0"
state_template: "{{ \"off\" if value_json.value == 0 else \"on\" }}"
command_topic: "homeassistant/Chandelier/38/1/0/set"
command_on_template: "{{ ((brightness / 255 * 99) | round(0)) if brightness is defined else 255 }}"
command_off_template: "0"
I cannot help here as I'm not an hass user. Try to check hass console to see if there is any error
no error from what I can see. Does anyone who uses hass have a way to get this to work?
@robertsLando are you able to turn a light on over 30 seconds? or is it only instant on/off?
@broyuken I have the opposite problem, my lights won't do instant and insist on transitioning over several seconds, which is worse because the value reports back by MQTT instantly, before it's had a chance to change meaning that a light that is actually off still shows as on, and vice-versa because the values didn't wait for the transition before updating.
Transition is a configuration vaueid
Daniel
On 2 Jun 2020, at 04:51, ve6rah notifications@github.com wrote:
@robertsLando are you able to turn a light on over 30 seconds? or is it only instant on/off? @broyuken I have the opposite problem, my lights won't do instant and insist on transitioning over several seconds, which is worse because the value reports back by MQTT instantly, before it's had a chance to change meaning that a light that is actually off still shows as on, and vice-versa because the values didn't wait for the transition before updating.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
Transition is a configuration vaueid …
That doesn’t help me in any way. What does that mean for my issue? Does it mean z2m can’t do it?
We already spoke about this, there is no transition
in openzwave, it's a device feature and it usually is configured from a device parameter (in configuration section) if he has it. I don't know if and how you could do it with hass but this is not a bug with z2m
Version
Build/Run method
Zwave2Mqtt version: v3.0.2 Openzwave Version: 1.6 something
Describe the bug Transition does not appear to work with zwave2mqtt. I set a transition in the developer tools and/or an automation but the light just turns on instantly. Additionally, I see no transition in the mqtt message in the z2m debug console
To Reproduce Steps to reproduce the behavior: Go to Developer tools Turn on a light Add a transition to the call Light turns on without transition
Expected behavior Light turns on with transition
Additional context Add any other context about the problem here. Light configuration:
Logs from debug console
Developer tools commands