Announcement

Collapse
No announcement yet.

Control devices via Harmony

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Control devices via Harmony

    Hi all. I found a very cool little node.js program that someone put up on GitHub (https://github.com/AShifter/harmony-span) that essentially creates an emulated Roku device on your network which you add to your Harmony remote. The emulated device then accepts the commands from the Harmony device and sends out wekhook information to control devices. I found a lot of information around this for IFTTT but I am struggling with getting the Wekhook info formatted correctly to send the JSON commands back to Homeseer.

    This is how the information is formatted within the Harmony Span config file:

    {"label":"New Integration","url":"http://localhost/","requesttype":"POST","header":"{}","query":"{}"} --This is how it looks with no info

    {"label":"Lights On","url":"http://x.x.x.x/JSON?request=controldevicebyvalue","requesttype":"GET","head er":"{}","query":"{}"} --This is how it formats the JSON command that is listed below

    and this is the actual working JSON command for my HS instance:

    http://x.x.x.x/JSON?request=controld...f=34&value=255

    As you can see, the config file is dropping parts of the command and honestly, I lack the understanding of webhooks to understand how to breakdown the JSON command into its pieces so that I put the proper information into the URL, header and query sections of the config lines.

    Any thoughts would be greatly appreciated!

    #2
    So following up on this, I was not able to get the JSON commands to format correctly, so I reverted to using IFTTT commands which work great. I am still having troubles getting the Node.js app to send the http requests out, but I have the webhooks for IFTTT setup correctly.

    If I figure it out I will put a note in here for anyone else that wants to try this out.

    Comment


      #3
      OK, last post. I was able to get everything working correctly by using the source code for the latest version. Whether on Windows or Linux you can create a git clone of the repository I linked above, then install npm and node on your system. Once done within the directory that you unzip the source run "npm install" then from within that same directory simply run node harmony-span.js Once you have it running you can paste webhook commands using an HTTP GET using either properly formatted Homeseer JSON commands or an IFTTT webhook. I have put these various commands in place and then followed the instructions on the page above to add the emulated Roku to my Harmony activity. I can now control various Homeseer devices and run various events directly from the Harmony remote.

      It is very slick once it is setup. Feel free to reach out if you need a hand getting it going.

      Comment

      Working...
      X