-
-
Notifications
You must be signed in to change notification settings - Fork 206
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
[bug] Basic set events not sent to mqtt anymore? #1044
Comments
Ah, should have read my own log file. I see this now under Is it not possible to publish these under the device itself anymore? |
Humm that's the event, you should get it under node too 🤔 Let me check... |
You should get a message under: |
I've confirmed this breaks in zwavejs2mqtt version 3.0.0, apparently from the jump to node-zwave-js 7.0.0. I speculate that this is because of a 7.0.0 breaking change separating value-notification from notifications. https://github.com/zwave-js/node-zwave-js/pull/2029/files From version 3.2.0: node_2 (3.2.0 with basic topic).json.zip Note that under 3.2.0 the device setup a basic topic the one time. Running the master that @robertsLando modified (zwavejs2mqtt: 3.2.1+b3ad1a3.b3ad1a3, zwave-js: 7.2.2-fd11d22)it doesn't setup a Basic tab in the UI. |
There are both
In v7 breaking changes @AlCalzone mentions the
This is correct as it is not returned from |
https://github.com/zwave-js/zwavejs2mqtt/blob/master/lib/ZwaveClient.js#L617 https://github.com/zwave-js/zwavejs2mqtt/blob/master/lib/Gateway.js#L210 This are the functions called when that event is triggered, essetially I get it as a My first thought was that maybe for some reason your node is not marked as |
Could someone give a try to #1055? |
* fix: notification event not publiished to mqtt Fixes #1044 * fix: reset timeout
I have merged #1055 so you can use |
I'll report back in a few, I was just building it from the PR. |
Just wait few minutes: https://github.com/zwave-js/zwavejs2mqtt/runs/2333371512 |
Weird, it didn't create the entities in zjs2m or the retained mqtt topic for HA but it did send the topic only one time and triggered the automation I have in HA, but broken otherwise. |
Wouldn't you need this so it sets up the entity for mqtt discovery? |
So relevant logs are: 2021-04-13 08:09:41.090 INFO ZWAVE: Node 16: value added 16-32-0-event => 0
2021-04-13 08:09:41.095 DEBUG GATEWAY: Publishing discovery: {
type: 'sensor',
object_id: 'notification_event',
discovery_payload: {
value_template: '{{ {}[value_json.value] | default(value_json.value) }}',
icon: 'mdi:alarm-light',
state_topic: 'zwave2jsmqtt/master_bedroom_lights/32/0/event',
json_attributes_topic: 'zwave2jsmqtt/master_bedroom_lights/32/0/event',
device: {
identifiers: [ 'zwavejs2mqtt_0xead969cf_node16', [length]: 1 ],
manufacturer: 'GE/Jasco',
model: 'In-Wall Dimmer Switch (14294 / ZW3005)',
name: 'master_bedroom_lights',
sw_version: '5.29'
},
name: 'master_bedroom_lights_notification_event',
unique_id: 'zwavejs2mqtt_0xead969cf_16-32-0-event'
},
discoveryTopic: 'sensor/master_bedroom_lights/notification_event/config',
values: [ '32-0-event', [length]: 1 ],
persistent: false,
ignoreDiscovery: false
}
.......
2021-04-13 08:09:41.107 DEBUG MQTT: Publishing to zwave2jsmqtt/master_bedroom_lights/32/0/event: {
time: 1618319381106,
value: 0,
nodeName: 'master_bedroom_lights',
nodeLocation: ''
} with options { qos: 1, retain: true }
........
2021-04-13 08:09:58.324 DEBUG MQTT: Publishing to zwave2jsmqtt/master_bedroom_lights/32/0/event: {
time: 1618319398317,
value: 0,
nodeName: 'master_bedroom_lights',
nodeLocation: ''
} with options { qos: 1, retain: true } Seems the entity is created now right? Alsoo the message is published to MQTT. The strange thing here is that the retain flag is set to true |
Wait maybe I have found something |
zwavejs2mqtt-store.zip |
Try with #1056 |
BTW I don't see the crash there |
Not sure if crashing was the right word, maybe triggering a refresh is more accurate, like when we save the settings. |
BTW please remember to delete logs between restarts so I only get the logs needed and not the old ones |
Yes I did, if you see multiple restarts then it happened when I was double clicking the switches. |
FYI seems the problem is fixes in #1056, just waiting for last feedback and then I will merge and release a new version |
Has this been changed lately? Until the recent release, basic events were toggling the state of the switch, but now they only change the "basic" value, which does not appear to be accessible through MQTT (only as event, not as state). |
I didn't change anything on this side. @AlCalzone ? |
Depends on the device 🤷🏻♂️ |
Thanks for prompt answer. I've just switched to zwavejs integration (from MQTT discovery) and it appears that home assistant events are properly triggered for basic changes. So this is no longer an issue. |
Version
Checklist:
Build/Run method
zwavejs2mqtt: 3.2.0
zwave-js: 7.1.1
Describe the bug
Until some unknown period in the past, basic set events from devices with a compat flag to undo the mapping and treat them as an event appeared under command class 32 under 32/0/event. After a complete rebuild of my network I no longer see 32 under any devices regardless of whether I use:
Double tapping my GE switches does send through the event properly (I can see it in HA) and I see it in the zwavejs1mqtt log. But I don't see any messages anywhere in mqtt.
With named topics:
With ValueID topics:
Expected behavior
Double tap up/down should generate an event notification with a value of 255/0, and this should appear in mqtt.
Additional context
zwave-js:
zwavejs2mqtt:
node2.log
The text was updated successfully, but these errors were encountered: