In your HA Dashboard, you could add a “gauge card” with a config something like this:
I have just received the new " Open Air Outdoor Monitor O-1PST CO2 Version" - will these integrations work with the additional sensor, or do I need to add something?
Primarily looking to switch to ESPHOME, with the additional upload to the Air Gradient API, so I can integrate in to Home Assistant.
Thanks.
I’m working on a config for ESPHome for that model right now, so if you can wait a few days I hope to have something ready soon.
Thanks for the update - as a newcomer to this community I can see your efforts are appreciated.
Does it include control of the blue light? That is already generating comments within the family and I haven’t even mounted it yet!
What blue light do you refer to?
Blue LED next to the USB port. Keeps coming on.
My initial release of an ESPHome config for the new AirGradient One with the v9 board is now available:
airgradient_esphome/airgradient-one.yaml at main · MallocArray/airgradient_esphome (github.com)
Supports all included sensors and the LED bar, based on CO2 values, as well as sending data to AirGradient’s dashboard in addition to your own HomeAssistant
We will most likely make the blue light only blink during the WiFi setup and if the monitor has some problem. Would that make your family happy ?
That would make the most obvious use of the LED in my mind. My children are used to things with lights on around the house and outside, and if something is showing a light which shouldn’t do I usually get a report very quickly. Therefore it being used for error conditions only would probably make the most sense.
Although I will be switching over to the ESPHome config as soon as it is ready…
I’ve updated gohai’s HomeKit port to work with DIY_PRO_V4_2. If anyone runs into any bugs or issues feel free to let me know and I’ll do my best to help out if I can. I haven’t run into any problems yet but I also haven’t done any extensive tests.
Here is the link to my repo - https://github.com/brian-gee/arduino-homekit-enabled/tree/master/examples
@investigatorno56 Thanks for your great work on HomeKit integration for DIY PRO V4.2
I would like to know can I upload the same firmware to two Boards which is DIY PRO V4.2 with the same setup password and added to the same HomKit network ?
Are the 2 units detected under the same HomeKit then they can added on the same Apple Home network such as the same Home Name and same WIFI network?
I found that only one unit can be detected on the Add Accessory Screen, the 2nd unit must be power off. Simply speaking only ONE unit can be detected on the same Home network, even I try to changed the Setup password with difference number. Do you have any idea to fix that?
Thanks!
Alan
Hey @Alan_Ng, I’m not sure as I only have one device that I can test this with. I think possibly setting a different serial number within the homekit.c file might resolve this issue. Give it a try and let me know if it works. If not maybe something in the below accessory options needs to be changed.
homekit_accessory_t *accessories[] = {
HOMEKIT_ACCESSORY(.id = 1, .category = homekit_accessory_category_sensor, .services = (homekit_service_t*[]) {
HOMEKIT_SERVICE(ACCESSORY_INFORMATION, .characteristics = (homekit_characteristic_t*[]) {
HOMEKIT_CHARACTERISTIC(NAME, "AirGradient DIY PRO"),
HOMEKIT_CHARACTERISTIC(MANUFACTURER, "Arduino HomeKit"),
HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, "0123456"),
HOMEKIT_CHARACTERISTIC(MODEL, "ESP8266"),
HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, "1.0"),
HOMEKIT_CHARACTERISTIC(IDENTIFY, my_accessory_identify),
NULL
}),
For what it is worth, Airgradient uses the last 6 characters of the MAC address as the serial number with the D1 Mini ESP8266 when it comes to their API. (Full MAC for the esp32-c3)
Hey @investigatorno56 thanks for your response. Let me show you what is my findings as below.
- Only 1 unit power on, it can be detected on Add Accessory screen and added to Home success.
- When 1st unit is added to Home and working then 2nd unit is not shown on the screen of the Add Accessory.
- Power off the 1st unit which is added to Home already, then 2nd unit will be shown on Add Accessory screen and it can be process the adding process but finally it failed with message of “it cannot be added”
- Removed the 1st unit from the Home and power off it then add the 2nd unit to Home will be detected and success.
I have built others HomeKit Board, it having the same issue when adding 2nd unit. That mean if you only have 1 unit then you do not discovered that issue.
As I searched for others HomeKit projects that come with Setup QR code which have the Setup ID inside the QR code. I have referred the below document for details and build the QR code.
I have try to use different Setup ID but it look like having the same issue, may be I not good for the program and misunderstand some details of building the QR code.
I have refer to the below information to create a QR code.
This generated setup payload is the actual content of the QR code and can be generated with the HomeKit Accessory Simulator (HAS) as well.
I recalled that I have try this with different SETUP ID but it still not resolve the issue. It may be I am not good for that QR code setup .
I think HomeKit have a record ( Serial number or others information) of the added units and do not allow to add the same HW information to the same HomeKIt network.
May be I try to change the Serial Number and SETUP ID with QR to check it again.
I will let you know my findings. Thanks again!
I’m working on an AirGradient integration for OpenHAB
It is available in the openhab marketplace, so it should be easy to enable it if you are running OpenHAB 4.
AirGradient API Binding - Add-on Marketplace / Bundles - openHAB Community
All feedback is welcome.
I am new here but can we put the data from an AirGradiant to WAQI.info? I see a lot of PurpleAir but with my students, I would prefer to buy 3 AirGradiant than 1 PurpleAir…
We don’t have an integration with Waqi but with openAQ which is used by many researchers.
Never looked before but it seems that it should be possible - they have info here Publishing Air Quality Data: on the aqicn.org / waqi.info map
Hi,
I succesful send data to WAQI.
I use Home Assistant to do that.
I have the Airgradient firmware with the MQTT set up
I retreive the data in HA by setting a sensors in the config yaml file.
mqtt:
sensor:
- name: "AirGradient Outdoor"
state_topic: "airgradient/readings/<id of the AG>"
value_template: "{{ value_json.pm02 }}"
unit_of_measurement: "µg/m3"
json_attributes_topic: "airgradient/readings/<id of the AG>"
I use pm02 as main value cause, I can calculate US AQI after that (not provided in MQTT stream (could be a nice improvment))
→ It will create a sensors with PM02 as main value and all the other data are attributes to that sensors
Then I setup a node red flow inside Home Assistant to send data to WAQI via the json api
Here the code to import in Node Red (you can delete weather data as I send my Davis Vantage data)
You have to set your lat long in the function box and also your Token from WAQI (works like a charm)
→ You can remove Weatherlink box and AQI box too
[{"id":"3e49292f7307e314","type":"group","z":"3fa1c2aa7dd4a8a0","name":"envois poussière vers WAQI","style":{"label":true},"nodes":["56ed22aa0ae44aeb","35ea220149053376","2d42f1205760cf2b","e974d2ea6e7cfb59","f087e7b6bb6b58df","4649ac5daf8ee750"],"x":34,"y":3519,"w":1152,"h":202},{"id":"56ed22aa0ae44aeb","type":"inject","z":"3fa1c2aa7dd4a8a0","g":"3e49292f7307e314","name":"Toutes les minutes","props":[{"p":"payload"}],"repeat":"60","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":180,"y":3560,"wires":[["4649ac5daf8ee750"]]},{"id":"35ea220149053376","type":"http request","z":"3fa1c2aa7dd4a8a0","g":"3e49292f7307e314","name":"Envois vers aqicn","method":"POST","ret":"obj","paytoqs":"ignore","url":"https://aqicn.org/sensor/upload","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Content-Type","keyValue":"","valueType":"other","valueValue":"application/json"}],"x":1070,"y":3680,"wires":[[]]},{"id":"2d42f1205760cf2b","type":"api-current-state","z":"3fa1c2aa7dd4a8a0","g":"3e49292f7307e314","name":"","server":"f910323b.88e67","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.airgradient_jardin","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"air","propertyType":"msg","value":"","valueType":"entityState"},{"property":"airgradient","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":450,"y":3620,"wires":[["e974d2ea6e7cfb59"]]},{"id":"e974d2ea6e7cfb59","type":"api-current-state","z":"3fa1c2aa7dd4a8a0","g":"3e49292f7307e314","name":"","server":"f910323b.88e67","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"weather.weatherlink_001d0a717179","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"weather","propertyType":"msg","value":"","valueType":"entityState"},{"property":"weatherlink","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":450,"y":3680,"wires":[["f087e7b6bb6b58df"]]},{"id":"f087e7b6bb6b58df","type":"function","z":"3fa1c2aa7dd4a8a0","g":"3e49292f7307e314","name":"fabrication de la requete","func":"msg.payload = \n{\n \"token\": \"<TOKEN>\", \n\t\"station\": \n\t{\n\t\t\"id\": \"<id>\", \n\t\t\"name\": \"<name>\",\n\t\t\"latitude\": <lat>,\n\t\t\"longitude\": <long>, \n\t},\n\t\"org\": {\n\t\t\"website\": \"<website>/\",\n\t\t\"name\": \"<name>\",\n\t},\n\t\"readings\": \n\t[\n\t\t\t{ \"specie\": \"pm0.3\", \"value\": msg.airgradient.attributes.pm003_count, \"unit\": \"count\" },\n\t\t\t{ \"specie\": \"pm1.0\", \"value\": msg.airgradient.attributes.pm01, \"unit\": \"µg/m3\" },\n\t\t\t{ \"specie\": \"pm2.5\", \"value\": msg.airgradient.attributes.pm02, \"unit\": \"µg/m3\" },\n\t\t\t{ \"specie\": \"pm10\", \"value\": msg.airgradient.attributes.pm10, \"unit\": \"µg/m3\" },\n\t\t\t{ \"specie\": \"CO2\", \"value\": msg.airgradient.attributes.rco2, \"unit\": \"ppm\" },\n\t\t\t{ \"specie\": \"VOC Index\", \"value\": msg.airgradient.attributes.tvoc_index },\n\t\t\t{ \"specie\": \"VOC RAW\", \"value\": msg.airgradient.attributes.tvoc_raw },\n\t\t\t{ \"specie\": \"NOx Index\", \"value\": msg.airgradient.attributes.nox_index },\n\t\t\t{ \"specie\": \"NOx RAW\", \"value\": msg.airgradient.attributes.nox_raw },\n\t\t\t{ \"specie\": \"AQI_PM25\", \"value\": msg.aqi, \"unit\": \"US AQI\" },\n\t\t\t{ \"specie\": \"temp\", \"value\": msg.weatherlink.attributes.temperature, \"unit\": \"°C\" },\n\t\t\t{ \"specie\": \"Hum\", \"value\": msg.weatherlink.attributes.humidity, \"unit\": \"%\" },\n\t\t\t{ \"specie\": \"Pressure\", \"value\": msg.weatherlink.attributes.pressure, \"unit\": \"hPa\" },\n\t\t\t{ \"specie\": \"Wind Speed\", \"value\": msg.weatherlink.attributes.wind_speed, \"unit\": \"km/h\" },\n\t\t\t{ \"specie\": \"Wind_bearing\", \"value\": msg.weatherlink.attributes.wind_bearing, \"unit\": \"°\" },\n\t]\n}\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":810,"y":3680,"wires":[["35ea220149053376"]]},{"id":"4649ac5daf8ee750","type":"api-current-state","z":"3fa1c2aa7dd4a8a0","g":"3e49292f7307e314","name":"","server":"f910323b.88e67","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.pm25_aqi_outdoor","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"aqi","propertyType":"msg","value":"","valueType":"entityState"},{"property":"US_AQI","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":460,"y":3560,"wires":[["2d42f1205760cf2b"]]},{"id":"f910323b.88e67","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]