What is the best way to check if my homeassistant and smartthings are connected via mqtt properly???
This is my mosquitto log
1517640477: New client connected from 192.168.79.5 as mqttjs_7783e2cd (c1, k10).
1517641297: mosquitto version 1.4.14 terminating
1517641394: mosquitto version 1.4.14 (build date Sun, 14 Jan 2018 15:41:02 +0000) starting
1517641394: Config loaded from /etc/mosquitto/mosquitto.conf.
1517641394: Opening ipv4 listen socket on port 1883.
1517641394: Opening ipv6 listen socket on port 1883.
1517641421: New connection from 192.168.79.5 on port 1883.
1517641421: New client connected from 192.168.79.5 as mqttjs_53642f0f (c1, k10).
1517643213: Saving in-memory database to /var/lib/mosquitto/mosquitto.db
My homeassistant log is
2018-02-02 23:04:03 INFO (Thread-9) [homeassistant.components.mqtt] Successfully reconnected to the MQTT server
2018-02-02 23:04:05 INFO (Thread-9) [homeassistant.components.mqtt] Successfully reconnected to the MQTT server
2018-02-02 23:04:07 INFO (Thread-9) [homeassistant.components.mqtt] Successfully reconnected to the MQTT server
2018-02-02 23:04:11 INFO (Thread-9) [homeassistant.components.mqtt] Successfully reconnected to the MQTT server
2018-02-02 23:04:11 WARNING (Thread-16) [homeassistant.components.emulated_hue] When targeting Google Home, listening port has to be port 80
2018-02-02 23:04:19 INFO (Thread-9) [homeassistant.components.mqtt] Successfully reconnected to the MQTT server
2018-02-02 23:04:26 WARNING (MainThread) [homeassistant.components.remote] Setup of platform harmony is taking over 10 seconds.
2018-02-02 23:04:35 INFO (Thread-9) [homeassistant.components.mqtt] Successfully reconnected to the MQTT server
2018-02-02 23:05:07 INFO (Thread-9) [homeassistant.components.mqtt] Successfully reconnected to the MQTT server
2018-02-02 23:05:16 ERROR (MainThread) [homeassistant.components.remote] Setup of platform harmony is taking longer than 60 seconds. Startup will proceed without waiting any longer.
2018-02-02 23:05:16 WARNING (MainThread) [homeassistant.components.sensor.template] Could not render template Harmony Hub, the state is unknown.
2018-02-02 23:06:11 INFO (Thread-9) [homeassistant.components.mqtt] Successfully reconnected to the MQTT server
2018-02-02 23:08:11 INFO (Thread-9) [homeassistant.components.mqtt] Successfully reconnected to the MQTT server
under the developing tools i see this “binary_sensor.garden”
I am able to toggle it “on” and “off” when I enteter this on command line.
mosquitto_pub -h 127.0.0.1 -p 1883 -t “homeassistant/binary_sensor/garden/state” -m ON
mosquitto_pub -h 127.0.0.1 -p 1883 -t “homeassistant/binary_sensor/garden/state” -m OFF
in my my event.log all i see is this under pm2
2018-02-05T05:11:55.253Z - info: Saving current state
2018-02-05T05:26:55.258Z - info: Saving current state
2018-02-05T05:41:55.263Z - info: Saving current state
2018-02-05T05:56:55.266Z - info: Saving current state
in my mosquitto.log this is all i see
1517806617: New client connected from ::1 as homeassistant23 (c1, k60).
1517806667: New connection from 127.0.0.1 on port 1883.
1517806667: New client connected from 127.0.0.1 as mosqsub|763-hassbian (c1, k60).
1517808378: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1517809167: New connection from 127.0.0.1 on port 1883.
1517809167: New client connected from 127.0.0.1 as mosqpub|1107-hassbian (c1, k60).
1517809167: Client mosqpub|1107-hassbian disconnected.
1517809175: New connection from 127.0.0.1 on port 1883.
1517809175: New client connected from 127.0.0.1 as mosqpub|1108-hassbian (c1, k60).
1517809175: Client mosqpub|1108-hassbian disconnected.
1517809211: New connection from 192.168.79.5 on port 1883.
1517809211: New client connected from 192.168.79.5 as mosqpub|1111-hassbian (c1, k60).
1517809211: Client mosqpub|1111-hassbian disconnected.
1517809220: New connection from 192.168.79.5 on port 1883.
1517809220: New client connected from 192.168.79.5 as mosqpub|1112-hassbian (c1, k60).
1517809220: Client mosqpub|1112-hassbian disconnected.
1517809260: New connection from ::1 on port 1883.
1517809260: New client connected from ::1 as mosqpub|1117-hassbian (c1, k60).
1517809260: Client mosqpub|1117-hassbian disconnected.
1517809324: New connection from 127.0.0.1 on port 1883.
1517809324: New client connected from 127.0.0.1 as mosqpub|1123-hassbian (c1, k60).
1517809324: Client mosqpub|1123-hassbian disconnected.
1517809351: New connection from 127.0.0.1 on port 1883.
1517809351: New client connected from 127.0.0.1 as mosqpub|1125-hassbian (c1, k60).
1517809351: Client mosqpub|1125-hassbian disconnected.
1517809857: New connection from 127.0.0.1 on port 1883.
1517809857: New client connected from 127.0.0.1 as mosqpub|1152-hassbian (c1, k60).
1517809857: Client mosqpub|1152-hassbian disconnected.
1517809865: New connection from 127.0.0.1 on port 1883.
1517809865: New client connected from 127.0.0.1 as mosqpub|1155-hassbian (c1, k60).
1517809865: Client mosqpub|1155-hassbian disconnected.
1517810179: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
1.)My question is… is my mqtt setup correctly? it appear to be. since i can toggle it on and off via commandline?
Soo now that i know how to make the binary switch in HA… how do i map (or connect) out to my smartthings devices?
for example if i want to connect the binary_switch.lock to my smarthings “Dead Bolt Lock”
3)How do i know if my smartthings is talking to my HA?
im assuming this one is creating a switch in my HA frontend correct? that will send a message to mqtt ; the message would be something like ON or OFF message…the mqtt will translate and send a command to my smartthings (device) correct?
platform: mqtt
entity_id: mysmartthings
name: “my smartthings”
command_topic: “homeassistant/binary_sensor/garden/state” (is this the switch that appear in my developer tools)
payload_on: “ON”
payload_off: “OFF”
optimistic: false
qos: 0
retain: true
where is the command that are suppose to link up to my smartthings device or a command that are being send to my smartthings device?? like i said i have a device in my smartthings name “Dead Bolt Lock”
i thought something would be like Dead Bolt Lock (command on/off) to homeassistant/binary_sensor/garden/state
sorry im really confused on how to make the two system talk to each other…
also dont forge to add he MQTT sonething Like (I have this in my configuration.yaml)