Hi everyone
We are using MQTT and I/O juggler to send messages to a Mosquitto broker and have come across a couple of issues we can’t find answers for and was hoping someone may help.
Firstly is there a way to send the value of Digital Input 1 in a Boolean format and not the Open/Shorted string that the %g3 gives us.
Secondly is there a way to send the value via MQTT every 5 minutes and not necessarily on change of state. We can see that it might have to be via a custom script in CLI and crontab but have no experience in that field and may need an example. It would be nice to have a interval based trigger in the I/O juggler.
Thanks in advance
Matthew
Hi tri,
Welcome to Teltonika Networks Community!
Have you tried using Data Type: 16 bit UINT, high byte first? This will give you boolean values of 0 (low) or 1 (high).
We have a feature called Data to Server, wherein you can send this data via MQTT in a given interval. Please refer to this link as a guide.
Let me know if this helps.
Regards,
Janmiguel
Thanks for looking at this for me.
I have setup the Modbus server and client, as you suggested, and am reading this as a true Boolean point eg. 1 or 0
The issue is sending just that value via the Data to Server function to our MQTT broker. Despite trying to find an example that makes sense to me, I am only receiving a string value at the Broker which looks like { “input1”: “0” } when using custom format in the request. I do not want to send JSON just the pure value. If you have a working example that would be very helpful
Regards
Matthew