Smith8154 / homebridge-airgradient

A plugin for Homebridge that fetches air quality information from Air Gradient devices.
Apache License 2.0
4 stars 1 forks source link

Support local server API #2

Open hsugene opened 4 months ago

hsugene commented 4 months ago

Is your feature request related to a problem? Please describe:

No problems with the plugin at all, I’ve been using it for a bit and it’s been great. However, AirGradient had a server outage last night and I was thinking it would be cool if this plugin offered the option to use the local server API:

https://github.com/airgradienthq/arduino/blob/master/docs/local-server.md

Describe the solution you'd like:

Apart from the functionality that already exists, it might be cool to expose the LEDs and display as lights so that we could dim them with HomeKit scenes.

Describe alternatives you've considered:

I have considered the more direct HomeKit integration described here: https://www.airgradient.com/integrations/airgradient-homekit/

But I would prefer to stick with the stock firmware.

Additional context:

No additional context, except that I appreciate the effort you’ve put into building and sharing this!

Smith8154 commented 2 months ago

I didn't even know this was possible! From the beginning I was hoping for local integration as I hate relying on cloud services for things in my home. I've been working on this and a few other things for a new release that should be ready shortly.

hsugene commented 2 months ago

That’s awesome, thanks for the update! Yeah, I think the local server functionality is relatively new.

For a fully local setup, another alternative that I’ve tested is having the AirGradient report via MQTT to Mosquitto, and then have that connected to HomeBridge using the MQTT-Thing plugin.

It works ... but it’s a lot of extra installation/configuration if the AirGradient is the only MQTT device. And it still doesn’t let you set things like displayBrightness and ledBarBrightness, which (apparently) can be done with the local server API.

Anyway, looking forward to have you have in store! Thanks again.