<?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 make the build-in MQTT broker work ?]]></title><description><![CDATA[<p dir="auto">I have a small MySensor network which is connected to MyController via a serial gateway.<br />
The sensors seems to be read as expected and produce nice graphs.</p>
<p dir="auto">I have enabled MQTT as you can see from the log-file below</p>
<pre><code>cat mycontroller.log
2018-04-29 20:53:58,336 INFO [main] [org.mycontroller.standalone.db.DataBaseUtils:117] Checking migration...
2018-04-29 20:53:58,980 INFO [main] [org.mycontroller.standalone.db.DataBaseUtils:168] Application information: [Version:1.2.0.Final, Database(type:H2 database embedded, version:1.4.194 (2017-03-10), schema version:1.04.01 - 2017 Oct 25), Built on:2018-02-23T10:26:25+0530, Git commit:a10694ff1bff40cfb9988cec48e6569ec51ee57b:master]
2018-04-29 20:53:59,238 WARN [main] [io.moquette.persistence.mapdb.MapDBPersistentStore:78] Using existing MapDB store file. Path=../conf/persistent_stores/moquette/moquette_store.mapdb
2018-04-29 20:53:59,332 WARN [main] [io.moquette.server.Server:186] Using default SSL context creator
2018-04-29 20:53:59,450 WARN [main] [io.netty.bootstrap.ServerBootstrap:146] Unknown channel option 'TCP_NODELAY' for channel '[id: 0x9685b6ea]'
2018-04-29 20:53:59,465 WARN [main] [io.netty.bootstrap.ServerBootstrap:146] Unknown channel option 'TCP_NODELAY' for channel '[id: 0xe0d895c8]'
2018-04-29 20:53:59,465 INFO [main] [org.mycontroller.standalone.mqttbroker.MoquetteMqttBroker:54] MQTT Broker started successfully. MqttBrokerSettings(enabled=true, sslEnabled=false, bindAddress=192.168.2.8, mqttPort=1883, mqttsPort=8883, websocketPort=7080, allowAnonymous=true, enabledOnBackend=true, sslKeystoreFile=null, sslKeystorePassword=null)
2018-04-29 20:54:00,074 INFO [main] [org.mycontroller.standalone.StartApp:215] TJWS server started successfully, HTTPS Enabled?:true, HTTP(S) Port: [8443]
2018-04-29 20:54:00,075 INFO [main] [org.mycontroller.standalone.StartApp:113] MyController.org server started in [1762] ms
</code></pre>
<p dir="auto">And i try to subscribe to the MQTT -server with</p>
<pre><code>mosquitto_sub -h 192.168.2.8 -t '#'
</code></pre>
<p dir="auto">The command blocks as expected but nothing further happens.<br />
Following  "Status-&gt;Resource logs" I see that measurements is arriving at a steady pace.</p>
<p dir="auto">What am I doing wrong ?</p>
<p dir="auto">Best Regard<br />
StorePeter</p>
<p dir="auto">.</p>
]]></description><link>http://forum.mycontroller.org/topic/296/how-do-i-make-the-build-in-mqtt-broker-work</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Jul 2026 01:13:47 GMT</lastBuildDate><atom:link href="http://forum.mycontroller.org/topic/296.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 30 Apr 2018 01:11:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to how do I make the build-in MQTT broker work ? on Wed, 02 May 2018 14:59:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/storepeter" aria-label="Profile: storepeter">@<bdi>storepeter</bdi></a> said in <a href="/post/1747">how do I make the build-in MQTT broker work ?</a>:</p>
<blockquote>
<p dir="auto">There is one minor difference - when using the serial gateway all my repeaters were interconnected with lines, now they are all islands. Before I believe that only non-repeater showed  as unconnected.  I kind of liked that distinction - Why is this so ?</p>
</blockquote>
<p dir="auto">There is no difference in MyController side for MQTT or Serial. On gateway, page select the gateway and execute <code>Discover</code>.<br />
<img src="/assets/uploads/files/1525272976811-1a98f50c-8784-4b84-9f4c-5a5e37b3662e-image-resized.png" alt="0_1525272973036_1a98f50c-8784-4b84-9f4c-5a5e37b3662e-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto"><code>Discover</code> job will be executed 30 minutes once I guess(default).</p>
<p dir="auto"><img src="/assets/uploads/files/1525272844235-ce0d2348-e066-4966-93eb-8a833563164a-image-resized.png" alt="0_1525272840404_ce0d2348-e066-4966-93eb-8a833563164a-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Your MQTT gateway RF may be weaker than serial gateway RF. When enabling <code>ack</code> for your gateway might resolve this issue. If the message failed to send, MyController retries N(in this image 5 times) times in the interval of 1 second(1000 ms).</p>
<p dir="auto"><img src="/assets/uploads/files/1525273083297-4ee37fa4-470d-4af9-a8e2-ad2fd4684493-image.png" alt="0_1525273080328_4ee37fa4-470d-4af9-a8e2-ad2fd4684493-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>http://forum.mycontroller.org/post/1749</link><guid isPermaLink="true">http://forum.mycontroller.org/post/1749</guid><dc:creator><![CDATA[jkandasa]]></dc:creator><pubDate>Wed, 02 May 2018 14:59:55 GMT</pubDate></item><item><title><![CDATA[Reply to how do I make the build-in MQTT broker work ? on Wed, 02 May 2018 12:31:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jkandasa" aria-label="Profile: jkandasa">@<bdi>jkandasa</bdi></a></p>
<p dir="auto">Thanks again, every day I feel a little more in control.</p>
<p dir="auto">To have only one gateway I have eliminated the serial-gateway. I am now using the Raspberry Pi as a MQTT gateway,  and MyController is setup to use the RPI as MySensor-MQTT gateway.   All Sensors get discovered and everything looks fine.</p>
<p dir="auto">So I  am happy - this is exactly what I was looking for <img src="http://forum.mycontroller.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=cf8d9d3844c" class="not-responsive emoji emoji-android emoji--wink" style="height:23px;width:auto;vertical-align:middle" title=";-)" alt="😉" /></p>
<p dir="auto">There is one minor difference - when using the serial gateway all my repeaters were interconnected with lines, now they are all islands. Before I believe that only non-repeater showed  as unconnected.  I kind of liked that distinction - Why is this so ?</p>
<p dir="auto">Thanks for great project and great support</p>
<p dir="auto">/StorePeter</p>
]]></description><link>http://forum.mycontroller.org/post/1747</link><guid isPermaLink="true">http://forum.mycontroller.org/post/1747</guid><dc:creator><![CDATA[storepeter]]></dc:creator><pubDate>Wed, 02 May 2018 12:31:26 GMT</pubDate></item><item><title><![CDATA[Reply to how do I make the build-in MQTT broker work ? on Wed, 02 May 2018 02:16:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/storepeter" aria-label="Profile: storepeter">@<bdi>storepeter</bdi></a> said in <a href="/post/1742">how do I make the build-in MQTT broker work ?</a>:</p>
<blockquote>
<p dir="auto">I just found this<br />
<a href="https://github.com/mycontroller-org/mycontroller/issues/7" rel="nofollow ugc">https://github.com/mycontroller-org/mycontroller/issues/7</a><br />
I certainly would like to see this implemented, or perhaps just a way to export a given sensor to MQTT. If this is already possible I would like to know how, otherwise a button on each sensor (and node to export, all its sensors) where you could specify a MQTT name, would be really helpfull. think of it as a symbolic link</p>
</blockquote>
<p dir="auto">This feature has been implemented on <a href="https://github.com/mycontroller-org/serial2mqtt" rel="nofollow ugc">serial2mqtt</a></p>
]]></description><link>http://forum.mycontroller.org/post/1745</link><guid isPermaLink="true">http://forum.mycontroller.org/post/1745</guid><dc:creator><![CDATA[jkandasa]]></dc:creator><pubDate>Wed, 02 May 2018 02:16:46 GMT</pubDate></item><item><title><![CDATA[Reply to how do I make the build-in MQTT broker work ? on Wed, 02 May 2018 02:10:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/storepeter" aria-label="Profile: storepeter">@<bdi>storepeter</bdi></a> said in <a href="/post/1741">how do I make the build-in MQTT broker work ?</a>:</p>
<blockquote>
<p dir="auto">Thank you for your reply, it helped me get a little further, although there are still many blanks<br />
When I first started playing with MySensors I made a MySensors-MQTT gateway on a Raspberry Pi as described here:<br />
<a href="https://www.mysensors.org/build/raspberry" rel="nofollow ugc">https://www.mysensors.org/build/raspberry</a><br />
but somehow it could not see my sensors, so I was stuck for a few days.<br />
Then I saw a comment somewhere on the MySensor forum that you need to have a controller, and then I noticed this comment "NOTE: No controller supports dynamic ID assignment through MQTT. All nodes must have MY_NODE_ID" on<br />
<a href="https://www.mysensors.org/build/mqtt_gateway" rel="nofollow ugc">https://www.mysensors.org/build/mqtt_gateway</a></p>
</blockquote>
<p dir="auto">MyController supports everything via MQTT. There is no restriction. However, you can see bit latency in the firmware update(OTA) via MQTT.</p>
<blockquote>
<p dir="auto">which led to MyController. So I build a MySensor serial-gateway and was up and running in no time with MyController, I was (and still am) very impressed with what could be achieved this way with very limited effort. Hence I rethought my configuration, now wanting to have MyController be the back-bone also since it seemed to have build in MQTT-broker.<br />
Now I just read:<br />
<a href="https://forum.mycontroller.org/topic/15/republish-mysensors-messages-via-mqtt" rel="nofollow ugc">https://forum.mycontroller.org/topic/15/republish-mysensors-messages-via-mqtt</a><br />
This is what I thought the MQTT functionallity in MyController was - I guess I was wrong, is it only intended to be a gateway from MQTT to MyController. I believe the other way could be really valuable with f.ex. node-red. Do I understand this right or is there something I have missed ?</p>
</blockquote>
<p dir="auto">Initially we do not have support for serial to MQTT. I am afraid to introduce this feature in MyController. Hence I created a separate project. It is <a href="https://github.com/mycontroller-org/serial2mqtt" rel="nofollow ugc">serial2mqtt</a>. If you want to convert serial to MQTT. use this project.</p>
<blockquote>
<p dir="auto">Anyway - for now it seems that I had already solved my problem, the Raspberry pi had been supplying a MQTT stream as soon as MyController had numbered my sensors.<br />
Is this a desireable setup, I read some where that you can only have one Gateway on a MySensors network, and now I have two ?</p>
</blockquote>
<p dir="auto">Yes, you should have only one. Gateway id is Unique(<code>0</code>) If you have more than one gateway, you may end up with some issues.<br />
But you can have more than one network. It means you can configure different frequency for each network. Somthing like displayed <a href="https://raw.githubusercontent.com/mycontroller-org/mycontroller/development/extra/images/MyController-MySensors-RF.png" rel="nofollow ugc">here</a>.</p>
<blockquote>
<p dir="auto">As you can see it is still MyController/MySensors playing with me, but soon I hope I will have some of my blanks filled in so it will be me playing with them.<br />
If you can read Danish or use google translate, I have written about this on my  blog and intend to document my progress there aswell<br />
<a href="http://peter.lorenzen.us/homeautomation/mysensors" rel="nofollow ugc">http://peter.lorenzen.us/homeautomation/mysensors</a></p>
</blockquote>
<p dir="auto">+1</p>
]]></description><link>http://forum.mycontroller.org/post/1744</link><guid isPermaLink="true">http://forum.mycontroller.org/post/1744</guid><dc:creator><![CDATA[jkandasa]]></dc:creator><pubDate>Wed, 02 May 2018 02:10:28 GMT</pubDate></item><item><title><![CDATA[Reply to how do I make the build-in MQTT broker work ? on Tue, 01 May 2018 14:26:25 GMT]]></title><description><![CDATA[<p dir="auto">I just found this<br />
<a href="https://github.com/mycontroller-org/mycontroller/issues/7" rel="nofollow ugc">https://github.com/mycontroller-org/mycontroller/issues/7</a></p>
<p dir="auto">I certainly would like to see this implemented, or perhaps just a way to export a given sensor to MQTT. If this is already possible I would like to know how, otherwise a button on each sensor (and node to export, all its sensors) where you could specify a MQTT name, would be really helpfull. think of it as a symbolic link</p>
]]></description><link>http://forum.mycontroller.org/post/1742</link><guid isPermaLink="true">http://forum.mycontroller.org/post/1742</guid><dc:creator><![CDATA[storepeter]]></dc:creator><pubDate>Tue, 01 May 2018 14:26:25 GMT</pubDate></item><item><title><![CDATA[Reply to how do I make the build-in MQTT broker work ? on Tue, 01 May 2018 13:54:38 GMT]]></title><description><![CDATA[<p dir="auto">Thank you for your reply, it helped me get a little further, although there are still many blanks</p>
<p dir="auto">When I first started playing with MySensors I made a MySensors-MQTT gateway on a Raspberry Pi as described here:<br />
<a href="https://www.mysensors.org/build/raspberry" rel="nofollow ugc">https://www.mysensors.org/build/raspberry</a></p>
<p dir="auto">but somehow it could not see my sensors, so I was stuck for a few days.<br />
Then I saw a comment somewhere on the MySensor forum that you need to have a controller, and then I noticed this comment "NOTE: No controller supports dynamic ID assignment through MQTT. All nodes must have MY_NODE_ID" on<br />
<a href="https://www.mysensors.org/build/mqtt_gateway" rel="nofollow ugc">https://www.mysensors.org/build/mqtt_gateway</a></p>
<p dir="auto">which led to MyController. So I build a MySensor serial-gateway and was up and running in no time with MyController, I was (and still am) very impressed with what could be achieved this way with very limited effort. Hence I rethought my configuration, now wanting to have MyController be the back-bone also since it seemed to have build in MQTT-broker.</p>
<p dir="auto">Now I just read:<br />
<a href="https://forum.mycontroller.org/topic/15/republish-mysensors-messages-via-mqtt" rel="nofollow ugc">https://forum.mycontroller.org/topic/15/republish-mysensors-messages-via-mqtt</a></p>
<p dir="auto">This is what I thought the MQTT functionallity in MyController was - I guess I was wrong, is it only intended to be a gateway from MQTT to MyController. I believe the other way could be really valuable with f.ex. node-red. Do I understand this right or is there something I have missed ?</p>
<p dir="auto">Anyway - for now it seems that I had already solved my problem, the Raspberry pi had been supplying a MQTT stream as soon as MyController had numbered my sensors.</p>
<p dir="auto">Is this a desireable setup, I read some where that you can only have one Gateway on a MySensors network, and now I have two ?</p>
<p dir="auto">As you can see it is still MyController/MySensors playing with me, but soon I hope I will have some of my blanks filled in so it will be me playing with them.</p>
<p dir="auto">If you can read Danish or use google translate, I have written about this on my  blog and intend to document my progress there aswell</p>
<p dir="auto"><a href="http://peter.lorenzen.us/homeautomation/mysensors" rel="nofollow ugc">http://peter.lorenzen.us/homeautomation/mysensors</a></p>
]]></description><link>http://forum.mycontroller.org/post/1741</link><guid isPermaLink="true">http://forum.mycontroller.org/post/1741</guid><dc:creator><![CDATA[storepeter]]></dc:creator><pubDate>Tue, 01 May 2018 13:54:38 GMT</pubDate></item><item><title><![CDATA[Reply to how do I make the build-in MQTT broker work ? on Mon, 30 Apr 2018 07:08:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/storepeter" aria-label="Profile: storepeter">@<bdi>storepeter</bdi></a> You have connected your gateway on the serial port. You do not see any activities on MQTT.<br />
If you want to convert your serial port data to MQTT you may use <a href="https://github.com/mycontroller-org/serial2mqtt" rel="nofollow ugc">serial2mqtt</a> or MySensors MQTT Gateway</p>
]]></description><link>http://forum.mycontroller.org/post/1736</link><guid isPermaLink="true">http://forum.mycontroller.org/post/1736</guid><dc:creator><![CDATA[jkandasa]]></dc:creator><pubDate>Mon, 30 Apr 2018 07:08:22 GMT</pubDate></item></channel></rss>