MQTT interface on-device

Dear Developers,
I’ve seen in the code examples of the Joulescope Python driver, that the communication with the device seems to be very much like MQTT but leveraging the C-driver directly. Is there anything on the device which could expose MQTT directly? We would like to include it in an active MQTT measurement device framework in our company without the need of an additional host (Ideally over Ethernet of course).

Hi @MLehmann - Yes, the Joulescope software is built around a Publish-Subscribe design pattern, just like MQTT.

For device control, MQTT is a great fit. I don’t believe that MQTT has guaranteed delivery, so it may be problematic if you want to receive every statistics message. I believe that MQTT gets very problematic with the large, frequent binary data blobs required by full 1 Msps sample data. For this reason, I do not see us adding MQTT to the instrument directly.

One approach to integrate with MQTT would be to run a python script on a host that bridges between pyjoulescope_drive and an MQTT client. The host could be a small Linux machine. Any small form factor computer or even a Raspberry Pi can do this.

It’s been a few years since I personally have worked with MQTT. I don’t have any great recommendations, but I found this in a brief search:

You could also use the C joulescope_driver with a C MQTT client if you would prefer.

What do you think?

1 Like

Hi Matt,
thanks for the swift response. I understand why you don’t want to integrate MQTT directly, although it would greatly boost the JS’s ability to integrate into automated measurement setups.
We will probably use a RPi for this matter (to monitor the power use of the same device class ;))

1 Like