stjohnjohnson / smartthings-mqtt-bridge

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

Dimmer/Switch - won't turn on #127

Closed tommyjlong closed 6 years ago

tommyjlong commented 6 years ago

I have a Zwave Shade acting as a dimmer switch and in HA I have it set up as an mqtt "light". This shows up in Home Assistant as a light with on/off switch button and a slider for the dimmer.

With initial condition that everyone has state information as "off" and "level" of 0, I go to Home Assistant and flip the switch button to the "on" position, and the way I have it configured, HA sends out on the smartthings topic switch = on.

MQTT-Bridge/server gets this from MQTT, and according to the log it "Passing level instead of switch on". But the level that was last stored is 0, meaning level =0 gets sent to smartthings which receives it, applies it, but of course keeps the device from turning on.

airdrummingfool commented 6 years ago

@tommyjlong my PR #132 should fix this issue, can you test it and let me know if it works for you?

tommyjlong commented 6 years ago

My fix was to comment out the following conditional in server.js if (property === 'switch' && contents === 'on' && history[topicLevelCommand] !== undefined) {

However I did test out your fix and it worked as well.

stjohnjohnson commented 6 years ago
stjohnjohnson commented 6 years ago

Thanks for the PR!