OpenWonderLabs / SwitchBotAPI

SwitchBot Open API Documents
868 stars 71 forks source link

Add more standard remote button commands to the API documentation #39

Open AdyRock opened 3 years ago

AdyRock commented 3 years ago

Is your feature request related to a problem? Please describe.

he API documentation only provides the command message for a few of the built in buttons. Could the rest be added to the document.

Describe the solution you'd like

What is the command for the INPUT button, the up / down / left / right arrows, the home button. etc.

Describe alternatives you've considered

Hacking random guesses

Additional context

When trying to add commands to control remote devices, it is time consuming to try and guess what the commands might be.

github-actions[bot] commented 3 years ago

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.

AdyRock commented 3 years ago

Hope someone will look at this

DavidCPreston commented 3 years ago

Late to the party :-). I've already written a Windows desktop app to access my smart meters so it didn't take much tweaking to add in the Switchbot stuff. Whilst the API initially looked good I now realise how limited it is. I am assuming the best way is to supply feedback through the app, and possibly raise issues on here? Is there somewhere else that people discuss the API and all things Switchbot, or is this the best?

But on the topic of this thread, I can't believe there isn't any reference for the button names; ideally there would be a call to return all of the /commands supported for a device (tried and got Forbidden error) BUT surely someone must know the button names? Has anyone found ones that aren't noted in the API and can add them here, or any way of finding them?

Not API but related - Why is there no "0" button, many of the channels I watch have a 0, am I missing something? I tried to use another virtual button and learn it but it doesn't respond when I press 0

AdyRock commented 3 years ago

Not API but related - Why is there no "0" button, many of the channels I watch have a 0, am I missing something? I tried to use another virtual button and learn it but it doesn't respond when I press 0

I have reported this one about 2 months ago and was told it would be added, but no idea when.

DavidCPreston commented 3 years ago

Not API but related - Why is there no "0" button, many of the channels I watch have a 0, am I missing something? I tried to use another virtual button and learn it but it doesn't respond when I press 0

I have reported this one about 2 months ago and was told it would be added, but no idea when.

I thought maybe it was just for my LG TV, it is an odd one

AdyRock commented 3 years ago

Not API but related - Why is there no "0" button, many of the channels I watch have a 0, am I missing something? I tried to use another virtual button and learn it but it doesn't respond when I press 0

I have reported this one about 2 months ago and was told it would be added, but no idea when.

I thought maybe it was just for my LG TV, it is an odd one

Nope, it's for everything :-( There is also a problem with sending 3 digit channel numbers as the device will often get the first two and then the last one as a separate command.

DavidCPreston commented 3 years ago

Not API but related - Why is there no "0" button, many of the channels I watch have a 0, am I missing something? I tried to use another virtual button and learn it but it doesn't respond when I press 0

I have reported this one about 2 months ago and was told it would be added, but no idea when.

I thought maybe it was just for my LG TV, it is an odd one

Nope, it's for everything :-( There is also a problem with sending 3 digit channel numbers as the device will often get the first two and then the last one as a separate command.

I was testing the custom buttons and found that sending the command 15 sends 1, 17 sends 2........ 35 sends 0!

DavidCPreston commented 3 years ago

Okay, the following numbers return success when sent as button name for a customised button. I have an LG TV and used Remote 2 of 10 with no customisation:- <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">

Command | Button Press -- | -- 1 | Volume- 3 | Channel+ 5 | Settings side menu 7 | Channel- 9 | Volume+ 11 | Power 13 | Mute 15 | 1 17 | 2 19 | 3 21 | 4 23 | 5 25 | 6 27 | 7 29 | 8 31 | 9 35 | 0 41 | OK 43 | Up 45 | Left 47 | Right 49 | Down

DavidCPreston commented 3 years ago

I've added all of the buttons with numbers that work for my LG TV to my Smart Meter app, as I want the temperature data with the energy usage. It's not pretty but it's enough to test it. I was hoping the API would give cloud data but it seems not, I've submitted a request. I run my app as a scheduled task daily to extract meter reading data; I will change this to run each daylight hour to get the temperature readings until/unless we get access to cloud data. image

iBlz commented 2 years ago

soo does anyone know the answer for this, what is the up/down/left/right arrow called