AdapterRequests
AdapterRequests copied to clipboard
Airthings Adapter
Would be great if someone could create an adapter for the Airthings devices. General information of products and service could be found here: https://www.airthings.com/de/dashboard API-Documentation could be found here: https://www.airthings.com/de/business/api Idea here obviously is to create rules/actions based on the sensor data such as air quality. Thanks a lot in advance :-)
There is a solution for bluetooth reading https://github.com/Airthings/waveplus-reader#setup-raspberry-pi but best would be one for the hub connection in general Further information you find on https://help.airthings.com/en/articles/4510990-integrations-api https://airthings.portal.azure-api.net/ https://github.com/Airthings and https://ifttt.com/airthings Getting Access Token https://github.com/Airthings/python-flask-ext-api-example
https://airthings.portal.azure-api.net/docs/services/airthings-open-api/operations/get-api-devices
there is a working plugin available for homebridge: https://github.com/michaelahern/homebridge-airthings maybe that could be a source of "inspiration" for a iobroker adapter...
would very much apprecheate a adapter like that as well!
Is the HAM adapter the working with this plugin?
the plugin does not send new values regulrarly if used in HAM adapter, it looks like it is only updated if the divice is beeing "used" in home app. If beeing polled by the HAM adapter settings, some values just report back "0".
so basically... technically it is kind of working, but unfortunately not usable.
But for this the ham has a "poll interval" that you can set ... then it would be interesting to see a log ... and if a 0 is returned then these normally come from the plugin
then it would be interesting to see a log
here you are. HAM is set to "local mode", "insercure mode" and a polling interval of 60sec, no additional command line parameters. ham.1.2022-01-05.log
see for example at ham.1.Wohnzimmer-WavePlus-TEMP.Air-Quality.VOC-Density
and if a 0 is returned then these normally come from the plugin
most propably, yes.
hi @Apollon77 could you work with benjholls logfile? what is neede to get an adapter for iobroker done on the airthings devices? how can I help?
Did not had time so far for this
@Apollon77 I have the Airthings View Plus now here at my home. Let me know if I can be of any help providing data to develop this adapter. Felix
@benjholl @NUIFelix Please give the latest ham adapter version a try and if data are still "0" then please open issue with a full debug log on ham adapter. I will be happy to then look into it
@Apollon77 Have tried to get this ham-airthings nightmare to work once again on the new versions...
previously, it worked for me with ham set to "wrapper mode" instead of "local mode", at least if we ignore the fact that for Apple the VOC Measurement is different (µg/m³) than for Airthings (ppb) and also limited to ridiculously tight limits that it is just unusable for me... Maybe thats just the dowside of jusing a "apple-compatible adapter" within ham (what is its indended job): when using iobroker and a working system (in this cas airthings) apple's definitions can be the bottleneck nobody needs...
back to topic: have tried ham on my iobroker (Version 5.3.0 in /opt/iobroker/node_modules/iobroker.ham, node: v16.17.1, js-controller: 4.0.23) and homebridge-airthings v0.7.0 plugin. Well... i do not get the CO2 value now, even tho homebridge does indeed retriev a correct value as in this example:
ham.0 | 2022-10-03 20:33:36.212 | info | stateChange ham.0.Schlafzimmer-WavePlus.CO2.Carbon-Dioxide-Level {"val":0,"ack":true,"ts":1664822009571,"q":0,"from":"system.adapter.ham.0","user":"system.user.admin","lc":1664802729106} |
---|---|---|---|
ham.0 | 2022-10-03 20:33:36.191 | info | updateState Schlafzimmer-WavePlus.CO2.Carbon-Dioxide-Level: value = 451 /common= {"type":"number","min":0,"max":100000,"read":true,"write":false,"role":"value","name":"Carbon Dioxide Level","unit":""} |
same problem with battery (64) level here:
ham.0 | 2022-10-03 20:33:35.448 | info | stateChange ham.0.Schlafzimmer-WavePlus.Battery.Battery-Level {"val":0,"ack":true,"ts":1664822009274,"q":0,"from":"system.adapter.ham.0","user":"system.user.admin","lc":1664802729103} |
---|---|---|---|
ham.0 | 2022-10-03 20:33:35.428 | info | updateState Schlafzimmer-WavePlus.Battery.Battery-Level: value = 64 /common= {"type":"number","unit":"%","min":0,"max":100,"read":true,"write":false,"role":"value.battery","name":"Battery Level"} |
I also have set up a completely iobroker-independent system: Homebridge v1.5.0, Node.js v16.17.1 and homebridge-airthings v0.7.0 plugin. Same config file. Same Devices. Same API. And i do get all of the values in the app on my phone, including battery levels and CO2 levels.
Yes, may be the homebridge plugin is written poorly. I dont know. But at least in its intended use (within the homekit-apple-ecosystem) it is working and i have to assume it has been tested on this as well. I can not blame the developer that he did not test his pluign within this "ham and iobroker" ecosystem he possibly never heard of.
With all respect for the work behind the ham project, for me it ist just a tinkery nightmare of never ending incompabilities, missing data, too many interfaces between different pieces of software and no possibility to troubleshoot anything with google results alone...
In fact ham 5.3.x should work for all plugins I checked and also no user reported issues.
Would be cool to get a "silly" loglevel log from your plugin in ham to [email protected] to check that.
In fact ham would just because work around for you until someone manages to build an adapter for it. Better then nothing ...
@Apollon77 have just sent it. thanks for looking into that!
I will check in more depth tomorrow: What you have set as "polling interval" in the ham adapter? Can you try that please to set e.g. 30s or such and then check if the correct values appear 30s "after start" then? Just as verification
nope, even with 30s "polling interval" and a lot mor waiting than only 30s after start (about 4 to 5 update cycles, eacht 180s), there has been no other value than "0". Do you want a log of that, too?
Interssting, would have expected this to have an effect.
Please try to install the GitHub version of Ham ... And please provide a new log. Does it fix the issue? In fact the plugin is (again)doing stuff differently and in fact we run into a timeing issue befause the values of the devices is not yet available in the plugin when he registers the structure ... so we read "empty" values and then when the value is updated it do not get pushed as events ... I try to work around that now ...
Would be interesting if (when that works initially) also updated values are updated later ... can you maybe also try to force that?
looks promising. All Values i would expect are available and even get updated correctly in this Version. Will send you a "silly" log via mail.
is there something new? I would also like to buy an airthing and would be very happy about an adapter.
@Apollon77 Do you remember the final state? Is this request ev solved and can be closed?
@Apollon77 I now have an Airthings Wave Plus. If I could help...
If ham adapter works we could be fine. If not then not.
@Apollon77 I now have an Airthings Wave Plus. If I could help...
Please test with ham adapter and report back.
I just see that I still need a SmartLink Hub, I don't have it and it costs more than €100. I will set up an RPI and retrieve the data directly via ble. Too bad, then this isn't an option for me.
Any updates about the adapter with a hub beeing used? https://dashboard.airthings.com/integrations/api-integration https://airthings.portal.azure-api.net/ Maybe the homebridge work helps? https://classic.yarnpkg.com/en/package/@kanreisa/homebridge-wave-plus
just a quick information from my end: since my last post from Oct 5th of last year, my setup was working smoothly.
I am using on my Setup:
- 1 Hub
- 4 Wave Plus
- 1 Wave Radon
For me it worked best to use a dedicated ham-instance for the airthings plugin with the following settings:
- „Homebridge adapter mode“: Wrapper Mode (did not work in other modes, at least for me!)
- „Use insecure Homebridge mode“ active
- „Additional NPM modules“: [email protected]
- „Value Polling Interval“: 30
- no „Homebridge command line parameters“
whilst i am not keen on getting the data of my airthings sensors through a cloud service, this at least works for me as long the cloud is available.
I have now helped myself with this project, ESP32 Bluetooth -> MQTT -> ioBroker https://github.com/martinheidemann/AirthingsMQTT
Without a hub and without a cloud!