stjohnjohnson / smartthings-mqtt-bridge

Bridge between SmartThings and MQTT
https://hub.docker.com/r/stjohnjohnson/smartthings-mqtt-bridge/
MIT License
363 stars 241 forks source link

MQTT and SmartThings connected, but don’t work #139

Closed bgx4k3p closed 6 years ago

bgx4k3p commented 6 years ago

I just setup a new Pi3 B+ with manual install of HA in virtual environment, mosquitto and smartthings bridge with npm. Everything seems to be running fine and configured properly, but when I try to turn on/off a light, nothing happens. I had the exact same setup with Hass.io image on Pi2 and it was working. Any ideas?

Below are logs: mosquitto

root@hass-pi:/home/pi# cat /var/log/mosquitto/mosquitto.log
1521734365: mosquitto version 1.4.15 (build date Wed, 28 Feb 2018 11:29:47 +0000) starting
1521734365: Config loaded from /etc/mosquitto/mosquitto.conf.
1521734365: Opening ipv4 listen socket on port 1883.
1521734365: Opening ipv6 listen socket on port 1883.
1521734381: New connection from ::1 on port 1883.
1521734381: New client connected from ::1 as hass-1 (c1, k60, u’hassio’).
1521734388: New connection from 127.0.0.1 on port 1883.
root@hass-pi:/home/pi#

smartthings bridge

root@hass-pi:/home/pi# pm2 logs smartthings-mqtt-bridge
[TAILING] Tailing last 15 lines for [smartthings-mqtt-bridge] process (change the value with --lines option)
/root/.pm2/logs/smartthings-mqtt-bridge-error-0.log last 15 lines:
/root/.pm2/logs/smartthings-mqtt-bridge-out-0.log last 15 lines:
0|smartthi | info: Skipping duplicate message from: smartthings/Living Room Lights/level = 24
0|smartthi | info: Incoming message from MQTT: smartthings/Living Room Lights/level = 24
0|smartthi | info: Skipping duplicate message from: smartthings/Living Room Lights/level = 24
0|smartthi | info: Incoming message from MQTT: smartthings/Kitchen Lights/level = 34
0|smartthi | info: Skipping duplicate message from: smartthings/Kitchen Lights/level = 34
0|smartthi | info: Incoming message from MQTT: smartthings/Kitchen Lights/level = 34
0|smartthi | info: Skipping duplicate message from: smartthings/Kitchen Lights/level = 34
0|smartthi | info: Incoming message from MQTT: smartthings/Living Room Lights/switch = off
0|smartthi | info: Skipping duplicate message from: smartthings/Living Room Lights/switch = off

configuration.yaml

# SmartThings Bridge MQTT
mqtt:
broker: localhost
port: 1883
keepalive: 60
client_id: hass-1
discovery: true
discovery_prefix: smartthings
username: hassio
password: hassio

# Lights GE Z-Wave Dimmer Switches
light:
  - platform: mqtt
    name: "Living Room Lights"
    state_topic: "smartthings/Living Room Lights/switch/state"
    command_topic: "smartthings/Living Room Lights/switch/cmd"
    brightness_state_topic: "smartthings/Living Room Lights/level/state"
    brightness_command_topic: "smartthings/Living Room Lights/level/cmd"
    brightness_scale: 99
    brightness_value_template: '{{ value }}'
    qos: 0
    payload_on: "on"
    payload_off: "off"
    retain: false

Mosquitto

root@hass-pi:/home/pi# dpkg -l|grep mosquitto
ii  libmosquitto1:armhf               1.4.15-0mosquitto1           armhf        MQTT version 3.1/3.1.1 client library
ii  mosquitto                         1.4.15-0mosquitto1           armhf        MQTT version 3.1/3.1.1 compatible message broker
ii  mosquitto-clients                 1.4.15-0mosquitto1           armhf        Mosquitto command line MQTT clients