-
Notifications
You must be signed in to change notification settings - Fork 242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MQTT -> SmartThings Suddenly Stopped Working #80
Comments
I'm having the same problem. No errors in Smartthings, but nothing posting on the bridge on my raspberry pi. Started on the evening of 4/3/2017. |
I uninstalled and re-installed and it is now working. Sorry for the false alarm. |
I've been running it since I published this module, and it hasn't failed for me yet. One thing I noticed is if the SmartThings hub reboots and is assigned a new IP then connections will fail. Should SmartThings get a new IP, you need to re-save the Smart App. I recommend giving both the Raspberry Pi and the SmartThings Hub a static IP from your router. |
I've got this problem. I added a new switch and that caused me to turn off the power, and thus to the smartthings hub. When I powered on, nothing is coming in to mqtt even. I checked the settings and the IP, etc., is right in the IDE. I can send mqtt from my PC and the lights go on/off. I'm just not getting data from the bridge/smartthings at all. I see messages in the IDE log after changing the slider value for the ceiling fan in the iPhone smartthings app:
I don't see anything from my mqtt server, though. I stopped the bridge, removed the logs, state.json, etc.,, and restarted it. The only file of interest is the events.log which looks like this:
Nothing more, even if I use the smartthings app or alexa to turn on/off things. I checked in the app that there is an app with all my devices checked so the bridge should work. I checked in the IDE and the settings have the right IP, MAC address, and port. Next I'm going to try and kill the device and all that's in the IDE and redo it. Maybe something in the README about how the hub's IP changing affects things? Thanks for this. It's making it possible for me to roll my own HA setup. |
@mschwartz Interesting, it shows no previous state? That indicates it has nothing to listen on. Go into the SmartThings UI on your phone, edit the MQTT bridge app configuration, and just save it. It should send a notification to resubscribe. |
It shows previous state, but that state never changed. I did switch from mosca to mosquitto, but everything worked. I also switched from using my router to assign IP -> mac address to everything on my network to dnsmasq. In doing so, I definitely renumbered things. I use a netmask of 255.0.0.0, which allows me to have 192.168.0.* for my computers, 192.168.1.* for my mobile devices, 192.168.3.* for home automation (echo, nest, smartthings hub, etc.), 192.168.4.* for my home entertainment devices (TV, apple TV, tivo, etc.). Everything was working fine until I turned the power off at the circuit breaker to install a new smart switch. When I turned the breaker on agian, the smartthings hub almost certainly got its new assigned IP. I was able to get it working again. I removed everything in the IDE and reinstalled it all and carefully did the device configuration. If you want to see screen shots of my HA software, let me know. I could post them here. |
I think I am also having this issue but I have just done a fresh install, when something happens in Smart Things I can see the message in the bridge log and the state updates in Home Assistant but nothing works the other way, I turn "Plug" off, I see the message in the bridge log but nothing happens after that |
I'm running into the same issue. I just installed hass.io and installed the smartthings mqtt bridge add-on. My bridge gets updates from smartthings and home assistant updates accordingly but when I use a switch in home assistant smartthings doesn't receive it. The bridge seems to see it but the smartthings hub doesn't? |
So I managed to fix my issue - for me, I was running the bridge as a docker container and I used the MAC from the docker container but it turns out you have to use the MAC address of the physical host, after I changed that and re-added the app in Smart Things two way traffic started working |
I think that was it for me too. I just switched to Hass.io which puts home assistant in a docker and I was using the docker MAC address too. Thanks for your help!! |
If he docker container is exposing a port to the network, you clearly/obviously need to use the host's MAC address. For example, the container exposes port 8080 for HTTP server/access, you'll be able to hit the host that's running the container, port 8080 and get the WWW server. If the docker container is using docker network between containers only, then the MAC of the container matters (but I've not seen where anyone should care about the container's MAC anyhow...) |
@mschwartz I don't think its fair to say "Clearly/Obviously" as testified by the fact that other people have made this mistake too, If you are new to Docker as I was, having a container in bridge mode and seeing it have a MAC address I believed that was the MAC to use, it was only trial and error that identified my mistake. |
I left an explanation for the next people to have the issue so they understand why. It should help with future additions to your set up as you expand it. |
Yeah that makes sense @mschwartz. Thanks for the technical explanation. I think what messed me up really was that I was using my router to find the MAC address and it was only showing me the docker MAC. I had to find the pi MAC address somewhere else. |
If you don't mind some more technical information... I turned off dhcp in my router and set up dnsmasq on one of the computers on my LAN. The dnsmasq server does both DHCP and DNS. Since doing this and having DHCP/dnsmasq set DNS server for everything on my LAN to my dnsmasq server, my web browsing and other network activity is much much faster. There's quite a lag, in general, if you're doing DNS lookup over the internet all the time. It's also a lot cleaner than editing your /etc/hosts file on all your computers to have symbolic name to IP address lookup for your LAN. I have three tips that may help someone. First, I set my NETMASK to 255.255.0.0. Most people probably just use up to 254 IP addresses for their LAN. This NETMASK allows you to use any IP address in the 192.168.. range. That is, 192.168.0., 192.168.1., 192.168.2.*, and so on. You now have 65536 IP addresses to assign as you see fit. Second, I set up dnsmasq to assign a static IP to absolutely every device that's normally in my home. That includes my TVs, my harmony hubs, the TiVo DVRs and set top boxes, my phones and tablets, my SmartThings hub... EVERY device! Third, in order to have a lot of flexibility to adding devices of a particular type (home theater, mobile devices, etc.), I assign a block of 255 IPs to the categories:
|
Hello, After like...48 hours of configurations, i'm very new to HA, finally, i was able to get it working ST -> HA but not the other way around, in my IDE the MAC there is the PIs, im not using docker... if i change a light state its reflected on HA but not the other way around... any help is appreciated. |
anyone? |
Has something in either the smartthings code, or the mqtt bridge code changed to cause MQTT messages to SmartThings to stop working? I had this going for months without any issues, just last week I noticed none of my mqtt based temperature sensors were working. I see all the messages from smartthings to MQTT working fine, but nothing going back. Have been using a raspberry pi 3, also tried wiping the SD card and starting from scratch, same result every time. Any ideas?
The text was updated successfully, but these errors were encountered: