Please login or register.

Login with username, password and session length
Advanced search  

News:

The X10Hub (PiX10Hub) is here! Created by the Community, for the Community.:)% #:)

Author Topic: Installing HomeGenie on Raspbian Buster  (Read 316 times)

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 19
  • Posts: 1092
Installing HomeGenie on Raspbian Buster
« on: September 12, 2019, 11:15:27 AM »

For those still using HomeGenie on a Raspberry Pi or any other Linux based machine you may or may not be aware that currently you cannot install it on Raspbian Buster, the latest release of the Raspbian operating system. It appears that the package installation manager Gdebi is failing for reasons I won't go into here. Until the author makes the necessary changes the only way to install HomeGenie on Raspbian Buster successfully is to install it manually.The offending dependencies have been removed using the method below.

Please find below a very simple copy/paste procedure which will have HomeGenie up and running on your Raspberry Pi.Make sure you make a HomeGenie Backup of you settings as you will need them later.

I'm assuming at this stage after nearly one year everyone knows how to create a Raspbian image on an SD card. If not there's plenty of instruction on how to do so on this forum and here https://www.raspberrypi.org/documentation/installation/installing-images/. Don't forget to drop a blank SSH text file and the wpa_supplicant.conf file with all your wifi credentials into the boot folder of your SD card. This can be done in Windows after you have created the Raspbian Buster image. Again these instructions can be found on the forum or the web.

===================================================================================================
Now that you have a copy Raspbian Buster on an SD card just pop it into your Raspberry Pi and power it up. Access it remotely using either SSH or for Windows users PuTTY. You can now configure your personal settings using the following command
===================================================================================================

sudo raspi-config


===================================================================================================
Once you have this completed just reboot your Pi and you're ready to install HomeGenie.

Open another session of SSH or PuTTY and copy/paste these instruction line by line into your SSH or PuTTY session

This will install the necessary sources and certificates for the latest version of Mono
===================================================================================================


sudo apt install apt-transport-https dirmngr gnupg ca-certificates

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

echo "deb https://download.mono-project.com/repo/debian stable-raspbianbuster main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list

sudo apt update


===================================================================================================
The following command will install the latest version of Mono. Ensure you copy/paste it in one single block into your SSH/PuTTY session. It is one single command.
===================================================================================================


sudo apt-get install mono-runtime libmono-corlib2.0-cil libmono-system-web4.0-cil libmono-system-numerics4.0-cil libmono-system-serviceprocess4.0-cil libmono-system-data4.0-cil libmono-system-core4.0-cil libmono-system-servicemodel4.0a-cil libmono-windowsbase4.0-cil libmono-system-runtime-serialization-formatters-soap4.0-cil libmono-system-runtime-serialization4.0-cil libmono-system-xml-linq4.0-cil mono-dmcs


===================================================================================================
Now that we have Mono installed we need to install some HomeGenie dependencies. This will download and install HomeGenie into the /pi/home/homegenie folder.
===================================================================================================


sudo apt-get install alsa-utils lame

sudo apt-get install libv4l-0

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

sudo apt-get install arduino-mk empty-expect


===================================================================================================
Now that we have Mono and all the relevant dependencies installed it's time to download and install HomeGenie
===================================================================================================


wget https://github.com/genielabs/HomeGenie/releases/download/v1.3-stable.5/homegenie_1.3-stable.5.tgz

tar xzvf homegenie_1.3-stable.5.tgz

===================================================================================================
Now we need to create a service file that will launch HomeGenie everytime you reboot.
===================================================================================================

sudo nano /etc/systemd/system/homegenie.service


===================================================================================================
Just copy the contents of this into the editor you opened and press the ctrl-x keys, then press y and enter key to save.
===================================================================================================

[Unit]
Description=Homegenie Server
After=network.target

[Service]
WorkingDirectory=/home/pi/homegenie
ExecStart=/usr/bin/mono /home/pi/homegenie/HomeGenie.exe --log
Restart=always

[Install]
WantedBy=multi-user.target


===================================================================================================
Now that you have your homegenie.service created you need to enable it
===================================================================================================

sudo systemctl enable homegenie.service


===================================================================================================
Now to start HomeGenie
===================================================================================================

sudo systemctl start homegenie.service



You can access HomeGenie in the usual way. It will have been installed on Port 80 as a new install. Once you have HomeGenie started go to

Configure->Maintenance->Configuration and Data and restore from the backup you made earlier. You're now running HomeGenie with the latest version of Raspbian Buster with all you original settings

« Last Edit: September 17, 2019, 03:46:29 PM by petera »
Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 19
  • Posts: 1092
Re: Installing HomeGenie on Raspbian Buster
« Reply #1 on: October 02, 2019, 12:08:37 PM »

Well I can announce we have at least one happy camper using HomeGenie on Raspbian Buster after following these installation instructions. He knows who he is so if he wants to share his adventures with you by all means I'm sure we would all like to hear about them  :)%
Logged

edjal

  • Sr. Member
  • ****
  • Helpful Post Rating: 0
  • Posts: 90
