Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - sudo apt-get install -y nodejs
- you may have to re-install the npm package (smartthings-mqtt-bridge), but aside from that, you shouldn't have to reconfigure it.
- pm2 script wizard??: https://github.com/dale3h/hassctl Install this
- Then run hassctl log -f
- this is the new config yaml file: http://pastebin.com/yrVWv9tH
- Create another file in the same directory as configuration.yaml, and name it secrets.yaml, and then put this in there (with your own info, of course):
- home_latitude: 26.1722
- home_longitude: -97.9812
- mqtt_broker: 'localhost'
- mqtt_port: 1883
- mqtt_username: 'your_username'
- mqtt_password: 'your_password'
- in your config yaml make sure to have:
- mqtt:
- broker: !secret mqtt_broker
- port: !secret mqtt_port
- client_id: home-assistant-1
- username: !secret mqtt_username
- password: !secret mqtt_password
- check if bridge runs: pm2 list
- After you reboot, go to the directory where you have your settings for the smartthings-mqtt-bridge stored, and run:
- pm2 start smartthings-mqtt-bridge
- pm2 save
- if you dont have an mqtt bridge directory create it:
- mkdir ~/.mqtt-bridge
- cd ~/.mqtt-bridge
- nano config.yml
- enter the following into the config.yml file in the bridge directory (keep as localhost in my case. make sure localhost is kept in both homeassistant and mqtt files):
- mqtt:
- host: mqtt://localhost
- preface: smartthings
- username: your_mqtt_username
- password: your_mqtt_password
- port: 8080
- in my case i was told to check pm2 logs, then pm2 list, then:
- cd ~/.mqtt-bridge
- ls -al (to look at the outputs)
- on my end it didnt look well so i ran:
- pm2 stop smartthings-mqtt-bridge
- make sure its stopped: pm2 list
- then i had to: pm2 delete smartthings-mqtt-bridge
- next i: sudo chown pi:pi config.yml
- then: And then, make sure you stay in that directory (~/.mqtt-bridge) and run: pm2 start smartthings-mqtt-bridge && pm2 logs smartthings-mqtt-bridge
- Result: success! working
- In my case nodejs was a process found using htop or top that as using 100% CPU. 10 minutes and Pi would crashed.
- Solution: sudo apt-get purge nodejs
- sudo apt-get install nodejs
- result: Success! nodejs is no longer running 100% CPU
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement