MySensors

From ago control wiki
(Difference between revisions)
Jump to: navigation, search
(Configuration)
Line 1: Line 1:
 
= MySensors support =
 
= MySensors support =
You can use self built sensors from the [http://www.mysensors.org MySensors project]
+
You can use self built sensors from the [http://www.mysensors.org MySensors project]
 +
 
 +
Note, at a minimum you will need a gateway (e.g. Arduino) and a radio (e.g. NRF24L01+ (note the "+" at the end)).  MySensors will not start without these components!
 +
 
 
== Installation ==
 
== Installation ==
Install the agocontrol-mysensors package
+
Install the agocontrol-mysensors package (this guide will assume you know how to access a terminal with permissions to install packages).
 +
apt-get install agocontrol-mysensors
 +
 
 +
This installation preconfigures the service which should not require any changes.  If needed, you can find it here:
 +
/lib/systemd/system/agomysensors.service
 +
 
 
== Configuration ==
 
== Configuration ==
The my sensors driver assumes /dev/ttyACM0 as default interface. You need to create a config (mysensors.conf) if yours is different. For example with '/dev/ttyUSB0' use this:
+
You need to create a config mysensors.conf file.  The mysensors.conf file tells agoControl the location of your gateway.  As such, you need to know yourself.  There are many ways to know where your device resides, maybe the easiest is "dmesg" from a terminal. The dmesg output for my Uno, for example, registered as /dev/ttyACM0.  Here was the particular line: 
 +
cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
 +
 
 +
Whatever the location, create the file and insert the required information:
 +
nano /etc/opt/agocontrol/conf.d/mysensors.conf
 +
 
 +
For example, if your gateway location were '/dev/ttyUSB0' insert this:
 
  [mysensors]
 
  [mysensors]
 
  device=/dev/ttyUSB0
 
  device=/dev/ttyUSB0
  
 +
==== Enable the Service at Startup ====
 +
systemctl enable agomysensors.service
 +
 +
==== Start the Service ====
 +
systemctl start agomysensors.service
 +
 +
==== Confirm the Service is Running ====
 +
systemctl status agomysensors.service
 +
 +
*Note: See [http://wiki.agocontrol.com/index.php/Config.ini] for configuring between SI and IP units.
 +
 +
== Testing ==
 +
You can run MySensors from the terminal for additional diagnostic information:
 +
/opt/agocontrol/bin/agoMySensors
 +
 +
For example, I am using an Uno as my gateway and another Uno with a single Dallas temperature sensor.  Here was my output:
 +
Waiting for the gateway starts...
 +
Done.
 +
Requesting gateway version...
 +
  found v1.4.1
 +
Initializing MySensors controller
 +
Register existing devices:
 +
  - 105/0:temperaturesensor
 +
Running MySensors controller...
 +
 +
== Mappings ==
 
Mappings can be edited/deleted from the file /etc/opt/agocontrol/maps/mysensors.json .
 
Mappings can be edited/deleted from the file /etc/opt/agocontrol/maps/mysensors.json .

Revision as of 05:06, 17 March 2015

Contents

MySensors support

You can use self built sensors from the MySensors project.

Note, at a minimum you will need a gateway (e.g. Arduino) and a radio (e.g. NRF24L01+ (note the "+" at the end)). MySensors will not start without these components!

Installation

Install the agocontrol-mysensors package (this guide will assume you know how to access a terminal with permissions to install packages).

apt-get install agocontrol-mysensors

This installation preconfigures the service which should not require any changes. If needed, you can find it here:

/lib/systemd/system/agomysensors.service

Configuration

You need to create a config mysensors.conf file. The mysensors.conf file tells agoControl the location of your gateway. As such, you need to know yourself. There are many ways to know where your device resides, maybe the easiest is "dmesg" from a terminal. The dmesg output for my Uno, for example, registered as /dev/ttyACM0. Here was the particular line:

cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device

Whatever the location, create the file and insert the required information:

nano /etc/opt/agocontrol/conf.d/mysensors.conf

For example, if your gateway location were '/dev/ttyUSB0' insert this:

[mysensors]
device=/dev/ttyUSB0

Enable the Service at Startup

systemctl enable agomysensors.service

Start the Service

systemctl start agomysensors.service

Confirm the Service is Running

systemctl status agomysensors.service
  • Note: See [1] for configuring between SI and IP units.

Testing

You can run MySensors from the terminal for additional diagnostic information:

/opt/agocontrol/bin/agoMySensors

For example, I am using an Uno as my gateway and another Uno with a single Dallas temperature sensor. Here was my output:

Waiting for the gateway starts...
Done.
Requesting gateway version...
 found v1.4.1
Initializing MySensors controller
Register existing devices:
 - 105/0:temperaturesensor
Running MySensors controller...

Mappings

Mappings can be edited/deleted from the file /etc/opt/agocontrol/maps/mysensors.json .

Personal tools