There is not change unit for barometer device at setting Topic is solved
Moderator: leecollings
-
- Posts: 7
- Joined: Friday 03 January 2020 22:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.10717
- Location: RU
- Contact:
There is not change unit for barometer device at setting
I use Davis meteo station and get data from baro device. Domoticz shor baro at hPa. I check setting and dont see where i can change unit to mmHg.
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: There is not change unit for barometer device at setting
You can't. It is not even allowed by law in the Netherlands.

Google translated this for me in
The Netherlands: legal ban on the use of mmHg
Since the Calibration Act of 1978, the use of mmHg as a unit of pressure "in the practice of a profession or business when requesting, offering or supplying goods or services" has been prohibited in the Netherlands, except for the blood pressure and pressure of other body fluids. This prohibition is repeated in the Units Decree to the Calibration Act of 1981 and in the Metrology Act of 2006. Following an amendment of the Metrology Act, this prohibition was implicitly applicable to everyone from 1 January 2010. [3] With effect from 2016 this prohibition applies explicitly to 'everyone'. [4]
Using a script and a virtual custom sensor you can work around this quite easily
Code: Select all
-- Conversion from hPa to mmHG
return
{
on =
{
devices =
{
31 -- change to "name" or idx of your barometer device
},
},
logging =
{
level = domoticz.LOG_DEBUG, -- set to LOG_ERROR when tested and OK
},
execute = function(dz, item)
_G.logMarker = _G.moduleLabel -- set logmarker to scrptname
hydrargyrum = dz.devices('Call me old fashioned') -- Change to name of your custom sensor (with x-as mmHG)
hydrargyrum.updateCustomSensor( dz.utils.round( item.barometer / 1.3322387415, 1 ))
end
}
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
-
- Posts: 350
- Joined: Sunday 19 April 2015 0:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V2022.2
- Location: UK
- Contact:
Re: There is not change unit for barometer device at setting
...or in UK use mb(ar): 1 hPa = 1 mb
-
- Posts: 7
- Joined: Friday 03 January 2020 22:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.10717
- Location: RU
- Contact:
Re: There is not change unit for barometer device at setting
i dont understand how i can add Dummy virtual sensor. At hardware type list i have Dummy (Does nothing, use for virtual switches only) only.
- Attachments
-
- Screenshot_106.png (85.29 KiB) Viewed 1016 times
-
- Posts: 7
- Joined: Friday 03 January 2020 22:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.10717
- Location: RU
- Contact:
Re: There is not change unit for barometer device at setting
if i add Dummy (Does nothing, use for virtual switches only) and add script at Setup-More Options-Events i see at Log:
2020-01-09 15:36:10.547 Status: dzVents: Info: Handling events for: "Temp Hum Baro", value: "18.2;44;1;985.8;3"
2020-01-09 15:36:10.547 Status: dzVents: Info: ------ Start internal script: Script #1: Device: "Temp Hum Baro (Davis)", Index: 17
2020-01-09 15:36:10.547 Status: dzVents: Error (2.4.19): Method updateCustomSensor is not available for device "Temp Hum Baro" (deviceType=Temp + Humidity + Baro, deviceSubType=Weather Station). If you believe this is not correct, please report.
2020-01-09 15:36:10.547 Status: dzVents: Info: ------ Finished Script #1
my script:
2020-01-09 15:36:10.547 Status: dzVents: Info: Handling events for: "Temp Hum Baro", value: "18.2;44;1;985.8;3"
2020-01-09 15:36:10.547 Status: dzVents: Info: ------ Start internal script: Script #1: Device: "Temp Hum Baro (Davis)", Index: 17
2020-01-09 15:36:10.547 Status: dzVents: Error (2.4.19): Method updateCustomSensor is not available for device "Temp Hum Baro" (deviceType=Temp + Humidity + Baro, deviceSubType=Weather Station). If you believe this is not correct, please report.
2020-01-09 15:36:10.547 Status: dzVents: Info: ------ Finished Script #1
my script:
- Spoiler: show
-
- Posts: 7
- Joined: Friday 03 January 2020 22:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.10717
- Location: RU
- Contact:
Re: There is not change unit for barometer device at setting
Answer how add Dummy virtual sensor at V4.10717:
1. Select Dummy (Does nothing, use for virtual switches only)
2. Click Create Virtual Sensor and select Sensor Type: Custom Sensor
1. Select Dummy (Does nothing, use for virtual switches only)
2. Click Create Virtual Sensor and select Sensor Type: Custom Sensor
-
- Posts: 7
- Joined: Friday 03 January 2020 22:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.10717
- Location: RU
- Contact:
Re: There is not change unit for barometer device at setting
my finish script:
-- Conversion from hPa to mmHG
I used correct value 6.3 for getting result as at my MeteoStation Davis...
-- Conversion from hPa to mmHG
Code: Select all
return
{
on =
{
devices =
{
17 -- change to "name" or idx of your barometer device
},
},
logging =
{
level = domoticz.LOG_DEBUG, -- set to LOG_ERROR when tested and OK
},
execute = function(dz, item)
_G.logMarker = _G.moduleLabel -- set logmarker to scrptname
hydrargyrum = dz.devices('Barometer') -- Change to name of your custom sensor (with x-as mmHG)
hydrargyrum.updateCustomSensor( dz.utils.round( item.barometer * 0.75006375541921 + 6.3, 1 ))
end
}
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: There is not change unit for barometer device at setting
Good to see that you got it working !
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
- EdwinK
- Posts: 1820
- Joined: Sunday 22 January 2017 21:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Rhoon
- Contact:
Re: There is not change unit for barometer device at setting
O wow.. We are good in banning some stuff, but not others.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
Who is online
Users browsing this forum: No registered users and 1 guest