MarkAdamson / home-assistant-plugin-for-tasker

Home Assistant plugin for Tasker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature Request] WebSocket Support

dale3h opened this issue · comments

Home Assistant has a very stable and easy-to-use WebSocket API that would allow this plugin to fire Tasker events based on state changes and/or other Home Assistant events.

The WebSocket API also implements features to call services, fetch state(s) on demand, fetch configuration, fetch services, fetch camera thumbnails, and much more. The only feature that this plugin currently has that is not supported by the WebSocket API is rendering templates.

https://developers.home-assistant.io/docs/en/external_api_websocket.html

A quick Google search turned up this Android library for implementing WebSockets: https://github.com/koush/AndroidAsync#can-also-create-web-sockets

I did consider this early on when writing the plugin. An early planned feature was Tasker Conditions (#1), which would necessarily rely on the websocket API (if it was going to be of any use).

I decided against it, for the reasons outlined on that issue.

I'm not categorically against the idea - I certainly would use it, if it avoided the potential problems I've noted. I'd consider any pull requests. But I'm not willing to put the time in myself, I'm afraid, when I've already found an alternative that works for me.