How do I change the default units for the MQTT gateway?
fixjunk last edited by
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.
@fixjunk this configuration will be supplied to your gateway from a controller.
When your MySesnors node boots up, sends a
I_CONFIGrequest to your controller, your controller has to respond to this request [response can be either (
M)etric or (
AFAIK, This metric change will not affect your sensor measurement units. You have to convert yourself in your sketch.
@mfalkvidd can confirm this.