I’ve been beating my head against a wall on this for a bit as well. Smartthings is at the center of my system, so I’m anxious to get it up and going so I can start moving functionality over to hass Alas, I can’t get it going either .
I’ve tried a ton of different options, but for simplicity, I’ll show you everything I’ve done from start to finish. This is a ground zero install on Raspberry Pi. There are currently no errors, but I can’t see any events in any of the logs that I’ve checked. Any debug steps would be appreciated, I’d love to get this going and update the docs. I’d be happy to run through it on gitter some weeknight if that’s easier
Build Image from latest raspian and update it
sudo apt-get update; sudo apt-get upgrade
Install All In One homeassistant installer
wget -Nnv https://raw.githubusercontent.com/home-assistant/fabric-home-assistant/master/hass_rpi_installer.sh && chown pi:pi hass_rpi_installer.sh && bash hass_rpi_installer.sh
Reset mosquitto password before we get started
sudo mosquitto_passwd /etc/mosquitto/pwfile pi
sudo systemctl restart mosquitto.service
Setup smarthings-mqtt-bridge via npm
sudo apt-get install npm
sudo npm install -g smartthings-mqtt-bridge
setup pm2 to run the processes
sudo npm install pm2 -g
create and edit smartthings-mqtt-bridge config
sudo cp /usr/local/lib/node_modules/smartthings-mqtt-bridge/_config.yml /usr/local/lib/node_modules/smartthings-mqtt-bridge/config.yml
sudo nano /usr/local/lib/node_modules/smartthings-mqtt-bridge/config.yml
mqtt-bridge-configuration /usr/local/lib/node_modueles/smartthings-mqtt-bridge/config.yml
mqtt:
# Specify your MQTT Broker's hostname or IP address here
host: localhost
# Preface for the topics $PREFACE/$DEVICE_NAME/$PROPERTY
preface: smartthings
# Suffix for the state topics $PREFACE/$DEVICE_NAME/$PROPERTY/$STATE_SUFFIX
# state_suffix: state
# Suffix for the command topics $PREFACE/$DEVICE_NAME/$PROPERTY/$COMMAND_SUFFIX
# command_suffix: cmd
# Other optional settings from https://www.npmjs.com/package/mqtt#mqttclientstreambuilder-options
username: pi
password: mqttpass
# Port number to listen on
port: 1883
** Add mqtt to HomeAssistant config configuration.yaml **
mqtt:
broker: localhost
port: 1883
client_id: home-assistant-1
username: pi
password: mqttpass
Add switches to their own file, or configuration.yaml
- platform: mqtt
name: "MQTT Dining Room Light"
state_topic: "smartthings/Dining Room Light/switch"
command_topic: "smartthings/Dining Room Light/switch"
payload_on: "on"
payload_off: "off"
retain: true
start the bridge
pm2 restart smartthings-mqtt-bridge
restart HASS
sudo systemctl restart home-assistant.service
Configure the smartthigns Device handler, Device, and SmartApp using steps outlined in https://github.com/stjohnjohnson/smartthings-mqtt-bridge
#Device Settings
IP: raspberry pi IP
MAC: Raspberry pi MAC
Port: 1883
Logging. On physical press of dining room light
IDE - MTTQ Bridge Log
4a29a366-0fa9-4d6e-a3a9-758909fb6001 9:55:04 PM: debug Forwarding device event to bridge: {“path”:"/push",“body”:{“name”:“Dining Room Light”,“value”:“on”,“type”:“switch”}}