stjohnjohnson / smartthings-mqtt-bridge

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

MQTT Bridge message with a statusCode of 400 #197

Closed ratsputin closed 5 years ago

ratsputin commented 5 years ago

Every 15 minutes, I'm logging the following event in the SmartThings MQTT Bridge Device Handler events list:

{"error":"Bad Request","message":"child \"body\" fails because [child \"value\" fails because [\"value\" must be a string]]","statusCode":400}

Everything else is working fine. Can I get some guidance as to where to start troubleshooting this?

I'm mainly pursuing this because I have an issue with my GoControl Smart Garage Door Controller. I'm not getting status updates until there's an actual event even though the polling interval is ~30 minutes. This leaves it in an unknown state and unable to be controlled in Home Assistant until the door is opened/closed.

grewhit25 commented 5 years ago

Have you looked at the new Smartthings integration on Home-Assistant? Not sure if your specific sensor has been implemented yet but still worth having a look.

ratsputin commented 5 years ago

Yeah. Having to open my firewall to allow a connection from the Internet to a minimally secured Linux box running multiple unknown, open-source components that control access to the house as well as the alarm system is a deal-breaker.

I'm a security architect, so I'm a bit on the paranoid side. :)

andrewsayre commented 5 years ago

@ratsputin well I wouldn't suggest doing that.. throw it behind something like nginx with mod_security and only expose the webhook for smartthings. I can give you the specs if you want to lock it down as much as possible. Also the push updates are digitally signed & validated by the integration. I think that gets down to an acceptable level of risk?

ratsputin commented 5 years ago

It looks like the bridge is no longer necessary with 0.90 as an open port isn't a requirement anymore. I'm going to reconfigure everything to go that route and see how things perform.