Hi there,
How I can set output on/off with mqtt protocol? Any example about this?
Thank you in advance for any help!
Liczba postów: 2,350
Liczba wątków: 40
Dołączył: Oct 2011
Reputacja:
14
Yes
mosquito klient example for our serwer
mosquitto_pub -h mqtt.ats.pl -p 1883 -t prefix/cmd -m "out0 1"
mosquitto_pub -h mqtt.ats.pl -p 1883 -t prefix/cmd -m "out0 0"
mosquitto_pub -h mqtt.ats.pl -p 1883 -t prefix/cmd -m "out1 1"
mosquitto_pub -h mqtt.ats.pl -p 1883 -t prefix/cmd -m "out0 0" etc.
for pwm in on/off mode
mosquitto_pub -h mqtt.ats.pl -p 1883 -t prefix/cmd -m "pwm0 1"
mosquitto_pub -h mqtt.ats.pl -p 1883 -t prefix/cmd -m "pwm0 0"
mosquitto_pub -h mqtt.ats.pl -p 1883 -t prefix/cmd -m "pwm1 0"
mosquitto_pub -h mqtt.ats.pl -p 1883 -t prefix/cmd -m "pwm1 1"
pozdrawiam
tomek