Homeseer plugin by JDWestoby (1 Viewer)

JDWestoby

MP Donator
  • Premium Supporter
  • April 9, 2008
    265
    32
    68
    Poltimore, Devon
    Home Country
    United Kingdom United Kingdom
    Two plugins that interface MediaPortal to HomeSeer.

    Now updated so they run on the 1.4. Should work on XP and Win7 (my new default OS in the house).

    Uses a very boring DefaultWide screen (which I like as I run these on several low powered Netbooks) . I use MP as my room focus - HomeSeer drives MP using my Automator interface and works as a clock radio and security system!

    No changes to the HomeSeer side (again), so no change to that plugin.


    Installing
    ================================
    Download and extract the zips.

    As before install the HomeSeer plugin on the HomeSeer machine only.
    (Caveat - I don't use this one anymore I use a plugin that ONLY looks at Events, so all my devices have associated events. There is a reason for this but you probably don't care in knowing why!)

    For MediaPortal plugin, right click on the SetUp.Cmd file and Run As Administrator, copies over the new files.


    Configuration
    ================================

    If previously installed no need to go through configuration again, picks up the [old] config values from the XML file.

    Assumes HomeSeer and MediaPortal stopped (neither will load plugins except at startup).

    HomeSeer -
    Start HomeSeer and enable in the Interfaces screen. (Restart it to ensure it is started correctly, should see log entries from 'Socket interface' plugin.)

    As displayed by Setup.Cmd, the HomeSeer plugin can be tested using Telnet.
    Should get back a list of lines showing your devices and (VR) events.
    If you feel keen you can test it by typing a line like -
    <Request Text="lounge lights" />

    MediaPortal -
    Start the MediaPortalConfig tool, enable the HomeSeer plugin if required, that's it.


    Usage
    ================================

    Assumes HomeSeer is running and plugin enabled.

    Start MediaPortal and select HomeSeer button (on Home or Plugins screen when enabled).

    Should see a screen with just a 'Connect' button and some wildcard boxes, ignore this for now (see screen shot).

    Press More/F9, brings up a config screen (see screen shot).

    ONLY important value here is the HostName, change this to point to your HomeSeer machine (if same as current MediaPortal machine can leave as 127.0.0.1).

    Other buttons are just information strings, some are internationalised but some will be English, change as you like (mimics HSpeaker client values.)

    Save (bottom button) and get back to the main HomeSeer screen.

    Press 'Connect' and should get alternate list boxes populated by your devices and VR events (see screen shot).

    Move to the one of the list boxes using up/down. Once on the list box left/right changes the selected item.

    The list boxes above the Device/Events/IR allow filtering select and press Enter to filter (and sort) the following list. Wildcard permits not filtering.

    Press OK and the keyboard comes up, either edit the value (add on or off) or just let it toggle and press 'Done'

    Hopefully your device came on/event triggered and the OK came up at the bottom.


    ANY problems I would like to hear about, it is VERY simple and there is a technical description of what it does in a later message.


    Version Description
    ======== ================================================
    1.0 Initial text entry by keyboard.
    1.1 XML fragments, add screen elements, configure inside MediaPortal.
    1.2 Query HomeSeer for devices, events for list boxes.
    1.3 Blue3 screens.
    1.4 IR added, XML fragment protocol enhanced, now gets back the state etc.
    1.5 Filtering/sorting on requests, lists work correctly, keys caught and mangled.
    Better HomeSeerText.png created.
    2.0 Update for MP 1.2 (and the Beta).
    3.2 New HS plugin format Group and VR only
     

    Attachments

    • HSPI_SOCKETCOMMAND.zip
      8 KB
    • HomeSeerPlugin.zip
      93.1 KB
    Last edited:

    JDWestoby

    MP Donator
  • Premium Supporter
  • April 9, 2008
    265
    32
    68
    Poltimore, Devon
    Home Country
    United Kingdom United Kingdom
    New and simpler

    TECH STUFF

    If you're not interested stop here.

    The operation is simple.

    HomeSeer fires up the plugin which listens on a TCP/IP port. All communication goes through here and is in the form of XML fragments comprising a single line. (E.G. <Request Text="Hello World" />.)

    Connect on MediaPortal connects a client to this port.

    Anytime a client connects it is spun off into it's own thread. HomeSeer thread sends details of devices, VR events and (hopefully) IR, then sits waiting for a request (or a disconnection).

    MediaPortal plugin thread waits for reponses, gets the devices/events/IR and sets these up in the screen lists.

    When Done pressed on the keyboard sends the line to HomeSeer.

    HomeSeer plugin tries to find a match to an event or some device (and possibly location) and then executes it, sending the response result back to the MediaPortal plugin which then displays it.
    (Literally the line is <Response Result="Ack" />.)


    Possible issues/extensions
    ===============================

    Get two HomeSeer entries in the ConfigTool, haven't worked out how to avoid this yet (give me time).

    XML parsing is massively over complex but it is the 'proper' way of doing it and is easily extensible. I REALLY couldn't justify setting up the XML to send in the same way though, it increased it from a single line of code to about eight!

    Can extend this to handle emails, security cameras etc. really easily by defining new XML strings


    If nothing else this would be VERY useful to several people over on the HomeSeer forum, several people have asked how to make a simple plugin !!!

    It is also a simple illustration of how to make a Windows plugin for MediaPortal - which I could have done with, a few weeks back!
     

    Poko

    MP Donator
  • Premium Supporter
  • February 1, 2007
    57
    1
    53
    Home Country
    United Kingdom United Kingdom
    Sorry for the lack of responses mate.

    This is brilliant stuff and I'll try it out asap on my homeseer set up!
    Thanks everso much for writing it, and believe me it's most certainly appreciated!

    Will keep in touch as I try it all out. (I have z-wave stuff at home)

    :D
     

    kerninger

    MP Donator
  • Premium Supporter
  • July 27, 2006
    14
    0
    Home Country
    Germany Germany
    Hi,
    with activated HSPI_SOCKETCOMMAND.dll my Homeseer (newest version 2.3.0.19) crashes. No further entrys in the HS logfile.
    Anyway; I'm using the MP-xAP Plugin to control everything in Homeseer without any problems. Why this new plugin ?
     

    Spragleknas

    Moderator
  • Team MediaPortal
  • December 21, 2005
    9,474
    1,822
    Located
    Home Country
    Norway Norway
    *A
    post_thanks.gif
    is given to JDWestoby, as I believe that MP needs more focus on home automation*
     

    JDWestoby

    MP Donator
  • Premium Supporter
  • April 9, 2008
    265
    32
    68
    Poltimore, Devon
    Home Country
    United Kingdom United Kingdom
    HomeSeer plugin

    Don't know why it crashes (or how I can determine what is happening, old support problem - working fine here. I want to help honestly. The ONLY thing HomeSeer wants is .NET [not sure what version] and the dll in the HomeSeer directory, on mine c:\Program Files\HomeSeer HS2)

    Why not use xAP?
    a) Didn't know about it
    b) Think this is just simple X10 stuff
    c) Want to eventually replace HomeSeer's HSpeaker with this so that I can just send this from ANY platform
    d) It was fun (sort of)

    Be honest, the reason we like home automation is that we can't afford servants so 'talking' to your HA system is the ultimate idea. That's why this version toggles so you can just return the command line and it turns it on/off as needed.

    ...Doubt it will ever make the tea from scratch though.

    (I even thought about replacing HomeSeer with a complete custom plugin, but overall it isn't really sensible. HomeSeer works well for me so why reinvent the wheel?)
     

    MartNZ

    Portal Member
    January 3, 2009
    6
    0
    Auckland
    Home Country
    New Zealand New Zealand
    Just like to add thanks to JDWestoby for his work on this plugin. My Homeseer rig has been converted to a Windows Home Server due mainly to limited range of x10 devices here in NZ but I will watch your progress with interest.
    :D
     

    rekenaar

    Retired Team Member
  • Premium Supporter
  • December 17, 2006
    4,421
    805
    Home Country
    South Africa South Africa
    JDWestoby

    I moved all relevant posts to this new thread in the plugins section of the forum.

    May I suggest you always keep the first post updated with your latest zip and release notes. The you can just drop a new post in this thread to notify everyone that you released a new version.

    You should be able to edit your old posts and remove the old zip files. If you struggle, let me know.

    I really hope you all are happy with this move, but I think it will be better to manage. If you are not happy, I will gladly reverse it.

    Keep up the good work :)
     

    mlburgoon

    Portal Pro
    November 16, 2006
    448
    48
    Home Country
    United States of America United States of America
    Yes, this is wonderful. thanks

    If you can edit your forst post and put the install files there and keep it up to date, then it will make things MUCH easier for us users to find and figure out. Also, if you can look at the showtimes plugin thread and you can see how he does it. I think it is great. He keeps a version history in that first post as well. that is nice to have as well.

    thanks Again and great work.
     

    Users who are viewing this thread

    Top Bottom