<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How do I change the default units for the MQTT gateway?]]></title><description><![CDATA[<p dir="auto">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.</p>
<p dir="auto">reference this line in the atmospheric pressure sketch:</p>
<pre><code>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.
</code></pre>
<p dir="auto">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.</p>
<p dir="auto">Thanks!</p>
]]></description><link>https://forum.mysensors.org/topic/11626/how-do-i-change-the-default-units-for-the-mqtt-gateway</link><generator>RSS for Node</generator><lastBuildDate>Wed, 18 Nov 2026 18:31:01 GMT</lastBuildDate><atom:link href="https://forum.mysensors.org/topic/11626.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 23 Mar 2021 20:41:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How do I change the default units for the MQTT gateway? on Thu, 25 Mar 2021 11:39:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/fixjunk" aria-label="Profile: fixjunk">@<bdi>fixjunk</bdi></a> this configuration will be supplied to your gateway from a controller.<br />
<img src="/assets/uploads/files/1616671939051-db3d11ac-6464-4684-9c31-76aab64f3d2b-image.png" alt="db3d11ac-6464-4684-9c31-76aab64f3d2b-image.png" class="img-markdown  img-fluid" /><br />
Source: <a href="https://www.mysensors.org/download/serial_api_20" rel="nofollow ugc">https://www.mysensors.org/download/serial_api_20</a><br />
When your MySesnors node boots up, sends a <code>I_CONFIG</code> request to your controller, your controller has to respond to this request [response can be either (<code>M</code>)etric or (<code>I</code>)mperal ]</p>
<p dir="auto">AFAIK, This metric change will not affect your sensor measurement units. You have to convert yourself in your sketch.<br />
<a class="plugin-mentions-user plugin-mentions-a" href="/user/mfalkvidd" aria-label="Profile: mfalkvidd">@<bdi>mfalkvidd</bdi></a> can confirm this.</p>
]]></description><link>https://forum.mysensors.org/post/109704</link><guid isPermaLink="true">https://forum.mysensors.org/post/109704</guid><dc:creator><![CDATA[jkandasa]]></dc:creator><pubDate>Thu, 25 Mar 2021 11:39:25 GMT</pubDate></item></channel></rss>