Open f00j00 opened 6 years ago
Man, i am going NUTSSSS to paste PROPER CODE!!!!! WHY DOES the post end up like this!!!!
Damn i HATE code!
I hope you're able to read my shi**!!
Use three backticks next time. I fixed your code.
So it looks like the bridge doesn't see the changes being pushed to mqtt. I wouldn't set optimistic to false since you have the same state/command topic. Also, try without qos.
Your brightness topics won't work because they are configured for suffixes but you didn't set suffixes.
Not sure, you can try enabling debug here: https://home-assistant.io/docs/mqtt/logging/
Nope, tried without qos, set optimistic to true, nothing worked, here is logs after debug:
pi@raspberrypi:~ $ /srv/homeassistant/homeassistant_venv/bin/python3 /srv/homeassistant/homeassistant_venv/bin/hass -c /home/pi/.homeassistant Config directory: /home/pi/.homeassistant 2017-09-27 08:57:59 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: service=turn_off, domain=homeassistant> 2017-09-27 08:57:59 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: service=turn_on, domain=homeassistant> 2017-09-27 08:57:59 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: service=toggle, domain=homeassistant> 2017-09-27 08:57:59 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: service=stop, domain=homeassistant> 2017-09-27 08:57:59 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: service=restart, domain=homeassistant> 2017-09-27 08:57:59 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: service=check_config, domain=homeassistant> 2017-09-27 08:57:59 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: service=reload_core_config, domain=homeassistant> 2017-09-27 08:58:00 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: service=create, domain=persistent_notification> 2017-09-27 08:58:00 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: service=dismiss, domain=persistent_notification> 2017-09-27 08:58:00 INFO (MainThread) [homeassistant.bootstrap] Home Assistant core initialized 2017-09-27 08:58:00 INFO (MainThread) [homeassistant.loader] Loaded frontend from homeassistant.components.frontend 2017-09-27 08:58:00 INFO (MainThread) [homeassistant.loader] Loaded api from homeassistant.components.api 2017-09-27 08:58:00 INFO (MainThread) [homeassistant.loader] Loaded http from homeassistant.components.http 2017-09-27 08:58:00 INFO (MainThread) [homeassistant.loader] Loaded websocket_api from homeassistant.components.websocket_api 2017-09-27 08:58:00 INFO (MainThread) [homeassistant.loader] Loaded mqtt from homeassistant.components.mqtt 2017-09-27 08:58:00 INFO (MainThread) [homeassistant.loader] Loaded logger from homeassistant.components.logger 2017-09-27 08:58:00 INFO (MainThread) [homeassistant.setup] Setting up logger 2017-09-27 08:58:11 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on smartthings/Far Right Stand/switch: on 2017-09-27 08:58:12 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on smartthings/Right Stand/switch: on 2017-09-27 08:58:12 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on smartthings/Far Right Stand/level: 100 2017-09-27 08:58:12 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on smartthings/Right Stand/level: 100 2017-09-27 08:58:37 WARNING (Thread-7) [netdisco.ssdp] Found malformed XML at http://192.168.2.152:49155/description0.xml: 2017-09-27 08:58:37 WARNING (Thread-7) [netdisco.ssdp] Found malformed XML at http://192.168.2.152:49155/description2.xml: 2017-09-27 08:58:43 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting 2017-09-27 08:58:44 WARNING (Thread-2) [homeassistant.components.light.hue] Connected to Hue at 192.168.2.198 but not registered. 2017-09-27 08:58:57 WARNING (MainThread) [homeassistant.components.remote] Setup of platform harmony is taking over 10 seconds. 2017-09-27 08:58:57 WARNING (MainThread) [homeassistant.components.media_player] Setup of platform cast is taking over 10 seconds. 2017-09-27 08:58:57 WARNING (MainThread) [homeassistant.components.media_player] Setup of platform cast is taking over 10 seconds. 2017-09-27 08:59:40 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on smartthings/Right Stand/switch: off 2017-09-27 09:02:32 WARNING (Thread-10) [homeassistant.components.mqtt] Disconnected from MQTT (1). Trying to reconnect in 1 s 2017-09-27 09:02:33 WARNING (Thread-10) [homeassistant.components.mqtt] Disconnected from MQTT (1). Trying to reconnect in 2 s 2017-09-27 09:02:35 INFO (Thread-10) [homeassistant.components.mqtt] Successfully reconnected to the MQTT server 2017-09-27 09:02:45 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on smartthings/Right Stand/switch: on 2017-09-27 09:02:47 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on smartthings/Far Right Stand/switch: off 2017-09-27 09:02:48 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on smartthings/Right Stand/switch: off 2017-09-27 09:02:52 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on smartthings/Far Right Stand/switch: on 2017-09-27 09:02:54 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on smartthings/Far Right Stand/switch: on 2017-09-27 09:02:57 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on smartthings/Right Stand/switch: on 2017-09-27 09:03:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on smartthings/Right Stand/switch: on 2017-09-27 09:04:25 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on smartthings/Far Right Stand/switch: off 2017-09-27 09:04:26 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on smartthings/Right Stand/switch: off 2017-09-27 09:04:29 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on smartthings/Right Stand/switch: on 2017-09-27 09:04:31 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on smartthings/Right Stand/switch: on 2017-09-27 09:04:34 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on smartthings/Far Right Stand/switch: on 2017-09-27 09:04:39 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on smartthings/Right Stand/switch: off 2017-09-27 09:04:39 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on smartthings/Far Right Stand/switch: off 2017-09-27 09:10:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on smartthings/Far Right Stand/switch: on 2017-09-27 09:10:01 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on smartthings/Right Stand/switch: on 2017-09-27 09:10:04 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on smartthings/Right Stand/switch: on 2017-09-27 09:10:23 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on smartthings/Far Right Stand/switch: off 2017-09-27 09:10:23 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on smartthings/Right Stand/switch: off 2017-09-27 09:10:24 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on smartthings/Far Right Stand/switch: on 2017-09-27 09:10:25 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on smartthings/Right Stand/switch: on
I'm having similar issues. I tried sending 'on' to a dimmer switch which gave me the following log entry in mqtt-bridge:
0|smartthi | info: Incoming message from MQTT: smartthings/Light_GF_Dining_Wall/switch/set = on
0|smartthi | info: Passing level instead of switch on
So I tried to just send a level instead and here is what I got.
0|smartthi | info: Incoming message from MQTT: smartthings/Light_GF_Dining_Wall/level/set = 50
0|smartthi | info: Skipping level set due to device being off
One side question. Does mqtt-bridge operate locally or is it going out to smarthings.com each time there is a change on either side?
@rgerrans that's because inside SmartThings they ignore requests to turn dimmers on/off. Instead you have to send the level you want (like 99 for max brightness). When you send "on" it sends the last saved "level". So it should work.
Also, it works as locally as SmartThings allows. Which is the Hub talks to MQTT bridge over local network. But the Hub is doing all the smart logic in the cloud, so it does talk to smarthings.com.
@stjohnhohnson Thanks for the clarification on execution location.
On the dimmer, that makes the log entry related to 'on' make sense. The part I realized I forgot to include in my earlier post is that the physical dimmer isn't turning on when I send that request. I'm just testing Smartthings so am not yet enough familiar with where to find their log files to confirm it's getting the command? Off does work do we are at least 1/2 ways there.
Thanks.
I did everythinggggg possible to try to get HASS talk to ST bridge, i ONLY receive notifications from ST, not the other way around, please support
Here are my config:
config.yml
/etc/mosquitto/mosquitto.conf
Logs from mosquitto:
mqttc is the client-id for hass
configurations.yaml
logs from smartthings-bridge:
HOWEVER, only ST can talk with HASS, NOT the other way around
I ensured my MAC is inputted for my RBP not docker, i dont use docker, i tried with and without ":"
it NEVER worked, if i turn off or on the light switch from ST , the switcher in HASS is synced...but when i press any switch in HASS it just wont work