Interfacing with a domotics server
-
Hello,
In order to indicate to my domoticz server when a print is complete, paused or... anything else I find usefull, I'd like to be able to send Json commands to my domoticz server through execution of the associated macros (Print complete, Pause... etc...).
Is there a way to do that ?
Thanks for your help.
-
That's possible using Duet 3 and an attached Raspberry Pi. It's not currently possible using Duet 2.
-
You may do that by attaching a RPi (zero), and write some code asking the Duet status, and sending relevant informations to your domotic server. An ESP8266/32 may be enough.
-
Another solution would be to use I²C. You then need to configure your device (Pi, ESP...) as I²C slave. Then, from the Duet, send I²C values from macros, each value meaning someting.
-
Which board are you planning on using? If using Duet3 + Raspberry Pi its reatively straight forward as dc42 says; for the other instances the easiest is to interface to one of the two serial ports (the usb serial console, or the PanelDue port) and either poll for status, or use M118 in your macros to send messages to the serial port of choice.
Pretty basic example of listening to the PanelDue port with an ESP8266 to play any beeps as needed:
https://github.com/beikeland/BeeperDue -
@enggmaug
Or use the domotics to poll the duet board periodically through HTTP.
I guess the domotics server is already running on a Pi?