rgerganov / py-air-control

Command line app for controlling Philips air purifiers
MIT License
255 stars 52 forks source link

JSON output #78

Open wldevries opened 3 years ago

wldevries commented 3 years ago

It would be great if this tool could dump the status as a JSON object. This would make integration with other systems much easier. For this to work well with multiple appliances ideally the ID or IP address of the device would be included as well.

My goal is to send the output of airctrl to MQTT, possibly to hook up logic, but my first main goal is to graph the PM2.5 and allergen index values over time in Grafana.

Cyber1000 commented 3 years ago

@wldevries if you call airctrl with -d (d for debug) you get json + "normal data"

Cyber1000 commented 3 years ago

Maybe a refactoring (#34) would be the best, the "library" part (for example CoAPAirClient) already returns json, just the command-line part prettifies/formats the output.