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

IKEA Starkvind Air purifier (E2007/E3007) #5351

Closed
grrrmml opened this issue Oct 5, 2021 · 57 comments · Fixed by #6118
Closed

IKEA Starkvind Air purifier (E2007/E3007) #5351

grrrmml opened this issue Oct 5, 2021 · 57 comments · Fixed by #6118

Comments

@grrrmml
Copy link

grrrmml commented Oct 5, 2021

Device

  • Product name: STARKVIND Air purifier (E2007 and E3007 [Table integrated])
  • Manufacturer: IKEA of Sweden
  • Model identifier: STARKVIND Air purifier
  • Device type :
    • Sensor: Air Quality (unknown if exposed and readable)
    • Other: Fan Control: Off/Low/Medium/High/On/Auto/Smart ( on the device, there is a wheel with levels Auto/1-5 and On/Off [push] )

Screenshots

e2007_node_info

e2007_overview

Basic

e2007_basic_cluster

Groups

e2007_groups

Scenes

e2007_scenes

Fan Control

e2007_fan_control

Unknown (FC57)

Unknown (FC7D)

nothing visible for both

@grrrmml grrrmml changed the title Device name STARKVIND Air purifier (E2007/E3007) Oct 6, 2021
@grrrmml grrrmml changed the title STARKVIND Air purifier (E2007/E3007) IKEA Starkvind Air purifier (E2007/E3007) Oct 6, 2021
@nicoscholl
Copy link

That would be awesome, just got mine a few days ago!

@dieugab
Copy link

dieugab commented Oct 16, 2021

Waiting for this device request until I buy one 👍

@dusopn
Copy link

dusopn commented Oct 16, 2021

Waiting for this device request until I buy one 👍

Exactly me too 👍

@yurgh
Copy link

yurgh commented Oct 24, 2021

Waiting for this device request until I buy one 👍

And me too

@timvanmeurs
Copy link

I bought one. Never developed anything regarding zigbee/deconz, but do have development experience. Let me know if I can assist in any way

@Mimiix
Copy link
Collaborator

Mimiix commented Oct 25, 2021

Asked @manup to see if this can be done with DDF's

@manup
Copy link
Member

manup commented Oct 25, 2021

Yes should be possible, although we need to have a closer look with the sniffer to check what the manufacturer specific clusters do. Perhaps sniffing the traffic between Ikea gateway and this device.

@timvanmeurs
Copy link

Maybe this helps:
home-assistant-libs/pytradfri#350

@sjorge
Copy link

sjorge commented Nov 10, 2021

I've been poking this device using z2m, sadly no gateway to compare but I did manage to get something out of 0xfc7d

This is the cluster definition I added to z2m, I'm not 100% sure PM25 but it's extremely likely. It follows the same attribute layout as far as I could tel for the Ember zigbee additional measurement clusters.

    manuSpecificIkeaPM25Measurement: {
        ID: 0xfc7d,
        manufacturerCode: manufacturerCode_1.default.IKEA_OF_SWEDEN,
        attributes: {
            measuredValue: { ID: 0x0000, type: dataType_1.default.uint16 },
            measuredMinValue: { ID: 0x0001, type: dataType_1.default.uint16 },
            measuredMaxValue: { ID: 0x0002, type: dataType_1.default.uint16 },
            measuredTolerance: { ID: 0x0003, type: dataType_1.default.uint16 },
        },
        commands: {},
        commandsResponse: {},
    },

Reading this gets the following readReponse:

Zigbee2MQTT:info  2021-11-10 21:23:22: Read result of 'manuSpecificIkeaPM25Measurement': {"measuredValue":2287,"measuredMinValue":0,"measuredMaxValue":259200,"measuredTolerance":0}

measuredValue probably needs a /100 I think as I had it in auto made and it went to the lowest speed so I don't think it is considering the air dirty and 2287ug/m3 would be extremely high if I am not mistaken.

I was unable to configure reporting on this, but I might be doing something wrong.

I sadly do not own the ikea gateway to compare it with the values in the tradfri app.

@ebaauw
Copy link
Collaborator

ebaauw commented Nov 14, 2021

