Ago control install debian jessie

From ago control wiki
(Difference between revisions)
Jump to: navigation, search
(placeholder while I test the process)
 
Line 1: Line 1:
This page is in testing as of 15 October 2015 and will be online shortly.
+
= NOTE: This page is a work in progress - please be careful when following the instructions since not all of them have been fully tested! =
 +
 
 +
= Installing agoControl on Debian Jessie =
 +
 
 +
Please mind that you should set up agoControl on a development system before installing it into production.  We use systemd for smooth process handling.
 +
 
 +
== Installation of agoControl Packages ==
 +
 
 +
=== Install apt Repository Key ===
 +
 
 +
wget -O - http://mirror.at.agocontrol.com/debian/conf/agocontrol.gpg.key | apt-key add -
 +
 
 +
=== Add agoControl Repositories ===
 +
Lastest unstable development packages:
 +
<pre>
 +
echo "  " >> /etc/apt/sources.list
 +
echo "# agoControl sources repository" >> /etc/apt/sources.list
 +
echo "deb http://mirror.at.agocontrol.com/jessie unstable main" >> /etc/apt/sources.list
 +
</pre>
 +
 
 +
=== Install agoControl ===
 +
 
 +
apt-get update
 +
apt-get install agocontrol
 +
 
 +
Optional packages for hardware and extra feature support:
 +
 
 +
* agocontrol-cloud (this package is temporarily unavailable!)      - ago Cloud automation system suport on [http://cloud.agocontrol.com cloud.agocontrol.com]
 +
* agocontrol-owfs        - Device for 1-Wire Hardware
 +
* agocontrol-zwave      - Device for Z-Wave Hardware
 +
* agocontrol-meloware  - Device for Meloware iPhone App
 +
* agocontrol-alert    - Device for to communicate via sms, email, tweet, push notifications
 +
* agocontrol-rrdtool  - Device for RRDtool graphs, plot, and lists of your measuring sensors
 +
 
 +
''' Configuring qpidd  at installation dialog'''
 +
 
 +
During installation, you will be prompted:
 +
 
 +
Please enter the password for the Qpid daemon administrator.
 +
Administrator password: 
 +
 
 +
''' type any password you want '''
 +
 
 +
Establish agoControl as an autostart service on boot:
 +
 
 +
apt-get install systemd systemd-sysv
 +
reboot
 +
 
 +
=== Enable logging ===
 +
 
 +
add this as a new line in the "standard log files" area of the '''/etc/rsyslog.conf''' file:
 +
 
 +
local0.*      /var/log/agocontrol.log
 +
 
 +
== edit config file (optional) ==
 +
The [[System.conf]] file is located here:
 +
/etc/opt/agocontrol/conf.d/system.conf
 +
This page lists all available sections: [[System.conf]]
 +
 
 +
== add udev rules (optional) ==
 +
If you have more than one USB device attached, then you need to know to exactly which ttyUSB0/ttyUSB1 etc that you device is attached. This might change after each reboot.
 +
The task is to setup an alternative usbdevice like the below example uses the names /dev/usbowfs and /dev/usbzwave and /dev/usbmysensor.
 +
 
 +
<pre>
 +
echo '# OWFS 1 Wire USB Adapter LinkUSBi
 +
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct} =="6001", SYMLINK+="usbowfs", RUN+="/bin/systemctl restart agoowfs.service"
 +
 
 +
# Vera Z-Wave USB Stick - Cygnal Integrated Products, Inc.
 +
SUBSYSTEMS=="usb", ATTRS{idVendor}=="10c4", ATTRS{idProduct} =="ea60", SYMLINK+="usbzwave", RUN+="/bin/systemctl restart agozwave.service"'> /etc/udev/rules.d/99-agocontrol.rules
 +
</pre>
 +
 
 +
 
 +
You need to know your idVendor=xxxx and idProduct=yyyy. get like below
 +
