Scripts
VB includes were not working.
Voice assistants and other 3rd party links
As mentioned above the setup hung trying to sort these links so once everything else is working the last step will be sorting Alexa, Google Assistant and IFTTT linkages.
Falling back to HS3
After spending a couple days on this I needed to fall back to HS3 till I can get enough working HS4 to make it reasonable to so I'm falling back. Fortunately for me that means shutdown HS4 and powering up the old PC. It seems like everything is working but it will take some time to see if that truly is the case.
Picking back up
Z-Wave
The Z-nets only allow one connection and the connections can cross as it tries to sort them. If you have more than one (I have 3), best to turn all the plugins off, reboot each Z-Net and then turn the plugins back on one at a time.
Preferably in ascending number order. The simplest way to reboot the Z-nets is just to go to the Z-net's web interface and click submit.
Still it seems I needed to a rescan to get motion triggers working again.
Plugins
Noticing some plugins do not seem to ever come out of "start is pending" status
Hue / JowiHue
Hubs did not show up at first. Did a rescan and they appeared.
Scenes and animations seem to have been lost in the migration. Needed to recreate them
Harmony
Looks like only the first instance is needed now.
I also needed to delete and readd one hub before it would connect.
Timers
Triggers using timers did not convert. As in this in HS3 Windows
Got converted to this in HS4 linux.
Note too the save icon. Change do not autosave like before. You should click the save action after editing a trigger or action.
Events
Other than mentioned elsewhere I'm seeing events triggered for no obvious reason.
Scripts
As mentioned above the events needed the paths edited but after that I started see a lot of errors that appeared to indicate issues with includes and imports. Turns out those errors are misleading. For instance when I run my script ChkSensors.vb I see:
09:44:07:5322:[Event]->Event Trigger "Monitor Sensor check"
09:44:07:5326:[Event]->Running script in background (Sensor check): ChkSensors.vb("chkSensors")
09:44:08:3512:[Error]->Compiling script ChkSensors.vb: The import 'System.Core' could not be found.
09:44:08:3513:[Error]->Compiling script ChkSensors.vb: Variable declaration without an 'As' clause; Object type assumed.
09:44:08:3514:[Error]->Compiling script ChkSensors.vb: Variable declaration without an 'As' clause; Object type assumed.
09:44:08:3515:[Error]->Compiling script ChkSensors.vb: Variable declaration without an 'As' clause; Object type assumed.
09:44:08:3516:[Error]->Compiling script ChkSensors.vb: Variable declaration without an 'As' clause; Object type assumed.
09:44:08:3517:[Error]->Compiling script ChkSensors.vb: Variable declaration without an 'As' clause; Object type assumed.
09:44:08:3518:[Error]->Compiling script ChkSensors.vb: Variable declaration without an 'As' clause; Object type assumed.
09:44:08:3519:[Error]->Compiling script ChkSensors.vb: Variable declaration without an 'As' clause; Object type assumed.
09:44:08:3519:[Error]->Compiling script ChkSensors.vb: Variable declaration without an 'As' clause; Object type assumed.
09:44:08:3520:[Error]->Compiling script ChkSensors.vb: Variable declaration without an 'As' clause; Object type assumed.
09:44:08:3521:[Error]->Compiling script ChkSensors.vb: Variable declaration without an 'As' clause; Object type assumed.
09:44:08:3522:[Error]->Compiling script ChkSensors.vb: Variable declaration without an 'As' clause; Object type assumed.
09:44:08:3522:[Error]->Compiling script ChkSensors.vb: Variable declaration without an 'As' clause; Object type assumed.
09:44:08:3523:[Error]->Compiling script ChkSensors.vb: Variable declaration without an 'As' clause; Object type assumed.
09:44:08:3524:[Error]->Compiling script ChkSensors.vb: Variable declaration without an 'As' clause; Object type assumed.
09:44:08:3525:[Error]->Compiling script ChkSensors.vb: Variable declaration without an 'As' clause; Object type assumed.
09:44:08:3526:[Error]->Compiling script ChkSensors.vb: Variable declaration without an 'As' clause; Object type assumed.
09:44:08:3527:[Error]->Compiling script ChkSensors.vb: Variable declaration without an 'As' clause; Object type assumed.
09:44:08:3528:[Error]->Compiling script ChkSensors.vb: Variable declaration without an 'As' clause; Object type assumed.
09:44:08:3528:[Error]->Compiling script ChkSensors.vb: 42021
09:44:08:3529:[Error]->Compiling script ChkSensors.vb: 42021
09:44:08:3529:[Error]->Compiling script ChkSensors.vb: 42021
09:44:08:3530:[Error]->Compiling script ChkSensors.vb: 42021
09:44:08:3531:[Error]->Compiling script ChkSensors.vb: Variable declaration without an 'As' clause; Object type assumed.
09:44:08:3531:[Error]->Compiling script ChkSensors.vb: 'lastSaid2969Ref' is not declared. It may be inaccessible due to its protection level.
09:44:08:3532:[Error]->Compiling script ChkSensors.vb: 'lastSaid2969Ref' is not declared. It may be inaccessible due to its protection level.
09:44:08:3533:[Error]->Compiling script ChkSensors.vb: Function without an 'As' clause; Object return type assumed.
09:44:08:3534:[Error]->Compiling script ChkSensors.vb: 'lastSaid2969Ref' is not declared. It may be inaccessible due to its protection level.
09:44:08:3535:[Error]->Compiling script ChkSensors.vb: Function without an 'As' clause; Object return type assumed.
09:44:08:3536:[Error]->Compiling script ChkSensors.vb: 'lastSaid2969Ref' is not declared. It may be inaccessible due to its protection level.
09:44:08:3536:[Error]->Compiling script ChkSensors.vb: 'AnnounceMode981Ref' is not declared. It may be inaccessible due to its protection level.
09:44:08:3537:[Error]->Compiling script ChkSensors.vb: 'AnnounceMode981Ref' is not declared. It may be inaccessible due to its protection level.
09:44:08:3538:[Error]->Compiling script ChkSensors.vb: 'CheckedDeviceCount4605Ref' is not declared. It may be inaccessible due to its protection level.
But from what I'm reading the issue is a bug with vbnc and arrays. For examples these, though none fix for what I'm seeing:
Bottom line "System.Core" is basically an indicator "something" went wrong and the "Variable declaration without an 'As' " are real warnings that should not matter. The "inaccessible due to its protection level" errors are the real issues.
At this point I decided to take a step back and see if I could get HS3 running on Linux to separate the migration to Linux issues from the HS3 to HS4 issues. Unfortunately it looks like at least some of the issues might be the events export as some things were still missing. So it looks like it makes little diff if I go to to HS3 or HS4 as it appears the migration to Linux is most of the issues. So I looked at my Raspberry Pi HS3 test instance which was working to see what version on mono it is using to downgrade my CentOS system to. First I needed to add the mono repo to get at the legacy versions.
yum-config-manager --add-repo http://download.mono-project.com/repo/centos7
Remove the current mono version
yum remove mono* libmono*
yum autoremove
And install the legacy versions
yum install -y mono-complete-5.18.0.240-0.xamarin.2.epel7.x86_64 --nogpgcheck
--nogpgcheck is added because the keys were missing when I was doing my install.
Just for added fun the 5.18.0.240-0 version on the Raspberry Pi does not appear to match up with the same version on CentOS. The version vbc on CentOS seemed too old for the version Homeseer needs from the error
Unhandled Exception:
System.TypeLoadException: Could not load type of field 'HSConsole.My.MyProject:m_ComputerObjectProvider' (0) due to: Could not load file or assembly 'Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Could not load type of field 'HSConsole.My.MyProject:m_ComputerObjectProvider' (0) due to: Could not load file or assembly 'Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
The newest mono-complete from the mono repo installs these versions
====================================================================================================================================
Package Arch Version Repository Size
====================================================================================================================================
Installing:
mono-complete x86_64 6.12.0.107-0.xamarin.9.epel7 download.mono-project.com_repo_centos7 3.5 k
Installing for dependencies:
ibm-data-db2 x86_64 6.12.0.107-0.xamarin.9.epel7 download.mono-project.com_repo_centos7 39 k
libmono-2_0-devel x86_64 6.12.0.107-0.xamarin.9.epel7 download.mono-project.com_repo_centos7 52 k
libmono-llvm0 x86_64 6.12.0.107-0.xamarin.9.epel7 download.mono-project.com_repo_centos7 8.9 M
libmonoboehm-2_0-devel x86_64 6.12.0.107-0.xamarin.9.epel7 download.mono-project.com_repo_centos7 3.1 k
libmonosgen-2_0-devel x86_64 6.12.0.107-0.xamarin.9.epel7 download.mono-project.com_repo_centos7 6.3 k
mono-core x86_64 6.12.0.107-0.xamarin.9.epel7 download.mono-project.com_repo_centos7 34 M
mono-data x86_64 6.12.0.107-0.xamarin.9.epel7 download.mono-project.com_repo_centos7 4.4 M
mono-data-oracle x86_64 6.12.0.107-0.xamarin.9.epel7 download.mono-project.com_repo_centos7 80 k
mono-data-sqlite x86_64 6.12.0.107-0.xamarin.9.epel7 download.mono-project.com_repo_centos7 67 k
mono-devel x86_64 6.12.0.107-0.xamarin.9.epel7 download.mono-project.com_repo_centos7 25 M
mono-extras x86_64 6.12.0.107-0.xamarin.9.epel7 download.mono-project.com_repo_centos7 398 k
mono-llvm-tools x86_64 6.0+mono20190708165219-0.xamarin.1.epel7 download.mono-project.com_repo_centos7 17 M
mono-locale-extras x86_64 6.12.0.107-0.xamarin.9.epel7 download.mono-project.com_repo_centos7 291 k
mono-mvc x86_64 6.12.0.107-0.xamarin.9.epel7 download.mono-project.com_repo_centos7 433 k
mono-reactive x86_64 6.12.0.107-0.xamarin.9.epel7 download.mono-project.com_repo_centos7 332 k
mono-wcf x86_64 6.12.0.107-0.xamarin.9.epel7 download.mono-project.com_repo_centos7 973 k
mono-web x86_64 6.12.0.107-0.xamarin.9.epel7 download.mono-project.com_repo_centos7 2.2 M
mono-winforms x86_64 6.12.0.107-0.xamarin.9.epel7 download.mono-project.com_repo_centos7 1.5 M
mono-winfxcore x86_64 6.12.0.107-0.xamarin.9.epel7 download.mono-project.com_repo_centos7 263 k
monodoc-core x86_64 6.12.0.107-0.xamarin.9.epel7 download.mono-project.com_repo_centos7 19 M
msbuild noarch 1:16.6+xamarinxplat.2020.10.22.18.31-0.xamarin.1.epel7 download.mono-project.com_repo_centos7 10 M
msbuild-libhostfxr x86_64 3.0.0.2019.04.16.02.13-0.xamarin.4.epel7 download.mono-project.com_repo_centos7 167 k
msbuild-sdkresolver noarch 1:16.6+xamarinxplat.2020.10.22.18.31-0.xamarin.1.epel7 download.mono-project.com_repo_centos7 49 k
Updating for dependencies:
libmono-2_0-1 x86_64 6.12.0.107-0.xamarin.9.epel7 download.mono-project.com_repo_centos7 3.3 k
libmonoboehm-2_0-1 x86_64 6.12.0.107-0.xamarin.9.epel7 download.mono-project.com_repo_centos7 6.3 M
libmonosgen-2_0-1 x86_64 6.12.0.107-0.xamarin.9.epel7 download.mono-project.com_repo_centos7 6.8 M
From the epel repo
====================================================================================================================================
Package Arch Version Repository Size
====================================================================================================================================
Installing:
mono-complete x86_64 6.8.0-1.el7 epel 39 k
Installing for dependencies:
glib2-devel x86_64 2.56.1-8.el7 updates 454 k
ibm-data-db2 x86_64 6.8.0-1.el7 epel 75 k
mono-core x86_64 6.8.0-1.el7 epel 19 M
mono-data x86_64 6.8.0-1.el7 epel 4.8 M
mono-data-oracle x86_64 6.8.0-1.el7 epel 116 k
mono-data-sqlite x86_64 6.8.0-1.el7 epel 103 k
mono-devel x86_64 6.8.0-1.el7 epel 6.4 M
mono-extras x86_64 6.8.0-1.el7 epel 463 k
mono-locale-extras x86_64 6.8.0-1.el7 epel 325 k
mono-mvc x86_64 6.8.0-1.el7 epel 484 k
mono-reactive x86_64 6.8.0-1.el7 epel 400 k
mono-wcf x86_64 6.8.0-1.el7 epel 921 k
mono-web x86_64 6.8.0-1.el7 epel 2.5 M
mono-winforms x86_64 6.8.0-1.el7 epel 1.6 M
mono-winfx x86_64 6.8.0-1.el7 epel 310 k
monodoc x86_64 6.8.0-1.el7 epel 19 M
Transaction Summary
====================================================================================================================================
Install 1 Package (+16 Dependent packages)
But still getting the Exception so added mono-*
====================================================================================================================================
Package Arch Version Repository Size
====================================================================================================================================
Installing:
mono-addins x86_64 1.1-3.el7 epel 417 k
mono-addins-devel x86_64 1.1-3.el7 epel 18 k
mono-basic x86_64 4.6-3.el7 epel 751 k
mono-basic-devel x86_64 4.6-3.el7 epel 9.2 k
mono-cecil x86_64 0.9.6-6.el7 epel 231 k
mono-cecil-devel x86_64 0.9.6-6.el7 epel 4.7 k
mono-icon-theme noarch 1:4.10.5-4.el7 base 3.7 M
mono-mvc-devel x86_64 6.8.0-1.el7 epel 39 k
mono-reactive-devel x86_64 6.8.0-1.el7 epel 39 k
mono-reactive-winforms x86_64 6.8.0-1.el7 epel 49 k
mono-web-devel x86_64 6.8.0-1.el7 epel 39 k
mono-yui x86_64 1.1.0-7.el7 epel 232 k
mono-zeroconf x86_64 0.9.0-16.el7 epel 99 k
mono-zeroconf-devel x86_64 0.9.0-16.el7 epel 24 k
Installing for dependencies:
gtk-sharp2 x86_64 2.12.26-4.el7 epel 681 k
libyui x86_64 3.1.5-1.el7 epel 209 k
libyui-gtk x86_64 2.44.5-5.el7 epel 203 k
Transaction Summary
====================================================================================================================================
Install 14 Packages (+3 Dependent packages)
That sorted the Exception which implies mono-complete is not installing needed dependencies.
After further troubleshooting is appears the issue I'm seeing comes down to variables defined in in and included script are not getting passed on to a script that includes it. For example my script PushBullet.vb includes SayIt.vb which includes Refs.vb. If I run a method in SayIt.vb it just works with no errors but if I run one in PushBullet.vb I get errors like these
03:53:29:4362:[Event]->Event Script Edit Edit PushBullet.vb triggered by the event page 'Run' button.
03:53:29:4365:[Event]->Event Trigger "Script Edit Edit PushBullet.vb"
03:53:29:4367:[Event]->Running script in background (Edit PushBullet.vb): PushBullet.vb("SendMsg","Test#test message")
03:53:30:1916:[Error]->Compiling script PushBullet.vb: Visual Basic.Net Compiler version 0.0.0.5943 (Mono 4.6 - tarball)
Copyright (C) 2004-2010 Rolf Bjarne Kvinge. All rights reserved.
/tmp/3zxjcr2a.0.vb (2,16) : warning VBNC40056: The import 'System.Core' could not be found.
/tmp/3zxjcr2a.0.vb (43,14) : warning VBNC42020: Variable declaration without an 'As' clause; Object type assumed.
/tmp/3zxjcr2a.0.vb (44,13) : warning VBNC42020: Variable declaration without an 'As' clause; Object type assumed.
/tmp/3zxjcr2a.0.vb (62,14) : warning VBNC42020: Variable declaration without an 'As' clause; Object type assumed.
/tmp/3zxjcr2a.0.vb (63,12) : warning VBNC42020: Variable declaration without an 'As' clause; Object type assumed.
/tmp/3zxjcr2a.0.vb (84,11) : warning VBNC42020: Variable declaration without an 'As' clause; Object type assumed.
/tmp/3zxjcr2a.0.vb (90,11) : warning VBNC42020: Variable declaration without an 'As' clause; Object type assumed.
/tmp/3zxjcr2a.0.vb (96,11) : warning VBNC42020: Variable declaration without an 'As' clause; Object type assumed.
/tmp/3zxjcr2a.0.vb (102,11) : warning VBNC42020: Variable declaration without an 'As' clause; Object type assumed.
/tmp/3zxjcr2a.0.vb (107,11) : warning VBNC42020: Variable declaration without an 'As' clause; Object type assumed.
/tmp/3zxjcr2a.0.vb (218,15) : warning VBNC42020: Variable declaration without an 'As' clause; Object type assumed.
/tmp/3zxjcr2a.0.vb (219,16) : warning VBNC42020: Variable declaration without an 'As' clause; Object type assumed.
/tmp/3zxjcr2a.0.vb (220,17) : warning VBNC42020: Variable declaration without an 'As' clause; Object type assumed.
/tmp/3zxjcr2a.0.vb (229,25) : warning VBNC42020: Variable declaration without an 'As' clause; Object type assumed.
/tmp/3zxjcr2a.0.vb (296,14) : warning VBNC42020: Variable declaration without an 'As' clause; Object type assumed.
/tmp/3zxjcr2a.0.vb (302,21) : warning VBNC42020: Variable declaration without an 'As' clause; Object type assumed.
/tmp/3zxjcr2a.0.vb (310,14) : warning VBNC42020: Variable declaration without an 'As' clause; Object type assumed.
/tmp/3zxjcr2a.0.vb (318,21) : warning VBNC42020: Variable declaration without an 'As' clause; Object type assumed.
/tmp/3zxjcr2a.0.vb (326,14) : warning VBNC42020: Variable declaration without an 'As' clause; Object type assumed.
/tmp/3zxjcr2a.0.vb (327,10) : warning VBNC42020: Variable declaration without an 'As' clause; Object type assumed.
/tmp/3zxjcr2a.0.vb (327,16) : warning VBNC42020: Variable declaration without an 'As' clause; Object type assumed.
/tmp/3zxjcr2a.0.vb (327,23) : warning VBNC42020: Variable declaration without an 'As' clause; Object type assumed.
/tmp/3zxjcr2a.0.vb (327,32) : warning VBNC42020: Variable declaration without an 'As' clause; Object type assumed.
/tmp/3zxjcr2a.0.vb (328,17) : warning VBNC42020: Variable declaration without an 'As' clause; Object type assumed.
/tmp/3zxjcr2a.0.vb (329,21) : warning VBNC42020: Variable declaration without an 'As' clause; Object type assumed.
/tmp/3zxjcr2a.0.vb (117,46) : error VBNC30451: 'lastSaid2969Ref' is not declared. It may be inaccessible due to its protection level.
/tmp/3zxjcr2a.0.vb (128,68) : error VBNC30451: 'lastSaid2969Ref' is not declared. It may be inaccessible due to its protection level.
/tmp/3zxjcr2a.0.vb (127,13) : warning VBNC42024: Function without an 'As' clause; Object return type assumed.
/tmp/3zxjcr2a.0.vb (125,48) : error VBNC30451: 'lastSaid2969Ref' is not declared. It may be inaccessible due to its protection level.
/tmp/3zxjcr2a.0.vb (124,17) : warning VBNC42024: Function without an 'As' clause; Object return type assumed.
/tmp/3zxjcr2a.0.vb (123,48) : error VBNC30451: 'lastSaid2969Ref' is not declared. It may be inaccessible due to its protection level.
/tmp/3zxjcr2a.0.vb (134,76) : error VBNC30451: 'AnnounceMode981Ref' is not declared. It may be inaccessible due to its protection level.
/tmp/3zxjcr2a.0.vb (135,51) : error VBNC30451: 'AnnounceMode981Ref' is not declared. It may be inaccessible due to its protection level.
/tmp/3zxjcr2a.0.vb (227,34) : error VBNC30451: 'Partition14702Ref' is not declared. It may be inaccessible due to its protection level.
/tmp/3zxjcr2a.0.vb (231,66) : error VBNC30451: 'Partition14702Ref' is not declared. It may be inaccessible due to its protection level.
/tmp/3zxjcr2a.0.vb (297,80) : error VBNC30451: 'AlarmLevel2899Ref' is not declared. It may be inaccessible due to its protection level.
/tmp/3zxjcr2a.0.vb (299,41) : error VBNC30451: 'AlarmLevel2899Ref' is not declared. It may be inaccessible due to its protection level.
/tmp/3zxjcr2a.0.vb (299,54) : error VBNC30451: 'AlarmAway' is not declared. It may be inaccessible due to its protection level.
/tmp/3zxjcr2a.0.vb (301,46) : error VBNC30451: 'AlarmLevel2899Ref' is not declared. It may be inaccessible due to its protection level.
/tmp/3zxjcr2a.0.vb (301,59) : error VBNC30451: 'AlarmHome' is not declared. It may be inaccessible due to its protection level.
vbnc : Command line : error VBNC99999: Unexpected error: Object reference not set to an instance of an object
at vbnc.ElseIfStatement.ResolveStatement (vbnc.ResolveInfo Info) [0x00058] in /builddir/build/BUILD/mono-basic-4.6/vbnc/vbnc/source/Statements/ElseIfStatement.vb:78
at vbnc.Statement.ResolveCode (vbnc.ResolveInfo Info) [0x00000] in /builddir/build/BUILD/mono-basic-4.6/vbnc/vbnc/source/Statements/Statement.vb:53
at vbnc.BaseObjects`1[T].ResolveCode (vbnc.ResolveInfo Info) [0x00054] in /builddir/build/BUILD/mono-basic-4.6/vbnc/vbnc/source/General/BaseObjects`1.vb:63
at vbnc.IfStatement.ResolveStatement (vbnc.ResolveInfo Info) [0x000ac] in /builddir/build/BUILD/mono-basic-4.6/vbnc/vbnc/source/Statements/IfStatement.vb:119
at vbnc.CodeBlock.ResolveCode (vbnc.ResolveInfo Info) [0x000c6] in /builddir/build/BUILD/mono-basic-4.6/vbnc/vbnc/source/Code/CodeBlock.vb:570
at vbnc.MethodBaseDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00088] in /builddir/build/BUILD/mono-basic-4.6/vbnc/vbnc/source/General/MethodBaseDeclaration.vb:331
at vbnc.SubDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00048] in /builddir/build/BUILD/mono-basic-4.6/vbnc/vbnc/source/Members/SubDeclaration.vb:118
at vbnc.BaseObjects`1[T].ResolveCode (vbnc.ResolveInfo Info) [0x00054] in /builddir/build/BUILD/mono-basic-4.6/vbnc/vbnc/source/General/BaseObjects`1.vb:63
at vbnc.TypeDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00081] in /builddir/build/BUILD/mono-basic-4.6/vbnc/vbnc/source/TypeDeclarations/TypeDeclaration.vb:407
at vbnc.ClassDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00029] in /builddir/build/BUILD/mono-basic-4.6/vbnc/vbnc/source/TypeDeclarations/ClassDeclaration.vb:140
at vbnc.AssemblyDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00040] in /builddir/build/BUILD/mono-basic-4.6/vbnc/vbnc/source/TypeDeclarations/AssemblyDeclaration.vb:159
at vbnc.Compiler.Compile_Resolve () [0x003ae] in /builddir/build/BUILD/mono-basic-4.6/vbnc/vbnc/source/General/Compiler.vb:416
at vbnc.Compiler.Compile () [0x004c6] in /builddir/build/BUILD/mono-basic-4.6/vbnc/vbnc/source/General/Compiler.vb:532
Compilation took 00:00:00.6890000
Taking the same scripts back to the Raspberry Pi even the SayIt.vb methods got the same "is not declared. It may be inaccessible due to its protection level." errors. Meaning it is not seeing any vars defined in an included file.
Since CentOS can see vars and method one level up, a quick fix seemed to be to copy Refs.vb in SayIt.vb though that did not sort the Alarm.vb script which includes PushBullet.vb. I worked around that by copying the bits of PushBullet.vb it used into it and including SayIt.vb.
But then vesync.vb tried to run and crashed HS4.
=================================================================
Basic Fault Address Reporting
=================================================================
Memory around native instruction pointer (0x7f139c7ac387):0x7f139c7ac377 48 63 d7 48 63 f6 48 63 f9 b8 ea 00 00 00 0f 05 Hc.Hc.Hc........
0x7f139c7ac387 48 3d 00 f0 ff ff 77 1e f3 c3 0f 1f 80 00 00 00 H=....w.........
0x7f139c7ac397 00 85 c9 7f db 89 c8 f7 d8 81 e1 ff ff ff 7f 0f ................
0x7f139c7ac3a7 44 c6 89 c1 eb ca 48 8b 15 9c 0a 39 00 f7 d8 64 D.....H....9...d
=================================================================
Managed Stacktrace:
=================================================================
at <unknown> <0xffffffff>
at scriptcode10.VBWrapper:sendCmd <0x000d7>
at scriptcode10.VBWrapper:sendOff <0x0010b>
at scriptcode10.VBWrapper:reset <0x00037>
at scriptcode10.VBWrapper:resetRef <0x0016f>
at <Module>:runtime_invoke_void__this___object <0x00094>
at <unknown> <0xffffffff>
at System.Reflection.RuntimeMethodInfo:InternalInvoke <0x000d0>
at System.Reflection.RuntimeMethodInfo:Invoke <0x00123>
at System.Reflection.MethodBase:Invoke <0x00045>
at Scheduler.clsRunVBNetScript:ExecuteScript <0x00deb>
at System.Threading.ThreadHelper:ThreadStart_Context <0x000a5>
at System.Threading.ExecutionContext:RunInternal <0x001f1>
at System.Threading.ExecutionContext:Run <0x00043>
at System.Threading.ExecutionContext:Run <0x0006f>
at System.Threading.ThreadHelper:ThreadStart <0x00043>
at System.Object:runtime_invoke_void__this__ <0x00085>
=================================================================
Connection to HomeSeer lost, exiting
So I disabled the vesync.vb script on the CentOS box and went back to the Pi with the idea trying to debug there without risking crashing my [some what] running system. In an effort to make the Pi test system closer to the CentOS system I upgraded it mono to version 6. That did not seem to change any outcomes.
This gave me some ideas on how to add some debug. After editing /usr/bin/vbnc to this
#!/bin/bash
# mono vbnc invocation script patched for HS3 aspx compatibility
logfile=/tmp/$(basename $0)$$.log
echo "$0 $@" > $logfile
for x
do
echo $x >> $logfile
if [[ $x =~ ^/tmp/ && -e $x ]]
then
(echo "------------"; echo "$x "; cat $x) >> $logfile
fi
done
exec /usr/bin/mono --debug $MONO_OPTIONS /usr/lib/mono/4.5/vbnc.exe "$@" 2>&1 | tee -a $logfile
This lets you see the options used to compile the script and sync the code lines to stacktrace. The start of the log in this case read:
/usr/bin/vbnc /quiet /target:library /out:/tmp/gnq3bi3e.dll /r:System.dll /r:System.Core.dll /r:System.Xml.dll /r:System.Data.dll /r:Scheduler.dll /r:HomeSeerAPI.dll /r:Microsoft.VisualBasic.dll /r:System.Data.DataSetExtensions.dll /r:System.Data.Linq.dll /r:System.Xml.Linq.dll /r:HSCF.dll /r:Microsoft.VisualBasic.dll /t:library /tmp/gnq3bi3e.0.vb
/quiet
/target:library
/out:/tmp/gnq3bi3e.dll
/r:System.dll
/r:System.Core.dll
/r:System.Xml.dll
/r:System.Data.dll
/r:Scheduler.dll
/r:HomeSeerAPI.dll
/r:Microsoft.VisualBasic.dll
/r:System.Data.DataSetExtensions.dll
/r:System.Data.Linq.dll
/r:System.Xml.Linq.dll
/r:HSCF.dll
/r:Microsoft.VisualBasic.dll
/t:library
/tmp/gnq3bi3e.0.vb
------------
/tmp/gnq3bi3e.0.vb
<feff>Imports System
Imports System.Core
Imports System.Xml
Imports System.Data
Imports System.Linq
Imports System.Data.Linq
Imports Microsoft.VisualBasic
Imports Scheduler
Imports HomeSeerAPI
Imports HomeSeerAPI.CAPI
Imports System.Collections
Namespace scriptcode11
Class VBWrapper
dim hs as object
public sub InitHS(newhs as object)
hs = newhs
end sub
'load object refs and speech methods
' import headers def
' Methods for sending messages to Pushbullet
Sub Main(ByVal params As String)
SendMsg(params)
End Sub
You will note the includes are missing since the start of my code ought to be:
'load object refs and speech methods
#Include SayIt.vb
' import headers def
#Include Secrets.vb
' Methods for sending messages to Pushbullet
Sub Main(ByVal params As String)
SendMsg(params)
End Sub
Most documentation says there is no Include support in vb. Which might explain why it does not work in mono though it worked in Windows VB as mentioned here and was working fine for me in my Windows instance. (Unfortunately all the scripts I had previously tried on my Pi test instance did not use includes.) So now I'm looking at how to rewrite without using Includes. It looks like the best solution for me is to change all the SayIt.vb method calls to use RunScriptFunc instead.
Starting Over going from HS3 on Windows to HS4 on Windows instead.
After spending close to 2 weeks trying to sort getting HS4 on Linux to work only to have it crash on me yet again requiring a reboot of the machine to get the plugins working again I decided staying on Windows might make more sense for now. Especially since it appears my scripts will need major rewrites to work on Linux. Note issues below were seen in both Windows and Linux unless otherwise noted.
Basic install