Version 1.1.15 released


#1

Hi, everybody.
I am here to announce the first release of the separated fork of HomeGenie: https://github.com/Bounz/HomeGenie-BE/releases/tag/V1.1.15

KNOWN ISSUES:

There are problems on Linux/RPi with missed native libraries. I recommend you to try it only on Windows right now.

So, here we are with the following changes (compared to Gene’s r526):

  • With the great help from @David_Wallis configured automatic builds and deployments through AppVeyor
  • Incorporated MIG libraries into HomeGenie solution
  • Changed links and titles in UI so now they should point to Bounz’s repository and new forum (by @David_Wallis)
  • Refactored update checker and installer, moving away from storing information about release in release_info.xml

Features from Genie’s branch, that haven’t been released:

  • fix ModulesManager.Each method bug: “Collection was modified, enumeration operation may not execute”
  • fix camera widget issue with URLs containing ‘?’ symbol
  • add missing Mysensors icons (by @raptorjr)

Features from @Bounz’s branch:

  • AutoRestart of crashed programs
  • 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 ConfigureMaintenance 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 :blush: and I ask you to reply in this topic about your installation experience: was it successful or not and what system do you use.


Z-Wave Devolo Home Control Wall Switch
#2

#3

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)
.


#4

Thanks Bounz for this release.

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.


#5

Sounds like HG has grabbed some other port other than port 80. Have you tried :8080 or 8081 etc


#6

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.


#7

Hi, Thomas.
As @Petediscrete said, did you try to use other ports?

There is one, written by Generoso: https://bounz.github.io/HomeGenie-BE/#/get_started
Let use it for the beginning.


#8

Ok Ver 1.1.15 up and running here on Raspberry Pi3 Raspbian Stretch Lite.

Updated the following way

  1. Backed up configuration in Ver .526 from HomeGenie Maintenance
  2. uninstall current hg with the command sudo dpkg --remove homegenie
  3. completely remove the hg folder sudo rm -rf /usr/local/bin/homegenie
  4. install new version sudo gdebi homegenie-beta_1.1.15_all.deb
  5. restore your backup

Everything ran smoothly. No problems to report


#9

Thanks - tried both 8080 and 8081. Also, netstat did not show 8080 or 8081 as active ports.

Will rebuild a SD card. See what happens.


#10

Hi tflemer,
I got the same problem and as mono is not part of Stretch, it needs to be installed :slight_smile:
sudo apt-get install mono-complete

HG should be accessible after this installation.


#11

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.


#12

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.


#13

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…

2018-01-21 18:26:14.4917 Debug Adding Gateway WebServiceGateway
2018-01-21 18:26:14.5008 Debug Setting Gateway options
2018-01-21 18:26:14.5054 Debug WebServiceGateway: BaseUrl=/hg/html
2018-01-21 18:26:14.5117 Debug WebServiceGateway: HomePath=html
2018-01-21 18:26:14.5124 Debug WebServiceGateway: Host=+
2018-01-21 18:26:14.5124 Debug WebServiceGateway: Port=80
2018-01-21 18:26:14.5124 Debug WebServiceGateway: Username=admin
2018-01-21 18:26:14.5136 Debug WebServiceGateway: Password=
2018-01-21 18:26:14.5136 Debug WebServiceGateway: HttpCacheIgnore.1=^.*\/pages\/control\/widgets\/.*\.(js|html)$
2018-01-21 18:26:14.5160 Debug WebServiceGateway: HttpCacheIgnore.2=^.*\/html\/index.html
2018-01-21 18:26:14.5168 Debug WebServiceGateway: UrlAlias.1=api/HomeAutomation.HomeGenie/Logging/RealTime.EventStream:events
2018-01-21 18:26:14.5183 Debug WebServiceGateway: UrlAlias.2=hg/html/pages/control/widgets/homegenie/generic/images/socket_on.png:hg/html/pages/control/widgets/homegenie/generic/images/switch_on.png
2018-01-21 18:26:14.5183 Debug WebServiceGateway: UrlAlias.3=hg/html/pages/control/widgets/homegenie/generic/images/socket_off.png:hg/html/pages/control/widgets/homegenie/generic/images/switch_off.png
2018-01-21 18:26:14.5194 Debug WebServiceGateway: UrlAlias.4=hg/html/pages/control/widgets/homegenie/generic/images/siren.png:hg/html/pages/control/widgets/homegenie/generic/images/siren_on.png
2018-01-21 18:26:14.5194 Debug WebServiceGateway: EnableFileCaching=false
2018-01-21 18:26:14.5433 Debug Adding Interface Protocols.UPnP Version: 1.0.5800.25495
2018-01-21 18:26:14.5509 Debug Setting Interface options

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.


#14

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.


#15

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.


#16

Actually, this should not matter, because SQLite is an embeddable database, so you don’t need to “install” it.


#17

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.


#18

@Bounz - I haven’t actually seen this being used - can we not just remove this?


#19

@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…

this is a script that can be tweaked for your env to do exactly that: https://github.com/davidwallis3101/HGConfigure/blob/master/Configure_161.ps1


#20

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.