Announcement

Collapse
No announcement yet.

Plug-in support on Linux (Plug-in authors please read!)

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

    Plug-in support on Linux (Plug-in authors please read!)

    [UPDATED 11/8/13]

    HS3 for Linux has been posted in the HS3 Beta forum.

    Each update in the updater contains information about which version of HS3 your plugin supports. Since plugins have not been tested on Linux yet, you should set your updater line so the plugin will not load on Linux. Once you verify your plugin supports Linux you can enable it for that OS.

    The updater line looks like this (only the first section):

    Z-Wave, HSPI_ZWave.exe, ,3.0.0.13, 31

    Note the "31", this indicates that the plugin works on Windows only. So this update will not appear under Linux. Ensure that your updater line is set to 31. This is important for authors who are hosting their own updates as we cannot change this. If we are hosting the update, we will automatically set the update to 31 until you submit an update that is Linux compatible.

    If your plugin works for both Windows and Linux, the # is 63, for Linux only, its 47.
    💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

    #2
    Will you be announcing what the requirements are for the Linux platform, or will it all be included in the HS3 linux package (ie Mono, etc)?

    Z

    Comment


      #3
      if we need to install different dll for the linux version of the plugin, is there a command to do so from the install script?
      or do we have to put two different packages in the updater, i.e. one for windows and one for linux?

      Comment


        #4
        We are testing the Linux version under Debian right now, but I know it runs ok under Ubuntu or Lubuntu.

        I will post detailed install instructions, but the Linux version is geared toward more technical users as we will only be providing a tar file, so you will have to manually install.

        Originally posted by vasrc View Post
        Will you be announcing what the requirements are for the Linux platform, or will it all be included in the HS3 linux package (ie Mono, etc)?

        Z
        💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

        Comment


          #5
          The plugins for Linux are EXE plugins, just like Windows. You should be able to supply one plugin that works for both. For example, our HSTouch plugin and X10 plugin are the same for both. The biggest change for Linux is that all filepaths are "/" rather than "\". There is an hs. call you make to HS to find out if you are running on Windows or Linux. We have a function called "FixPath(path)" that simply swaps the slashes.

          We do have 2 Z-Wave plugins, but that is because the plugin supports HID devices which is Windows specific, so in the Z-Wave version that is removed.

          Also, there is no windows forms, or least we don't depend on them, so you need to wrap any "Application." calls in a class that handles each OS.

          There is no "Err" and "Erl" object so you need to wrap those. (mainly used to display line numbers)

          To see how close your plugin is, run it through the MOMA app (runs on Windows) and it will point out any .net calls that are not in MONO. Get the app here:

          http://www.mono-project.com/MoMA

          When you build for Linux, you can build for "Any CPU", although building for X86 seems to work anyway.

          Originally posted by spud View Post
          if we need to install different dll for the linux version of the plugin, is there a command to do so from the install script?
          or do we have to put two different packages in the updater, i.e. one for windows and one for linux?
          💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

          Comment


            #6
            So if I'm reading the report correctly:
            MDB files are not supported by Mono?
            GetSchema isn't supported for SQLlite?

            I note this is for Mono Vers 2.8. I have 2.11 installed so not sure if it supports more or not? What version of Mono are you expecting to support?

            I also mistakenly assumed (4.0 profile) would be the test I would want to run assuming it referred to Net framework 4, but it has a LOT of not supported features, while 2.0 does much better. Which test is appropriate?

            Thanks,
            Z

            Comment


              #7
              We are using MONO 2.8 on the ZEE and the .net 4.0 profile and all of our code appears to work ok. We are using SQLite but I cannot comment on missing features, it has the features we need.

              MDB databases are not supported, you have to use SQLite.

              Originally posted by vasrc View Post
              So if I'm reading the report correctly:
              MDB files are not supported by Mono?
              GetSchema isn't supported for SQLlite?

              I note this is for Mono Vers 2.8. I have 2.11 installed so not sure if it supports more or not? What version of Mono are you expecting to support?

              I also mistakenly assumed (4.0 profile) would be the test I would want to run assuming it referred to Net framework 4, but it has a LOT of not supported features, while 2.0 does much better. Which test is appropriate?

              Thanks,
              Z
              💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

              Comment


                #8
                Originally posted by rjh View Post
                The biggest change for Linux is that all filepaths are "/" rather than "\". There is an hs. call you make to HS to find out if you are running on Windows or Linux. We have a function called "FixPath(path)" that simply swaps the slashes.
                I don't remember seeing what the hs. call is to determine the platform as well as the function to fix the path?? I've looked at the hs. options on both the Windows and Linux dll's and can't find anything obvious.

                I can of course make a unique EXE just for Linux but would prefer to integrate it into one source either by realtime calls or compile options.

                Thanks,
                Z

                Comment


                  #9
                  Not a direct call, but you could check the first character of hs.GetAppPath, it should be "/" on Linux.

                  Bill

                  Comment


                    #10
                    Good idea, but it looks like it returns Windows style still?
                    GetAppPath=\home\HS3\HomeSeer

                    I hope they fix this one. Sounds like HS3 doesn't recognize it's running on Mono??

                    Z
                    Last edited by vasrc; November 14, 2013, 03:52 PM.

                    Comment


                      #11
                      will hs.GetOSVersion not work?

                      I don't do Linux but it works on windows.

                      Greig.
                      Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
                      X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
                      Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
                      Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
                      Scripts =
                      Various

                      Comment


                        #12
                        OK, answering my own question after looking at the Mono docs..
                        They recommend using System.IO.Path.DirectorySeparatorChar instead of hardcoding it.
                        I'll see how that works.

                        Z

                        Comment


                          #13
                          Originally posted by enigmatheatre View Post
                          will hs.GetOSVersion not work?
                          I don't do Linux but it works on windows.
                          Greig.
                          Just for grins, that would give you:
                          OSvers=3.2.0.4

                          Not sure what that signifies, it's not Debian, nor Mono, nor HS3, nor the Plugin

                          Z

                          Comment


                            #14
                            try hs.GetOSType()

                            Comment


                              #15
                              Originally posted by spud View Post
                              try hs.GetOSType()
                              That does it..
                              Type 0 = Windows
                              Type 1 = Linux

                              Thanks,
                              Z

                              Comment

                              Working...
                              X