Associations not being created automatically for my aeotec device #6861
Unanswered
Darrilla
asked this question in
Request Support / Investigate Issue
Replies: 1 comment
-
IIRC you fixed your problem by updating the controller's firmware, right? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Checklist
I have read and followed the above instructions
I have checked the troubleshooting section and my problem is not described there.
I have read the changelog and my problem was not mentioned there or the fix did not work.
Describe the issue
Hi. I have been trying to lookup device information in the database, but it's always returning an empty object. I got the configManager from the driver, then await configManager.loadAll(); Later on, I call const device = configManager.lookupDevice(
manufacturerId,
productType,
productId
);
, but device always comes back as an empty object {}. I know the device is valid: "manufacturerId": 134,
"productId": 96,
"productType": 259,
What am I doing wrong? I even set an external config db location, and I can see the manufactures json and the device folder with all of the database files. Thanks for any help you can give me
kpine — 05/17/2024 4:33 PM
Are you awaiting the call?
const device = await configManager.lookupDevice(...). Docs say it returns a Promise. https://zwave-js.github.io/node-zwave-js/#/api/config-manager?id=lookupdevice
Also don't think you need a loadAll if you access through the driver.
node-zwave-js/packages/zwave-js/src/lib/node/Node.ts
Lines 2090 to 2095 in e7c5470
And, not sure what you're trying to do, but if it's a node in the network, the device config is a property of the Node. https://zwave-js.github.io/node-zwave-js/#/api/node?id=deviceconfig
Darrilla — 05/17/2024 4:51 PM
I'm discovering a new device and it has been added at this point. I wanted to get the name and associations and propertyInfo
I am awaiting the call
kpine — 05/17/2024 5:33 PM
not sure why you need to use the configManager then.
node.deviceConfig doesn't have what you need? associations aren't in the deviceConfig unless the file specifies them, sometimes they are discovered from the interview. not sure what propertyInfo is.
Darrilla — 05/17/2024 7:06 PM
I'm fairly new to this. I think I meant parameter info. I had this aeotec smart switch 6 that was not sending value updated notifications. It turned out I had to create an association group and set one of the parameters to send reports to the group. I have read that the association is in the config database. It's hard to figure this out from the docs but thank you for telling me about device config.
kpine — 05/17/2024 7:27 PM
the config file will tell information about the groups, like name, but not the current associations.
there is an API for querying/setting associations. https://zwave-js.github.io/node-zwave-js/#/api/controller?id=managing-associations
are you writing your own application?
Darrilla — 05/17/2024 9:35 PM
Yes, I am writing my own. I was able to set the association and it works. I'm trying to determine how the device config can help me figure out when a device needs a manually configured association group.
kpine — 05/17/2024 10:05 PM
what do you mean by "needs"?
if the association is necessary and not the Lifeline (usually group 1), they are flagged with "isLifeline": true in the config file and the driver will do the association automatically
https://zwave-js.github.io/node-zwave-js/#/config-files/file-format?id=associations
AlCalzone — Yesterday at 2:00 AM
You don't need to deal with lifeline associations yourself when using node-zwave-js
AlCalzone — Yesterday at 2:10 AM
And the device config of an interviewed node is available as the deviceConfig property.
The reporting groups of aeotec devices are not related to association groups AFAIK, that's just configuration parameters. The reports all come in via the lifeline.
You do have to configure the reporting group and its interval etc though.
Darrilla — Yesterday at 8:35 AM
I don't know what I'm doing wrong then. I was not receiving any real-time updates when the load change occurred. I found a setting for this device - by default it does not send notifications. I turned that on and still did not receive any notificiations. I queried for the association group and there weren't any. I read more in the device-specific docs and it said it would send the notificaitons to group one. My final solution was this: // The Aeotec Smart Switch supports 2 association groups and Max 5 nodes for each group.
// it starts without any group, so we have to add this node and the controller (node 1)
await this.node.commandClasses.Association.addNodeIds(1, 1, this.node.id);
// Now tell the device to report to group 1, and we are sending the Hail CC (1)
/* To set which notification would be sent to the
associated nodes in association group 1 when the
state of output load is changed.
0 = Nothing - this is the default!
1 = Hail CC
2 = Basic Report CC
*/
await this.node.commandClasses.Configuration.set({ parameter: 0x50, value: 1 });
Based on what I see in the device configuration, I believe that association should have been created automatically, but it didn't work until I did it myself
kpine — Yesterday at 8:55 AM
I think Basic Report CC is usually recommended
Darrilla — Yesterday at 8:56 AM
I am also confused because when I first add the node, the deviceConfig doesn't have anything for associations or paramInformation: "associations": {},
"paramInformation": {
"_map": {}
},
kpine — Yesterday at 8:56 AM
Are you waiting for the interview to complete before querying?
Darrilla — Yesterday at 8:56 AM
Thanks. I tried both, and Hail worked. If basic is recommended, I will use that
Yes, the interview is complete. This is when the node is ready (discoveredNode.ready is true)
The database shows several paramInformation fields, and has associations definitions, but definitely not part of the deviceConfiguration on the Node, so how do I determine for any particular device that I would need to do what I ended up having to do for this one...set up reporting and associations?
kpine — Yesterday at 9:02 AM
Setting config is device specific
ZJS has no opinion on how the device should be configured, so that's currently up to you
The association should have been automatic. Maybe there was an interview failure. Re-interview might have fixed it.
I don't think there's any reason to use deviceConfig.
Probably the preferred way is using the value API.
I would use ZUI as a reference
Darrilla — Yesterday at 9:04 AM
To get the device label, manufacturer, at the least
Darrilla — Yesterday at 9:09 AM
I have tried reinterview, made no difference.I have included/excluded this device a hundred times, trying to figure out why I wasn't getting the value updated notification. I can see in the zwave logs that 15:07:22.839 SERIAL « 0x011a00498431140410015e25263370273281855972867a73ef5a8284 (28 bytes)
15:07:22.840 SERIAL » [ACK] (0x06)
15:07:22.840 DRIVER « [Node 049] [REQ] [ApplicationUpdateRequest]
payload: 0x31140410015e25263370273281855972867a73ef5a82
15:07:22.841 CNTRLR « [Node 049] Received updated node info
, but still no notification would come. It took me creating that association and turning on the reporting via the 0x50 parameter. I have not used ZUI, so that is good advice. I am still learning about zwave and zwave-js, but it seems to me that there should be some way to determine how to enable reporting for any particular device. This is my lack of understanding - I'm sure the reality is that you can't figure everything out automatically just from the available database info
kpine — Yesterday at 9:31 AM
Like I said, configuration parameter settings are up to you (device specific). There's nothing in the DB that would suggest you to do something with config parameter 50.
The association issue is either a bug, an interview problem, or a misunderstanding. Confirming how the device includes with ZUI might confirm that. You can easily see the association group states.
AlCalzone — Yesterday at 9:42 AM
Can you share a log of a re-interview? Open a discussion (investigate issue) in the node-zwave-js repo, post it there, and I can take a look.
Sounds like something is going wrong on your end.
Darrilla — Yesterday at 10:17 AM
As can be seen here, I added this via zwave-js-ui, and it has no groups. The events are empty, no matter how many times I manually toggle the device.
Image
and I am unable to add any groups - so even though in the node I can see the parameter to enable notifications, it doesn't seem to allow me even in this ui to create the association group like I did in my code using node-zwave-js
Darrilla — Yesterday at 10:26 AM
Maybe it is just this device, but even the docs at https://devices.zwave-js.io/?jumpTo=0x0086:0x0003:0x0060:0.0 for this particular device show that the lifeline association should be set automatically, but that isn't happening even when I'm using zwave-js-ui
Z-Wave JS Config DB Browser
DB Browser – The official device configuration reference! If you wish to find out if your device is supported, please search for it here.
Darrilla — Yesterday at 10:51 AM
Update: I have not figured out any way to add the group using the ui. I have successfully updated the notification config parameter to notify when the load changes, but since there is no group, I do not see any events in the UI for this devce when toggling the switch
AlCalzone — Yesterday at 10:51 AM
Tried a factory reset of the device?
Darrilla — Yesterday at 11:10 AM
Funny you ask. I just did a factory reset of the device, and then re-added it to the controller. Unfortunately, there are still no groups and no way to add them.
AlCalzone — Yesterday at 11:17 AM
Ok then I really need the interview log. Without that it's guessing
Darrilla — Today at 8:31 AM
I do have the logs and I will upload them. It appears that the reason the association configuration step is not completed is because of a timeout: 2024-05-19T01:16:47.001Z SERIAL « 0x011800a91700000500ef7f7f7f7f0101030000000002030000b1 (26 bytes)
2024-05-19T01:16:47.002Z SERIAL » [ACK] (0x06)
2024-05-19T01:16:47.002Z DRIVER « [REQ] [SendDataBridge]
callback id: 23
transmit status: OK, took 50 ms
routing attempts: 3
protocol & route speed: Z-Wave, 40 kbit/s
routing scheme: LWR
ACK RSSI: -17 dBm
ACK channel no.: 1
TX channel no.: 1
2024-05-19T01:16:48.056Z CNTRLR [Node 002] Timed out while waiting for a response from the node (ZW0201)
2024-05-19T01:16:48.057Z CNTRLR [Node 002] Querying association groups timed out, skipping interview...
I will create a discussion
Software versions
Driver (node-zwave-js): ...12.5.2
Z-Wave JS UI: ...
zwave-js-ui: 9.12.0
zwave-js: 12.8.1
home id: 3553047428
home hex: 0xd3c73384
Device information
"manufacturerId": 134,
"productId": 96,
"productType": 259,
"firmwareVersion": "1.7",
AEON Labs | Smart Switch 6 | ZW096
Checklist
I made sure to provide a driver log on level debug.
The log includes a re-interview of the problematic device (if applicable).
The log includes the problematic interaction with the device (if applicable).
I provided the node ID of the problematic device (if applicable).
Upload Logfile
reinterview.log
interview.log
Node ID 2
Beta Was this translation helpful? Give feedback.
All reactions