your prompt will show something like this: Bus 001 Device 002: ID xxxx:yyyy Standard Microsystems Corp.
 +
lsusb
 +
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
 +
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 +
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
 +
Bus 001 Device 004: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light
 +
Bus 001 Device 005: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
 +
 
 +
 
 +
If you have mysensor.org device and need to modify the file:
 +
 
 +
sudo nano /etc/udev/rules.d/99-agocontrol.rules
 +
 
 +
 
 +
Add the mysensor alternative usbdevice. In my case xxxx=1a86 and yyyy=7523
 +
<pre>
 +
# MySensor.org serial gateway
 +
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct} =="7523", SYMLINK+="usbmysensor", RUN+="/bin/systemctl restart agomysensors.service"
 +
</pre>
 +
 
 +
 
 +
Load the new rule:
 +
udevadm trigger
 +
 
 +
 
 +
Check the new alternative usbdevice (Don't care about the date stamp. a RPI device doesn't have hwclock and after each reboot timestamp is 1970. ntpdate is fixing internal date after network is up)
 +
ls -l /dev/usb*
 +
lrwxrwxrwx 1 root root 7 Jan  1  1970 /dev/usbmysensor -> ttyUSB1
 +
lrwxrwxrwx 1 root root 7 Jan  1  1970 /dev/usbzwave -> ttyUSB0
 +
 
 +
 
 +
Or display detailed USB device info with:
 +
udevadm info --query=all --attribute-walk --name=/dev/ttyUSB0
 +
 
 +
 
 +
Remember to update your conf files to use the new alternative /dev/usbzwave:
 +
<pre>
 +
sudo nano /etc/opt/agocontrol/conf.d/zwave.conf
 +
[zwave]
 +
#device=/dev/ttyUSB0
 +
device=/dev/usbzwave
 +
</pre>
 +
 
 +
 
 +
Same goes for mysensor conf file:
 +
<pre>
 +
sudo nano /etc/opt/agocontrol/conf.d/mysensors.conf
 +
[mysensors]
 +
#device=/dev/ttyUSB1
 +
device=/dev/usbmysensor
 +
</pre>
 +
 
 +
== start / stop / autostart services ==
 +
'''Configue service autostart'''
 +
This will enable all services:
 +
<pre>
 +
/opt/agocontrol/bin/agoctrl.sh enable
 +
</pre>
 +
You can also use "systemctl enable <service>" to manually enable specific services.
 +
""Start components""
 +
This will start all installed components:
 +
/opt/agocontrol/bin/agoctrl.sh start
 +
 
 +
== Final steps ==
 +
If you do not have additional hardware like Z-Wave or 1-Wire you can start the '''ago simulator''' to simulate some devices:  [[Simulator]]
 +
 
 +
=== Access the admin interface ===
 +
http://127.0.0.1:8008/
 +
 
 +
'''Hint:''' You may change "127.0.0.1" to your hostname or ip-address.

Revision as of 16:55, 16 October 2015

Contents

NOTE: This page is a work in progress - please be careful when following the instructions since not all of them have been fully tested!

Installing agoControl on Debian Jessie

Please mind that you should set up agoControl on a development system before installing it into production. We use systemd for smooth process handling.

Installation of agoControl Packages

Install apt Repository Key

wget -O - http://mirror.at.agocontrol.com/debian/conf/agocontrol.gpg.key | apt-key add -

Add agoControl Repositories

Lastest unstable development packages:

echo "  " >> /etc/apt/sources.list
echo "# agoControl sources repository" >> /etc/apt/sources.list
echo "deb http://mirror.at.agocontrol.com/jessie unstable main" >> /etc/apt/sources.list

Install agoControl

apt-get update
apt-get install agocontrol

