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

[New device support]: Ikea VINDSTYRKA Air Quality Monitor #16717

Closed
philippsandhaus opened this issue Feb 17, 2023 · 23 comments · Fixed by Koenkk/zigbee-herdsman-converters#5521
Labels
new device support New device support request

Comments

@philippsandhaus
Copy link

philippsandhaus commented Feb 17, 2023

Link

Press Announcement

Database entry

{"id":40,
"type":"Router",
"ieeeAddr":"0x187a3efffe8104ed",
"nwkAddr":18782,
"manufId":4476,
"manufName":"IKEA of Sweden",
"powerSource":"Mains (single phase)",
"modelId":"VINDSTYRKA",
"epList":[1,242],
"endpoints":{
	"1":{
		"profId":260,
		"epId":1,
		"devId":770,
		"inClusterList":[0,3,4,1026,1029,64599,64636,1066,64638],
		"outClusterList":[3,25,32,514],
		"clusters":{},
		"binds":[],
		"configuredReportings":[],
		"meta":{}
	},
	"242":{
		"profId":41440,
		"epId":242,
		"devId":97,
		"inClusterList":[],
		"outClusterList":[33],
		"clusters":{},
		"binds":[],
		"configuredReportings":[],
		"meta":	{}}
		},
	"appVersion":16,
	"stackVersion":106,
	"hwVersion":1,
	"dateCode":"20220719",
	"swBuildId":"1.0.010",
	"zclVersion":8,
	"interviewCompleted":true,
	"meta":{},
	"lastSeen":1676659177867,
	"defaultSendRequestWhen":"immediate"
}

Comments

I tried to add the device as described in the guide for adding new devices, but unfortunately the device does not report anything on its own. The guide suggests to add a configure: section and looking for definitions of similar devices, but I do not find any similar devices in Ikea.js. Could anyone point me in the right direction?

External converter

const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const e = exposes.presets;
const ea = exposes.access;

const definition = {
    zigbeeModel: ['VINDSTYRKA'], // The model ID from: Device with modelID 'lumi.sens' is not supported.
    model: 'VINDSTYRKA', // Vendor model number, look on the device for a model number
    vendor: 'IKEA of Sweden', // Vendor of the device (only used for documentation and startup logging)
    description: 'Humidity and air quality sensor', // Description of the device, copy from vendor site. (only used for documentation and startup logging)
    fromZigbee: [], // We will add this later
    toZigbee: [], // Should be empty, unless device can be controlled (e.g. lights, switches).
    exposes: [e.battery(), e.temperature(), e.humidity()], // Defines what this device exposes, used for e.g. Home Assistant discovery and in the frontend
};

module.exports = definition;
@philippsandhaus philippsandhaus added the new device support New device support request label Feb 17, 2023
@philippsandhaus philippsandhaus changed the title [New device support]: [New device support]: Ikea VINDSTYRKA Air Quality Monitor Feb 17, 2023
@peterkappelt
Copy link

I've got one, too. Temperature and Humidity reporting is fairly standard and works with the code below, for instance. PM2.5 and TVOC though seems to be IKEA specific. Does anynone happen to have a Dirigera Hub and is able to provide a Zigbee packet capture so we can extract some information?

const fz = require("zigbee-herdsman-converters/converters/fromZigbee");
const tz = require("zigbee-herdsman-converters/converters/toZigbee");
const exposes = require("zigbee-herdsman-converters/lib/exposes");
const reporting = require("zigbee-herdsman-converters/lib/reporting");
const extend = require("zigbee-herdsman-converters/lib/extend");
const e = exposes.presets;
const ea = exposes.access;

