Version 1.1.15 released

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

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.

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

@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

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.

Just for anyone either coming to HomeGenie for the first time or are struggling to get HomeGenie working, this is the procedure I followed starting with a blank SD card and installing Raspbian Stretch Lite on a Raspberry Pi. If it’s not suitable here you can move it to somewhere else.

Remember I used this installation procedure only for Raspbian Stretch.

Raspbian Stretch Installation Instructions for a HomeGenie Setup

  1. Download latest Raspbian Stretch Lite image
  2. Write image to blank SD card using Win32 Disk imager ( or any other disk imaging software )
  3. Create a blank text file on the PC with the name SSH. with no extension. Place this file onto the the SD card. It allows you to SSH into the Raspberry Pi later. SSH is automatically disabled on all new Raspbian Stretch images.
  4. Remove SD card and put it in the Raspberry Pi and power up the Pi.

5 .Identify what ip address the Pi has booted on in your network. In a PuTTY session (or any other SSH software) log into the Pi from your PC using the address you identified
6. You will be asked for a login name. Use the default name pi and the default password raspberry. You are now logged into the Pi.
7. The first command to use is sudo raspi-config. First thing to do here is set a new password for your Pi. The next thing is to expand the file system so Raspbian uses the complete SD card for storage. Some other settings you might like to change too. Once finished save your settings and reboot your Pi.
8. When logging in now the login name is pi and the password is the new password you created.
9. At the prompt type sudo apt-get update
10. Next command is sudo apt-get upgrade. This will take quite a while to complete.
11 Next command at the prompt will be sudo apt-get install dirmngr This will allow you to install the latest version of Mono for your version of Raspbian.
12. The following will install Mono 5.4 on Raspbian Stretch.

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF

echo “deb http://download.mono-project.com/repo/debian raspbianstretch main” | sudo tee /etc/apt/sources.list.d/mono-official.list

sudo apt-get update

This will take a while too. You now have a version of Raspbian Stretch Lite which you can now install HomeGenie on.

HomeGenie installation as follows

From the command prompt in the PuTTY session on your PC use the following commands

wget https://github.com/Bounz/HomeGenie-BE/releases/download/V1.1.15/homegenie_1.1.15_all.deb

sudo apt-get update

sudo apt-get install gdebi-core

sudo gdebi homegenie_1.1.15_all.deb

You should now be prompted to access HomeGenie by typing the ip address of your Raspberry Pi in a browser session on your PC. You have already identified the ip address of your Raspberry Pi earlier.

Optional dependencies

In order to activate some features, optional dependencies may be required to install.

Audio playback utilities

sudo apt-get install alsa-utils lame

Embedded speech syntesys engine

sudo apt-get install libttspico-utils

SSL client support

sudo apt-get install ca-certificates-mono

LIRC Infrared inteface

sudo apt-get install lirc liblircclient-dev

Video4Linux camera

sudo apt-get install libv4l-0

X10 CM15 Home Automation interface

sudo apt-get install libusb-1.0-0 libusb-1.0-0-dev

Arduino™ programming from HG program editor

sudo apt-get install arduino-mk empty-expect

I added this because looks like that some package references it: https://plus.google.com/103363116404947540962/posts/87V5H2bHmyW
Maybe this is some other interface or automation program… I don’t know, this issue needs more investigation.

Here is are logs on installing r526 and V1.1.15. The error.log must be telling me something. I just don’t know what. I did look in the .deb file, thinking that gets to mirror servers might be the disconnect. Not sure the USA servers are up-to-date. However, both versions pull US servers. Maybe someone can pin point from the error.log where I am going wrong.HG install r526 01222018.zip (11.6 KB)
HG V1-1-15 install 01222018.zip (32.0 KB)

@tflemer, thank you for your logs, they contain comprehensive data.
Looks like one of the problems is corrupted database image (homegenie_stats.db file).

2018-01-22 08:46:25.9240|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 |

You see, there is text “Database Error” before the stack trace. I was able to reproduce this error by writing random characters in .db file.
So, as a solution, I can offer you to replace that file with one from the previous installation (r526), because it looks like default empty .db in distribution is also corrupted.

But the other error messages look weird. And as I can see corrupted database should not lead to the app crash.

P.S. Also, try to install Mono from official repositories. As I can see from your installation log mono’s package repository hosts are not added to your system’s apt-get sources. See http://www.mono-project.com/download/#download-lin-raspbian

@Petediscrete I wonder if we can mark those packages as dependencies in the .deb file…

If we could get some feedback from users on how successful they were installing from these repositories and getting Homegenie up and running as a result, it would certainly would be an ideal thing to do.

As Debian/Raspbian users know, Mono in their distribution repositories is usually a couple of releases behind and prevents users from taking full advantage of the current Mono development which is an ever evolving creature.

On a side note, Mono probably means absolutely nothing to Homegenie users on Windows. Maybe if we could try to keep these discussions clearly flagged as directed to Homegenie on Linux and its different flavours.

From what I am hearing, Windows 10 users are struggling running HA products in general so maybe the Linux platform and in particular Raspbian on the Raspberry Pi is the way forward. Just purely a personal opinion.

Bounz, Thanks and yes would like the .db file. Also, went nuts trying to find the find. Dumped the entire list and could not locate. So, where do I put the db. file?

On Mono - Yes, I will pull directly from their repository. Following Michel, I did install Mono on one of the load iterations. Did not help. Also, checked to see if Mono was installed with Raspian - no. So, It is coming in with the .deb file. The odd part is, both V1.1.15 and r526 are pulling from the same mirror server here in the US. Going step wise, will replace the .db file and then uninstall/install Mono directly.

It should be located in the root of HomeGenie installation folder (alongside HomeGenie.exe).

as i referenced in the camera thread… the build might be the issue for the camera, but looking at the linux.csproj file there is also a shared folder containing the system.Data.SQLite.dll file which may have been used for the required files on a linux build… which may be related to any above issues.

I think we may need to add this csproj file to the solution so that this is built to also include the V4L interop code.

David

Spent a lot of time investigating how SQLite works on different platforms and it’s a nightmare.
Going to try LiteDB, as it’s fully managed database and doesn’t require any native libraries.

Have you looked at MariaDB. Its working nicely in Stretch.

I know about MariaDB, but it doesn’t have an embeddable engine and therefore should be installed and managed separately, which will result in additional installation steps and new points of failure.

an interface, allowing people to use whatever, let the software create the db schema :))

2 Likes

Thanks for posting this guide. I’ll be setting up my RPi3 soon and I’ll give your instructions a try.

I ran through all the steps including setting up SSL and X10. When I tried to access HG via a browser, I could not connect. I looked at the service and found it wasn’t working. Any thoughts?

[email protected]:~ $ sudo service homegenie status
● homegenie.service
Loaded: loaded (/etc/init.d/homegenie; generated; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2018-02-07 14:21:22 PST; 4min 11s ago
Docs: man:systemd-sysv-generator(8)
Process: 377 ExecStart=/etc/init.d/homegenie start (code=exited, status=203/EXEC)

Feb 07 14:21:22 RPi3 systemd[1]: Starting homegenie.service…
Feb 07 14:21:22 RPi3 systemd[1]: homegenie.service: Control process exited, code=exited status=203
Feb 07 14:21:22 RPi3 systemd[1]: Failed to start homegenie.service.
Feb 07 14:21:22 RPi3 systemd[1]: homegenie.service: Unit entered failed state.
Feb 07 14:21:22 RPi3 systemd[1]: homegenie.service: Failed with result ‘exit-code’.