Hi all, I want to retrieve the units set in the settings page like "kilograms" or "m/s". They are currently not in the json output or Setting dict.
IS this not possible to retrieve?
How to acces the defined units
Moderator: leecollings
-
Ewaldharmsen
- Posts: 130
- Joined: Tuesday 07 February 2017 15:00
- Target OS: Linux
- Domoticz version:
- Contact:
-
Xorfor
Re: How to acces the defined units
I am working on a Python API for Domoticz which will use the API/JSON URL's from Domoticz. There are a lot of 'undocumented' URL's. So it is possible to retrieve the settings with:
There you will find eg.:
"WeightUnit" where the value 0 = "Kilograms", 1 = "Pounds"
"WindUnit" where the value 0 = "m/s", 1 = "km/h", 2 = "mph", 3 = "Knots", 4 = "Beaufort"
Hope this helps?
Code: Select all
/json.htm?type=settings"WeightUnit" where the value 0 = "Kilograms", 1 = "Pounds"
"WindUnit" where the value 0 = "m/s", 1 = "km/h", 2 = "mph", 3 = "Knots", 4 = "Beaufort"
Hope this helps?
-
Ewaldharmsen
- Posts: 130
- Joined: Tuesday 07 February 2017 15:00
- Target OS: Linux
- Domoticz version:
- Contact:
Re: How to acces the defined units
ah thanks! This helps!
Is there also a temperature setting?
Is there also a temperature setting?
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: How to acces the defined units
Yes; "TempUnit"Ewaldharmsen wrote: Friday 04 January 2019 8:58 ah thanks! This helps!
Is there also a temperature setting?
- Spoiler: show
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki