Skip to content

A Node.JS application that allows you to trigger external webhooks from your Logitech Harmony Hub and compatible remotes.

License

Notifications You must be signed in to change notification settings

marceskenazi/harmony-span

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HarmonySpan

a Node.JS application that allows you to trigger webhooks and issue MQTT-messages directly from a Logitech Harmony Hub and compatible remote.

Quick Setup

Have your Harmony Remote (or Hub), a MicroUSB cable, and the MyHarmony desktop software ready. Compatibility issues are currently being investigated with the Mobile app. Your mileage may vary.

Download the latest binaries for your platform (HarmonySpan currently has pre-built binaries for Windows, macOS, and Linux available at https://github.com/AShifter/harmony-span/releases/).

Run the executable you downloaded - if you get any popups asking for firewall permission in Windows, check both Private and Public networks permission. HarmonySpan will automatically find your first suitable network adapter.

Windows Defender Firewall Notification

On Linux/macOS machines you might have to run chmod +x ./HarmonySpan_<PLATFORM>_x64 on the binary itself to enable the executable flag for that file.

Connect your Harmony Remote (or Hub if you don't have a remote with a MicroUSB port, like the Companion or Smart Control remotes) to your PC running the MyHarmony Software and scan for SSDP devices;

MyHarmony Desktop Software, Scan for devices

a Roku device with the serial number HARMONY-FREEDOM should appear - this is your HarmonySpan server. Add it to your remote and make sure you sync over USB. After this step, you can sync wirelessly. You only need to sync over USB when you're initally adding HarmonySpan.

MyHarmony Desktop Software, Harmony Span appearing

Unplug your remote and go to the Devices menu. HarmonySpan should appear - enter the HarmonySpan device and try pressing some buttons. You should see feedback in the terminal showing what buttons you're pressing.

Terminal Feedback from HarmonySpan

Navigate to the HarmonySpan Configuration Utility page on your local network to start setting up HarmonySpan.

HarmonySpan Configuration Utility

For simple IFTTT webhooks, just paste the webhook URL in the URL field for each button you want to attach to a webhook, and press the Submit Settings button - HarmonySpan will automatically apply the new configuration without the need for a restart.

To get IFTTT URLs and control your smart home devices, this video by Robert Cowan at https://youtu.be/XxH1q2Tcdis?t=573 (should begin at 9 minutes 33 seconds) will help you get started.

In the Advanced Options menu (orange button), you can also add a body and header to the request if you want to talk directly to the API for things like LIFX bulbs. The query string is sent as the request body, and header as the request header. If you're not sure what this does, don't use it.

At this point you can do whatever you want with the buttons - To make your lights turn on and off when you play and pause a movie, just add the HarmonySpan buttons that are linked to your 'lights on' and 'lights off' webhook URLs with the Pause and Play buttons on the activity you use to watch a movie. For more information, check Logitech's documentation on creating button sequences. https://support.myharmony.com/en-es/creating-button-sequences

Click the Submit Settings button once you fill in all of the fields for the button you're working with. Switching buttons without submitting your changes will delete the new values you put in for the first button.

How It Works

Logitech allows you to control 'IP devices' over your local network (think Roku, NVIDIA SHIELD, Apple TV) rather than controlling them with IR. This works because each device broadcasts to a local Simple Service Discovery Protocol (SSDP) IP (239.255.255.250, chances are you can see traffic on it in your network with Wireshark) to let other devices in the network know that they can be controlled.

HarmonySpan broadcasts SSDP messages as if it were a Roku device with External Control Protocol (ECP) support - this is how it's possible to add HarmonySpan to your Harmony Hub. The Harmony Hub sends ECP commands to a regular Roku to control it - but in HarmonySpan, we take those ECP commands, watch when they're triggered, and in turn trigger a webhook. This solution doesn't require a bluetooth keyboard or any special hardware emulation - we're talking over HTTP the whole way.

See it in action

TwoGuyzTech // Control ANYTHING with your Logitech Harmony remote! | Trigger Webhooks from Sequences https://www.youtube.com/watch?v=W59Ae5jUl2w

Build Montage // DIM & BRIGHTEN Your Cinema Lights With PAUSE & PLAY In Your Home Theater! https://www.youtube.com/watch?v=Gqjma5_ZAYo

About

A Node.JS application that allows you to trigger external webhooks from your Logitech Harmony Hub and compatible remotes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 94.6%
  • HTML 3.8%
  • CSS 1.6%