rudders / homebridge-http

HTTP Plugin for Homebridge
Apache License 2.0
178 stars 109 forks source link

What sorts of commands/accesories does this create?-IRKIT #21

Closed AppleTechy closed 8 years ago

AppleTechy commented 8 years ago

Does it allow you to create a light that triggers it to change to a set channel number? Just trying to figure out if those will be better at doing what I want than the Harmony Hub.

rudders commented 8 years ago

Not sure I understand your use-case AppleTechy.

It's essentially just on/off/brightness - but each of these just calls the specified URL so you could use it for anything - but to HomeKit it's just a switch or a light.

AppleTechy commented 8 years ago

@rudders It was directed toward the IRKit plugin in which I guess was a fork of the http plugin. Little confused on why there isn't a separate Github page for it. It is for @senyoltw IRkit plugin.

AppleTechy commented 8 years ago

@rudders It doesn't seem to be maintained at very well. Is there anyway I can merge the IRKIt fork and the newest version of the homebridge-http software into a brand new Github page and then reload it into NPM. It would be kind of weird as I don't actually have an IRKIT I am just interested in possibly buying on

rudders commented 8 years ago

@senyoltw would need to allow issues on the forked repository via repository settings - hopefully she'll/he'll pick it up here.

rudders commented 8 years ago

About to release a new version of http which could create a few conflicts.

Expect it would be a manual job to convert the new http plugin to work with IRkit but as you have a working model from @senyoltw then it shouldn't be too hard I expect.

NovaGL commented 8 years ago

Looking through the source it only supports on and off commands via IRKit. See below for the fields that are required.

So if you want to do more than that you are out of luck.

As additional services require clientkey and deviceid which aren't included as options in the repo

Format - Raw

Freq It represents the sub- carrier frequency of the infrared signal . 38 or 40 only . Unit [kHz]

Data - Infrared signal consists of turning on and off of the sub-carrier frequency . IRKit device the time between on → off , you count the time between off → on at 2MHz counter . The data, list the number of times of turning on and off a number counted by the counter .

AppleTechy commented 8 years ago

@NovaGL Do you have an IRKIT? Can you string commands together to turn on the TV along with the reciever and Cable Box?

NovaGL commented 8 years ago

I do not have an IRKit, I have a Harmony Hub.

You could combine things, but they would have to be separate commands and made as a scene in your app of choice such as Eve.

Does Homebridge-IRKit actually work? It looks like it's missing some elements.

Eg

