[Solved] Zwave Refresh for a particular attribute
-
My thermostat (CT100 plus) has been very intermittent in updating its operating"State" (idle, heating or cooling), in a timely manner. Update were coming but sometimes 15 min after the fact. The other attributes are updating just fine. It was like that when paired with my vera plus, and it did not improved since it is on the Hass/Zwavejs2MQTT.
Back on the vera days, my only option was to use polling but that generated alot of traffic( Thermostat have many attributes). So I kept the polling to a minimum and that did not helped very much. Hass Zwavejs integration only allows polling entire device (like vera I think). I then found out that with Zwave2MQTT, we can poll individual attribute rather than the whole device. This reduced the amount of trafic dramatically, almost 15 to 1. I think that it would be a nice addition for MSR. Why refresh the whole device if only one attribute is needed.
Following is the screen capture of the zwavejs2MQTT interface for doing this. I did not find a way to attach files but I have one zwavejs2mqtt log file for a MSR refresh and one for the MQTT operating state 66 refresh. The funny thing is that a refresh from MSR trigger all values to be updated, except for the "operating state"! (This thermostat has a mind of its own)
I can add the 2 files if of any interest (One of them is quite long).
-
Are you on today's 22049 or the first release?
-
vezinpireplied to toggledbits on Feb 19, 2022, 12:29 AM last edited by vezinpi Feb 18, 2022, 7:54 PM
@toggledbits Sorry should have mentionned it. 22049 on Raspberry pi OS with Docker.
I did most of the work on the initial version but did the upgrade before posting. Just double check and cannot see how I can make rule that trigger every 30 or 60 sec that would set a reaction with Zwave_device_refresh on the thermostat "Operating state" only. That what the zwave2mqtt allow you to do to cope with older zwave devices or in my case, device that do not want to play nice. For the people using the standard zwave-js server, they have no option (that I can think of)
EDIT: As for the "ThermostatOperatingStateCCGet" not being part of the refresh, I just compare the logs between a refresh from MSR and a refresh from ZwaveJS2MQTT and they are identical (beside callback ID and checksum).
-
No worries. I noted a bug in the thermostat support when I plugged your data in on my end that would have prevented, at least to my view of it, the operating state from being correct at all. If you have state, even an old one, that bug was fixed, so we're moving on...
There is polling already, mentioned in the documentation as a "there but don't use it yet" feature. I've just finished (is anything ever finished?) and extended it to include specific command classes that will work with either
zwavejs2mqtt
orzwave-js-server
(and therefore either is fine with Reactor). That will be out in today's build, along with updated docs. -
vezinpireplied to toggledbits on Feb 20, 2022, 4:10 PM last edited by vezinpi Feb 20, 2022, 1:13 PM
@toggledbits Just installed version 22050.
Almost there! When MSR is restarted after changing the poll configuration, the node is poll with the proper command class. However the Interval time is not taken into consideration. I seems that the global poll interval is taken. Also noticed in the log that the next time (for the poll to be executed) is "Local Time". Not sure if that is normal. Here is my config and the logs. (the config file ident get screwed up with the paste but it is fine)
Hope this help
Reactor.yaml
controllers: - id: zwavejs implementation: ZWaveJSController enabled: true config: source: ws://192.168.... auth: > HIt54tjRUlqaUShB... poll_interval: 3600 poll_frequency: 20 poll_nodes: - entity: Thermostat command_class: Thermostat Operating State interval: 100
Log: i.e. my TZ is -5
[zwavejs-22050]2022-02-20T15:46:02.192Z <ZWaveJSController:5:ZWaveJSController.js:1506> ZWaveJSController#zwavejs node 9 eligible for polling [zwavejs-22050]2022-02-20T15:46:02.206Z <ZWaveJSController:5:ZWaveJSController.js:1519> ZWaveJSController#zwavejs polling node 9 command class 0x"42" (Thermostat Operating State) 2022-02-20T15:46:02.212Z CNTRLR » [Node 009] querying thermostat operating state... 2022-02-20T15:46:02.238Z SERIAL » 0x010e00a9010902420225000000001522 (16 bytes) 2022-02-20T15:46:02.240Z DRIVER » [Node 009] [REQ] [SendDataBridge] │ source node id: 1 │ transmit options: 0x25 │ route: 0, 0, 0, 0 │ callback id: 21 └─[ThermostatOperatingStateCCGet] 2022-02-20T15:46:02.250Z SERIAL « [ACK] (0x06) 2022-02-20T15:46:02.256Z SERIAL « 0x010401a90152 (6 bytes) [zwavejs-22050]2022-02-20T15:46:02.263Z <ZWaveJSController:6:ZWaveJSController.js:710> ZWaveJSController#zwavejs handling controller event statistics updated 2022-02-20T15:46:02.259Z SERIAL » [ACK] (0x06) 2022-02-20T15:46:02.266Z DRIVER « [RES] [SendDataBridge] was sent: true 2022-02-20T15:46:02.304Z SERIAL « 0x011d00a91500000502c47f7f7f7f00000305060000030100007f7f7f7f7fe0 (31 bytes) 2022-02-20T15:46:02.307Z SERIAL » [ACK] (0x06) 2022-02-20T15:46:02.311Z DRIVER « [REQ] [SendDataBridge] callback id: 21 transmit status: OK, took 50 ms repeater node IDs: 5, 6 routing attempts: 1 protocol & route speed: Z-Wave, 100 kbit/s ACK RSSI: -60 dBm ACK RSSI on repeaters: N/A, N/A ACK channel no.: 0 TX channel no.: 0 [zwavejs-22050]2022-02-20T15:46:02.325Z <ZWaveJSController:5:ZWaveJSController.js:652> ZWaveJSController#zwavejs handling node event statistics updated entity Entity#zwavejs>9-0 [zwavejs-22050]2022-02-20T15:46:02.328Z <ZWaveJSController:6:ZWaveJSController.js:702> ZWaveJSController#zwavejs received statistics for Entity#zwavejs>9-0: [Object]{ "commandsTX": 3, "commandsRX": 3, "commandsDroppedRX": 0, "commandsDroppedTX": 0, "timeoutResponse": 0 } 2022-02-20T15:46:02.428Z SERIAL « 0x010c00a80001090342030000c2d3 (14 bytes) 2022-02-20T15:46:02.430Z CNTRLR [Node 009] [~] [Thermostat Operating State] state: 0 => 0 [Endpoint 0] [zwavejs-22050]2022-02-20T15:46:02.438Z <ZWaveJSController:5:ZWaveJSController.js:652> ZWaveJSController#zwavejs handling node event value updated entity Entity#zwavejs>9-0 [zwavejs-22050]2022-02-20T15:46:02.441Z <ZWaveJSController:5:ZWaveJSController.js:788> ZWaveJSController#zwavejs update value [Object]{ "source": "node", "event": "value updated", "nodeId": 9, "args": { "commandClassName": "Thermostat Operating State", "commandClass": 66, "endpoint": 0, "property": "state", "newValue": 0, "prevValue": 0, "propertyName": "state" } } [zwavejs-22050]2022-02-20T15:46:02.443Z <ZWaveJSController:5:ZWaveJSController.js:800> ZWaveJSController#zwavejs updating attributes for node 9 value "0:66:state:"=0: [Array][ "hvac_control.state", "hvac_heating_unit.state", "hvac_cooling_unit.state" ] [zwavejs-22050]2022-02-20T15:46:02.448Z <ZWaveJSController:5:ZWaveJSController.js:817> ZWaveJSController#zwavejs setting Entity#zwavejs>9-0.x_zwave_values.Thermostat_Operating_State_state to 0 2022-02-20T15:46:02.438Z SERIAL » [ACK] (0x06) 2022-02-20T15:46:02.441Z DRIVER « [Node 009] [REQ] [BridgeApplicationCommand] │ RSSI: -62 dBm └─[ThermostatOperatingStateCCReport] state: Idle **[zwavejs-22050]2022-02-20T15:46:02.454Z <ZWaveJSController:5:ZWaveJSController.js:1525> ZWaveJSController#zwavejs poll Entity#zwavejs>9-0 succeeded, next at 1645375562452<****2/20/2022, 11:46:02 AM****>** [zwavejs-22050]2022-02-20T15:46:02.510Z <ZWaveJSController:6:ZWaveJSController.js:710> ZWaveJSController#zwavejs handling controller event statistics updated [zwavejs-22050]2022-02-20T15:46:02.575Z <ZWaveJSController:5:ZWaveJSController.js:652> ZWaveJSController#zwavejs handling node event statistics updated entity Entity#zwavejs>9-0 [zwavejs-22050]2022-02-20T15:46:02.576Z <ZWaveJSController:6:ZWaveJSController.js:702> ZWaveJSController#zwavejs received statistics for Entity#zwavejs>9-0: [Object]{ "commandsTX": 3, "commandsRX": 4, "commandsDroppedRX": 0, "commandsDroppedTX": 0, "timeoutResponse": 0 }
-
@vezinpi Got it. Fix in next release.
It would be helpful if you enclosed config and log stuff in "block code" formatting. To do that, put three backticks (```) one their own line before and after the pasted stuff. If you don't do that, the formatting gets corrupted, and when looking at YAML, that's particularly misleading; you can see that for yourself in your post, I'm sure. Example, before and after formatting:
this is a code block --
this line is indented, can you tell?
put the backticks on their own line
before AND after the code block.You make it look like this while editing:
```
this is a code block --
this line is indented, can you tell?
put the backticks on their own line
before AND after the code block.
```That ends up looking like this in the final post:
this is a code block -- this line is indented, can you tell? put the backticks on their own line before AND after the code block.
I see some non-US keyboard layouts don't have the backtick on a key, but a handy alternative is to select the text/code/config block and hit the button below in this site's post editing tools, or hit the tool first and then paste-replace the default contents:
-
vezinpireplied to toggledbits on Feb 20, 2022, 6:17 PM last edited by vezinpi Feb 20, 2022, 1:19 PM
@toggledbits said in Zwave Refresh for a particular attribute:
It would be helpful if you enclosed config and log stuff in "block code" formatting. To do that, put three backticks (```) one their own line before and after the pasted stuff.
I have been looking for that for a long time. I am not really a "Forum" type of person. Lot's to learn, thanks for letting me know and your patience.
-
No worries! For most forum use, it's not the kind of thing one needs to know. When things get technical as we do here, it's a big help, though. Thanks for updating, too. The updated post is lovely!
-
Gave it a try again. It was working as advertised initially but if the zwavejs2mqtt server is restarted/updated then the polling does not resume. It will only resume when MSR is restarted.
-
Fixed by version 22052.
-
10/10