Hello !
*Regarding websockets: * Just found the howto I was talking about: http://www.frugalprototype.com/installation-de-votre-propre-broker-mqtt/ it's in french (very convenient for me, sorrry guys ;-). But as a summary, it says the websocket function of mosquitto can be enabled just with a small config file. I will try this (quick & easy to test). *Also, just to summarise my setup:* I just received last week a brand new Orange Pi PC plus (kind of low cost raspberry which as a nice advantage imho: it has integrated emmc 8GB memory). It is setup with Armbiam Ubuntu Xenial (server), v5.25. (I am more familiar to ubuntu so it's easier for me too) I just setup mosquitto from depot ( apt-get install mosquitto ). I setup weewx using the quick start guide with depot ( http://www.weewx.com/docs/apt-get.htm ) So it's all fresh install. I only modified mosquitto config to use "user/password" and play a bit with weewx and wxMesh as you know. *finally, I have a general question regarding how the driver works:* let me know if my understanding is correct or wrong the "on_message" stuff is kind of asynchronous then when a message is available on the broker, this function will be trigged and will load the message content in payload. then the genLoopPackets is synchronous (I mean executed every n seconds, n=poll interval defined in weewx.conf) So every n seconds, it checks if payload as some content and if yes, it will process the data and deliver the "_packet" to next weewx process If this is correct, does it mean that if several mqtt messages are delivered inside the n seconds interval, maybe only the last one will be processed ? The background of the question is that I'm thinking if it may be possible to use a sub topic structure for mqtt The simplest idea I have in mind is to have: weather/<weewx_schemas_label>: weather/outTemp weather/outHumidity .... Then each of these topics may be sent at any time: Temp, humidity, barometer may be send only every few minutes. Wind may be sent every 1 or few seconds, rain may be send only when it's raining... weewx driver may subscribe to /weather/# to get them all and process whenever they arrive ? -Ok- I speak but don't have a clue on how to do that :-) not sure it is realistic. The advantage could that it stick better to what I have seen from mqtt usage, then same published topics could be used by other subscribers ( home-assistant <https://home-assistant.io/>, automatic watering for the garden or whatever) Best regards, Le mardi 21 février 2017 00:05:11 UTC+1, mwall a écrit : > > i found it helpful to configure the broker so that it publishes using > websockets. then you can use a web browser to see what is happening. this > is especially useful when you're trying to decode someone else's topic > hierarchy, or to figure out why your own topics are not showing up where > you think they should be. > > the hivemq folks wrote one of the first ones, which many people have now > embedded: > > http://www.hivemq.com/blog/full-featured-mqtt-client-browser > > http://www.espert.io/mqtt/index.html > > but many other browser-based clients are out there: > > http://mitsuruog.github.io/what-mqtt/ > > https://www.cloudmqtt.com/docs-websocket.html > > if you're using the mosquitto broker, you'll have to compile it with > websocket compatibility. but once you do that, enabling websockets is just > a matter of making the broker listen on the websocket port. > > m > -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
