2 examples for mosquitto_pub

{{ score }}
  # Send a message 'ON' to topic 'switches/living' on a password protected broker
# 192.168.1.90 is the address of your mosquitto broker server
mosquitto_pub -h 192.168.1.90 -u username -P password -t 'switched/living' -m 'ON'
        
{{ score }}
  # Basic usage on a non authenticated broker
mosquitto_pub -h 192.168.1.100 -t 'switches/living' -m 'ON'