IKEA VINDSTYRKA Zigbee Air quality sensor

Can we get tVOC index using quirk? I would love to avoid using zha toolkit and a separate automation for polling tVOC.

1 Like

Hello, my installation is HA on Raspberry Pi, no HACS, IKEA Dirigera and this sensor, hardware version 1 firmware 1.0.11 (ā€œlatestā€). I just noticed the strange behaviour of pm2.5 and "air quality"values. The history looks like this:

So temperature and humidity just work, while air quality and PM2 5 work sometimes, then freeze for quite a while (days).

I read through this thread but didnā€™t quite get if the issue discussed here applies to me, as two out of four values update frequently, so ZigBee works ok. I am not well versed in HA internals, it just works for me. Perhaps someone would care to explain what should be done in this straightforward use case? Or is it a big in my system?

Just got my unit,
After a bit of fiddling I now have TVOC in ZHA.

Hereā€™s a graph card I created to show it.

type: custom:swipe-card
cards:
  - type: gauge
    entity: sensor.vindstyrka_tvoc
    needle: true
    segments:
      - from: 0
        color: green
      - from: 51
        color: yellow
      - from: 101
        color: orange
      - from: 151
        color: red
    min: 0
    max: 201
  - type: gauge
    entity: sensor.vindstyrka_tvoc
    needle: true
    segments:
      - from: 0
        color: green
      - from: 51
        color: yellow
      - from: 101
        color: orange
      - from: 151
        color: red
      - from: 201
        color: MediumSlateBlue
      - from: 301
        color: purple
    min: 0
    max: 500

As Sensironā€™s TVOC value is proprietary, itā€™s been a bit hard to work out what values I should use. I used this table as a reference:


