Announcement

Collapse
No announcement yet.

Description: MeiHarmonyHub (Logitech Harmony Hub Monitor and Control

Collapse
This topic is closed.
X
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Description: MeiHarmonyHub (Logitech Harmony Hub Monitor and Control

    Description:
    The MeiHarmonyHub plug-in allows you to monitor and control Logitech Harmony Hubs in HomeSeer. MeiHarmonyHub allows you to customize the plugin to suite your needs with real time updates from the hub when activities are changed.

    Price:
    $39.95

    Features:
    • Network discovery of all hubs on your network (Beta!)
    • Monitor which activity is currently active on your Logitech Harmony Hub
    • Change the activity from within Homeseer
    • Send commands to any of your entertainment devices stored in your hub (TV, Receiver, etc.)
    • Supports both Windows and Linux installs of HomeSeer!
    • Trigger HomeSeer Events based on when an Activity Starts or when it's completed it's start sequence
      • There are 3 states that the Harmony Hub tracks: Activity is Starting, Activity has Started, Activity Changed (in that order). The first two are provided as Triggers in the HomeSeer Event Engine.
        • Activity is Starting - This is when the activity has just started. This is great for triggering any light scenes you want to kick off with an activity. Some activities can take longer than others to start, so this way HomeSeer events can be kicked off at the start instead of after the activity has started.
        • Activity has Started - This is when the activity has completed it's start up sequence. This is before the Hub actually internally changes the activity to the just started activity.
        • Activity Changed - This is when the activity has changed in the Hub. This is when the plugin actually updates the HomeSeer Activity Device, so creating a trigger for this is basically looking for when the Activity Device changes.
    • Trigger HomeSeer Events based on when the Hub Starts to power off or when it's completed it's power off sequence
      • There are 3 states that the Harmony Hub tracks in regards to powering off: Power off is Starting, Power Off has completed, Activity Changed (in that order). The first two are provided as Triggers in the HomeSeer Event Engine.
        • Power Off is Starting - This is when the power off sequence has just started.
        • Power Off has Completed - This is when the hub has completed the Power Off sequence. This is before the Hub actually internally changes the activity to "PowerOff".
        • Activity Changed - This is when the activity has changed in the Hub to PowerOff. This is when the plugin actually updates the HomeSeer Activity Device, so creating a trigger for this is basically looking for when the Hub has powered off and the hub has set that to it's active activity.
    • Event Actions - there are a few Event Actions mainly for convenience (as most can be done using built in actions).
      • Start Activity - Start an activity on the Hub.
      • Send Device Command - Send a command to a Device.
      • Send Device a string of commands - This is an advanced feature (See Here: https://forums.homeseer.com/showthre...01#post1356301)
      • Set Sleep timer - Set the sleep timer to any number of minutes.
      • Cancel Sleep timer - Cancel the sleep timer if one is active.


    Details:
    MeiHarmonyHub gives you the option to control and/or monitor your Logitech Harmony Hub. There are currently 5 basic devices the plug-in creates:
    1. Main Root Device
      • This is the main root device. This device current provides no functionality, but is reserved for future functionality such as update notifications when a new version of the plugin is available.
    2. Harmony hub root device and connection status/control
      • This is the main root device for a Harmony Hub and is always created. This Device is used to show the current connection state of the plugin with the Harmony Hub
      • This device also allows you to manually disconnect or reconnect the plugin to the Hub.
    3. Activities
      • This device is used to show the the currently active Activity on the Hub.
      • This is an optional device. You must check the "Use Activity?" checkmark in the Hub options to have this device created for your Hub.
    4. Device
      • One of these devices is created for each entertainment device that is on your Harmony Hub (Even if it's not used in an activity).
      • This device allows you to send commands to the Device as if it were from the Hub.
      • This is an option device. You must Check the "Use Devices" checkbox in the Hub options to have this device created for your Hub.
    5. Sleep Timer
      • This device tracks and lets you set the sleep timer on your harmony hub.
      • By default the device has buttons for 15, 30, 60, 90, and 120 minute sleep timers as well as Cancel. New buttons can be added in the Status Graphics page for the device where the value is the number of minutes for the sleep timer.
      • This is an option device. You must Check the "Use Sleep Timer" checkbox in the Hub options to have this device created for your Hub.


    There are a few options that can be changed to alter the behavior of the plug-in.
    Main:
    • Max Connection Attempts - This sets the number of times the plugin will attempt to connect to a Hub before it gives up. This setting is defaulted to 0 which means the plugin will keep trying to connect to the Hub until it can make a connection.
    • Time Between Connection Attempts - This is the Amount of time (in ms) between connection attempts. This can be any value greater than 0 (zero), however it defaults to 500 (ms).
    • Request Timeout - The amount of time before a request to the hub Times out (this includes heartbeat checks to the hub)
    • Heartbeat Interval - How often to send a heartbeat to the hub in Milliseconds (defaults to 30 seconds and should only be changed in extreme cases)
    • Maximum Missed Heartbeats - The number of consecutively missed heartbeats before the plugin considers the hub disconnected.
    • Update Activity Device - This allows you to set when the activity device is updated with teh value from the hub: When an activity is starting, when an activity has finished starting, and when the hub updates it's internal activity ID. Default is the last option.
    • Device Polling - This sets the interval of how often the plugin will check the hub for new Entertainment Devices and Activities on the hub. This is defaulted to 1 Day, but can be set to any value with 0 (zero) disabling the polling all together.


    Hubs:
    • Run Discovery (Beta 3.1.0.7+)
    • Adding Harmony Hubs By IP - Currently the only way to add a hub is by it's IP. In the future automatic discovery of hubs may be implemented, but is currently on hold. It is strongly recommended that any Hubs you have either have a static IP, or that you assign them a static DHCP address based on their MAC address.
    • Hub Management- This is the list of Logitech Harmony Hubs the plug-in knows about. Each Hub has a set of options for each one:
      • Enabled? - Checking this will tell the plug-in to create devices for this Hub. If you uncheck this box, the plug-in will not delete the devices in HomeSeer. That is left up to the user to do. If the devices are left, they will not be updated during polling of devices is this box is unchecked. Also, if this box is unchecked and the plugin is connected to that hub it will stay connected, but will not attempt to reconnect if the plugin is restarted.
      • Use Activity? - If this box is checked, the plugin will create and update the Activity Device. This box can be unchecked at anytime and updating of the HomeSeer device will stop, however it can still be used to change the activity on the Hub. Note that there is no performance benefit to disabling this after the device is created to save on CPU cycles. The plugin does not poll the Hub for updates, instead, the Hub notifies the plugin when an activity changes.
      • Use Devices? - Checking this box will have the plugin create HomeSeer devices for all the Entertainment Devices on your Hub.
      • Use Sleep Timer? - Checking this box will have the plugin create a HomeSeer device for controlling and monitoring the sleep timer on your hub.


    Devices:
    This page allows you to set up certain settings for each Entertainment Device that has a HomeSeer device created.
    • Select a Hub - This allows you to select the hub with the Entertainment device you wish to work with.
    • Select a Device - This allows you to select the Entertainment Device you wish to work with. Note that this does not show up until you select a hub.
    • Command - Device settings selected:
      • This sets the defaults for all commands for this device
      • Repeat - This allows you to tell the plugin to repeat all commands for this device a certain number of times. It defaults to 1.
      • Repeat Delay (ms) - This allows you to set the amount of time between each Repeat above. This defaults to 500, but note that this is not used if the above is 1.
      • Inter-command delay (ms) - This allows you to set a minimum amount of time between commands send to this device. This is good if you don't want to plugin to send too many requests to a given device too fast.
    • Command - Command Selected
      • This sets the values for a specific command
      • Enabled? - Checking this allows you to set overrides for the selected command
      • Repeat - This allows you to tell the plugin to repeat all commands for this command a certain number of times. It defaults to 1.
      • Repeat Delay (ms) - This allows you to set the amount of time between each Repeat above. This defaults to 500, but note that this is not used if the above is 1.


    Logging:
    There are currently 2 options for logging for the plug-in.
    • Enable Debug Logging - Enabling this option will create a log file in \logs\MeiHarmonyHub.log in the HomeSeer install directory. This should only be turned on for sending debug information to the Developer upon request.
    • HomeSeer logging Level - This sets the level of logging that goes to the HomeSeer logs. For most cases, Error or Off should be adequate.



    Features that are in the R&D stage
    • Controlling Home Automation Devices controlled via the Harmony Hub
      • The Harmony Hub can control Home Automation devices such as the Nest Thermostat, Ecobee thermostat, Philips Hue, etc. In addition, with the Harmony Hub Extender installed, z-wave and zigbee devices can be controlled by the hub.
      • There has been some limited success using the plugin to not only control, but monitor these devices in near real time without polling (testing so far limited to Philips Hue and a Zigbee bulb controlled via the Hub extender).
      • There are no promises, but early signs point to being able to create HomeSeer Devices for these Home Automation devices controlled by the Hub and allow HomeSeer to control and Monitor them.
      • Due to the scope of this addition, it may be in R&D for a while and may not ever make it into the plugin at all.
    • I am open to any other additions that anyone wants to request. You can make feature requests here: https://forums.homeseer.com/showthread.php?t=194097
    Attached Files
    Last edited by sirmeili; March 24th, 2018, 08:30 PM.
    Thanks,
    Frank

  • #2
    Send a string of Commands to a Device

    It is possible to send a string of commands (like a macro) to a device on the hub.*

    Currently the string needs to be formatted in a very specific way using JSON (JavaScript Object Notation). Each "command" can have up to 4 properties:
    • Command - the name of the command to send, this is the name of the status on the device.
    • Repeat - The number of times to repeat the command. This overrides all other settings for the device and command
    • Repeat Delay - If Repeat is greater than 1, this is the number of milliseconds (ms) to wait between each command is sent.
    • Wait - This is the number of milliseconds to wait after this command before the next command can be sent. Note that Wait is not the same as intercommand delays in the settings. If Wait is set to less than the intercommand delay set for the device (defaulted to 500ms), the plugin will still wait 500ms to send the next command. This is by design, but may change in the future.

    For instance, to enter the channel 10.1 on my LGTV, I could send the following:

    Code:
    [{Command:"Number1"},{Command:"Number0"},{Command:"Dot"},{Command:"Number1"}]
    If I wanted to send the channel number 111.2, I could send this:

    Code:
    [{Command:"Number1",Repeat:3,RepeatDelay:750,Wait:750},{Command:"Dot",Wait:750},{Command:"Number1"}]
    The above will send the the number "1" three times waiting 750ms between each time. It will then wait 750ms before sending the "Dot", and wait another 750ms before sending the final "1"

    note that you can also just create an object for Wait if you want to like this:

    Code:
    {Wait:1500}
    That will just cause the plugin to wait the specified amount of time before sending the next command.

    Finally, also note that even if you are only sending 1 command, the string must be encapsulated between 2 square brackets ([]). For Instance:

    Code:
    [{Command:"Play"}]

    *This has been expanded via a separate action to send commands to multiple devices on the same hub. See next Post.
    Last edited by sirmeili; April 18th, 2018, 10:54 PM.
    Thanks,
    Frank

    Comment


    • #3
      Send a String of Commands to a hub (multiple devices)

      It is possible to send a string of commands (like a macro) to a hub.

      Currently the string needs to be formatted in a very specific way using JSON (JavaScript Object Notation). Each "command" can have up to 5 properties:
      • Command - the name of the command to send, this is the name of the status on the device.
      • DeviceRef - the HomeSeer Device Reference Number for the Device you want to send the command to.
      • Repeat - The number of times to repeat the command. This overrides all other settings for the device and command
      • Repeat Delay - If Repeat is greater than 1, this is the number of milliseconds (ms) to wait between each command is sent.
      • Wait - This is the number of milliseconds to wait after this command before the next command can be sent. Note that Wait is not the same as intercommand delays in the settings. If Wait is set to less than the intercommand delay set for the device (defaulted to 500ms), the plugin will still wait 500ms to send the next command. This is by design, but may change in the future.

      For instance, to enter the channel 10.1 on my LGTV and then mute my Denon receiver, I could send the following:

      Code:
      [{Command:"Number1",DeviceRef:825},{Command:"Number0",DeviceRef:825},{Command:"Dot",DeviceRef:825},{Command:"Number1",DeviceRef:825},{Command:"Mute",DeviceRef:822}]
      If I wanted to send the channel number 111.2 on my TV then Mute my Denon Receiver, I could send this:

      Code:
      [{Command:"Number1",DeviceRef:825,Repeat:3,RepeatDelay:750,Wait:750},{Command:"Dot",DeviceRef:825,Wait:750},{Command:"Number1",DeviceRef:825},{Command:"Mute",DeviceRef:822}]
      The above will send the the number "1" three times waiting 750ms between each time. It will then wait 750ms before sending the "Dot", and wait another 750ms before sending the final "1". Finally it will send "Mute" to the receiver.

      note that you can also just create an object for Wait if you want to like this:

      Code:
      {Wait:1500}
      That will just cause the plugin to wait the specified amount of time before sending the next command.

      Finally, also note that even if you are only sending 1 command, the string must be encapsulated between 2 square brackets ([]). For Instance:

      Code:
      [{Command:"Play",DeviceRef:832}]

      There is an Action called "Send String of Commands (Multiple Devices)" where you can utilize this functionality. In the future a scripting function may be exposed as well.

      ** You can find the device reference for a HomeSeer Device by clicking on the device name and then going to the Advanced tab. The Device Reference is the top number in the table (image attached).
      Attached Files
      Last edited by sirmeili; April 18th, 2018, 11:05 PM. Reason: Added image to show where to find Device Reference Number.
      Thanks,
      Frank

      Comment


      • #4
        Voice Control devices (Or Individual Activity Devices)

        As of 3.0.3.10, you can now create a device in the plugin settings which will allow you to start that activity (turning it off will send the Power Off activity to the hub for any of these activities.

        The benefit of this, if any, is that the plugin is called directly when the device is changed instead of having to create an event triggered off of a device you create. For instance, to get this same functionality you would have to:

        Create a Device with On/Off statuses.
        Create an event that when the above device is set to ON, you control the MeiHarmonyHub device to set the activity.
        Create another event that when the above device is set to OFF, you tell teh activity device to send OFF for that hub.

        With this new feature, you can just:

        Go to the settings -> Voice control tab and add a new Device by:

        Selecting the main Activity Device
        Select the Activity you want the device to control
        Give the Location, Location2, and Device Name.


        The only other step you may need to make is opening the newly created device from the device management screen and adding a voice command. In my testing, on my google home, the device was not picked up until I added this, but I may have just been impatient.


        Available as of 3.1.0.0 - Voice Control Devices (VCD) track activity state!

        As of 3.1.0.0 the plugin will now update the voice control devices with the correct state even if they are not the device that started the activity. For instance, if you use the remote to change the activity to "Watch TV" and you have a VCD tied to that activity, it will change it's state to "ON" and all the other VCDs on that hub will turn to "OFF".
        Last edited by sirmeili; August 5th, 2018, 02:18 PM.
        Thanks,
        Frank

        Comment


        • #5
          Virtual Remotes (BETA!)

          Please note this functionality is in Beta and the functionality and the format of the settings may change during development.

          Virtual remotes have been added since version 3.0.3.16. This gives you the ability to create one ore more HomeSeer devices that allow you to map the buttons to different devices and/or commands based on the active Activity.

          For instance, you can create a "Volume" Device that has 3 commands:
          • Volume Up
          • Volume Down
          • Mute


          In my house, We watch either the TV directly or we watch via a Receiver, so I'm going to take 2 activities and show the differents:
          • Watch Roku (TV Only)
            • Volume Up - Device TV; Command: VolumeUp
            • Volume Down - Device TV; Command: VolumeDown
            • Mute - Device: TV; Command: Mute
          • Play Xbox One S
            • Volume Up - Device: Denon Receiver; Command: VolumeUp
            • Volume Down - Device Denon Receiver; Command: VolumeDown
            • Mute - Device: Denon Receiver; Command: Mute


          With the above setup, I can turn the volume up, down, or mute it with the same device no matter the activity and be assured the right device gets the command without having to create a bunch of activities.

          Another good for this would be "Play" or "Pause" if you wanted to pause the TV when the door bell rings. In this case, you could have just 1 activity to pause the TV and let the plugin determine which device to send the command to.

          Voice Control
          You could use these devices with Voice control. For the Volume example above, you could check the "Voice control" checkbox on the device settings and set the Mute button to Control Use: Off and either Set Volume Up to Control Use: On or add another button called UnMute which just mirrored the same commands for "Mute" and set it's Control Use to On.

          This would allow you to say "Alexa, turn the living room volume off" and it would mute your system and then say "Alexa, turn the living room volume On" and unmute it.


          *Currently the configuration UI for this is a bit cumbersome. I'm trying to figure out a way to make it more user friendly. Please feel free to start a new thread with any suggestions for improving the configuration screen for this feature.
          Thanks,
          Frank

          Comment

          Working...
          X