OpenWonderLabs / SwitchBotAPI

SwitchBot Open API Documents
883 stars 73 forks source link

Get Dewpoint/VPD/Absolute Humidity for Outdoor Meter #328

Open BinaryAlps opened 3 months ago

BinaryAlps commented 3 months ago

Current Situation

It is possible to export the data from the App and receive all the available metrics (Humidity/Temperature/Dewpoint/VPD/Absolute Humidity). When using the api to get the status of an Outdoor Meter only the following data is received:

deviceId: mydeviceid
deviceType: WoIOSensor
humidity: 74
temperature: 20.8
version: V0.4
battery: 100

Proposed Change

Also add the Dewpoint/VPD/Absolute Humidity values to the response when calling the /status endpoint for an Outdoor Meter.

Response should look something like this:

deviceId: mydeviceid
deviceType: WoIOSensor
humidity: 74
temperature: 20.8
dewpoint: 16.1
vpd: 0.64
absoluteHumidity: 13.48
version: V0.4
battery: 100

Additional Context

No response

JensGlad commented 2 months ago

I see the convenience in adding those additional values. However, the proposed addition seems redundant as we can compute the values if needed. For instance: https://unidata.github.io/MetPy/latest/api/generated/metpy.calc.dewpoint_from_relative_humidity.html

(Personally, I prefer the status being as small and “raw data” as possible. Put the computation on the client side, where they know the exact use case.)