Closed bakman2 closed 4 years ago
Hi,
I am able to add a Television accessory and can turn it on/off.
How did you add it?
Topic: ? Payload: ?
Note: please copy the JSON message, do not use images.
This is what I inject from a function node:
a = "homebridge/to/add"
s = "homebridge/to/add/service"
// television
payload = {}
payload.name = "tv"
payload.service_name = "Panasonic"
payload.service = "Television"
c = {}
c.ConfiguredName = "Panasonic"
c.SleepDiscoveryMode = 1
c.Brightness = 30
c.PowerModeSelection = 0
c.RemoteKey = { "minValue": 0, "maxValue": 16}
payload.Characteristics = c
node.send({topic:a, payload})
// add as services:
payload = {}
payload.name = "tv"
payload.service_name = "Apple TV"
payload.service = "InputSource"
payload.Identifier = 1
c = {}
c.ConfiguredName = "Apple TV"
c.InputSourceType = 3
c.IsConfigured = 1
c.CurrentVisibilityState = 0
c.TargetVisibilityState = 0
payload.Characteristics = c
node.send({topic:s, payload})
payload = {}
payload.name = "tv"
payload.service_name = "Plex"
payload.service = "InputSource"
payload.Identifier = 2
c = {}
c.ConfiguredName = "Plex"
c.InputSourceType = 3
c.IsConfigured = 1
c.CurrentVisibilityState = 0
c.TargetVisibilityState = 0
payload.Characteristics = c
node.send({topic:s, payload})
(this is all based on the hap nodejs, trying to reverse engineer the correct way to describe the characteristics.)
As far as I know there is no Television service.
See: https://github.com/homebridge/HAP-NodeJS/blob/master/src/lib/gen/HomeKit.ts
The services in that file HomeKit.ts
are the only services supported.
There are separate files for television (among others), they do seem to work as the screenshot above shows.
https://github.com/homebridge/HAP-NodeJS/tree/master/src/lib/gen
Okey, I have to investigate, never used these files.
I have tried to add the services without success. Just now I'm working on other projects, maybe you can get help from the homebridge team or have a look at other tv-plugins.
I managed to get it working with homebridge, but i'm not impressed so I will give up on it ;)
I am able to add a Television accessory and can turn it on/off. I am able to add InputSource(s) as services to the Television, but when I do this the Television icon disappears.
Do you have some guidance on how to implement the inputSource(Types) with homebridge-mqtt ? Is this even possible ? (I am using node-red).