const definition = {
  zigbeeModel: ["VINDSTYRKA"],
  model: "VINDSTYRKA",
  vendor: "IKEA of Sweden",
  description: "IKEA Air Quality and Humidity sensor",
  fromZigbee: [fz.temperature, fz.humidity],
  toZigbee: [],
  exposes: [e.temperature(), e.humidity()],
  configure: async (device, coordinatorEndpoint, logger) => {
    const ep = device.getEndpoint(1);
    await reporting.bind(ep, coordinatorEndpoint, [
      "msTemperatureMeasurement",
      "msRelativeHumidity",
    ]);
    await ep.configureReporting("msTemperatureMeasurement", [
      {
        attribute: "measuredValue",
        minimumReportInterval: 30,
        maximumReportInterval: 120,
      },
    ]);
    await ep.configureReporting("msRelativeHumidity", [
      {
        attribute: "measuredValue",
        minimumReportInterval: 30,
        maximumReportInterval: 120,
      },
    ]);
  },
};

module.exports = definition;

@sjorge
Copy link
Sponsor Contributor

sjorge commented Feb 18, 2023

You can see if the PM2.5 works the same as on the starkvind.

I went to ikea to find one to add support but they're not here yet where i live.

@kkossev
Copy link

kkossev commented Feb 18, 2023

I've got one, too.

Is it already available in Ikea Germany? I can't find it online .. : (

@peterkappelt
Copy link

Unfortunately, Starkvind seems to use another cluster (manuSpecificIkeaAirPurifier with id 64637), while vindstyrka seems to publish PM2.5 data on cluster 1066. Strangely, the 1066 cluster is already assigned to heimanSpecificPM25Measurement - though reading values and configuring reporting both fail with UNSUPPORTED_ATTRIBUTE.

I'll try to get around a dirigera gateway - I think capturing the real protocol is way easier than just wandering around in the dark and trial&error

@kkossev I've got mine today in a local IKEA in Germany. They didn't publish the product on their website yet, but apparently it is already available in some stores

@Astrofreak85
Copy link

Astrofreak85 commented Feb 18, 2023

Today I got the last one in Ikea Dresden, they told me they got 20pcs on thursday
tried to pair it....but didn't work so far...

@peterkappelt
Copy link

peterkappelt commented Feb 18, 2023

Okay turns out 1066 cluster isn't actually Heiman-Specific, but a general purpose PM2.5 cluster defined in the ZCL spec. So this definitely needs some patching in zigbee-herdsman (there is a manufacturer code specified for heimanSpecificPM25Measurement that prevents messages with the IKEA manufacturer code coming through).

The following definition works for me. You might need to manually click on configure and it'll probably fail, but at least the sensor is reporting temperature, humidity and PM2.5. No clue for TVOC though...

const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const e = exposes.presets;
const ea = exposes.access;

const definition = {
    zigbeeModel: ['VINDSTYRKA'],
    model: 'VINDSTYRKA',
    vendor: 'IKEA of Sweden',
    description: 'IKEA Air Quality and Humidity sensor',
    fromZigbee: [fz.temperature, fz.humidity, fz.heiman_pm25],
    toZigbee: [],
    exposes: [e.temperature(), e.humidity(), e.pm25()],
    configure: async (device, coordinatorEndpoint, logger) => {
        const ep = device.getEndpoint(1);
        await reporting.bind(ep, coordinatorEndpoint, ["msTemperatureMeasurement", "msRelativeHumidity", "heimanSpecificPM25Measurement"]);
        await ep.configureReporting("msTemperatureMeasurement", [{attribute: "measuredValue", minimumReportInterval: 30, maximumReportInterval: 120}]);
        await ep.configureReporting("msRelativeHumidity", [{attribute: "measuredValue", minimumReportInterval: 30, maximumReportInterval: 120}]);
        await ep.configureReporting("heimanSpecificPM25Measurement", [{attribute: "measuredValue",
                        minimumReportInterval: 30, maximumReportInterval: 60, reportableChange: 1}]);
    }
};

image

@peterkappelt
Copy link

@Astrofreak85 i had to do a factory reset first before I could pair it.

Do you happen to have acess to a dirigera hub for capturing (or know anyone)? I'm also located near Dresden and would be keen to capture some data

@lovwyr
Copy link

lovwyr commented Feb 19, 2023

