BobRak / OpenHAB-Smartthings

53 stars 54 forks source link

Cannot update switch state from openhab #60

Closed fedgers closed 5 years ago

fedgers commented 5 years ago

Odd issue in that smartthings is able to send updates to openhab but not the other way around.

I'm running openhab in a docker container. Everything else works fine.

When running a command through the openhab console: smarthome:send KitchenLightsOutlet ON There is a matching JSON POST and 202 response code in the logs indicating that everything seems to be wired up okay. Even checking on the status through openhab shows the correct state of the switch but not in smartthings.

Double-checked the .things, .items and .rules to make sure it is all okay and everything seems fine.

fedgers commented 5 years ago

Found the issue!

When using a Docker container the MAC address to supply in the app setup needs to be the one for the host (i.e. my laptop's NIC), not the container MAC address. As soon as I fixed that everything worked great.

Leaving this here so if someone else stumbles across the same issue there's a quick solution.

Bob - this stuff is great, thanks!