I received the Starkvind (standing model) I ordered and paired it to the TRAFDR hub without any issues. It uses regular pairing, so I have finally captured the hub's network key, enabling me to sniff the Zigbee communication between the Starkvind and the hub. The bastards are using channel 25, same as my production deCONZ network, but nothing that filerting on PANID cannot solve.

The hub seems to control the air purifier exclusively by writing to manufacturer-specific attributes in the 0xFC7D cluster. The Strakvind sends attribute reports in addition to the Write Attributes Response. The Report Attributes is answered by the Hub with a Default Response. The hub queries the Scenes cluster.

So far, I've found out the following attributes, all of which support attribute reporting.

Attribute Data Type rw Use
0x0000 u32 r Filter Run Time (in minutes)
0x0001 u8 r Replace Filter
0x0002 u32 rw Filter Life Time (in minutes)
0x0003 bool rw Disable LEDs
0x0004 u16 r Air Quality (PM2.5 in µg/m³)
0x0005 bool rw Lock Controls
0x0006 u8 rw Target Mode
0x0007 u8 r Current Mode
0x0008 u32 r Device Run Time (in minutes)

Target Mode takes the following values:

Value Meaning
0x00 Off
0x01 Auto
0x0a - 0x32 Fixed speed, between 10 and 50, corresponding to the LEDs on the Starkvind

Current Mode reports the same values, except for 0x01. The Smart Home app and the dial on the purifier only allow setting 10, 20, 30, 40, 50, but I've also seen Current Mode being reported as 25. The is also reflected in the app.

I've observed the following values for Air Quaily:

Value Meaning
0x0002 Good.
0xFFFF No data available, because device is off.

When resetting the filter (through the seconds hidden button on the purifier, underneath the pairing button) it reports attributes 0x0000 (value 0), 0x0001 (value 0) and 0x0002 (value 259200, which suspiciously looks like the filter life time of 6 months in minutes, 6 * 30 * 24 * 60). After some playing around, I think 0x0000 keeps track of the time the device has been on with this filter. It's reset by pressing the reset button. 0x0002 is the threshold after which the filter needs to be replaced. This is indicated by 0x0001, which matches the red warning LED on the device. 0x0008 is the total run time. All times are in minutes. If you setup attribute reporting with min value 1 (it's a mains powered device anyway), you can see the values updating in real-time.

The hub exposes the purifier to HomeKit natively, as a single accessory with an Air Quality Sensor and an Air Purifier service. It only uses standard HomeKit characteristics, and doesn't expose disabling the LED. Lock Physical Controls isn't supported by Home, but works from Eve (which display it as Child Lock).

I'll update general.xml with these findings, so we can control the purifier from the GUI. For REST API support, we need to make from hard decisions:

  • I think the actuator function should be exposed as a /lghts resource, since the device supports (and seems to use) groups and scenes. However, historically, we made the distinction between target and current modes using config vs state attributes. Current mode could be exposed as state.speed, which is already used for the Hampton Bay fan controller. I don't think we already expose other air purifiers? Haven't figured out yet what attributes the Scenes cluster supports, let alone how to support these in the API.
  • I think the air quality sensor should be exposed as a ZHAAirQuality /sensors resource, but without state.airqualityppb, as the purifier doesn't seem to report the raw value.

@ebaauw
Copy link
Collaborator

ebaauw commented Nov 14, 2021

Screenshot 2021-11-14 at 14 49

Note that the Air Quality now reports 7, but I think it's still Good (device is set to auto and speed is 10). Maybe it reports the raw value after all?

@SwoopX
Copy link
Collaborator

SwoopX commented Nov 14, 2021

I'd say so. You might want to check this out for further reference

QString getAirQualityString(quint32 levelPpb)
{
QString airquality;
if (levelPpb <= 65) { airquality = QLatin1String("excellent"); }
if (levelPpb > 65 && levelPpb <= 220) { airquality = QLatin1String("good"); }
if (levelPpb > 220 && levelPpb <= 660) { airquality = QLatin1String("moderate"); }
if (levelPpb > 660 && levelPpb <= 2200) { airquality = QLatin1String("poor"); }
if (levelPpb > 2200 && levelPpb <= 5500) { airquality = QLatin1String("unhealthy"); }
if (levelPpb > 5500 ) { airquality = QLatin1String("out of scale"); }
return airquality;
}

