Hi,
basing of the following tutorial:
I develop an idea to control, through Arduino + Ethernet Shield, a 433MHz power socket thanks a light switch based on MQTT (the broker is Mosquitto).
I’m writing here because when I change the status of the switch on HA seems that Arduino doesn’t receive nothing.
The mosquito server and HA are on an Odroid XU4.
The MQTT settings in the HA configuration file is the following (the first part is broker settings, the second one is referred to light switch):
mqtt:
platform: 192.168.1.xxx
port: 1883
client_id: home-assistant-1
keepalive: 60
protocol: 3.1.1
username: myuser
password: abcdefg
light:
platform: mqtt
name: "Desk lamp"
state_topic: "main/desk/status"
command_topic: "main/desk/switch"
optimistic: false
The arduino code is http://pastebin.com/7MUc34Eh
Could someone help me?
P.S.
The MQTT broker works: if I create a sensor and I can update the its status with “mosquitto_sub” from terminal.