How do I change the default units for the MQTT gateway?
-
I'm using a raspberry pi with onboard MQTT broker and nRF24 connected to the GPIO. Everything works just fine but I can't find anything on the site about how to set a temperature units preference (metric = false) from the gateway side.
reference this line in the atmospheric pressure sketch:
bool metric = true; // Variable that stores if the sensor will output the temperature in Fahrenheit of Celsius. The gateway sends this preference to the node, so you dont need to change it here.
So then... where do I change it? I checked the obvious places (./configure --help, mysensors.conf, the serial API, the MyConfig.h file itself...) but I can't find a clear answer.
Thanks!
-
@fixjunk this configuration will be supplied to your gateway from a controller.
Source: https://www.mysensors.org/download/serial_api_20
When your MySesnors node boots up, sends aI_CONFIG
request to your controller, your controller has to respond to this request [response can be either (M
)etric or (I
)mperal ]AFAIK, This metric change will not affect your sensor measurement units. You have to convert yourself in your sketch.
@mfalkvidd can confirm this.