{ "accessory": "IRKit", "name": "TV, "irkit_url": "http://irkitxxxxx.local/messages", "on_form": {"format":"raw","freq":38,"data":[18031,8755,1190,1190,1190,3341,1190,3341,1190,3341,1190,1190,1190,3341,1190,3341,1190,3341,1190,3341,1190,3341,1190,3341,1190,1190,1190,1190,1190,1190,1190,1190,1190,3341,1190,3341,1190,1190,1190,3341,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,3341,1190,3341,1190,3341,1190,3341,1190,3341,1190,65535,0,9379,18031,4400,1190]}, "off_form": {"format":"raw","freq":38,"data":[18031,8755,1190,1190,1190,3341,1190,3341,1190,3341,1190,1190,1190,3341,1190,3341,1190,3341,1190,3341,1190,3341,1190,3341,1190,1190,1190,1190,1190,1190,1190,1190,1190,3341,1190,3341,1190,1190,1190,3341,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,3341,1190,3341,1190,3341,1190,3341,1190,3341,1190,65535,0,9379,18031,4400,1190]} }

{ "accessory": "IRKit", "name": "Set top Box, "irkit_url": "http://irkitxxxxx.local/messages", "on_form": {"format":"raw","freq":38,"data":[18031,8755,1190,1190,1190,3341,1190,3341,1190,3341,1190,1190,1190,3341,1190,3341,1190,3341,1190,3341,1190,3341,1190,3341,1190,1190,1190,1190,1190,1190,1190,1190,1190,3341,1190,3341,1190,1190,1190,3341,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,3341,1190,3341,1190,3341,1190,3341,1190,3341,1190,65535,0,9379,18031,4400,1190]}, "off_form": {"format":"raw","freq":38,"data":[18031,8755,1190,1190,1190,3341,1190,3341,1190,3341,1190,1190,1190,3341,1190,3341,1190,3341,1190,3341,1190,3341,1190,3341,1190,1190,1190,1190,1190,1190,1190,1190,1190,3341,1190,3341,1190,1190,1190,3341,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,3341,1190,3341,1190,3341,1190,3341,1190,3341,1190,65535,0,9379,18031,4400,1190]} }

AppleTechy commented 8 years ago

@NovaGL IDk @payote has one but I don't think it works very well. IRKIT looks pretty sketchy in design but if it work it works. I currently have a harmony hub buy can't figure out how to get multiple activities to have different starting channels. Have you been able to do that?

NovaGL commented 8 years ago

Starting channel is setup through the harmony app, just choose the menu item starting channel.

Alternatively you do the same as above you set it up as two devices and create a scene.

AppleTechy commented 8 years ago

@NovaGL I tried using the starting channel menu but it while only let me set a starting channel for one activity. Then when I set the next one it deletes the previously saved starting channel for a different activity. Have you had that occur?

NovaGL commented 8 years ago

I don't really use starting channels, but couldn't you add extra button presses after the command starts.

AppleTechy commented 8 years ago

@NovaGL I had been wanting to use it so I could say to siri "Turn on the News" (News= an activity in harmony hub) This then turns on the tv, reciever, and cable box. And then it also turns on the News channel. I was trying to make 5 such activities so I could make voice commands for "turn on the history channel", "turn on the discovery channel", "turn on the Food Network", "turn on the News". If that makes any since

NovaGL commented 8 years ago

Like I said I create two devices, one called Turn on tv and the other called news, then I create a scene called turn on news which switches the tv on and pushes the button for the news channel.

AppleTechy commented 8 years ago

But There isn't that level of control with harmony hub plugin. You can only create buttons's based of activities. So that wouldn't work unless you know a secret trick or something that I missed? @novagl

On Sunday, February 7, 2016, NovaGL notifications@github.com wrote:

Like I said I create two devices, one called Turn on tv and the other called news, then I create a scene called turn on news which switches the tv on and pushes the button for the news channel.

— Reply to this email directly or view it on GitHub https://github.com/rudders/homebridge-http/issues/21#issuecomment-181204673 .

NovaGL commented 8 years ago

I do actually, it's called build your own :)

The below might be a bit confusing but is outside the scope of this repo, if you have any questions on how my app works create an issue on my repo.

I use homebridge-cmd with my fork of a harmony app

I have compiled versions for PC, ARM and MAC look in the releases folder

To get the IDs required you would run the app with a command like this

HarmonyHubControl.exe 192.168.0.XXX list_activities

Grab the one you want and put in the config HarmonyHubControl.exe 192.168.0.XXX start_activity xxx

So the config would look something like this

Turn activity on or off

{ "accessory": "CMD", "name": "TV", "on_cmd": "/harmonyhub/Harmony HARMONY_IP start_activity TV-DEVICE-ID", "off_cmd": "/harmonyhub/Harmony HARMONY_IP start_activity -1" }

To send a device command would be much the same.

HarmonyHubControl.exe 192.168.0.XXX list_devices

Grab the ID you want and do HarmonyHubControl.exe 192.168.0.XXX issue_device_command TV-DEVICE-ID 6 0 1

{ "accessory": "CMD", "name": "NEWS", "on_cmd": "/harmonyhub/Harmony HARMONY_IP issue_device_command TV-DEVICE-ID 6 0 1", "off_cmd": "/harmonyhub/Harmony HARMONY_IP issue_device_command TV-DEVICE-ID 6 0 1" }

payote commented 8 years ago

I've been trying to figure out whether or not it's possible to string IR commands using IRKit - either introducing a pause between strings of IR codes, or simply grouping them into one long string.

The plugin only seems to support the on or off states - and I suppose I could create multiple entries in the config to support more than one button, but haven't had time to try it.

In my trials, the IRKit plugin is spotty at best in sending the commands, but sending the same command via Terminal is instant.

NovaGL commented 8 years ago

This is getting further off-topic but I have a PHP script that allows multiple CURL functions, so you could string them together to get what you want.

I feel that the IRKit plugin is not well made and you would be better suited to using the homebridge-cmd plugin.

payote commented 8 years ago

@NovaGL - that sound more like what I was hoping to achieve. I'm relegated the IRKit hardware to turning some flameless LED candles on and off. I'm going to take a look at the cmd plugin. Thanks.