- On windows command propmt (I usually run in administrative mode) cd into the nodejs directory (C:\Program Files\nodejs)
from that directory run
- npm install -g mqtt-bridge-smartthings
that will automatically download all the dependencies and setup - other installed packages should not make a difference.
- In windows explorer go to C:\Program Files\nodejs\node_modules\mqtt-bridge-smartthings and there create ‘config.yml’ and ‘devices.yml’ for your situation using the examples.
- go back to the command prompt and from the same directory C:\Program Files\nodejs run the command mqtt-bridge-smartthings
this should start the server and you should see the logging on the console.
Do you have an MQTT boker running separately?
Then follow the directions for smartthings IDE to set up the device handlers, the bridge and the smartapp.
Once you are comfortable everything is working fine you an set the process to run as a service so it automatically start and everything should be handled automatically.
if you are using sonoff’s also make sure to set the timezones etc otherwise your timestamps will be wrong. From the web console I run the following backlog commands
Backlog ntpServer1 0.us.pool.ntp.org; ntpServer2 1.us.pool.ntp.org; ntpServer3 2.us.pool.ntp.org; Sleep 250; TIMEDST 0,2,3,1,2,-300; TIMESTD 0,1,11,1,2,-360; Timezone 99; WifiConfig 2; Latitude xx.xxx; Longitude -xx.xxx; SetOption55 0
Backlog setoption53 1; powerretain on;SwitchRetain off; ButtonRetain on; ButtonRetain off
Timezone 99 is CST for me. Enter your specific longitude / latitude (that gets local sunrise /sunset)
make sure you also configure the MQTT on the sonoff devices - should write a small readme on that too - for me I set the unique topic like “SNF-M1” etc, for each sonoff and then for full topic I jsut prepend smartthings as "smartthings/%prefix%/%topic%
hope this helps
(I just added this info in the WindowsInstall.md and Tasmota.md files)
To get up and running quickly follow this simplest sceario.
From _devices.example copy the simplest device section into a ‘device.yml’ files, change the particulars according to your set up.
In IDE by code install the mbs-bridge device handler and mbs-smartapp-lite
create a virtual smartthings switch device.
configure settings in mbs-bridge
map the create switch to the smartapp in the smartapp settings and hit save.
You should be all set. and the switch should be working