Closed kdknigga closed 1 year ago
I finally had the possibility to debug this again - and I think this is a UI issue. If I query the cached information using a driver function, I do get the correct values:
2023-07-10 11:21:28.607 DEBUG SOCKET: Event ZWAVE_API emitted to pyddaTiXAJ-G7uIAAAAB
2023-07-10 11:21:28.611 INFO Z-WAVE: Calling api driverFunction with args: [
'const {require} = this;\n' +
'const {ScheduleEntryLockCC} = require("zwave-js");\n' +
'const node = driver.controller.nodes.get(2);\n' +
'const enabled = ScheduleEntryLockCC.getUserCodeScheduleEnabledCached(\n' +
' driver,\n' +
' node,\n' +
' 1\n' +
');\n' +
'\n' +
'console.log("enabled:", enabled);',
[length]: 1
]
enabled: true
2023-07-10 11:21:28.612 INFO Z-WAVE: Success zwave api call driverFunction undefined
2023-07-10 11:21:58.573 DEBUG SOCKET: Event ZWAVE_API emitted to pyddaTiXAJ-G7uIAAAAB
2023-07-10 11:21:58.575 INFO Z-WAVE: Calling api driverFunction with args: [
'const {require} = this;\n' +
'const {ScheduleEntryLockCC} = require("zwave-js");\n' +
'const node = driver.controller.nodes.get(2);\n' +
'const kind = ScheduleEntryLockCC.getUserCodeScheduleKindCached(\n' +
' driver,\n' +
' node,\n' +
' 1\n' +
');\n' +
'\n' +
'console.log("kind:", kind);',
[length]: 1
]
kind: 2
2023-07-10 11:21:58.577 INFO Z-WAVE: Success zwave api call driverFunction undefined
023-07-10 11:22:35.411 DEBUG SOCKET: Event ZWAVE_API emitted to pyddaTiXAJ-G7uIAAAAB
2023-07-10 11:22:35.413 INFO Z-WAVE: Calling api driverFunction with args: [
'const {require} = this;\n' +
'const {ScheduleEntryLockCC} = require("zwave-js");\n' +
'const node = driver.controller.nodes.get(2);\n' +
'const schedule = ScheduleEntryLockCC.getScheduleCached(\n' +
' driver,\n' +
' node,\n' +
' 2,\n' +
' 1,\n' +
' 1\n' +
');\n' +
'\n' +
'console.log("schedule:", schedule);',
[length]: 1
]
schedule: {
weekdays: [ 0, 6 ],
startHour: 2,
startMinute: 0,
durationHour: 4,
durationMinute: 0
}
2023-07-10 11:22:35.417 INFO Z-WAVE: Success zwave api call driverFunction undefined
2023-07-10 11:25:47.699 DEBUG SOCKET: Event ZWAVE_API emitted to pyddaTiXAJ-G7uIAAAAB
2023-07-10 11:25:47.701 INFO Z-WAVE: Calling api driverFunction with args: [
'const {require} = this;\n' +
'const {ScheduleEntryLockCC} = require("zwave-js");\n' +
'const node = driver.controller.nodes.get(2);\n' +
'const numSlots = ScheduleEntryLockCC.getNumDailyRepeatingSlotsCached(\n' +
' driver,\n' +
' node\n' +
');\n' +
'\n' +
'console.log("numSlots:", numSlots);',
[length]: 1
]
numSlots: 20
The UI however does not show this:
Update: The information does get requested:
2023-07-10 12:12:18.548 INFO Z-WAVE: Calling api getSchedules with args: [ 2, { mode: 'daily', fromCache: false }, [length]: 2 ]
2023-07-10 12:12:21.028 INFO Z-WAVE: Success zwave api call getSchedules {
daily: {
numSlots: 1,
slots: [
{
userId: 1,
slotId: 1,
weekdays: [ 0, 6, [length]: 2 ],
startHour: 2,
startMinute: 0,
durationHour: 4,
durationMinute: 0,
enabled: false
},
[length]: 1
]
},
weekly: { numSlots: 0, slots: [ [length]: 0 ] },
yearly: { numSlots: 0, slots: [ [length]: 0 ] }
}
but it still isn't shown:
Another update: After reloading the entire page, the information is now there:
The enabled
state isn't correct though, even after pressing "ENABLE" a few times. The information from cache is correct:
2023-07-10 12:16:52.417 INFO Z-WAVE: Calling api driverFunction with args: [
'const { logger, zwaveClient, require } = this\n' +
'const {ScheduleEntryLockCC} = require("zwave-js");\n' +
'const node = driver.controller.nodes.get(2);\n' +
'const enabled = ScheduleEntryLockCC.getUserCodeScheduleEnabledCached(\n' +
' driver, node, 1\n' +
');\n' +
'console.log("enabled:", enabled);',
[length]: 1
]
enabled: true
but the UI doesn't think so:
Is your problem within Home Assistant (Core or Z-Wave JS Integration)?
NO, my problem is NOT within Home Assistant or the ZWave JS integration
Is your problem within Z-Wave JS UI (formerly ZwaveJS2MQTT)?
YES, BUT a Z-Wave JS UI developer has told me to come here
Checklist
[X] I have checked the troubleshooting section and my problem is not described there.
[X] I have read the changelog and my problem was not mentioned there.
Describe the bug
Refreshing a node's lock schedule from cache loads nothing.
What did you expect to happen? I expected to see the schedule I had created.
Device information
Manufacturer: Model name: Node ID in your network:
How are you using
node-zwave-js
?zwave-js-ui
(formerlyzwavejs2mqtt
) Docker image (latest)zwave-js-ui
(formerlyzwavejs2mqtt
) Docker image (dev)zwave-js-ui
(formerlyzwavejs2mqtt
) Docker manually built (please specify branches)ioBroker.zwave2
adapter (please specify version)HomeAssistant zwave_js
integration (please specify version)pkg
node-red-contrib-zwave-js
(please specify version, double click node to find out)Which branches or versions?
version: zwave-js-ui: 8.16.1 zwave-js: 10.20.0
Did you change anything?
no
If yes, what did you change?
No response
Did this work before?
Don't know, this is a new device
If yes, where did it work?
No response
Attach Driver Logfile
zwavejs_2023-05-19.log