Optional packages for hardware and extra feature support:

  • agocontrol-cloud (this package is temporarily unavailable!) - ago Cloud automation system suport on cloud.agocontrol.com
  • agocontrol-owfs - Device for 1-Wire Hardware
  • agocontrol-zwave - Device for Z-Wave Hardware
  • agocontrol-meloware - Device for Meloware iPhone App
  • agocontrol-alert - Device for to communicate via sms, email, tweet, push notifications
  • agocontrol-rrdtool - Device for RRDtool graphs, plot, and lists of your measuring sensors

Configuring qpidd at installation dialog

During installation, you will be prompted:

Please enter the password for the Qpid daemon administrator. Administrator password:

type any password you want

Establish agoControl as an autostart service on boot:

apt-get install systemd systemd-sysv
reboot

Enable logging

add this as a new line in the "standard log files" area of the /etc/rsyslog.conf file:

local0.*       /var/log/agocontrol.log

edit config file (optional)

The System.conf file is located here:

/etc/opt/agocontrol/conf.d/system.conf

This page lists all available sections: System.conf

add udev rules (optional)

If you have more than one USB device attached, then you need to know to exactly which ttyUSB0/ttyUSB1 etc that you device is attached. This might change after each reboot. The task is to setup an alternative usbdevice like the below example uses the names /dev/usbowfs and /dev/usbzwave and /dev/usbmysensor.

echo '# OWFS 1 Wire USB Adapter LinkUSBi
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct} =="6001", SYMLINK+="usbowfs", RUN+="/bin/systemctl restart agoowfs.service"

# Vera Z-Wave USB Stick - Cygnal Integrated Products, Inc.
SUBSYSTEMS=="usb", ATTRS{idVendor}=="10c4", ATTRS{idProduct} =="ea60", SYMLINK+="usbzwave", RUN+="/bin/systemctl restart agozwave.service"'> /etc/udev/rules.d/99-agocontrol.rules


You need to know your idVendor=xxxx and idProduct=yyyy. get like below your prompt will show something like this: Bus 001 Device 002: ID xxxx:yyyy Standard Microsystems Corp.

lsusb 
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. 
Bus 001 Device 004: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light
Bus 001 Device 005: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter


If you have mysensor.org device and need to modify the file:

sudo nano /etc/udev/rules.d/99-agocontrol.rules 


Add the mysensor alternative usbdevice. In my case xxxx=1a86 and yyyy=7523

# MySensor.org serial gateway
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct} =="7523", SYMLINK+="usbmysensor", RUN+="/bin/systemctl restart agomysensors.service"


Load the new rule:

udevadm trigger


Check the new alternative usbdevice (Don't care about the date stamp. a RPI device doesn't have hwclock and after each reboot timestamp is 1970. ntpdate is fixing internal date after network is up)

ls -l /dev/usb* 
lrwxrwxrwx 1 root root 7 Jan  1  1970 /dev/usbmysensor -> ttyUSB1 
lrwxrwxrwx 1 root root 7 Jan  1  1970 /dev/usbzwave -> ttyUSB0


Or display detailed USB device info with:

udevadm info --query=all --attribute-walk --name=/dev/ttyUSB0


Remember to update your conf files to use the new alternative /dev/usbzwave:

sudo nano /etc/opt/agocontrol/conf.d/zwave.conf 
[zwave]
#device=/dev/ttyUSB0
device=/dev/usbzwave


Same goes for mysensor conf file:

sudo nano /etc/opt/agocontrol/conf.d/mysensors.conf 
[mysensors]
#device=/dev/ttyUSB1
device=/dev/usbmysensor

start / stop / autostart services

Configue service autostart This will enable all services:

/opt/agocontrol/bin/agoctrl.sh enable

You can also use "systemctl enable <service>" to manually enable specific services. ""Start components"" This will start all installed components:

/opt/agocontrol/bin/agoctrl.sh start

Final steps

If you do not have additional hardware like Z-Wave or 1-Wire you can start the ago simulator to simulate some devices: Simulator

Access the admin interface

http://127.0.0.1:8008/

Hint: You may change "127.0.0.1" to your hostname or ip-address.

Personal tools