Announcement

Collapse
No announcement yet.

Linux support planned?

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

  • nfrobertson
    replied
    Originally posted by tim.palmer View Post
    You're the man! It was caused by the misplaced dll file! Works 100% now, initialized and added the thermostat, no issue!
    Tim,

    Today while looking at the problem with VB scripts on Linux, I also found the actual root cause of the problem we had with the System.Data.SQLite.dll. Turns out the file HSPI_INSTEON_THERMOSTAT.exe.config is supposed to point to the right directory to pickup DLL files like that but it was using Bin/ instead of bin/ and on Linux that failed due to case sensitivity. I have fixed this in the latest beta version 3.0.6.1. You should be ok with our work around solution of putting the DLL file in the main HS3 folder for now but wanted you to know there's a permanent fix now.

    Thanks
    Nathan

    Leave a comment:


  • nfrobertson
    replied
    VB scripts complaining about Import System.Core ...

    If you are running on Linux and try to use the example VB scripts (prior to 3.0.6.1) then you may get an unexpected error like:

    Code:
    Compiling script /opt/HomeSeer/scripts/tstat.vb: Namespace or type specified in the Imports 'System.Core' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
    If you encounter this, check the line that calls PluginFunction() The array parameter needs to have New Object() in front of { }

    In this example line, change

    Code:
    Dim mode As String = plugin.PluginFunction("GetMode", {thermostatName})
    to

    Code:
    Dim mode As String = plugin.PluginFunction("GetMode", New Object() {thermostatName})

    Leave a comment:


  • nfrobertson
    replied
    Thanks for confirming Tim. I'll get this fixed and into the beta updater soon.

    Nathan

    Leave a comment:


  • tim.palmer
    replied
    You're the man! It was caused by the misplaced dll file! Works 100% now, initialized and added the thermostat, no issue!

    Leave a comment:


  • nfrobertson
    replied
    Tim,

    I was finally able to get my Oracle VirtualBox back up with Debian. I ran the HS3 3.0.0.258 (the linux version I worked with earlier this year) with Insteon Thermostat Plugin 3.0.5.3 which was previously installed and received an error I didn't expect:

    Code:
    Unhandled Exception:
    System.TypeLoadException: A type load exception has occurred.
    [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: A type load exception has occurred.
    I upgraded the plugin to the latest 3.0.5.5 from the beta updater but still encountered the same exception. I then used a separate terminal to run: mono HSPI_INSTEON_THERMOSTAT.exe and again received the same exception.

    Earlier this year I had added SQLite support for a possible future feature. I discovered there were separate DLL versions for Windows and Linux. I thought I had this all ironed out but apparently there's still an install issue on the linux side. Go looking for System.Data.SQLite.dll under your HS3 installation. My install below is under /opt/HomeSeer When you find it, copy it to your HS3 directory (/opt/HomeSeer in my example) and shutdown HS3 and try again. After doing that I was able to get the Insteon Thermostat plugin to run again.

    BEFORE

    Code:
    root@debian:/opt/HomeSeer# find . -name System.Data.SQLite.dll -ls
    308671  244 -rw-r--r--   1 nathan   root       249856 Nov 13  2014 ./bin/System.Data.SQLite.dll
    309705  244 -rw-r--r--   1 root     root       249856 Sep  3 16:59 ./bin/HSPI_INSTEON_THERMOSTAT/System.Data.SQLite.dll
    310359  244 -rw-r--r--   1 root     root       249856 Apr 14  2016 ./Updates3/Insteon\ ThermostatBETA\ 3.0.5.3/System.Data.SQLite.dll
    309699  244 -rw-r--r--   1 root     root       249856 Sep  3 16:59 ./Updates3/Insteon\ ThermostatBETA\ 3.0.5.5/System.Data.SQLite.dll
    AFTER

    Code:
    root@debian:/opt/HomeSeer# cp bin/System.Data.SQLite.dll .
    root@debian:/opt/HomeSeer# !find
    find . -name System.Data.SQLite.dll -ls
    308671  244 -rw-r--r--   1 nathan   root       249856 Nov 13  2014 ./bin/System.Data.SQLite.dll
    309705  244 -rw-r--r--   1 root     root       249856 Sep  3 16:59 ./bin/HSPI_INSTEON_THERMOSTAT/System.Data.SQLite.dll
    309225  244 -rw-r--r--   1 root     root       249856 Oct 22 16:26 ./System.Data.SQLite.dll
    310359  244 -rw-r--r--   1 root     root       249856 Apr 14  2016 ./Updates3/Insteon\ ThermostatBETA\ 3.0.5.3/System.Data.SQLite.dll
    309699  244 -rw-r--r--   1 root     root       249856 Sep  3 16:59 ./Updates3/Insteon\ ThermostatBETA\ 3.0.5.5/System.Data.SQLite.dll

    Leave a comment:


  • nfrobertson
    replied
    Busy week at work, sorry for the delay. Below I will paste in a default ini file. Save this to HS3\Config\hspi_insteon_thermostat.ini

    Maybe you can stop the plugin, delete it and reinstall it so you can take note of the log messages during the install step. Perhaps that will give a clue as to why it's not running? Note each file and destination it tries to install them to and then navigate out to the filesystem and confirm all was installed as expected. Working with my other plugin, at one point we found some case sensitive differences.

    Another step might be to run it yourself from the linux command line in a different terminal that where you start HS3. I believe the command you run is
    Code:
    mono HSPI_INSTEON_THERMOSTAT.exe
    I will dust off my virtualbox with debian now that I have a few minutes and try this myself.

    [hspi_insteon_thermostat]
    Version=3.0.5.5
    LogLevel=67
    InsteonFlags=15
    BoundsTempLow=35
    BoundsTempHigh=97
    BoundsHeatSetLow=35
    BoundsHeatSetHigh=95
    BoundsCoolSetLow=37
    BoundsCoolSetHigh=97
    BoundsHumidityLow=5
    BoundsHumidityHigh=100
    ControlPageRefresh=10

    Leave a comment:


  • tim.palmer
    replied
    No other update on this? is there a way to get a "generic" .ini file so that maybe the plugin will at least initialize? Anything else you'd recommend?

    Leave a comment:


  • tim.palmer
    replied
    And here is the ps listing for HSPI, no joy there either. Seems like it's not even starting up, even though HS thinks it is:

    ps -ax | grep HSPI
    1193 pts/4 Sl+ 15:19 /usr/bin/mono /usr/local/Homeseer/HSPI_Insteon.exe
    1395 pts/4 Sl+ 44:27 /usr/bin/mono /usr/local/Homeseer/HSPI_RFXCOM.exe
    2460 pts/4 Sl+ 9:34 /usr/bin/mono /usr/local/Homeseer/HSPI_HSTOUCH.exe
    24262 pts/8 S+ 0:00 grep --color=auto HSPI

    Leave a comment:


  • tim.palmer
    replied
    Here is the contents of the install.txt:

    HSPI_INSTEON_THERMOSTAT.exe,.,0
    HSPI_INSTEON_THERMOSTAT.exe.config,.,0
    HSPI_INSTEON_THERMOSTAT_README.html,.\Docs,0
    System.Data.SQLite.dll,.\bin\HSPI_INSTEON_THERMOSTAT,0
    InsteonThermostat_script_api.vb,.\scripts,0
    InsteonThermostat_toggle_mode.vb,.\scripts,0
    HTML_HELP_INSTEON_THERMOSTAT.zip,[UNZIPOVER],.\html\help\INSTEON_THERMOSTAT
    HTML_IMAGES_INSTEON_THERMOSTAT.zip,[UNZIP],.\html\images\INSTEON_THERMOSTAT

    And the only log entry that occurs when starting/enabling the plugin:
    Plug-In Finished initializing plug-in Insteon Thermostat

    It's really weird, permissions look fine, it just doesn't seem to be initializing properly when the interface is enabled. It makes sense as there still is no ini file created.

    Thanks!

    Leave a comment:


  • nfrobertson
    replied
    It should create it when the plugin runs the first time so this indicates it's not even getting as far as running. Can you post the contents of the install.txt. I just want to double check it's the linux version and not the windows version which I can tell by the contents of that file.

    Do you see anything in the log when you stop/start the plugin? Can you pull up a terminal shell and see that it seems to actually be running using ps ?

    Nathan

    Leave a comment:


  • tim.palmer
    replied
    So I think I might have found the problem. There is no hspi_insteon_thermostat.ini in my Config directory. I also see from the install.txt file that one is not created during install, so is the .ini created on first run of the plugin, or is there a default .ini that is supposed to install and is just missing from this version of the plugin installer? On a hunch, I tried to install the beta version of the plugin hoping that it was just a glitch with the installer, but no joy. Any other thoughts on this? Sorry to keep being a pain, it's just a really strange problem as your plugin was always 100% in my previous install with Windows.

    Thanks!

    Leave a comment:


  • nfrobertson
    replied
    You are correct that this plugin still requires Mark's plugin under Linux just like under Windows. First I would double check to make sure Mark's plugin is working and you can control lights or something with it. Yes, via the Hub should work. I use a Hub now on my test system. Once you are sure Mark's plugin is working then you should be able to drop in this Insteon Thermostat plugin and begin working with it. On the Config page under the General tab off to the right is an Informational section which should show "Insteon PLM/HUB Address=....." and that shows it is talking with Mark's plugin. It sounds like perhaps you haven't gotten that far yet. Look under the HS3/Config directory and find/edit hspi_insteon_thermostat.ini then set LogLevel=67 so you know you have debug logging turned on. Hopefully you'll be able to to see something in the HS3 log when you restart or turn off/on the Insteon Thermostat plugin.

    Nathan

    Leave a comment:


  • tim.palmer
    replied
    Hey Nathan! I've come back to a Linux HS3 Pro setup, and see that you now support Linux! Awesome!

    Just curious if your plugin supports access via Mark's plugin to Insteon Hub's. Everything appears to start correctly, no log errors, plugin started successfully, but it shows:

    Code:
    WARNING: Failed getting InterfaceStatus from Insteon Thermostat - the interface was not found in the list of active interfaces, the list may need to be refreshed.
    on the plugin status page, which means it can't be configured. System Info: Ubuntu 14.04 running HS Pro 3.0.0.297

    Just wondering if you've encountered something like this before or have any insight. Thanks again for all your work on this plugin!

    Leave a comment:


  • nfrobertson
    replied
    I just posted v3.0.2.1 to the updater with a revised support string so it will show as available for Linux via the HS3 updater.

    I was able to get this running with HS3 3.0.0.181 and Mark Sandler's latest Insteon plugin 3.0.5.20 under an Oracle Virtual Box running Debian 8.1.0. It ran fine right out of the box without any significant changes. Yes, I did run this through the Moma tool and with "profile 2" saw no issues (profile 4 is a whole different case). I cleaned up a bit of debugging I've been doing with others via the forum and posted this to the updater.

    HS3 Linux http://board.homeseer.com/showthread.php?t=162813

    Oracle Virtual Box (open source VM) https://www.virtualbox.org/

    Debian 8.1.0 https://www.debian.org/

    Please keep in mind you have to have a successfully working Linux environment with HS3 and Mark's plugin before even attempting to use this Insteon Thermostat plugin. I was able to get this working because Virtual Box apparently has USB drivers that will allow mapping the Insteon USB PLM into Debian so it can be used via /dev/ttyUSB0. Mark has advised that if you are running a dedicated system (not a VM) with Debian/Ubuntu that /dev/ttyUSB0 is *not* supported. I guess that means it has to connect to a real COM# port but I haven't tested that.

    Good luck!

    Nathan

    Leave a comment:


  • nfrobertson
    replied
    Getting Debian running in an Oracle VirtualBox then will run HS3 .181 for Linux and see where we're at with adding Linux support for this plugin. Stay tuned...

    Nathan

    Leave a comment:

Working...
X