And it seems to match well with what the VOC Index PDF says for each value (https://sensirion.com/media/documents/02232963/6294E043/Info_Note_VOC_Index.pdf)

image
image

Any feedback welcome.

1 Like

I wanted to set up a shorter and reliable polling interval for the attributes, so I can use them better in derivative sensors. I created an automation, like shown here in the thread, but I kept getting this error message:

<DATETIME> WARNING (MainThread) [custom_components.zha_toolkit.zcl_attr] Result: {0: <Status.UNSUPPORTED_ATTRIBUTE: 134>} - Attribute 0 not in read ({}, {0: <Status.UNSUPPORTED_ATTRIBUTE: 134>})

After a lot of debugging, eventually I enabled debug logging for ZHA, and manually sent the update request, (Settings > Devices and Services > ZHA > X devices > 3 dots > Manage Zigbee Device > PM25 Endpoint, measured_value (0x000) > Read Attribute), and I found out, that the only difference between the request sent by the ZHA manual update and the ZHA Toolkit automation is, that I specified the manf: 4476 in my automation. After removing it, the polling worked fine.
I had to add the manf: 4476 only to the VOC sensor, as that one would throw the same error without that parameter specified.

Here is my automation YAML (you can add more attributes to poll, like it is shown in the thread):

alias: Zigbee polling
description: ""
trigger:
  - platform: time_pattern
    minutes: /1
condition: []
action:
  - metadata: {}
    data:
      ieee: <IEEE>
      endpoint: 1
      cluster: 1066
      attribute: 0
      state_id: sensor.bathroom_aqi_pm2_5
      allow_create: true
    action: zha_toolkit.attr_read
mode: single

Hereā€™s an automation I put together to regularly update the Humidity, PM2.5 and Temperature sensor values, as similar to other posts Iā€™ve noticed the values stop updating after a while.

It also has the TVOC reading action.

alias: Read VINDSTYRKA
description: Use ZHA_toolkit
trigger:
  - platform: time_pattern
    seconds: "0"
    minutes: /1
condition: []
action:
  - data:
      ieee: # put your IEEE here, remove the #
      endpoint: 1
      cluster: 64638
      attribute: 0
      manf: 4476
      state_id: sensor.VINDSTYRKA_tvoc
    action: zha_toolkit.attr_read
  - action: zha_toolkit.attr_read
    metadata: {}
    data:
      ieee: sensor.vindstyrka_humidity
      attribute: 0
      cluster: 1029
  - action: zha_toolkit.attr_read
    metadata: {}
    data:
      ieee: sensor.vindstyrka_pm2_5
      cluster: 1066
      attribute: 0
  - action: zha_toolkit.attr_read
    metadata: {}
    data:
      ieee: sensor.vindstyrka_temperature
      cluster: 1026
      attribute: 0
mode: single

CC: @kadam12g I hadnā€™t spotted your post above, looks like we had the same idea :smiley:

1 Like

I hope this is the right place. I have this VINDSTYRKA sensor attached to Home Assistant via Zigbee2MQTT. I keep getting notifications to upgrade the sensor firmware from version 65552 to 16777233. Can someone point me in the direction of release notes? Iā€™ve searched for the answers, but have been unsuccessful. Thanks.

(Dropping into an old topic here, but ā€¦)

Support for editing template sensors in the dashboard/UI was added in the 2023.09 release, and has been expanded since then. You can achieve the same goal by editing the configuration manually, but Iā€™d recommend upgrading. When you originally wrote this, you were on a release over 6 months old.

Have a great day!

I have clicked the update and now when connected to Z2MQTT sensor reboots randomly. It doesnā€™t reboot when not connected. Strangely the update popped up in Settings->Updates not in Z2M->OTA which shows FW version 1.0.010 from 2022. I am on latest HA core and Z2M. Anyone knows how to solve the reboots? Thanks

Hi All,
I read this thread about 29 times and still canā€™t get the damned tVOC to read and report. Running latest HA, created template-helper


and automation:
image

Traces error shows me:

Also experimented with variations of sensor template:

Any help or pointers where my errors are are appreciated.

Thereā€™s a bug in most recent HA Core updated ZHA. This broke ZHA Toolkit (it now needs to be updated to fix the issue):

1 Like

There is a fix available! I have downloaded and installed the 4 affected PY files and all now works! (I could just wait until it is merged and then update, but I am a bit impatientā€¦)

Where did you download these files from ?

The pull request is near the bottom of the linked GitHub issue mentioned in @VACIncā€™s reply.

Youā€™d then need to install by updating the version in your custom_components. It is a little old school, but one way to do this would be to download a .patch from GitHub.

https://github.com/mdeweerd/zha-toolkit/pull/263.patch

And then you can apply it using the patch tool.

apk add -U patch   # make sure the `patch` tool is installed
cd /config
curl -L https://github.com/mdeweerd/zha-toolkit/pull/263.patch | patch -p1 --backup

The patch command will not be able to locate the hacs.json, but you can safely skip this one (just press <enter>):

checking file custom_components/zha_toolkit/__init__.py
checking file custom_components/zha_toolkit/scan_device.py
checking file custom_components/zha_toolkit/utils.py
checking file custom_components/zha_toolkit/zcl_attr.py
can't find file to patch at input line 140
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|
|From 55f440af55f3b28cb37ed7acb396e14bfa5e72c0 Mon Sep 17 00:00:00 2001
|From: =?UTF-8?q?Micha=C5=82=20Modzelewski?= <[email protected]>
|Date: Tue, 17 Sep 2024 13:09:25 +0200
|Subject: [PATCH 3/3] Require 2024.9.0
|
|---
| hacs.json | 2 +-
| 1 file changed, 1 insertion(+), 1 deletion(-)
|
|diff --git a/hacs.json b/hacs.json
|index b09835a..f43d65d 100644
|--- a/hacs.json
|+++ b/hacs.json
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
1 out of 1 hunk ignored

That command should make backups of any files it changes, but Iā€™d still recommend performing a backup and being extra careful. Good luck!