Giter Site home page Giter Site logo

Comments (23)

Fishwaldo avatar Fishwaldo commented on September 13, 2024 1

ahhh - So you probably want to rename some things?
scene_id should be the ValueID Index (each ValueID represents a Scene/Button in this case)

Then "TriggeredScene" or something? "TriggeredSceneLabel" and "TriggeredSceneValue"

I've just added "Selected_id" to the JSON to give you both the Label (Selected) and Value of the Label (Selected_id)

from homeassistant-zwave_mqtt.

marcelveldt avatar marcelveldt commented on September 13, 2024 1

Yeah, the value is incorrect. the label should be fine. I filed an issue report at qt-openzwave for that.
I have another PR waiting btw regarding the central scenes support as I've been testing today myself with some remotes with central scene support

from homeassistant-zwave_mqtt.

silfa718 avatar silfa718 commented on September 13, 2024 1

Updated to 1.0.13 and got this:

{
"event_type": "zwave_mqtt.scene_activated",
"data": {
"node_id": 6,
"scene_id": 2,
"scene_label": "Scene 2",
"scene_value_id": 4,
"scene_value_label": "Pressed 2 Times"
},
"origin": "LOCAL",
"time_fired": "2020-02-25T12:09:56.642041+00:00",
"context": {
"id": "2ae84bc728b544d793f8cb5964cc3ef7",
"parent_id": null,
"user_id": null
}
}

from homeassistant-zwave_mqtt.

mosjonathan avatar mosjonathan commented on September 13, 2024

in the current add-on for zwave i get the following:

{
"event_type": "zwave.scene_activated",
"data": {
"entity_id": "zwave.thermofloor_as_unknown_type_0300_id_a305",
"node_id": 7,
"scene_id": 1,
"scene_data": 7680
},
"origin": "LOCAL",
"time_fired": "2020-02-16T15:09:01.069244+00:00",
"context": {
"id": "90aa26fafbeb42329509601d2eb2938e",
"parent_id": null,
"user_id": null
}
}

scene id is the button number in my case 1 through 8
and scene data gives away a single, double, hold and release event number

from homeassistant-zwave_mqtt.

marcelveldt avatar marcelveldt commented on September 13, 2024

The new implementation takes care of unfolding the central scene support while the previous (OZW 1.4) only forwarded the raw data.

So, my guess is that you will get another scene id (and label) for other key presses.

from homeassistant-zwave_mqtt.

mosjonathan avatar mosjonathan commented on September 13, 2024

for 1 button press i get scene id 1,2 or 3 with the according labels single hold or release.
unfortunately those are the same for all 8 buttons (of the same node).
so it is not possible to see which button is pressed

from homeassistant-zwave_mqtt.

marcelveldt avatar marcelveldt commented on September 13, 2024

Aha! So The scene is correct but the device itself has multiple buttons.

from homeassistant-zwave_mqtt.

mosjonathan avatar mosjonathan commented on September 13, 2024

