logantgt / harmony-span

A Node.JS application that allows you to trigger external webhooks from your Logitech Harmony Hub and compatible remotes.
MIT License
27 stars 14 forks source link

Not Working - Please Check My Work Flow! #31

Open Trevorwelton opened 3 years ago

Trevorwelton commented 3 years ago

Hi- I've spent the last 3 hours working on this to no avail. I think I'm close, but I can't get it to work. The instructions are simply not clear/descriptive enough. I think some more details for the uninitiated would be really helpful. The video linked was from over 3 years ago and the IFTTT website has changed.

Here is what I have done -please point out my errors or omissions!

Signed in to IFTTT Under "If this" I chose "Webhooks" and selected "Receive a Web Request" and created my event name "Play_Lights_Off" then created the trigger. Under "then that" I selected Lutron Caseta and selected "set light level" then chose my lights and the light level followed by selecting "Create Action" and finished and connected it. I then used the weblink shown in the video to navigate to the Webhooks setting page where I found my unique URL (could not find this any other way). I added just the key to the Webhook URL (http://localhost/MYKEY) in the HarmonySpan Configuration Utility and submitted and this didn't work. I then tried copying and pasting the entire URL from Webhooks into the URL line (replacing the http://localhost) and this didn't work either. Yes, I synced each time.

I'm not clear if there is more work to be done in the Harmony app to setup the assignment for the buttons. I checked and the pause and play buttons are assigned to Roku Streaming Stick+, so it didn't seem like I needed to do anything else. In terms of creating a sequence, the Roku Stream Stick+ did not show up under the optional devices when trying to "add a step".

Some help here would be really appreciated. Also WAY more clear, step by step instructions would be helpful. There are a lot of gaps in the present instructions.

bikerapn commented 3 years ago

Hi - I'm just learning this myself but I think the Webhook URL you are using is incorrect. If you look at the "Documentation" for the Webhook service on IFTTT - the same place where you see your personal key - right below your key is the syntax for the Webhook URL. It's of the form: https://maker.ifttt.com/trigger/event/with/key/your_personal_key. Replace "event" with the name of the IFTTT applet you created and "your_personal_key" with your private key as provided by IFTTT and then enter that as your Webhook URL in HarmonySpan. You should be able to see what's happening in the HarmonySpan "window" that needs to be running on your PC (assuming it's a Windows PC) - it should show the key that it senses has been pressed as well as what it posts to IFTTT. Good luck ...

Trevorwelton commented 3 years ago

Ok, thanks so much! I've made that step, now I'm not clear on what, if anything, I'm supposed to do in the Harmony app? Am I supposed to add the Roku device to the Activity? Need to set buttons to anything specific?

Another point on confusion - can I have two settings assigned to the same button (Play)?

Pretty big gaps in the instructions.

bikerapn commented 3 years ago

Hi - Glad you got that. So - with regard to your remote, in the HarmonySpan configuration, you've assigned an IFTTT webhook to "buttons" in the HarmonySpan device. Now, on your remote, you can go to HarmonySpan device and press the buttons you've assigned and you should see your actions occur. If that looks good, then, yes, you include the HarmonySpan device in your activities and then you can either assign a HarmonySpan button to a button in the activity or you can assign a sequence that's made of other device actions as well as HarmonySpan actions and that's what's so powerful. In my case, I have Hue lights in my home theater. My process of "dimming" is to go through a set of scenes that first turn off lights at the front, dim the remaining lights, change their color, and eventually turn then off while adjusting floor lighting that's controlled by a z-wave switch. Each Hue scene and floor lighting setting is a Harmony activity which I previously had to execute manually by pressing soft buttons on my Harmony screen that I created. Now, I'm able to use IFTTT to trigger each of those Harmony activities by assigning each one to a HarmonySpan button. and creating the webhook Then in my activity I assigned a sequence to a "long press" of the play button that executes the "play" button of my video device (ie, UHD player), then executes my HarmonyActivity Dim 1, followed by HarmonyActivity Dim2 and so on. I have a delay also between each step. Now I simply long press the "play" button on my remote and it executes that whole sequence with no intervention. That's something I've wanted to be able to do for a long long time.

As for your question on multiple button assignments - I assume you mean on the remote and you should be able to assign an action or sequence to a "short press" and a "long press" of that button on the remote - so in my example above, a short press of "play" is the simply the standard action for "play" and the long press is the sequence I mentioned. The Harmony app will let you create and assign the sequence if needed. I'm not sure if that's available on all Harmony models but I have the Ultra, Elite, and Pro 2400 and each of those allows that. If you meant, can you assign multiple actions to a single button press, the answer there is yes as well and that's when you'd use a button sequence. I hope this helps.

Cheers.

Trevorwelton commented 3 years ago

Thank you so much, once again Bikerapn!

So I was able to test my webhook for powering on my lights through IFTTT (where I found my key), so I knew the webhook worked!

I then had to figure out the next steps, which I have recorded here in more detail to help any others that may struggle with the instructions: 1) You need to register with IFTTT and select the "If this" button and search for webhooks to create your webhook name. Next, go to the "Then That" button and search for the IOT aware device in your house - in my case it was the Lutron Caseta Hub. Now you should have your webhooks created. The video in the instructions was a little bit helpful, but left out a few steps! 2) To get your Webhook URL, you need to go to the Documentation tab on the Webhooks page (that shows your list of webhooks on IFTTT). 3) You can type your webhook name into the {event} box then "Test It". It should trigger the event. If not something is wrong. 4) Once you have the webhook tested, copy and paste the entire URL (with the event name in place) into the Configuration Utility along w the webhook name and press "submit". This will program your HarmonySpan "button" that you select from the drop down menu. 5) Now you need to navigate to your existing activity on the Harmony phone app that you want to run this event - say "Watch a Movie" and you'll need to re-run the activity to be able to ADD the HarmonySpan device or Roku Streaming Stick+ device to the list of devices associated with this activity. This is critical. 6) Now you can go to button customization in the activity, select the remote button you want associated with the HarmonySpan "button" (in this case pause or play and short or long press) and create a new Sequence that includes the Roku Streaming Stick + device and the "button" you assigned to it in the Configuration Tool in Step 1 of the sequence set up and the associated button on the remote (they may NOT and don't have to be the same!) in Step 2 of the sequence set up. Navigate to the right and select this Sequence to add it to the activity.

This should be it!

tbuck410 commented 3 years ago

"Next, go to the "Then That" button and search for the IOT aware device in your house - in my case it was the Lutron Caseta Hub" My light controller is Universal Devices and that is not listed as a then option. Can I still do this 'play, light dim' sequence?