SwitchBotAPI icon indicating copy to clipboard operation
SwitchBotAPI copied to clipboard

Control led lights on hub plus

Open strunker opened this issue 4 years ago • 16 comments

Very minor but it would be kind of cool to be able to toggle the light states on\off via the API on the hub plus.

strunker avatar Dec 30 '20 17:12 strunker

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jan 09 '21 18:01 github-actions[bot]

+1

donavanbecker avatar Jan 09 '21 18:01 donavanbecker

Seconding this! That would be really nice.

RosemaryOrchard avatar Apr 01 '21 11:04 RosemaryOrchard

+1 from me.

ganlbarone avatar Apr 01 '21 11:04 ganlbarone

Would like this too!

mrlt8 avatar Apr 25 '21 03:04 mrlt8

I wouldnt hold your breath lol. I dont think they have made any updates to the API since release back in Dec. Not any that have made it into the docs they havent been updated in 4 months. I had saw in another post somewhere the dev team stated they arent really focused on the enhancements that they were focusing on some app nonsense. I thought the app, least on iOS worked well enough not sure what else they are doing there, but they definitely don't seem to be paying much mind to the API.

strunker avatar Apr 25 '21 13:04 strunker

Is there any unofficial way to control the LEDs on the hub or has anyone sniffed the packets on the official app?

mrlt8 avatar Apr 27 '21 04:04 mrlt8

I did originally. But literally like the same week they publicly released the API and I just turned more towards developing around that rather than hacking apart the app with fiddler. I have to do this quite often with my Blink cameras, because there is no official API. It becomes rather annoying to maintain when the vendor makes changes.

Perhaps here, since the changes to this product seem rather infrequent, it would be a different experience but I definitely wouldn't opt for this over official support. They should just put it in the API officially supported, they could probably implement this in like an hour since it already exists in the app.

strunker avatar Apr 27 '21 11:04 strunker

Any luck? I had a quick look, but 1) it seems like we can't control the LEDs over bluetooth and 2) remote "cloud" control seems to control the LEDs via mqtt on AWS IoT.

I wonder if this is the main reason why the LED controls have not been exposed to the API? From what I could tell, all the other commands seem to be standard http requests.

mrlt8 avatar May 16 '21 14:05 mrlt8

I'll give it a look and post back when i have some free time.

This is the type of stuff that pisses me off though. Like, in 2021 when you buy a "smart" product, it should be built from ground up around an extensible API that ANYONE can get access to. That's like half the reason to buy into these types of products.

strunker avatar May 16 '21 14:05 strunker

I spent a little time on this today. I turned off BT on my phone so that it would be forced to make wifi calls as opposed to BT. I saw no web requests fly through fiddler when controlling the light on the hub. Assuming this means that traffic is proxies, or uses some other protocol, udp maybe, or other method like a web socket, something that would not show up in fiddler. It was odd because some of the things for the hub, like when you pull its firmware information under the "more" section, does make an api call to some endpoint hosted in AWS. The actual LED control sadly does not.

strunker avatar May 16 '21 22:05 strunker

Assuming this means that traffic is proxies, or uses some other protocol, udp maybe, or other method like a web socket, something that would not show up in fiddler.

I believe it’s web socket. As I posted earlier, I could see the secure-mqtt requests being made to an AWS IoT servers on port 8883.

I might take a look at the AWS documentation and see if we can connect to it directly or maybe redirect the hub’s mqtt requests locally…?

mrlt8 avatar May 16 '21 23:05 mrlt8

I missed your comments on mqtt. And yeah sadly, Fiddler does support viewing websockets but not mqtt. I captured the LED activity in fiddler and saw no websocket data. Perhaps the below would be useful? Have not had a free moment to try it yet, but it is a proxy specifically designed for mqtt and mqtts.

https://github.com/NVISOsecurity/IOXY

strunker avatar May 17 '21 19:05 strunker

Any update or planning for new api evolution?

Hector47 avatar Sep 26 '21 14:09 Hector47

Hello, not available in api v1.1? it should have the same capability than the Color Bulb.

Hector47 avatar Dec 12 '22 16:12 Hector47

I have given up hope on improvements to this API. I actually stopped using all their products except the button pusher due to lack of proper API support. Been having a TON more fun with Govee products.

strunker avatar Dec 15 '22 07:12 strunker