more G-Labs products

Author Topic: HomeGenie and ZWave on Intel Edison  (Read 3367 times)

January 03, 2015, 06:00:59 AM
Read 3367 times

jarrettv

  • *
  • Information
  • Newbie
  • Posts: 13
I'm experimenting with HomeGenie on Intel Edison. A tiny linux computer with integrated wifi/bt and microprocessor.

Mono compiles fine and you can run HomeGenie.exe fine. However, plugging in a Z-StickS2 is not creating a serial port that can be detected by HomeGenie.

root@edison1:~# lsusb
Bus 001 Device 002: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub


[ 3010.060833] usb 1-1: new full-speed USB device number 2 using dwc3-host
[ 3010.085385] usb 1-1: New USB device found, idVendor=10c4, idProduct=ea60
[ 3010.085415] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3010.085436] usb 1-1: Product: CP2102 USB to UART Bridge Controller
[ 3010.085455] usb 1-1: Manufacturer: Silicon Labs
[ 3010.085474] usb 1-1: SerialNumber: 0001


It doesn't appear to be loading the usbserial driver. Any ideas?

root@edison1:~# cat /proc/tty/driver/usbserial
usbserinfo:1.0 driver:2.0



January 08, 2015, 05:47:59 PM
Reply #1

jarrettv

  • *
  • Information
  • Newbie
  • Posts: 13
Success!

So the edison uses yocto project which creates linux distributions with minimal included kernel module drivers.

I'm not (yet) a linux guru so compiling and installing a kernel module is a multi-day research project.

Anyway, the intel guys are slowly building up the opkg repository and they kindly added the drivers for me.

Once you add the repos you can do:
opkg update
opkg install kernel-module-cp210x



June 07, 2016, 05:36:18 AM
Reply #2

MacGyver

  • *
  • Information
  • Newbie
  • Posts: 7
I loaded everything on my edison and can't seem to get Homegenie up and running. I'm at a loss here. I upgraded the kernal and also finaly got mono on it. It  is Intel firmware iot-devkit-prof-dev-image-edison-20160315,upgraded kernel-module-cp210x and Mono 3.12.0., lower versions and latest would not compile. I installed homegenie_1_1_beta_r522.tgz and it does not auto start and when I run startup terminal just locks up. I see it listed with ps.
 I have HG running fine on a Linux Laptop but I would love to get it going on this edison board.

Thanks! 
The ten most dangerous words in the English language are "Hi, I'm from the government, and I'm here to help."

RONALD REAGAN July 28, 1988

June 07, 2016, 10:53:32 PM
Reply #3

MacGyver

  • *
  • Information
  • Newbie
  • Posts: 7
Ok Sucess in getting it running on the Edison board!
Since yocto is such a minimal system it is a royal pain to get used to!
Here is what I finaly did to get it up and running.

Install Yocto Linux image on the Intel Edison

Edit /etc/opkg/base-feeds.conf with the following (other opkg config files don't need any changes):

src/gz all http://repo.opkg.net/edison/repo/all
src/gz edison http://repo.opkg.net/edison/repo/edison
src/gz core2-32 http://repo.opkg.net/edison/repo/core2-32

Run opkg update

Do not run "opkg upgrade", that will overfill your rootfs and is not an intended use case for this repo.
Upgrade specific packages with just "opkg install <packagename>" if you want to upgrade something.

Then install to your board the latest Kernal.

root@edison1:~# opkg install kernel-module-cp210x

At this point you now can install mono if the above went well!

root@edison1:~# opkg install mono

It will install mono 4.2.2 the most current at this time.

When this is finished you can now install Homegenie.

root@edison1:~# opkg install libusb-1.0-0 alsa-utils lame lirc

Download and copy homegenie_1_1_beta_r522.tgz to your /home/root directory on the edison.

extract Homegenie

tar xzvf homegenie_1_1_beta_r522.tgz

Change to your Homegenie directory and run Homegenie!

cd homegenie
./startup.sh

Profit!

I need to work out it running in the background on this flavor of linux but I have made good progress with this puppy.
It is running much faster on the Edison than the Debian laptop that I have had HG running on.
« Last Edit: July 03, 2016, 03:36:58 PM by MacGyver »
The ten most dangerous words in the English language are "Hi, I'm from the government, and I'm here to help."

RONALD REAGAN July 28, 1988

June 14, 2016, 03:06:02 PM
Reply #4

[email protected]

  • *****
  • Information
  • Hero Member
  • Posts: 271
How does perf compare between edison and RPi ?

July 03, 2016, 04:00:16 PM
Reply #5

MacGyver

  • *
  • Information
  • Newbie
  • Posts: 7
The performance is much better than the Raspberry Pi. Everything is so much more snappy.

I worked out getting homegenie to auto start when booting the edison.
I am using Systemctl to do it.

I made a file called homegenie.service and put it into /lib/systemd/system
the file is:

#  Home Automation Start
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Unit]
Description=homegenie
After=network.target

[Service]
ExecStart=/usr/local/bin/homegenie/startup.sh

Restart=always
RestartSec=10s
Environment=NODE_ENV=production

[Install]
WantedBy=multi-user.target


Commands available are:

sudo systemctl enable homegenie.service
sudo systemctl disable homegenie.service
sudo systemctl status homegenie.service

sudo systemctl start homegenie.service
sudo systemctl stop homegenie.service
sudo systemctl restart homegenie.service
sudo systemctl reload homegenie.service

Now I can run it headless and everything works great!
The ten most dangerous words in the English language are "Hi, I'm from the government, and I'm here to help."

RONALD REAGAN July 28, 1988

July 04, 2016, 11:43:23 AM
Reply #6

[email protected]

  • *****
  • Information
  • Hero Member
  • Posts: 271
Be nice to get this documented properly and the at least can say intel eddison is also supported :)

September 28, 2016, 01:29:37 PM
Reply #7

MacGyver

  • *
  • Information
  • Newbie
  • Posts: 7
It is close to 2 months that I have this up and running and it is working well. I have also back in July added a compact flash card that has homegenie installed on it and the good thing is if Intel Edison Yocto crashes, you do not have to reload homegenie from scratch. I modified the DEBIAN scripts and move them over to a Directory called YOCTO. I am very happy with this board and only need to put it into a suitable housing.
I have started work on writing up how to do it from scratch from un-boxing the Intel Edison to it's current state running HG in my home. I will publish it here soon in the next few weeks.

Happy Coding
Harry
The ten most dangerous words in the English language are "Hi, I'm from the government, and I'm here to help."

RONALD REAGAN July 28, 1988