Skip to content
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

Support POSTing to endpoints that accept PUT commands #48

Closed
fireboy1919 opened this issue Apr 13, 2017 · 6 comments
Closed

Support POSTing to endpoints that accept PUT commands #48

fireboy1919 opened this issue Apr 13, 2017 · 6 comments
Milestone

Comments

@fireboy1919
Copy link

I have written an integration for this project that works with this project over here: https://github.com/fireboy1919/MiThings

And it works! Works great, actually. Unfortunately, though, Smartthings hub is super buggy, and I had to modify one thing.

Specifically, Smartthings doesn't support PUT requests. I don't know why. Same exact command as post, but with a different verb, and it doesn't go out. I have a bug request in and will be ready if they ever decide to fix it.

In the meantime, I added an extra line to my compiled version of this project to support POST requests for sending bulb commands. Seems to work fine.

How would you feel about adding or changing that command to a POST rather than a PUT?

@sidoh
Copy link
Owner

sidoh commented Apr 13, 2017

I think I've used PUT with SmartThings before. Is the issue that HubAction doesn't support it?

PUT feels like the "right" HTTP verb given the behavior. I'm not opposed to adding POST, but I'd prefer not to replace PUT.

@fireboy1919
Copy link
Author

I agree that it is the right verb. Yes, the issue is that HubAction doesn't go out at all when used with PUT.

I've tried it on both the device and smart apps; same problem. HubAction is GET or POST only right now.

@sidoh
Copy link
Owner

sidoh commented Apr 13, 2017

Gotcha, makes sense. I've been pretty unimpressed with HubAction :(

Adding support for POST in existing PUT routes sounds fine to me.

@fireboy1919
Copy link
Author

Oh, and btw, this is the only working Smartthings integration with Milight. The other one was designed to use an external internet service, and the guy who wrote it shut it down.

@sidoh
Copy link
Owner

sidoh commented Apr 13, 2017

I use Milight stuff with SmartThings as well with my ha_gateway project.

@sidoh
Copy link
Owner

sidoh commented Apr 14, 2017

Added support for POST with c15ee92. Will be released with v1.2.0. Wrapping up a couple of features before releasing. Released 1.2.0-dev4 with this feature.

@sidoh sidoh added this to the 1.2.0 milestone Apr 15, 2017
@sidoh sidoh changed the title Integration with Smartthings Support POSTing to endpoints that accept PUT commands Apr 21, 2017
@sidoh sidoh closed this as completed Apr 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants