Page 1 of 1

Dummy THB device as a "Weather Station" (baro in 0.1 hPa steps: sTypeTHBFloat)

Posted: Thursday 27 April 2017 12:03
by FrankW
Would it be possible to change the Dummy hardware device "Temp + Humidity + Baro" to use the subtype 'sTypeTHBFloat' instead of 'sTypeTHB1'?
I.e., the device would be listed as a type "Weather Station"?

I would like the resolution of the barometric pressure to be in 0.1 hPa steps (sTypeTHBFloat would fix this, but I'm not sure if there need to be other modifications in the Domoticz code to facilitate this change).

In hardware/Dummy.cpp, near line 294:

Code: Select all

      case pTypeTEMP_HUM_BARO:
        // OLD // DeviceRowIdx=m_sql.UpdateValue(HwdID, ID, 1, pTypeTEMP_HUM_BARO, sTypeTHB1, 12, 255, 0, "0.0;50;1;1010;1", devname);
        DeviceRowIdx=m_sql.UpdateValue(HwdID, ID, 1, pTypeTEMP_HUM_BARO, sTypeTHBFloat, 12, 255, 0, "0.0;50;1;1010;1", devname);
        bCreated = true;
        break;