Sending or requesting measurements from one Mycodo instance to another

Hi Kyle

I figured I would rather bring this up on the forum instead of creating an unnecessary issue on Github.

I know this has been looked at before and is on the roadmap in terms of future integration, forgive me if I have missed any info on this topic and if it has been covered in full in the past but what would be the simplest method of sending or requesting measurements from one instance of Mycodo to another on the same local network?

I’m guessing using the API along with the Python 3 code input could work for one method however i am not sure how to correctly request and parse the data. If you have some example code you could share it would greatly be appreciated.

I can provide more information on how the system is set up if further information is needed.

Thank you

1 Like

I think the best solution to this is publishing measurements form Inputs to an MQTT server and other Mycodo installs can subscribe to those topics to immediately obtain measurements. You can see this has been a long-talked about topic:

There are other methods such as using the API to periodically query the latest measurement, but it’s a bit involved to set up. But as of now, using the API and a script that you use in something like the Python Code Input or Bash Script Input is probably the most accessible way to do this.