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

fix: vindstyrke uses a different datatype #6971

Merged
merged 1 commit into from
Jan 28, 2024
Merged

fix: vindstyrke uses a different datatype #6971

merged 1 commit into from
Jan 28, 2024

Conversation

sjorge
Copy link
Sponsor Contributor

@sjorge sjorge commented Jan 28, 2024

Requires Koenkk/zigbee-herdsman#890

Zigbee2MQTT:debug 2024-01-28 10:38:56: Received MQTT message on 'zigbee2mqtt/bridge/request/permit_join' with data '{"device":null,"time":254,"transaction":"8kp3h-4","value":true}'
Zigbee2MQTT:info  2024-01-28 10:38:56: Zigbee: allowing new devices to join.
Zigbee2MQTT:info  2024-01-28 10:38:56: MQTT publish: topic 'zigbee2mqtt/bridge/response/permit_join', payload '{"data":{"time":254,"value":true},"status":"ok","transaction":"8kp3h-4"}'
Zigbee2MQTT:info  2024-01-28 10:39:04: Device '0x90ab96fffefa5d91' joined
Zigbee2MQTT:info  2024-01-28 10:39:04: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x90ab96fffefa5d91","ieee_address":"0x90ab96fffefa5d91"},"type":"device_joined"}'
Zigbee2MQTT:info  2024-01-28 10:39:04: Starting interview of '0x90ab96fffefa5d91'
Zigbee2MQTT:info  2024-01-28 10:39:04: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x90ab96fffefa5d91","ieee_address":"0x90ab96fffefa5d91","status":"started"},"type":"device_interview"}'
Zigbee2MQTT:debug 2024-01-28 10:39:04: Device '0x90ab96fffefa5d91' announced itself
Zigbee2MQTT:info  2024-01-28 10:39:04: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x90ab96fffefa5d91","ieee_address":"0x90ab96fffefa5d91"},"type":"device_announce"}'
Zigbee2MQTT:debug 2024-01-28 10:39:04: Received Zigbee message from '0x90ab96fffefa5d91', type 'readResponse', cluster 'genBasic', data '{"modelId":"VINDSTYRKA"}' from endpoint 1 with groupID 0
Zigbee2MQTT:debug 2024-01-28 10:39:04: Skipping message, still interviewing
Zigbee2MQTT:debug 2024-01-28 10:39:04: Received Zigbee message from '0x90ab96fffefa5d91', type 'readResponse', cluster 'genBasic', data '{"manufacturerName":"IKEA of Sweden"}' from endpoint 1 with groupID 0
Zigbee2MQTT:debug 2024-01-28 10:39:04: Skipping message, still interviewing
Zigbee2MQTT:debug 2024-01-28 10:39:04: Received Zigbee message from '0x90ab96fffefa5d91', type 'readResponse', cluster 'genBasic', data '{"powerSource":1}' from endpoint 1 with groupID 0
Zigbee2MQTT:debug 2024-01-28 10:39:04: Skipping message, still interviewing
Zigbee2MQTT:debug 2024-01-28 10:39:05: Received Zigbee message from '0x90ab96fffefa5d91', type 'readResponse', cluster 'genBasic', data '{"zclVersion":8}' from endpoint 1 with groupID 0
Zigbee2MQTT:debug 2024-01-28 10:39:05: Skipping message, still interviewing
Zigbee2MQTT:debug 2024-01-28 10:39:05: Received Zigbee message from '0x90ab96fffefa5d91', type 'readResponse', cluster 'genBasic', data '{"appVersion":1}' from endpoint 1 with groupID 0
Zigbee2MQTT:debug 2024-01-28 10:39:05: Skipping message, still interviewing
Zigbee2MQTT:debug 2024-01-28 10:39:05: Received Zigbee message from '0x90ab96fffefa5d91', type 'readResponse', cluster 'genBasic', data '{"stackVersion":106}' from endpoint 1 with groupID 0
Zigbee2MQTT:debug 2024-01-28 10:39:05: Skipping message, still interviewing
Zigbee2MQTT:debug 2024-01-28 10:39:05: Received Zigbee message from '0x90ab96fffefa5d91', type 'readResponse', cluster 'genBasic', data '{"hwVersion":1}' from endpoint 1 with groupID 0
Zigbee2MQTT:debug 2024-01-28 10:39:05: Skipping message, still interviewing
Zigbee2MQTT:debug 2024-01-28 10:39:05: Received Zigbee message from '0x90ab96fffefa5d91', type 'readResponse', cluster 'genBasic', data '{"dateCode":"20230202"}' from endpoint 1 with groupID 0
Zigbee2MQTT:debug 2024-01-28 10:39:05: Skipping message, still interviewing
Zigbee2MQTT:debug 2024-01-28 10:39:05: Received Zigbee message from '0x90ab96fffefa5d91', type 'readResponse', cluster 'genBasic', data '{"swBuildId":"1.0.11"}' from endpoint 1 with groupID 0
Zigbee2MQTT:debug 2024-01-28 10:39:05: Skipping message, still interviewing
Zigbee2MQTT:info  2024-01-28 10:39:05: Successfully interviewed '0x90ab96fffefa5d91', device has successfully been paired
Zigbee2MQTT:info  2024-01-28 10:39:05: Device '0x90ab96fffefa5d91' is supported, identified as: IKEA Vindstyrka air quality and humidity sensor (E2112)
Zigbee2MQTT:info  2024-01-28 10:39:05: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"definition":{"description":"Vindstyrka air quality and humidity sensor","exposes":[{"access":1,"description":"Measured temperature value","label":"Temperature","name":"temperature","property":"temperature","type":"numeric","unit":"°C"},{"access":1,"description":"Measured relative humidity","label":"Humidity","name":"humidity","property":"humidity","type":"numeric","unit":"%"},{"access":1,"description":"Measured PM2.5 (particulate matter) concentration","label":"PM25","name":"pm25","property":"pm25","type":"numeric","unit":"µg/m³"},{"access":1,"description":"Sensirion VOC index","label":"VOC index","name":"voc_index","property":"voc_index","type":"numeric"},{"access":1,"category":"diagnostic","description":"Link quality (signal strength)","label":"Linkquality","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"E2112","options":[{"access":2,"description":"Calibrates the temperature value (absolute offset), takes into effect on next report of device.","label":"Temperature calibration","name":"temperature_calibration","property":"temperature_calibration","type":"numeric"},{"access":2,"description":"Number of digits after decimal point for temperature, takes into effect on next report of device. This option can only decrease the precision, not increase it.","label":"Temperature precision","name":"temperature_precision","property":"temperature_precision","type":"numeric","value_max":3,"value_min":0},{"access":2,"description":"Calibrates the humidity value (absolute offset), takes into effect on next report of device.","label":"Humidity calibration","name":"humidity_calibration","property":"humidity_calibration","type":"numeric"},{"access":2,"description":"Number of digits after decimal point for humidity, takes into effect on next report of device. This option can only decrease the precision, not increase it.","label":"Humidity precision","name":"humidity_precision","property":"humidity_precision","type":"numeric","value_max":3,"value_min":0},{"access":2,"description":"Calibrates the pm25 value (absolute offset), takes into effect on next report of device.","label":"Pm25 calibration","name":"pm25_calibration","property":"pm25_calibration","type":"numeric"}],"supports_ota":true,"vendor":"IKEA"},"friendly_name":"0x90ab96fffefa5d91","ieee_address":"0x90ab96fffefa5d91","status":"successful","supported":true},"type":"device_interview"}'
Zigbee2MQTT:info  2024-01-28 10:39:05: Configuring '0x90ab96fffefa5d91'
Zigbee2MQTT:info  2024-01-28 10:39:06: Successfully configured '0x90ab96fffefa5d91'
Zigbee2MQTT:debug 2024-01-28 10:39:08: Received Zigbee message from '0x90ab96fffefa5d91', type 'attributeReport', cluster 'msIkeaVocIndexMeasurement', data '{"measuredValue":0}' from endpoint 1 with groupID 0
Zigbee2MQTT:info  2024-01-28 10:39:08: MQTT publish: topic 'zigbee2mqtt/0x90ab96fffefa5d91', payload '{"linkquality":207,"voc_index":0}'
Zigbee2MQTT:debug 2024-01-28 10:40:05: Received Zigbee message from '0x90ab96fffefa5d91', type 'attributeReport', cluster 'msRelativeHumidity', data '{"measuredValue":4300}' from endpoint 1 with groupID 0
Zigbee2MQTT:info  2024-01-28 10:40:05: MQTT publish: topic 'zigbee2mqtt/0x90ab96fffefa5d91', payload '{"humidity":43,"linkquality":189,"voc_index":0}'
Zigbee2MQTT:debug 2024-01-28 10:40:05: Received Zigbee message from '0x90ab96fffefa5d91', type 'attributeReport', cluster 'pm25Measurement', data '{"measuredValue":7}' from endpoint 1 with groupID 0
Zigbee2MQTT:info  2024-01-28 10:40:05: MQTT publish: topic 'zigbee2mqtt/0x90ab96fffefa5d91', payload '{"humidity":43,"linkquality":189,"pm25":7,"voc_index":0}'
Zigbee2MQTT:debug 2024-01-28 10:40:05: Received Zigbee message from '0x90ab96fffefa5d91', type 'attributeReport', cluster 'msTemperatureMeasurement', data '{"measuredValue":2100}' from endpoint 1 with groupID 0
Zigbee2MQTT:info  2024-01-28 10:40:05: MQTT publish: topic 'zigbee2mqtt/0x90ab96fffefa5d91', payload '{"humidity":43,"linkquality":189,"pm25":7,"temperature":21,"voc_index":0}'
Zigbee2MQTT:debug 2024-01-28 10:40:06: Received Zigbee message from '0x90ab96fffefa5d91', type 'attributeReport', cluster 'msIkeaVocIndexMeasurement', data '{"measuredValue":39}' from endpoint 1 with groupID 0
Zigbee2MQTT:info  2024-01-28 10:40:06: MQTT publish: topic 'zigbee2mqtt/0x90ab96fffefa5d91', payload '{"humidity":43,"linkquality":189,"pm25":7,"temperature":21,"voc_index":39}'

Here is a log of the device joining after the change.

Zigbee2MQTT:debug 2024-01-28 10:40:05: Received Zigbee message from '0x90ab96fffefa5d91', type 'attributeReport', cluster 'pm25Measurement', data '{"measuredValue":7}' from endpoint 1 with groupID 0

Also matches with what is on the actual display.

@sjorge
Copy link
Sponsor Contributor Author

sjorge commented Jan 28, 2024

Reading a cluster manually is also possible (as we do not need to specify the type)

Zigbee2MQTT:debug 2024-01-28 10:43:37: Received MQTT message on 'zigbee2mqtt/0x90ab96fffefa5d91/1/set' with data '{"read":{"attributes":["measuredValue"],"cluster":"pm25Measurement","options":{}}}'
Zigbee2MQTT:debug 2024-01-28 10:43:37: Publishing 'set' 'read' to '0x90ab96fffefa5d91'
Zigbee2MQTT:debug 2024-01-28 10:43:37: Received Zigbee message from '0x90ab96fffefa5d91', type 'readResponse', cluster 'pm25Measurement', data '{"measuredValue":6}' from endpoint 1 with groupID 0
Zigbee2MQTT:info  2024-01-28 10:43:37: MQTT publish: topic 'zigbee2mqtt/0x90ab96fffefa5d91', payload '{"humidity":48,"linkquality":182,"pm25":6,"temperature":19,"update":{"installed_version":16777233,"latest_version":16777233,"state":"idle"},"voc_index":92}'
Zigbee2MQTT:info  2024-01-28 10:43:37: Read result of 'pm25Measurement': {"measuredValue":6}

Reconfigure via the frontend still throws an INVALID_DATA_TYPE error, not sure how we can fix that. Not having either attributes in the cluster.ts doesn't help for that either. I guess we could store ID + DT as numeric when we ep.configureReporting() is called the attribute as a object vs a string. But that seems like a big invasive change. That would only fix devices paired after the change and the frontend would need to somehow also show those differently in the UI.

At least after these 2 PRs the vindstyrke is usable again and doesn't throws INVALID_DATA_TYPE in normal use/configure/pairing.

@Koenkk Koenkk merged commit e4b88b8 into Koenkk:master Jan 28, 2024
2 checks passed
@sjorge sjorge deleted the vs branch January 28, 2024 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants