stjohnjohnson / smartthings-mqtt-bridge

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

Changing preface/path #101

Open causalloop opened 7 years ago

causalloop commented 7 years ago

I wanted to change the preface, ie, HOME/smartthings to.. whatever - POTATO/somedifferentcomputer/smartthings but found that changing the config file and restarting the service didn't change anything.. I feel like I'm missing something really obvious...

stjohnjohnson commented 7 years ago

What is the contents of your config file?

causalloop commented 7 years ago
---
mqtt:
    # Specify your MQTT Broker's hostname or IP address here
    host: mqtt://10.20.30.225
    # Preface for the topics $PREFACE/$DEVICE_NAME/$PROPERTY
    preface: BANZAI/MUDPIE/smartthings
    clientId: ST_BROKER
    # 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: AzureDiamond
    # password: hunter2

# Port number to listen on
port: 8180

Where Banzai is the 'root' so to speak, mudpie is the rpi that the broker is on and smartthings is smartthings' topic. I've a hub at home and one at work (yes, its a bit silly..) and the rpi I'm using I was going to use as sort of a floater as I have this set up on a VM at home already.. I suppose I should mention that I'm running two instances of the mqtt getup on my hubs (though it started as just one). I don't think thats the issue, but I could be wrong - and the brokers are on two different machines and as far as I can tell, are set up the same.

Forgetting for the moment having two instances, I can change the config file till I'm blue in the face but it doesn't seem to matter - its like its cached the original config somewhere and is ignoring my modifications (post restarting services and rebooting etc). Am at a bit of a loss to be honest.