staromeste / homebridge-http-advanced-accessory

Supports all devices on HomeBridge Platform / Bridges devices to http
Apache License 2.0
65 stars 22 forks source link

One-way device handling #16

Open radiocolin opened 4 years ago

radiocolin commented 4 years ago

I added a line to create a television service, since the underlying framework has added support for it: case "Television": newService = new Service.Television(this.name); break;

By stepping through debug, I'm able to figure out all the required properties as I open the device in HomeKit (and see where it crashes).

I'm hitting a wall in that the device I'm talking to is one-way stateless... it can receive button press commands but has no method of reporting a status back to me.

Is there any way to map a static response for each of the required getWhatevers?

Eg:

                "getActiveIdentifier":{
                    "url":null
                },

This sort-of works, but pumps out a lot of errors in the console, and tells HomeKit the device is unresponsive. I'd just like to always have a static "1" returned for this get event.

staromeste commented 4 years ago

No, but a workaround would be to call an echo service on the internet like postal-echo: https://postman-echo.com/get?foo1=bar1&foo2=bar2

And map a static value to report or you can report the value you previously sent using the placeholders described in the documentation.

Guido

Il giorno 3 dic 2019, alle ore 04:50, Colin Weir notifications@github.com ha scritto:

 I added a line to create a television service in my config. By stepping through debug, I'm able to figure out all the required properties as I open the device in HomeKit.

However, I'm hitting a wall in that the device I'm talking to is one-way stateless... it can receive button press commands but has no method of reporting a status back to me.

Is there any way to map a static response for each of the required getWhatevers?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.