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

[bug] Notification sensor for basic command not created after re-interview #1024

Closed
4 of 7 tasks
towerhand opened this issue Apr 9, 2021 · 19 comments
Closed
4 of 7 tasks
Assignees
Labels
bug Something isn't working

Comments

@towerhand
Copy link
Contributor

towerhand commented Apr 9, 2021

Version

2021.4.1

Checklist:

  • I am not using HomeAssistant. Or: a developer has told me to come here.
  • I have checked the troubleshooting section and my problem is not described there.
  • I have read the changelog problem was not mentioned there.

Build/Run method

  • Docker
  • PKG
  • Snap package
  • Manually built (git clone - npm install - npm run build )

zwavejs2mqtt: 3.2.0
zwave-js: 7.1.1

Describe the bug

After re-interviewing my two GE switches the double click feature stopped working, the switches in question are a GE dimmer 14294 and a GE fan switch 14287 with the compat flag "treatBasicSetAsEvent": true, node 16 and 17.

I'm using the MQTT discovery and when I go to the "home assistant" tab in each device the entities for the notifications are gone so it explains why the event is not getting published to MQTT, using the debug tool in zjs2m I was able to rule out a problem with zwavejs because the events are getting received.

I'm not sure when this bug started since the nodes don't get interviewed after every restart now.

Expected behavior

An entity used to be created for the basic notification and zjs2m used to publish the value of "0" or "255" to MQTT.

Additional context

@towerhand towerhand added the bug Something isn't working label Apr 9, 2021
@robertsLando
Copy link
Member

@AlCalzone ?

@AlCalzone
Copy link
Member

AlCalzone commented Apr 9, 2021

@towerhand Your logs indicate that the events are received and published as such:

2021-04-08 19:06:28.814 INFO ZWAVE: Node 17: value notification: 32-0-event 0
2021-04-08 19:06:30.880 INFO ZWAVE: Node 16: value notification: 32-0-event 255
...

@AlCalzone
Copy link
Member

I guess you're looking for the wrong event in HA. There were breaking changes:
https://www.home-assistant.io/blog/2021/04/07/release-20214/#breaking-changes

@towerhand
Copy link
Contributor Author

I’m using MQTT discovery, not using the zwave js server so that breaking changes shouldn’t affect me, I checked with freshcoast in discord and it is working with the zwaje js server, only in the mqtt side the entity disappears and stop reporting it.

I’ll post more logs in a little while, not sure what happened but I changed the settings to debug before recreating the logs.

@towerhand
Copy link
Contributor Author

Ok my apologies, I forgot I needed to change the log options in two places, attached new logs. In the screenshot the entity that disappeared is sensor.master_bedroom_fan_notification_event.

Screen Shot 2021-04-09 at 7 50 29 AM

zwavejs2mqtt-store.zip

@AlCalzone
Copy link
Member

Looks good from the node-zwave-js side - especially since it is working in zwave-js-server

@robertsLando
Copy link
Member

@towerhand Did you checked if you get them using mqtt explorer?

@towerhand
Copy link
Contributor Author

towerhand commented Apr 9, 2021

Yes, I checked with MQTT explorer and no topics are getting sent, makes sense because zjs2m is not showing them in the UI as you can see in the screenshot, that device used to have 4 entities but sensor.master_bedroom_fan_notification_event disappeared.

@robertsLando
Copy link
Member

makes sense because zjs2m is not showing them in the UI as you can see in the screenshot

It could be that them are sent as notificaitons, so in that case you would not see a valueId on ui for them

@towerhand
Copy link
Contributor Author

Ok, anything else I can do to test? or let me know if I can provide any more info.

@AlCalzone
Copy link
Member

AlCalzone commented Apr 9, 2021

@robertsLando the basic event is a value notification (so many similar names 😅) which should have a value ID, but no persistent value.

@robertsLando
Copy link
Member

Ok I have just checked the code, I never changed anything on that side: https://github.com/zwave-js/zwavejs2mqtt/blob/master/lib/Gateway.js#L1882

Here is where the discovery should happen, sincerly I have no clue as I also don't see any error on console. @billiaz ?

@towerhand
Copy link
Contributor Author

Could this be part of the reason? the basic option shows up as undefined.

Screen Shot 2021-04-11 at 8 28 58 AM

@towerhand
Copy link
Contributor Author

And this is part of the debug info tab in the device, the values I used to get when the entity was available before re interviewing were 0 and 255.

{
  "id": "17-32-0-currentValue",
  "nodeId": 17,
  "commandClass": 32,
  "commandClassName": "Basic",
  "endpoint": 0,
  "property": "currentValue",
  "propertyName": "currentValue",
  "type": "number",
  "readable": true,
  "writeable": false,
  "label": "Current value",
  "stateless": false,
  "min": 0,
  "max": 99,
  "list": false,
  "isCurrentValue": true,
  "targetValue": "32-0-targetValue"
},
{
  "id": "17-32-0-targetValue",
  "nodeId": 17,
  "commandClass": 32,
  "commandClassName": "Basic",
  "endpoint": 0,
  "property": "targetValue",
  "propertyName": "targetValue",
  "type": "number",
  "readable": true,
  "writeable": true,
  "label": "Target value",
  "stateless": false,
  "min": 0,
  "max": 99,
  "list": false,
  "newValue": "",
  "toUpdate": true
}

@AlCalzone
Copy link
Member

You won't see a status in that overview. The device configuration file tells zwave-js to treat the command as an event - to be specific 17-32-0-event, which means that it only has a meaning the instant it is received.

Since these switches can send these events without changing their status, persisting them as a status would be incorrect.

@robertsLando I guess adding some documentation which specifies how zwavejs2mqtt handles the different events received from zwave-js would be good :)

@towerhand
Copy link
Contributor Author

Ah it makes sense, I was just trying to provide more info so hopefully you guys can figure out why zjs2m is not creating the entity and passing the event to mqtt.

@robertsLando
Copy link
Member

There is another issue related #1044

@towerhand
Copy link
Contributor Author

towerhand commented Apr 12, 2021

New logs with latest master.

@robertsLando
Copy link
Member

Duplicate of #1044. Please follow updates there ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants