Community
OpenEnergyMonitor

OpenEnergyMonitor Community

MQTT maximum stay alive timeout

Tags: #<Tag:0x00007f88c0be43d0>

Sorry, unable to find the maximum Stay Alive time before timeout. Think it was under a minute in the early days but hoping it’s higher now.

Hello @Clinkerr, is this in reference to MQTT’s use in emoncms? Could you give a bit more information on your question?

I tried using a Huawei dongle + PAYG SIM, it’s charitable work so I’m looking to keep down their costs. They need to send temperature and humidity every 10 minutes. They prefer EMONCMS but as I had an account with Thingspeak I sent 1,000 http request messages from a Pi and checked the SIM balance. It implied I’d used about 12MB which surprised me as I was sending only a key and 5 digit number. After a lot of googling I now believe MQTT is more economical with data (than HTTP) as it can keep an open connection and avoid the initial overhead on subsequent messages, unlike http. I found an old discussion here saying the mqtt timeout was restricted to 60 seconds until the strain on the servers could be ascertained. I’m hoping it has now increased. It’s an hour in Thingspeak but EMONCMS is preferred.
I tested the dongle over a long period without any messages and the credit balance was unchanged.
Bear in mind I’m learning all this as I go so could be misunderstanding anything.

Thanks.

Thanks @Clinkerr, do you have a link to the old thread by any chance? Your right that MQTT should be more economical. Are you using your own self-hosted emoncms server and MQTT broker? Unfortunately emoncms.org does not currently support MQTT if you were hoping to use it as the remove server.

I have found the old thread but was mistaken, it was in Thingspeak !
I thought emoncms provided mqtt on the basis of MQTT - Guide | OpenEnergyMonitor
(The intention intially is not to run our own emoncms server.)

Ah good to know. MQTT is supported locally on the emonpi/emonbase as part of the local emoncms installation which is what that guide refers to but not on emoncms.org. Sorry about that.