Added Common.Logging NuGet package so it restores during build, moved packages folder to the root folder of repository
Added unit tests for SchedulerService
BEFORE YOU INSTALL
Please, make a full backup of your existing HomeGenie installation:
backup settings using HomeGenie’s UI (on Configure → Maintenance page)
backup HomeGenie’s installation folder in case you will need to return to the previous version
Also, take into account that I haven’t tested Windows installer and HomeGenie manager program (that icon in the tray that allows you to start/stop HG).
Also, during the preparation of this release, I’ve found a bug in Mono on macOS High Sierra (https://github.com/mono/mono/issues/6612) which makes it impossible to run HG on macOS because it crashes during settings up UPnP device.
INSTALLATION
You should be able to install this version of HomeGenie as you did it earlier.
After installation, you should be able to restore your settings and automation programs from the backup.
So I hope everybody will be able to install this version without a problem and I ask you to reply in this topic about your installation experience: was it successful or not and what system do you use.
I started with a fresh SD card of Raspian Stretch. Attached is my running instructions for installation with updates for V 1.1.15. All went well to the end. I got the message that HG is running and can be accessed via http. Looking at top in a terminal session, HG is there, but refusing connections. I may have goofed by not rebooting before running apt-get upgrade. Will do over. At this point HG is not accessible on either localhost or the assigned IP address.RPi 3B Raspian setup.zip (16.2 KB)
.
I install it on Rpi 3 running a fresh installation of Strech and everything is ok. I had a problem to access it at first, but it was because I forgot to install Mono. I restored a backup done with HG r526.
Bounz you state that the user can install this version as they did before. Maybe this would be a good place to let potential users know how to install it with instructions.
HG will grab the first available port if 80 is not available. It’s 80,8081,8082,8083 and so on. If for some reason HG hasn’t started you can start it manually by typing
mono homegenie.exe in the working directory. No need to keep reinstalling from the start.
Make sure you have the latest version of Mono installed. The Stretch repository version is Mono 4x. The best way to do this is the following
Sudo apt-get install dirmngr (this ensures you have the correct key to install this version of Mono)
Go to the Mono website, select your particular flavour of Mono and follow the simple instructions. This will give you the latest version Mono 5x and helps avoid issues with security certs and the sending of email notifications within Homegenie.
This is why a step by step installation guide is needed. Mono is a basic requirement for installation of Homegenie.
Current
.deb installs. Generates an error.log file
Mono is installed with V1.1.15
As below, HG is starting on port 80. From log file
HG is running – just not accepting connections on port 80. (or ports 8080+)
I can access the RPi on port 22. Also, the PIXEL GUI is functional.
Tried mono Homegenie.exe manual start - same errors…
Then drops out here. Not sure – error says SQLite3. Install says (libmono-sqlite4.0-cil install)
2018-01-21 18:26:18.5178 Info HomeAutomation.HomeGenie.Automation 8 Automation Program Program.Status Idle
2018-01-21 18:26:18.6657 Debug Disabling Interface Protocols.UPnP
2018-01-21 18:26:18.7042 Info HomeAutomation.HomeGenie.Automation 180 Automation Program Program.Status Idle
2018-01-21 18:26:18.7169 Debug Disabling Interface HomeAutomation.ZWave
2018-01-21 18:26:18.7215 Debug Disabling Interface HomeAutomation.X10
2018-01-21 18:26:18.7289 Info HomeAutomation.HomeGenie 0 HomeGenie service ready SystemInfo.HttpAddress +:80
2018-01-21 18:26:18.9006 Error HomeAutomation.HomeGenie Service.StatisticsLogger Database Error Exception.StackTrace SQLite.Interop.dll: at (wrapper managed-to-native) System.Data.SQLite.UnsafeNativeMethods:sqlite3_config_none (System.Data.SQLite.SQLiteConfigOpsEnum)
at System.Data.SQLite.SQLite3.StaticIsInitialized () [0x0001d] in <9ce7d8410bcd4d7f88eed4557d443345>:0
at System.Data.SQLite.SQLiteLog.Initialize () [0x00000] in <9ce7d8410bcd4d7f88eed4557d443345>:0
at System.Data.SQLite.SQLiteConnection..ctor (System.String connectionString, System.Boolean parseViaFramework) [0x00013] in <9ce7d8410bcd4d7f88eed4557d443345>:0
at System.Data.SQLite.SQLiteConnection..ctor (System.String connectionString) [0x00000] in <9ce7d8410bcd4d7f88eed4557d443345>:0
at (wrapper remoting-invoke-with-check) System.Data.SQLite.SQLiteConnection:.ctor (string)
at HomeGenie.Service.Logging.StatisticsLogger.OpenStatisticsDatabase () [0x00023] in <8d43297479e340b0bc2b2a967fada7ef>:0
2018-01-21 18:26:19.4658 Error HomeAutomation.HomeGenie Trapper Unhandled Exception Error.Exception System.BadImageFormatException: Could not resolve field token 0x04000047
File name: 'HomeGenie'
at HomeGenie.Service.HomeGenieService..ctor () [0x0009b] in <8d43297479e340b0bc2b2a967fada7ef>:0
at HomeGenie.Program.Main (System.String[] args) [0x0003f] in <8d43297479e340b0bc2b2a967fada7ef>:0
From the Error.log. SQLite is not liking HomeGenie.
ot set to an instance of an object Exception.StackTrace at HomeGenie.Automation.ProgramManager.RoutePropertyBeforeChangeEvent (System.Object eventData) [0x0003c] in <8d43297479e340b0bc2b2a967fada7ef>:0
at HomeGenie.Automation.ProgramManager.SignalPropertyChange (System.Object sender, HomeGenie.Data.Module module, MIG.MigEvent eventData) [0x00029] in <8d43297479e340b0bc2b2a967fada7ef>:0
at HomeGenie.Service.HomeGenieService+<>c__DisplayClass65_0.<migService_InterfacePropertyChanged>b__1 () [0x00001] in <8d43297479e340b0bc2b2a967fada7ef>:0
at HomeGenie.Service.Utility+<>c__DisplayClass23_0.<RunAsyncTask>b__0 () [0x00002] in <8d43297479e340b0bc2b2a967fada7ef>:0 |
2018-01-21 19:04:49.2596|ERROR|MIG.MigService|HomeAutomation.HomeGenie Service.StatisticsLogger Database Error Exception.StackTrace SQLite.Interop.dll: at (wrapper managed-to-native) System.Data.SQLite.UnsafeNativeMethods:sqlite3_config_none (System.Data.SQLite.SQLiteConfigOpsEnum)
at System.Data.SQLite.SQLite3.StaticIsInitialized () [0x0001d] in <9ce7d8410bcd4d7f88eed4557d443345>:0
at System.Data.SQLite.SQLiteLog.Initialize () [0x00000] in <9ce7d8410bcd4d7f88eed4557d443345>:0
at System.Data.SQLite.SQLiteConnection..ctor (System.String connectionString, System.Boolean parseViaFramework) [0x00013] in <9ce7d8410bcd4d7f88eed4557d443345>:0
at System.Data.SQLite.SQLiteConnection..ctor (System.String connectionString) [0x00000] in <9ce7d8410bcd4d7f88eed4557d443345>:0
at (wrapper remoting-invoke-with-check) System.Data.SQLite.SQLiteConnection:.ctor (string)
at HomeGenie.Service.Logging.StatisticsLogger.OpenStatisticsDatabase () [0x00023] in <8d43297479e340b0bc2b2a967fada7ef>:0 |
2018-01-21 19:04:49.6995|ERROR|MIG.MigService|HomeAutomation.HomeGenie Trapper Unhandled Exception Error.Exception System.BadImageFormatException: Could not resolve field token 0x04000047
File name: 'HomeGenie'
I have been running apt-get upgrade during initial setup. This may be causing the disconnect. Otherwise mono and SQLite are all coming from the HG .deb file. So, should at least get me to http.
I was looking for similar error messages on the internet and it seems like an internal mono bug during loading SQLite.dll, so HomeGenie.exe crashes and therefore you can’t access it.
If it’s possible - try to start with a clean slate.
Just two things come to mind. I installed Raspbian Stretch Lite (version without the GUI) and the default database installed is MariaDB and not SQL. Maybe if you try installing the the Raspbin Stretch Lite version, ensure you have the latest version of Mono 5.4x and install mono-complete and any other dependencies required.
Good to know on the bug. I have setup r526 many times to fill out my recipe card as posted in this thread. My running version of r526 is good for comparison with netstat, ps…also there is no error.log in r526. Based on the log files, it looks like apt-get upgrade may be causing the disconnect. Also, other people are getting V1.1.15 to run. Will verify today.
There are some follow on objectives that I want to work on. Like up loading the HG backup file. Testing with Raspian Lite. PIXEL is a lite weight GUI. I am always impressed with the fast power up and reboot times of RPi 3B. So, would not expect Raspian Lite to fix any basic functions. However, I am noticing lag with r526 when a number of modules and programs are added in. I got carried away and cut out too many HG programs in an attempt to speed up processing. Had to revert back. This is all next steps.
@tflemer I have a script that does exactly that and cuts back all the shite that is installed by default…
I have created an issue on github to try and create a ‘minimal’ release that people can use that doesn’t contain all the demo and noise… IE Phillips Hue generates around 11,000 log entries per month on a default install and I don’t have any phillips hue stuff…
David – thanks for the alternate script. I agree a stripped-down version would be useful and will give it a go. The fully loaded version is helpful as guidance to set up in HG. So, have both available would be great.
I figured, some scientific method is needed in my process. The last runup of V 1.1.15 ended at the same place. Refused connection. Also, got the same error and info logs in HG. So, took a SDcard, went through the steps, and reverted back to r526. It works, no error or info log. Have capture files that I will post once zipped up. Note: Both are using the same version of Raspian, RPi board…et al. I did notice this go by:
update-binfmts: warning: /usr/share/binfmts/cli: no executable /usr/bin/cli found, but continuing anyway as you request
Created symlink /etc/systemd/system/multi-user.target.wants/binfmt-support.service → /lib/systemd/system/binfmt-support.service.
However, it is in both versions r526 and V1.1.15. No speculation here, I just need to up my scientific method. Wish me luck on that.