YIO-Remote / remote-software

💎 YIO Remote Software repository
GNU General Public License v3.0
164 stars 21 forks source link

webhook action (basic feature) #439

Closed newatschoen closed 2 years ago

newatschoen commented 4 years ago

dear all,

it would be great to implement asap a webhook function, because you can use it for more or less everything in a smart home world....

e.g. create an action "Sonos on" and send a "http get" url from the remote to the smart home system...

This has the advantage to directly support countless unsupported systems :)

and nearly everybody can use directly this nice yio remote

Shepless commented 4 years ago

Nice idea @newatschoen I guess we would need to figure out a generic message structure that can communicate all of the various events/actions the remote does, I think that will be the trickiest part.

newatschoen commented 4 years ago

thx @Shepless :)

zehnm commented 4 years ago

@newatschoen Please provide more details about the desired functionality. Would you only like outgoing http requests, e.g. pressing a button on the remote triggers a REST call?

One simple way would be to map the remote entity to REST calls:

If you envision something else, then please describe it as detailed as possible, since a webhook can be anything ;-)

newatschoen commented 4 years ago

@zehnm hi markus - I think this will be finde and "enough" for the beginning :)

So maybe something like "add a virtual button / action button" in the yio remote web ui, with an webhook action like "http get" http://ipadresse/webhook/dothemagic

newatschoen commented 4 years ago

So it could be possible to start lots of actions in a smart home system e.g. "Good night" or "TV scene" or "Arm alarm system" or "Disarm alarm system"

zehnm commented 4 years ago

I'm currently building a proof of concept. MyStrom WiFi switches are already working :-) As soon as it reaches alpha state, i.e. most important parameters are configurable and no longer hard-coded, I'll publish my repo. It might take a few days though, I have a bunch of other work at the moment.

If you have API specifications from devices you'd like to have supported, then please post them here. I'm focusing on:

newatschoen commented 4 years ago

for webhooks against homey it should be like this:

http://[homeyip]/api/manager/logic/webhook/[event]

(via http get)

zehnm commented 4 years ago

I've started the implementation: https://github.com/zehnm/integration.webhook It's currently in its early stages, but the switch entity is already working. I'll add more features and documentation. Once it's mature enough it will most likely be added to the YIO repos. Please comment here if you need specific features to support your use cases.

newatschoen commented 4 years ago

maybe it is possible to realize something like this (picture is from a habridge configuration page of webhooks) in the webconfigurator of the yio remote web ui

image

zehnm commented 4 years ago

Beta testers wanted! I've implemented a webhook integration supporting switch, blind, light and climate entities. The first test release is ready for your feedback: https://github.com/zehnm/integration.webhook There's no web-configurator support yet, the configuration needs to be done manually in config.json. The documentation is not complete yet and needs some rework, but working configuration examples are provided. Just let me know if you need help setting it up.

zehnm commented 3 years ago

Has anyone tested my beta release so far and has some feedback?