stjohnjohnson / smartthings-mqtt-bridge

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

Questions... questions... and more questions #209

Open wonderwareguru opened 4 years ago

wonderwareguru commented 4 years ago

Because I'm a complete dumbass at times, and as a novice, I humbly ask for some clarification and help.

I'm trying to get mqtt-bridge working with my node-red installation but have failed; even with instruction. It would be extremely appreciated if someone could make a step by step video on the setup, using docker and node-red and smartthings. I have node-red and mqtt broker working correctly, able to control my tasmota sonoff devices with node-red, but can't figure out where is the break with the bridge and smartthings.

Question 1: $PREFACE/$DEVICE_NAME/$PROPERTY... and the suffixes..

To control a dimmer switch, is the topic: "smartthings/kitchen light/level" or "smartthings/kitchen light/level/set"or "smartthings/kitchen light/level/set_state" or "smartthings/kitchen light/level/set-state" or "smartthings/kitchen light/level/set/cmd" or ....................................... ;/

and payload for switch a string "on" / "off" , and dimmer a number?

Question 2: "mqtt:

Specify your MQTT Broker URL here

host: mqtt://localhost
# Example from CloudMQTT
# host: mqtt:///m10.cloudmqtt.com:19427

" a.) Is the "mqtt:///" a typo? ("///")

b.) Do you have to type: "host: mqtt://192.168.1.x:1883" or "host: mqtt://192.168.1.x" or "host: 192.168.1.x:1883"

Question 3. Which config file in the container, in docker, do we edit for the mqtt://....... address is it "/config/config.yml" or "usr/src/app/_config.yml"

Question 4. Is there a way to test the mqtt-bridge from the C.L?

Question 5. Has anyone confirmed that the mqtt-bridge works with node-red? Does the bridge even work? No offense

Question 6. Does anyone have a video installation tutorial?

Thanks a million ladies and gentlemen...

gcaley commented 4 years ago

1) So not sure on getting mqtt-bridge to update smartthings devices (im working on that), but I have it sending smartthings->mqtt 2) In the config.yml file all you need to change is e.g. host: 192.168.2.148 3) /config/config.yml 4) Really the easiest way is to use an mqtt client and subscribe to the smartthings topic Then as you change a switch in ST, you should see the topic update with that change 5) The bridge isnt supposed to work with Node Red, only MQTT. You can then use NodeRed to read from the smartthings MQTT topic and to publish into that topic. 6) Sorry no, but was quick to configure. I did the following a) Created a folder called mqtt-bridge b) Created a docker container using: docker run -d --name mqtt-bridge -v /home/gcaley/mqttbridge:/config -p 8080:8080 stjohnjohnson/smartthings-mqtt-bridge c) Stopped the container d) edited the /home/gcaley/mqttbridge/config.yml and changed the host line to host:192.168.2.148 e) Restarted the container f) Subscribed to my mqtt server topic smartthings

and then i would see lines such as the following appearing, as ST changes the devices:

image