Digital icon indicating copy to clipboard operation
Digital copied to clipboard

Feature Request: MQTT component

Open lnetwalker opened this issue 5 years ago • 8 comments

I would like to see a number of devices which just represent MQTT values. For example a output device which publishes its values to MQTT or a input device which take MQTT values and puts them in my cirquit. With these devices it would be very easy to connect real hardware to simulated circuits. I looked at the sources but my Java knowledge is far too basic to do it by myself. Anybody out there who is able and willing to give this idea a chance ?

lnetwalker avatar Jul 17 '20 12:07 lnetwalker

A MQTT component is very easy to implement bacause of the Paho project. There is already a UART plugin which can be use as a base for a MQTT integration. If you describe in more detail what you need, it will be easy to implement.

hneemann avatar Jul 18 '20 07:07 hneemann

Thanks for your attention on my suggestion. In the simplest case there would be Inputs and Outputs ( like Buttons and LEDs ) which are connected to MQTT topics. Inputs represent the subscription of a topic, outputs publish their state to topics. In the first step the allowed values ( payload ) for the topics are 0 and 1. In a more sophisticated szenario it could be possible to have something like a regex which extracts values from a payload. I can support this with testing, writing documentation in German and English.

lnetwalker avatar Jul 20 '20 09:07 lnetwalker

With MQTT we can integrated Digital with other tools in software and hardware. I endorse and desire this enhancement. Anyway Digital is a great tool that i used with my students . Thank you.

fazerlab avatar Nov 12 '20 11:11 fazerlab

is there a chance that MQTT is added ? I'm willing to help whereever I can.

lnetwalker avatar Mar 02 '21 10:03 lnetwalker

To be honest, I don't think that MQTT will be implemented as part of Digital. This is more suitable to be implemented as a jar component in a separate project, similar to the serial port integration.

hneemann avatar Mar 02 '21 12:03 hneemann

Hi. Made a try on this, very raw and in initial stages, since I stumbled on this amazing project at the same time I was looking to MQTT.

You can check and eventually try my first attempt in: https://github.com/jorge-agra/digital-custom-component-mqtt

Just a basic MQTT send component, please exercise some forgiveness :)

Best. JA

jorge-agra avatar Jun 16 '21 14:06 jorge-agra

Hi, until now I was busy and had no time to check it out, but it seems very promising. Can I download a compiled jar anywhere to check it out ? ( I have currently no development Env )

lnetwalker avatar Jul 08 '21 17:07 lnetwalker

Hi. Created a jar of it, and added some instructions on how to use it from Digital. Needed some tweaking to be able to load the plugin and the paho client lib.

Good luck using it, you will probably need it :)

Contact me if you need help.

Best.

jorge-agra avatar Jul 08 '21 22:07 jorge-agra