yes that is correct ( Heatit Z Push 8 https://www.robbshop.nl/z-push-button-8-wandzender-z-wave-plus-heat-it)

from homeassistant-zwave_mqtt.

Fishwaldo avatar Fishwaldo commented on September 13, 2024

@marcelveldt:

  1. you should be publishing the Value from the List, not the label (as it can be changed/translated etc). (maybe scene_value as well?). I think I need to add a "Selected_Value" to the json as well.
  2. Each "Scene" is a different ValueID: ( I see 3 in the dump below triggering changes.)
OpenZWave/1/node/7/instance/1/commandclass/91/value/562950076547092/,{    "Label": "Scene 2",    "Value": {        "List": [            {                "Value": 0,                "Label": "Inactive"            },            {                "Value": 1,                "Label": "Pressed 1 Time"            },            {                "Value": 2,                "Label": "Key Released"            },            {                "Value": 3,                "Label": "Key Held down"            }        ],        "Selected": "Inactive"    },    "Units": "",    "Min": 0,    "Max": 0,    "Type": "List",    "Instance": 1,    "CommandClass": "COMMAND_CLASS_CENTRAL_SCENE",    "Index": 2,    "Node": 7,    "Genre": "User",    "Help": "",    "ValueIDKey": 562950076547092,    "ReadOnly": false,    "WriteOnly": false,    "ValueSet": false,    "ValuePolled": false,    "ChangeVerified": false,    "Event": "valueChanged",    "TimeStamp": 1581863554}
OpenZWave/1/node/7/instance/1/commandclass/91/value/281475099836436/,{    "Label": "Scene 1",    "Value": {        "List": [            {                "Value": 0,                "Label": "Inactive"            },            {                "Value": 1,                "Label": "Pressed 1 Time"            },            {                "Value": 2,                "Label": "Key Released"            },            {                "Value": 3,                "Label": "Key Held down"            }        ],        "Selected": "Pressed 1 Time"    },    "Units": "",    "Min": 0,    "Max": 0,    "Type": "List",    "Instance": 1,    "CommandClass": "COMMAND_CLASS_CENTRAL_SCENE",    "Index": 1,    "Node": 7,    "Genre": "User",    "Help": "",    "ValueIDKey": 281475099836436,    "ReadOnly": false,    "WriteOnly": false,    "ValueSet": false,    "ValuePolled": false,    "ChangeVerified": false,    "Event": "valueChanged",    "TimeStamp": 1581863555}
OpenZWave/1/node/7/instance/1/commandclass/91/value/281475099836436/,{    "Label": "Scene 1",    "Value": {        "List": [            {                "Value": 0,                "Label": "Inactive"            },            {                "Value": 1,                "Label": "Pressed 1 Time"            },            {                "Value": 2,                "Label": "Key Released"            },            {                "Value": 3,                "Label": "Key Held down"            }        ],        "Selected": "Inactive"    },    "Units": "",    "Min": 0,    "Max": 0,    "Type": "List",    "Instance": 1,    "CommandClass": "COMMAND_CLASS_CENTRAL_SCENE",    "Index": 1,    "Node": 7,    "Genre": "User",    "Help": "",    "ValueIDKey": 281475099836436,    "ReadOnly": false,    "WriteOnly": false,    "ValueSet": false,    "ValuePolled": false,    "ChangeVerified": false,    "Event": "valueChanged",    "TimeStamp": 1581863556}```

from homeassistant-zwave_mqtt.

marcelveldt avatar marcelveldt commented on September 13, 2024

@Fishwaldo currently the scene ID is published AND the label. scene_id in the hass event is the value from the list.
What's missing is the difference between buttons but as is turns out this is just a different ValueID. For now we'll go with a simple ValueID property in the hass event to differentiate the different keys/buttons ?

from homeassistant-zwave_mqtt.

hazzeh avatar hazzeh commented on September 13, 2024

Here are some additional logs if it helps. It is from a nodon 4 button remote, but I've only captured 2 buttons and 2 "actions".

It shows the data published to the mqtt bus, and also what the zwave_mqtt.scene_activated is showing in home assistant.

In the mqtt message, the "Label" and "Index" corresponds to the what button is pressed, and the "Value.Selected" corresponds to the "action".
In the zwave_mqtt.scene_activated event, the scene_id and scene_label corresponds to the "action".
I guess it need something for the Label and Index as well (like @Fishwaldo suggested).

remote.txt

from homeassistant-zwave_mqtt.

hazzeh avatar hazzeh commented on September 13, 2024

I did a proposal for a fix here: hazzeh@72848b1

from homeassistant-zwave_mqtt.

marcelveldt avatar marcelveldt commented on September 13, 2024

@Fishwaldo thanks for the fix in the daemon, much better now.
@hazzeh, thanks for your proposed fix. Looks fine. Just only we need to incorporate the new value Fishwaldo added to the json. Will you do a PR for this or want me to fix it ?

from homeassistant-zwave_mqtt.

hazzeh avatar hazzeh commented on September 13, 2024

@marcelveldt I can do a PR after I've updated it with selected_id. However Im not sure if the selected_id is showing the correct value.
For me it will be the same number for every value and scene. It changes when I restart the ozwdaemon. @Fishwaldo is that the correct behaviour with selected_id? I thought it should correspond to the "List Value". In the List for my remote , the values goes from 0 to 4.

Values from the mqtt bus:

    "Label": "Scene 2",
        "Selected": "Pressed 2 Times",
        "Selected_id": 3307669504
    "Label": "Scene 1",
        "Selected": "Pressed 1 Time",
        "Selected_id": 3307669504

from homeassistant-zwave_mqtt.

marcelveldt avatar marcelveldt commented on September 13, 2024

@hazzeh can you please test the latest version ?
While I was refactoring some stuff I did some basic work on this too, so you should now have the index as additional property in the event.

from homeassistant-zwave_mqtt.

hazzeh avatar hazzeh commented on September 13, 2024

@marcelveldt Same issue with the latest versions of the ozwdaemon. The problem is that it is the incoming values from ozwdaemon that are incorrect imo. I'll try some troubleshooting of qt-openzwave and see if I can pinpoint the issue.

from homeassistant-zwave_mqtt.

silfa718 avatar silfa718 commented on September 13, 2024

This is what I am getting when I double press down on my homeseer switch

{
"event_type": "zwave_mqtt.scene_activated",
"data": {
"node_id": 6,
"scene_id": 2,
"scene_label": "Scene 2",
"scene_value_id": 1897188608,
"scene_value_label": "Pressed 2 Times"
},
"origin": "LOCAL",
"time_fired": "2020-02-23T21:21:47.143352+00:00",
"context": {
"id": "a9968d68d89b4500b4cd55250316a0d1",
"parent_id": null,
"user_id": null
}
}

from homeassistant-zwave_mqtt.

hazzeh avatar hazzeh commented on September 13, 2024

@silfa718 You need to upgrade the to the latest dockerimage of ozwdaemon (and restart home assistant), then the scene_value_id will show the correct value.

from homeassistant-zwave_mqtt.

silfa718 avatar silfa718 commented on September 13, 2024

I am on version 1.0.12 ozwdaemon

from homeassistant-zwave_mqtt.

mosjonathan avatar mosjonathan commented on September 13, 2024

I think that the version if this component needs a bump after the latest commit from @marcelveldt

from homeassistant-zwave_mqtt.

marcelveldt avatar marcelveldt commented on September 13, 2024

@hazzeh I think we can close this one now ? Is everything correct on your side too now ?

from homeassistant-zwave_mqtt.

hazzeh avatar hazzeh commented on September 13, 2024

@hazzeh I think we can close this one now ? Is everything correct on your side too now ?

Yes, your correction works like a charm. Thanks.

from homeassistant-zwave_mqtt.

mosjonathan avatar mosjonathan commented on September 13, 2024

@marcelveldt i can confirm that it works correctly.

thanks for the fix

from homeassistant-zwave_mqtt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.