Re: Installing HomeGenie on Raspbian Buster
« Reply #2 on: October 03, 2019, 10:39:59 AM »

 Hi All I have just installed the latest RPi Buster with the help of petera and his step by step instructions. I have learned a lot with his expert guidance. I am presently re configuring HG rather than using a backup of previous RPi. I had a couple of problems with previous versions. X10 E2 and E10 were not enabled in HG but were giving sporadic commands, and sometimes modules not scheduled on would turn on could not figure it out. In addition I'm sure some of my issues resulted from improper clearing memory of My CM15 controller. Both Tuicemen and petediscrete provided me with the proper procedure for clearing memory in CM15 in preparation for HG use. I learned the hard way this is a very important step. House codes have to be set to none, memory and history have to be cleared all AHP programs, Macros and schedules have to be deleted and finally most importantly download changes to interface (CM15)
Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 19
  • Posts: 1092
Re: Installing HomeGenie on Raspbian Buster
« Reply #3 on: October 03, 2019, 12:48:32 PM »

Glad to hear you are up and running with HG using the latest Raspbian OS, Raspbian Buster. This is important as the previous Raspbian OS version, Raspbian Stretch will be heading to end of life support so updates available for it will be restricted to security updates for a limited amount of time. You can sit back for at least another three years without worrying about what Raspbian OS version you have.

What you now have is a HG installation unique to you. The problem with using another persons downloaded  image is, that persons image could have corrupted configuration files unknown to them. You then inherit those corrupted files and problems that arise with your installation as a result are very difficult to resolve.

Other than your sources list for Mono which i resolved, you saw how quickly the copy/paste method performed. You used exactly the instructions I outlined above. I think it's best that any user who is serious about exploiting HG fully should use this method. The main thing is that it works.

I hope that your new installation now resolves your Ghost RF commands issue. Maybe you could report back later and let us know if it does.

For any other HG users, you should give the above a try. If nothing else it will give you a basic primer in Raspbian and the Raspberry Pi which I imagine @edjal will clearly agree with.
Logged

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 18
  • Posts: 1727
Re: Installing HomeGenie on Raspbian Buster
« Reply #4 on: October 03, 2019, 04:29:59 PM »

Any idea if the new OS and Mono will require updating as frequently as in the past to keep email functioning?  I have never had it work for more than ~ 2 weeks before having to update it again.  It's really been the biggest disappointment with HG (which is actually a very good thing, everything else works as expected).   >!

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 19
  • Posts: 1092
Re: Installing HomeGenie on Raspbian Buster
« Reply #5 on: October 03, 2019, 08:06:53 PM »

Any idea if the new OS and Mono will require updating as frequently as in the past to keep email functioning?  I have never had it work for more than ~ 2 weeks before having to update it again.  It's really been the biggest disappointment with HG (which is actually a very good thing, everything else works as expected).   >!

To be honest, since installing Raspbian Stretch a while back and keeping current with the Mono project Raspbian release I've had no problems with email notifications. In fact using Raspbian Buster with Mono 6.0.0.327 has made the whole HG experience feel a bit smoother. My install is running on a Raspberry Pi Zero W quite happily 24/7 with no freeze ups and no need for regular rebooting as some users seem to do.
Logged

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 18
  • Posts: 1727
Re: Installing HomeGenie on Raspbian Buster
« Reply #6 on: October 04, 2019, 11:13:31 AM »

I don't have issues with reboots on Stretch like I did on older OS versions.  But, no installation so far has kept email working so I assume it isn't and don't rely on it anymore.  I'll get one of my dusty old HG build cards out and put Buster on it since my home automation season is now starting!

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 19
  • Posts: 1092
Re: Installing HomeGenie on Raspbian Buster
« Reply #7 on: October 04, 2019, 01:09:02 PM »

I'd really be interested to see why your notification program keeps falling over. When you finally kick back in on the season I'd try to keep your setup as stock as possible. The latest version of Mono from the project page should help too.

Is your email notification program a simple one or do you have the likes of picture attachments. I did find a while back that if there was any delay in fetching images from a camera the notification program fell over and nothing was sent.

Again it might be worth passing some of the older 3rd party C# programs through a compiler to debug them. Have you used Mono Develop at any stage.
Logged

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 18
  • Posts: 1727
Re: Installing HomeGenie on Raspbian Buster
« Reply #8 on: October 07, 2019, 11:46:31 AM »

I've gone through a lot of variations in my setup so I can't say that I don't have a development version of Mono on one of my cards.  I think (from memory) that I'm using Mono complete for my most recent installer script.  My current image should be based on the script I have posted on my github distro.  But, when I get going again I'll scrap things and start from your script adding the features I need.  I'll probably step into it as well to make sure new things don't break working features since the last version I have been using is probably 1-2 years old now.

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 19
  • Posts: 1092
Re: Installing HomeGenie on Raspbian Buster
« Reply #9 on: October 07, 2019, 02:52:57 PM »

A while back I was installing Mono complete to compensate for a couple of dependency issues I was experiencing particularly the email notification issue. Thatís stripped back now to the basic Mono and dependencies install and all seems fine.

Youíll probably have a better idea how this install performs when you get a chance to install it.

Do you normally edit your install scripts to reflect any changes in distributions, links etc or does the install script handle this at execution time.
Logged

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 18
  • Posts: 1727
Re: Installing HomeGenie on Raspbian Buster
« Reply #10 on: October 07, 2019, 03:05:33 PM »

My scripts are just dumb command lists right now and they don't do anything fancy.  I install mono complete for the email certificate stuff as I recall, so if that's now part of the main distro, dropping it would be a good choice.
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.