I’m working on a project with MQTT - and I wanted to see if anyone has input about how to best accomplish my plan.
The goal: I have a system with a Raspberry Pi and an Argon as components that communicate to each other, they are portable, and they get moved to a new environment periodically (therefore the local IP addresses change). I have to use local communication because the internet is intermittent at the site, and I can’t be losing messages during brief internet outages - the messages are time sensitive alarm conditions. I want the Rpi to initially send it’s local IP address to the Argon, and once that is received, further messages will be completely local.
So I think the question is - can I get two separate MQTT clients running simultaneously on an Argon? Or should I (could I) set up the Argon to use a Cloud Broker initially, but when the Local IP info arrives via MQTT and cloud, change the Mqtt broker to be the local one?
So when the system has been moved, it’s because I moved it, so I am planning to have the Pi send it’s address out each time it starts up, or when I press a button. Yes, it’s getting it address via DHCP, and I’m never sure of what subnet setup I’ll find when I arrive onsite.
The Argon in the system also will also get it’s address by DHCP, and I figure as long as it’s connected to the internet before I start the Pi, it will mostly self configure.
I haven’t done anything about trying to understand the downtime, it’s highly variable, but in a recent deployment, over 5 weeks, we had approximately 18 interruptions of internet service, ranging from seconds to over 12 hours. When the interruption occurs, it’s only with internet access, there isn’t an interruption or rebooting of the local network equipment, so over that 5 weeks, my gear never changed local IP. With Murphy’s help there is always an alarm condition during an internet outage!