Hi all, long-time reader, first post. Working on a project that I think is reasonably relevant here and could use some community input on a specific integration challenge.
Background
I work on the IT and operations side of a clinic network. We recently finished rolling out a Hospital Management System across our sites, which handles patient records, admissions, pharmacy, billing, and the usual administrative stack. The core platform is working well. The gap we are now trying to close is real-time environmental and equipment monitoring at the ward level, specifically bed occupancy sensing, room temperature logging, and infusion pump status tracking, feeding live data back into the central system dashboard.
The architecture we are prototyping uses BeagleBone Black units as edge nodes in each ward. Each node reads from a small cluster of sensors over I2C and GPIO, publishes to a local MQTT broker, and is supposed to forward processed readings to the HMS REST API endpoint on a defined interval. We are running Debian on the BeagleBones with a lightweight Python service managing the sensor polling and MQTT publish side.
The specific problem
The MQTT to REST bridge is where we are hitting friction. We have tried two approaches so far.
The first was a custom Python script running as a systemd service on each BeagleBone that subscribes to local MQTT topics and posts to the REST endpoint directly. This works in normal conditions but handles reconnection poorly when the ward network drops briefly, which happens often enough in our environment to be a real operational issue. Missed readings during reconnection windows are not acceptable for the infusion pump status data specifically.
The second approach was pushing the bridge off the edge node entirely and handling the MQTT to REST translation at a central aggregator on the local server, with the BeagleBones only responsible for sensor read and MQTT publish. This is cleaner in principle but introduces a single point of failure we are not comfortable with given the clinical environment.
What we are actually asking
Has anyone here built a reliable MQTT to REST bridge on BeagleBone that handles intermittent connectivity gracefully? Specifically looking for guidance on local message queuing during disconnection windows so readings are buffered on the device and flushed in order when connectivity restores. We have looked at using SQLite as a local queue but are not sure this is the right tool or whether there is a more established pattern for this class of problem on resource-constrained edge hardware.
Also open to suggestions on whether BeagleBone Black is the right choice for this node role or whether BeaglePlay would give us meaningfully better headroom for the same use case. The I2C and GPIO requirements are modest but we would eventually like to add a small local display for ward staff without a separate microcontroller.
Any pointers to relevant projects or prior threads appreciated. Happy to share more detail on the sensor setup or the REST API structure if it helps diagnose the bridge problem.