@ebaauw
Copy link
Collaborator

ebaauw commented Nov 14, 2021

Yeah, saw that. I have no other air quality sensor to compare, but it would fit the u16. Maybe I should light a celebratory cigar… Been eyeing the Eve Room, but want a version supporting Thread before spending that amount of money.

@ebaauw
Copy link
Collaborator

ebaauw commented Nov 14, 2021

The Starkvind accepts, but ignores the Identify command. It has implemented Trigger Effect, but not all values. Blink and Breathe work, and trigger the LED on the pairing button.

Koenkk pushed a commit to Koenkk/zigbee-herdsman that referenced this issue Nov 14, 2021
…ier (#455)

* Repalce manuSpecificIkeaPM25Measurement with manuSpecificIkeaAirPurifier

* Add additional STARKVIND attributes

Found via dresden-elektronik/deconz-rest-plugin#5351 (comment)
@michaelnimbs
Copy link

Hello, I implemented the Starkvind support for the pytradfri library for home-assistant mentioned above in this thread:
home-assistant-libs/pytradfri#350 (comment)
I can confirm that it shows the raw value for the air quality sensor:

Indicators for air quality (PM 2.5):
Green: 0-35 / Good
Amber: 36-85 / OK
Red: 86- / Not good

I confirmed this by blowing out some candles and letting the smoke get inside the Starkvind, the value went up above 200 and the Ikea app showed the correct corresponding states and the fan went to full power.

@ebaauw
Copy link
Collaborator

ebaauw commented Nov 14, 2021

Thanks, @michaelnimbs. Do you happen to know in which unit the Starkvind reports the air quality, or is this just a raw sensor value. Most air quality sensor I’ve seen (as in: read about - I don’t have any) use five levels of quality instead of three, and I’d like to do the same, exposing the Starkvind through the deCONZ API.

I confirmed this by blowing out some candles and letting the smoke get inside the Starkvind

That is a much better approach than picking up smoking! I was already tempted to light a cigar…

@michaelnimbs
Copy link

@ebaauw Maybe μg/m3, but I don't know for sure.

@grrrmml
Copy link
Author

grrrmml commented Nov 14, 2021

First of all, thanks to everybody for the work so far.
The unit should be μg/m3, and I found following values (for PM2.5 and comparison to PM10).
This is my second air quality measuring device, but first with such values.

Maybe following table helps (taken from a texas instruments datasheet).

PM2.5 PM10 AQI AQI Category
0.0 to 12.0 0 to 54 0 to 50 Good
12.1 to 35.4 55 to 154 51 to 100 Moderate
35.5 to 55.4 155 to 254 101 to 150 Unhealthy for sensitive groups
55.5 to 150.4 255 to 354 151 to 200 Unhealthy
150.5 to 250.4 355 to 424 201 to 300 Very unhealthy
250.5 to 350.4 425 to 504 301 to 400 Hazardous
350.5 to 500.4 505 to 604 401 to 500 Hazardous

@SwoopX
Copy link
Collaborator

SwoopX commented Nov 14, 2021

Whoever might be interested in this, some further reading on VOC levels https://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/9_Gas_Sensors/Sensirion_Gas_Sensors_SGP3x_TVOC_Concept.pdf

Interestingly, the danish company Develco seems to have chosen the german approach, which is the current implementation 🤔

@ebaauw
Copy link
Collaborator

ebaauw commented Nov 14, 2021

This is all new to me. What I understand from https://www.epa.gov/pm-pollution/particulate-matter-pm-basics and https://www.wkcgroup.com/tools-room/micrograms-per-cubic-meter-parts-per-billion-converter/ and @SwoopX 's link above.

There's different ways of how to measure a pollutant:

  • By density (weight per volume) of the pollutant in µg/m³ (microgram per cubic meter) or mg/m³;
  • By level (as part of the volume) of the pollutant in ppb (parts per billion) or ppm (parts per million);
  • You cannot generally convert density (µg/m³) to level (ppb) or vice versa, as this is dependent on the specific weight of the pollutant and the temperature (high school physics: pV = nRT). You can only convert for a given pollutant and at a given temperature (at standard air pressure);

There's different types of pollutants:

  • PM2.5 and PM10 look at particulate matter (dust), PM2.5 looks at fine inhalable particles, with a diameter of 2.5µm; PM10 looks at inhalable particles, with a diameter of 10µm; In think these are usually measured by density;
  • VOC looks at Volatile Organic Compounds (gasses). TVOC is all VOC gasses combined. This seems to be measured by density as well.
  • Other harmful gasses like CO (carbon monoxide) are usually measures by level.

I suppose depending on what pollutant you're looking at (PM2.5, PM10, TVOC, CO, ...), different density and level thresholds apply for computing air quality. HomeKit supports different characteristics for the different pollutants, explicitly specifying density vs level in the name, see "Air Quality and Smoke Detection" on https://developer.apple.com/documentation/homekit/hmcharacteristic/characteristic_types, but the TRADFRI hub only exposes Air Quality to HomeKit. Without knowing what pollutant(s) the sensor in the Starkvind actually measures and how (level vs density), the value reported in attribute 0x0004 cannot be compared with values reported by other sensors.

EDIT https://www.imore.com/ikea-confirms-homekit-support-its-new-smart-air-purifiers suggests it measures PM2.5.

EDIT 2 From the Product Details on the IKEA web site:

The air purifier can be set to auto mode, which means that it automatically detects the particles (PM2.5) in the air and then adjusts the fan speed, so you can think about other things.

@grrrmml
Copy link
Author

grrrmml commented Nov 14, 2021

@ebaauw Taking your observation under regular conditions ("Air Quality now reports 7") and michaelnimbs "letting the smoke get inside the Starkvind, the value went up above 200" > that corresponds quite well with the figures I added above.
0.0 to 12.0 > Good
150.5 to 250.4 > Very unhealthy (when smoking candles for 24hours/day)

(Unfortunately I cannot contribute much more at the moment. I installed the deconz beta, and compiled and replaced the rest-api on my RPi4, but cannot yet get it working, even after deleting the device and re-adding. I will maybe try again after PR is merged. If I miss something important, I'd be happy for a hint...)

@ebaauw
Copy link
Collaborator

ebaauw commented Nov 15, 2021

You need to copy the general.xml file from my PR to /usr/share/deCONZ/zcl and restart deCONZ. I haven’t yet made any changes to the REST API plugin code.

@ebaauw
Copy link
Collaborator

ebaauw commented Nov 15, 2021

So we need a state.pm2_5 to expose the value of 0x0004 (in µg/m³).

There seem to be multiple standards of Air Quality, with different number of levels, names for those levels, and thresholds for the PM2.5 density:

  • The current implementation by @SwoopX follows the German standard from the link in his other comment, with values excellent, good, moderate, poor, and unhealthy. I haven't been able to find a mapping of PM2.5 to these levels;
  • The US standard uses six levels, as mentioned by @grrrmml. The mapping threshold mentioned there are consistent with https://www.airnow.gov/aqi/aqi-calculator-concentration/.
  • The EU standard uses six levels: good, fair, moderate, poor, very poor, and extremely poor. A mapping table is on https://www.eea.europa.eu/themes/air/air-quality-index (click on Legend Explained).
  • HomeKit uses five levels: excellent, good, fair, inferior, poor. It also adds an unknown value (which makes sense, as the Starkvind reports 0xFFFF this when it's off).

I would propose to stick to the current implementation and use the EU mapping, so we would get:

PM2.5 EU Index state.airquality
0-10 Good excellent
10-20 Fair good
20-25 Moderate moderate
25-50 Poor poor
50-75 Very poor unhealthy
75-1000 Extremely poor out of scale
65535 -- unknown

We might want to rename out of scale to hazardous.

@BlankStarBE
Copy link

BlankStarBE commented Jan 25, 2022

Is the device already supported and if not, can it be expected in the next version?
I got one for Christmas...
I would like to thank you in advance for the work you have done.

Just got one and sure hope it will be included in a (near) future release!

@TheNON75
Copy link

TheNON75 commented Feb 9, 2022

With the help of DDF, some limited functionalities can already be implemented, such as:

  • config/fanmode off/auto/low/medium/high
  • config/ledindicator (no update is possible atm)
  • config/locked (no update is possible atm)
  • state/airqualityppb
  • state/speed:
  • state/on: to be derived

@ebaauw
Copy link
Collaborator

ebaauw commented Feb 9, 2022

Note that the Xiaomi reports VOC level in ppb, which is exposed as airqualityppb. The Starkvind reports PM2.5 density in µg/m³. This cannot (shouldn’t) be exposed as the same resource attribute, even if you were to convert PM2.5 density to PM2.5 level in ppb (as it’s a different quantity).

@Kllrv
Copy link

Kllrv commented Feb 19, 2022

With the help of DDF, some limited functionalities can already be implemented

Have you got such a working DDF available somewhere?

@dieugab
Copy link

dieugab commented Feb 26, 2022

Wondering the same thing as @Kllrv. Would love to get this working in the meantime

@MTrab
Copy link

MTrab commented Feb 27, 2022

Would be nice to see some progress to this issue/feature.

What do you need to speed up this one?

@kimosak
Copy link

kimosak commented Mar 18, 2022

Nothing new with Starkving on v2.15.0-beta deconz-rest-plugin, is anything needed to speed it up?
Thanks

@MTrab
Copy link

MTrab commented Mar 18, 2022

Gave up waiting - moved to Zigbee2MQTT

@andiyk
Copy link

andiyk commented Apr 8, 2022

is still being worked on?

@kimosak
Copy link

kimosak commented Apr 8, 2022

Same question here, Waiting for v2.15.+ to test it

@mayanigrosh
Copy link

@ebaauw How can the rest of us help this along?

@manup
Copy link
Member

manup commented Apr 13, 2022

Hi we have the Starkvind on the order list expected to arrive in May to be able to create the DDF.
If anybody is keen to create one earlier I'm happy to help out.

@TheNON75
Copy link

TheNON75 commented May 2, 2022

Hi @manup,
Considering it is already May, I am not sure if it makes sense, but here I am

@manup
Copy link
Member

manup commented May 4, 2022

The Starkvind is ordered, so I hope to have a DDF ready shortly after its arrives.

@TheNON75
Copy link

TheNON75 commented May 4, 2022

Sounds good, I look forward to hearing some news :)

@MichelEhmen
Copy link

Hello, Are there already any updates?

@manup
Copy link
Member

manup commented May 20, 2022

I have the Starkvind now running in my living room (vanilla without Zigbee, boy this thing can be loud..). The last days kept me a bit busy with bug fixes, I'm starting now to build the DDF and check what needs to be extended on the C++ side based on @ebaauw research.

@manup manup added this to the v2.17.0-beta milestone Jun 6, 2022
@manup manup linked a pull request Jun 6, 2022 that will close this issue
This was referenced Jun 10, 2022
@oywino
Copy link

oywino commented Apr 7, 2023

I've had my IKEA STARKVIND for some moths, integrated into Home Assistant using REST-API via deConz without any issues - until quite recently when it suddenly and for no apparent reason reports Air Quality Out-of-Scale and the speed automatically increases to maximum:

image

Then after a while it seems to autocorrect itself again. This has never happened before, but recently it happens almost weekly and randomly.
Does anyone know why?

@leoluk
Copy link

leoluk commented Apr 7, 2023

I've had my IKEA STARKVIND for some moths, integrated into Home Assistant using REST-API via deConz without any issues - until quite recently when it suddenly and for no apparent reason reports Air Quality Out-of-Scale and the speed automatically increases to maximum

This sounds like a hardware issue - the coordinator is not involved in setting fan speed. Try cleaning the sensor.

@Mimiix
Copy link
Collaborator

Mimiix commented Apr 7, 2023

Hi,

For any questions on devices, please use the forums. If you think a bug is involved, open a new issue.

Locking this up.

@dresden-elektronik dresden-elektronik locked and limited conversation to collaborators Apr 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.