@Astrofreak85 push the Connect Button 4x to init an Reset and then its pairable
@peterkappelt when i leaved yesterday there where ~10 Units left in Stock :)

@Astrofreak85
Copy link

@peterkappelt no sadly not, but if I can help anyway, just let me know

@philippsandhaus
Copy link
Author

philippsandhaus commented Feb 20, 2023

@peterkappelt Great, this also works for me. I get the same measurements as you get. My guess is, that TVOC might not be reported over zigged at all. I tried also to use the corresponding definition for TVOC, but got no measurements:

await ep.configureReporting("heimanSpecificAirQuality", [{attribute: "tvocMeasuredValue",
                        minimumReportInterval: 30, maximumReportInterval: 60, reportableChange: 1}]);

As Ikea apparently does follow the specification for PM25 I suspect they would do the same for TVOC.

@peterkappelt
Copy link

@philippsandhaus Apparently, it does report TVOC data - at least that's what a dump from the gateway suggests. I wasn't able to figure out the meaning of the 64xxx clusters though, they didn't respond to basic attribute read commands.

IKEA doesn't seem to fully follow the ZCL spec here either. PM2.5 reports as data type float, but per standard it should've been an integer. So we'll definitely need some manufacturer specific cluster definition. I'll try to submit a pull request till end of the week

@peterkappelt
Copy link

I also observed that PM2.5 is reported ~once per second, regardless of what I've configured for reporting. Can anyone confirm this behaviour? I definitely don't want that much traffic by default on my network

@0ip
Copy link

0ip commented Feb 20, 2023

Can anyone confirm this behaviour?

@peterkappelt I tried your converter and receive PM2.5 reports as frequently as in your case.
However, I cannot even set the reporting interval. Here's the error message:
image

@0ip
Copy link

0ip commented Feb 20, 2023

As a side note/might be useful for later:
I read that the SEN54 sensor from Sensirion the Vindstyrka uses likely does not report a raw TVOC reading, which seems to be of little value anyway. Instead, it (only?) emits a unitless and proprietary index that can be used to detect short-term VOC changes compared to a 24 hour baseline. The baseline is 100. A value less than 100 (= less VOCs) corresponds to fresh air coming in or the use of an air purifier. Higher value = more VOCs. See this PDF for more details about this index.

@peterkappelt
Copy link

I've created a PR with the initial support, just fyi

@Astrofreak85
Copy link

I don't know if this belongs here or not. After update to the current release I can find the Vindstyrka, but I only get the lqi readin, everything else stays at N/A

@rotilho
Copy link

rotilho commented Mar 9, 2023

The temperature precision is sooooo disappointing. I hope they somehow fix it

@prolife86
Copy link

't know if this belongs here or not. After update to the current release I can find the Vindstyrka, but I only get the lqi readin, everything else stays at N/A

Try removing it and adding it again, sounds like an incomplete interview.

@prolife86
Copy link

The temperature precision is sooooo disappointing. I hope they somehow fix it

What do you mean?

@0ip
Copy link

0ip commented Mar 11, 2023

The temperature precision is sooooo disappointing. I hope they somehow fix it

What do you mean?

prolife86: rotilho likely refers to the lacking number of decimals. I think it's due to the sensors intrinsic measurement inaccuracy. So it doesn't get much more precise than this in terms of hardware. See the spec for details

@rotilho
Copy link

rotilho commented Mar 12, 2023

That's what I mean. It could at least have a 0.5 precision since the sensor has 0.45 accuracy.

@sanyafifa
Copy link

I don't know if this belongs here or not. After update to the current release I can find the Vindstyrka, but I only get the lqi readin, everything else stays at N/A

I have the same problem
How did you solve yours?

@edmondss
Copy link

edmondss commented Feb 7, 2024

Hi guys, I just bought this Ikea air quality monitor. After pairing with Z2m i found out that the data in HA is NOT exactly the same as to what's showing on the ikea sensor screen. Is this normal?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new device support New device support request
Projects
None yet
Development

Successfully merging a pull request may close this issue.