Smartthing MQTT bright, not getting server address from config


So I just started with HA, using hassbian on Pi 3. Trying to get it to integrate with my smartthings. I have followed a number of guides and different configs but I can’t get the bridge to try connect to the address in my config.

I went with mosquitto broker and installed smartthings-mqtt-bridge with npm. Started it directly using sudo smartthings-mqtt-bridge and also tried with PM2. both methods give me the same, the config is below:

    # Specify your MQTT Broker's hostname or IP address here
    # Preface for the topics $PREFACE/$DEVICE_NAME/$PROPERTY
    preface: smartthings

    # The write and read suffixes need to be different to be able to differentiate when state comes from SmartThings or when its coming from the physical device/application

    # Suffix for the topics that receive state from SmartThings $PREFACE/$DEVICE_NAME/$PROPERTY/$STATE_READ_SUFFIX
    # Your physical device or application should subscribe to this topic to get updated status from SmartThings
    # state_read_suffix: state

    # Suffix for the topics to send state back to SmartThings $PREFACE/$DEVICE_NAME/$PROPERTY/$STATE_WRITE_SUFFIX
    # your physical device or application should write to this topic to update the state of SmartThings devices that support setStatus
    # state_write_suffix: set_state

    # Suffix for the command topics $PREFACE/$DEVICE_NAME/$PROPERTY/$COMMAND_SUFFIX
    # command_suffix: cmd

    # Other optional settings from
    # username: AzureDiamond
    # password: hunter2

# Port number to listen on
port: 8080

events read:

0|smartthi | info: Perfoming configuration migration
0|smartthi | info: Saving current state
0|smartthi | info: Connecting to MQTT at mqtt://mqtt
0|smartthi | info: Starting SmartThings MQTT Bridge - v2.1.0
0|smartthi | info: Loading configuration
0|smartthi | info: Loading previous state
0|smartthi | info: Perfoming configuration migration
0|smartthi | info: Saving current state
0|smartthi | info: Connecting to MQTT at mqtt://mqtt

I have rebooted the pi, shutdown HA and mosquitto and tried starting the bridge “alone”, nothing seems to make a difference. I have setup the smartthings app and handler. But until I can get the bridge to work have not gone much further, any help would be greatly appreciated

I’m not sure…
but where it says Connected to MQTT at mqtt://mqtt, I think it should be mqtt:// This may hint that the bridge for some reason is not reading your config file?? and instead using some defaults?

Yup that is exactly what I think, but no idea where its getting it from. If i rename the config.yml file it fails saying the config file is missing. So I know its referencing that file but why its not using the config, i haven’t been able to figure out

I’m not a YAML expert, but maybe delete the line with “—” (I think YAML considers it a start of document marker so its valid, but mine doesn’t have it).
Maybe file permissions problem?
For what its worth, I use Docker instead.

thanks for the reply :slight_smile:

I can’t use Docker because the Pi3 cpu can’t use it. At least that is what I understood from the forums I read.

So I had to use npm.

But I have subsequently found out what the issue is, although not sure how to fix it. What I have found is that if I am not in the smartthings-mqtt-bridge dir a new config.yml is created. So for instance if i run sudo smartthings-mqtt-bridge in /home/pi then config.yml gets created in /home/pi, and obviously its created with the defaults. I have tried to get the automated startup working with PM2 but that seems to run with lowered permissions so smartthings-mqtt-bridge keeps throwing errors about access denied.

There’s a docker Rpi3 version of that bridge, I ran it on a Pi3 myself for a bit. But I will say, make your game plan to pull the plug on Smartthings totally, the bridge is pain to maintain and keep everything sync’d.