Announcement

Collapse
No announcement yet.

Harmony plugin for Linux?

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

  • Harmony plugin for Linux?

    According to the plugin list on the Homeseer website the Harmony plugin should work on Linux but I can't find it in the updater. I recently moved my HS3 to a Linux box and now lost the Harmony plugin. When I copy over the hspi_harmony.exe and run it with mono it seems to connect to HS3 but then it complains that it has no license and the trial period is expired without giving me a chance to input my license key. What do I have to do in order to make the Harmony plugin work on Linux? Or is it not really compatible with Linux?

  • #2
    Hi,

    The Harmony Hub plug-in is not Linux compatible. HomeSeer has incorrectly identified it as Linux compatible. I recently started hosting my own plugins myself and set the compatibility correctly.

    I don't know why Homeseer has flagged it as Linux compatible, they never ask me.

    Sorry if this caused you any inconvenience.

    I have no plans to convert it to a Linux compatible plugin on the short term. I have to use a windows .exe to interface with the Hub. If someone can convert a C## source to VB.NET, I could do it easier/faster.
    Regards,

    Rien du Pre
    The Netherlands
    Using:
    Homeseer PRO latest HS4 BETA on a Raspberry
    Plugin's:
    RFXCOM, mcsMQTT, Z-Wave

    Comment


    • #3
      Not sure whether these converters work...

      http://www.developerfusion.com/tools.../csharp-to-vb/
      cheeryfool

      Comment


      • #4
        Originally posted by Rien du Pre View Post
        Hi,

        The Harmony Hub plug-in is not Linux compatible. HomeSeer has incorrectly identified it as Linux compatible. I recently started hosting my own plugins myself and set the compatibility correctly.

        I don't know why Homeseer has flagged it as Linux compatible, they never ask me.

        Sorry if this caused you any inconvenience.
        Yeah, it's a minor inconvenience. Will it work if I run it as a remote plugin? I guess I can try it myself.

        Comment


        • #5
          I guess this will work, but never tried it.

          So please try it yourself and let me know the outcome :-)
          Regards,

          Rien du Pre
          The Netherlands
          Using:
          Homeseer PRO latest HS4 BETA on a Raspberry
          Plugin's:
          RFXCOM, mcsMQTT, Z-Wave

          Comment


          • #6
            Originally posted by Rien du Pre View Post
            I guess this will work, but never tried it.

            So please try it yourself and let me know the outcome :-)
            I finally found a Windows box I can try it on but it doesn't work . I installed HS3 on the Windows box, installed the plugin, installed my license and shut down HS3 again. Now, if I try to start "hspi_HarmonyHub.exe server=mylinuxhs3ip" it connects but immediately dies with "Cannot load plugin Harmony Hub, no license or trial expired". I guess it's looking for the license on the Linux side or something? But how can I install my license on the Linux HS3 server? I tried to copy the license.bin from Windows but that didn't make any difference. So, running the Harmony plugin remotely doesn't work because of this licensing issue .

            Comment


            • #7
              Originally posted by kkkk View Post
              I finally found a Windows box I can try it on but it doesn't work . I installed HS3 on the Windows box, installed the plugin, installed my license and shut down HS3 again. Now, if I try to start "hspi_HarmonyHub.exe server=mylinuxhs3ip" it connects but immediately dies with "Cannot load plugin Harmony Hub, no license or trial expired". I guess it's looking for the license on the Linux side or something? But how can I install my license on the Linux HS3 server? I tried to copy the license.bin from Windows but that didn't make any difference. So, running the Harmony plugin remotely doesn't work because of this licensing issue .
              Ok Thanks for trying.

              Can anyone from HomeSeer confirm this license behavior ?

              Thanks,
              Regards,

              Rien du Pre
              The Netherlands
              Using:
              Homeseer PRO latest HS4 BETA on a Raspberry
              Plugin's:
              RFXCOM, mcsMQTT, Z-Wave

              Comment


              • #8
                I think I found a clue as to why the plugin doesn't work as a remote plugin in the following thread http://forums.homeseer.com/showthrea...ight=licensing.

                It looks like HS3 requires a copy of the plugin on the Linux side. Now, if I provide that it still doesn't work because the name of your plugin is hspi_HarmonyHub.exe and HS3 on Linux is case-sensitive and it doesn't recognize that name. If I rename or link the plugin to the correct name HSPI_HarmonyHub.exe I get the following error in the HS3 log:

                Code:
                03:00:59:6921:[Error]->Error, Class not found in plugin EXE, maybe namespace is not correct,? Note filename is case sensitive!: HSPI_HarmonyHub.exe Class: HSPI_HarmonyHub.HSPI->
                I hope that gives you some ideas as how to make the plugin work as a remote plugin on Linux HS3.

                Comment


                • #9
                  I got a little bit further but I'm afraid I can't make the Harmony plugin work as a remote plugin for a Linux HS3. I got the plugin to load and connect by changing every occurrence of hspi to HSPI in the exe file with a hex editor. After that HS3 recognized the plugin and I could enter my license. But every time I tried to scan or rescan devices or activities I got the following error:
                  Code:
                  01:59:25:0396:[Harmony Hub Error]->Plugin: Harmony Hub Get Devices The system cannot find the file specified-The system cannot find the file specified
                  01:59:33:3737:[Harmony Hub Error]->Plugin: Harmony Hub Get Activities The system cannot find the file specified-The system cannot find the file specified
                  If I try to run the plugin local on the Linux HS3 system I get the following:

                  Code:
                  Plugin: Harmony Hub Get Devices ApplicationName='/home/hs/HomeSeer\bin\HarmonyHub\harmonyhubcontrol.exe', CommandLine='xxxx@xxxx.com xxxxxx 10.0.1.xxx list_devices_raw', CurrentDirectory='', Native error= Cannot find the specified file-
                  It apparently looks for the harmonyhubcontrol.exe with a bogus path. But this Windows binary would not have worked anyway.

                  I'm not sure what the plugin does if I run it remotely on the Windows box, whether it tries to run harmonyhubcontrol.exe on the Windows box or the Linux box and whether that is the file it's complaining about. I couldn't figure that out. So for now I think I have to give up to make the plugin work remotely.

                  Comment


                  • #10
                    Hi,

                    I use a Windows executable to get and set the HUB info. As stated before, I have the C# sources, but don't know how to convert it to VB.net.
                    Regards,

                    Rien du Pre
                    The Netherlands
                    Using:
                    Homeseer PRO latest HS4 BETA on a Raspberry
                    Plugin's:
                    RFXCOM, mcsMQTT, Z-Wave

                    Comment


                    • #11
                      Originally posted by Rien du Pre View Post
                      Hi,

                      I use a Windows executable to get and set the HUB info. As stated before, I have the C# sources, but don't know how to convert it to VB.net.
                      I thought mono can compile C# sources into native code on Linux, see here http://www.mono-project.com/docs/abo...guages/csharp/. Have you tried to compile your source on a Linux box with mono?

                      Comment


                      • #12
                        I finally found some time to work on the HarmonyHub plugin on Linux. I found a program HarmonyHubControl written in C++ on Sourceforge which does exactly the same as the Windows program (with a very small patch) and compiles fine with gcc on Linux. So, after changing the class name to HSPI_HarmonyHub (uppercase HSPI) and putting the harmonyhubcontrol.exe into the right spot I was able to get devices and activities from the plugin and it created a HS device! So far everything looks very promising but I'll do more testing.

                        The HarmonyHubControl program for Linux you can download with the following command from a Linux box: "git clone git://git.code.sf.net/p/harmonyhubcontrol/code harmonyhubcontrol-code". It comes with a Makefile and compiles out-of-the-box with any decent gcc (3.4 or higher). In order to make it compatible with the Windows program the following small patch is needed:
                        Code:
                        --- HarmonyHubControl.cpp.orig  2015-06-06 01:36:40.041903614 -0400
                        +++ HarmonyHubControl.cpp       2015-06-06 01:48:47.746685110 -0400
                        @@ -988,8 +988,9 @@
                                     std::map< std::string, std::string>::iterator ite = mapActivities.end();
                                     for(; it != ite; ++it)
                                     {
                        +                resultString.append("---");
                                         resultString.append(it->first);
                        -                resultString.append(" - ");
                        +                resultString.append("---");
                                         resultString.append(it->second);
                                         resultString.append("\n");
                         
                        @@ -1009,8 +1010,9 @@
                                     std::vector< Device >::iterator ite = vecDevices.end();
                                     for(; it != ite; ++it)
                                     {
                        +                resultString.append("---");
                                         resultString.append(it->m_strID );
                        -                resultString.append(" - ");
                        +                resultString.append("---");
                                         resultString.append(it->m_strLabel );
                                         resultString.append("\n");

                        Comment


                        • #13
                          I needed a couple more changes to the HarmonyHubControl program from Sourceforge, Following is the complete patch:

                          Code:
                          --- HarmonyHubControl.cpp.orig  2015-06-06 19:58:08.178988116 -0400
                          +++ HarmonyHubControl.cpp       2015-06-07 02:35:07.897449855 -0400
                          @@ -60,6 +60,12 @@
                               {
                                   return m_strCommand;
                               }
                          +    std::string toShort()
                          +    {
                          +        std::string ret = "---";
                          +        ret.append(m_strCommand);
                          +        return ret;
                          +    }
                           };
                           
                           
                          @@ -83,6 +89,18 @@
                                   ret.append("\n");
                                   return ret;
                               }
                          +    std::string toShort()
                          +    {
                          +        std::string ret = "";
                          +        std::vector<Action>::iterator it = m_vecActions.begin();
                          +        std::vector<Action>::iterator ite = m_vecActions.end();
                          +        for(; it != ite; ++it)
                          +        {
                          +            ret.append("\n");
                          +            ret.append(it->toShort());
                          +        }
                          +        return ret;
                          +    }
                           };
                           
                           class Device
                          @@ -115,6 +133,17 @@
                                   }
                                   return ret;
                               }
                          +    std::string toShort()
                          +    {
                          +        std::string ret = "";
                          +        std::vector<Function>::iterator it = m_vecFunctions.begin();
                          +        std::vector<Function>::iterator ite = m_vecFunctions.end();
                          +        for(; it != ite; ++it)
                          +        {
                          +            ret.append(it->toShort());
                          +        }
                          +        return ret;
                          +    }
                           };
                           
                           static const std::string base64_chars = 
                          @@ -988,8 +1017,9 @@
                                       std::map< std::string, std::string>::iterator ite = mapActivities.end();
                                       for(; it != ite; ++it)
                                       {
                          +                resultString.append("---");
                                           resultString.append(it->first);
                          -                resultString.append(" - ");
                          +                resultString.append("---");
                                           resultString.append(it->second);
                                           resultString.append("\n");
                           
                          @@ -1009,8 +1039,9 @@
                                       std::vector< Device >::iterator ite = vecDevices.end();
                                       for(; it != ite; ++it)
                                       {
                          +                resultString.append("---");
                                           resultString.append(it->m_strID );
                          -                resultString.append(" - ");
                          +                resultString.append("---");
                                           resultString.append(it->m_strLabel );
                                           resultString.append("\n");
                                           
                          @@ -1029,7 +1060,7 @@
                                       std::vector< Device >::iterator ite = vecDevices.end();
                                       for(; it != ite; ++it)
                                       {
                          -                resultString.append(it->toString());
                          +                resultString.append(it->toShort());
                                           resultString.append("\n\n\n");
                                       }
                                   }
                          @@ -1053,13 +1084,13 @@
                                               {
                                                   if(strCommandParameterSecondary == it->m_strID)
                                                   {
                          -                            resultString.append(it->toString());
                          +                            resultString.append(it->toShort());
                                                       resultString.append("\n\n\n");
                                                   }
                                               }
                                               else
                                               {
                          -                        resultString.append(it->toString());
                          +                        resultString.append(it->toShort());
                                                   resultString.append("\n\n\n");
                                               }
                          Now everything seems to work properly on Linux. I'm running HomeSeer on a Cubietruck (ARM-based CPU, similar to a Raspberry) with Debian Wheezy.

                          Comment


                          • #14
                            Just curious if this is still working for your on Linux?


                            Sent from my iPhone using Tapatalk

                            Comment


                            • #15
                              Hi all...

                              a newbie to all of this but gradually getting to grips with HS3 and the multitude of options it open for me. I just got myself a HomeTroller-SEL to minimise the computer side hassle. With RFXCOM, Z-wave working nicely my next target was to get the Harmony Hub integrated as everywhere I looked it suggested it would work. Before my purchase I checked the compatibility matrix and when I got the box it even appears under the Harmony Hub plug-in available. Only one it fails to install and I read the documentation did I realise it was Windows only.

                              I realise it is not anyone's fault here!

                              So - have I totally shot myself in the foot by buying the HomeTroller-SEL and not the full sized Windows version?

                              From reading above it looks like there is hope... has ANYONE managed to get this working well enough to actually release? It looks tantalisingly close!

                              More importantly is there ANYTHING I can do to help? Buying a licence is no issue... even a bonus to buy yourself a Xmas present as the alternatives are expensive...

                              Or am I indeed looking at some limited "hacky alternatives" to do this? The z-wave extender for Harmony does not have an EU version, so I am stuck there. So I guess I am maybe looking at trying to get some sort of IR integrated to the HT-SEL or indeed seeing if I can get a refund to move up to the big box. Or get a windows image for the HomeTroller-SEL itself... and hope the licence key is cross platform. Linux seemed an ideal match for home automation... simple, robust and secure.

                              Comment

                              Working...
                              X