Environment Configuration - Physical Hardware

This configuration applies only to the Reasoner role. It is distributed to all hosts connected to same AMQP broker.

You can override path to configuration direcotry by setting system variable R_CONFIG_DIR.

Default is /srv/robotice/conf.

Expected files:

  • <R_CONFIG_DIR>/devices.yml
  • <R_CONFIG_DIR>/systems.yml
  • <R_CONFIG_DIR>/plans.yml

Devices

ubuntu1:
  sensors:
    dummy2:
      name: dummy2
      device: dummy
      type: dummy
      port: bcm18
      metric: random
    dummy1:
      device: dummy
      type: dummy
      metric: random
      port: bcm18
  actuators:
    relay1:
      device: relay
      type: relay
      port: P9_20
    relay3:
      device: relay
      type: relay
      port: P9_20
rabbitmq1:
  sensors:
    hygro_case1_do:
      device: hygro
      type: DO
      metric: soil_hummidity
      port: bcm25
    dummy1:
      metric: random
      device: dummy
      type: dummy
      port: bcm18
  actuators: {}

Plans

hklab_box1:
  description: simple test box
  cycle: 1800
  actuators:
    light1:
      cycles:
      - value: 1
        start: 6400
        end: 80000
    water1:
      cycles:
      - value: 0
        start: 6400
        end: 80000
    water2:
      cycles:
      - start: 0
        end: 59
        value: 1
      - start: 60
        end: 599
        value: 0
      - start: 600
        end: 699
        value: 1
      - start: 700
        end: 1399
        value: 0
      - start: 1400
        end: 1499
        value: 0
      - start: 1500
        end: 1739
        value: 0
      - start: 1740
        end: 1800
        value: 1
  sensors:
    temp1:
      cycles:
      - start: 0
        end: 599
        value_low: 0
        value_high: 25
      - start: 600
        end: 1199
        value_low: 30
        value_high: 50
      - start: 1200
        end: 1800
        value_low: 35
        value_high: 55
    hygro2:
      cycles:
      - start: 0
        end: 1800
        value_low: 50
        value_high: 2000
    hygro1:
      cycles:
      - start: 0
        end: 1800
        value_low: 1
        value_high: 0
    air_humidity1:
      cycles:
      - start: 0
        end: 899
        value_low: 20
        value_high: 30
      - start: 900
        end: 1800
        value_low: 35
        value_high: 65
    terra_humidity1:
      cycles:
      - start: 0
        end: 899
        value_low: 20
        value_high: 30
      - start: 900
        end: 1800
        value_low: 35
        value_high: 65
    light2:
      cycles:
      - start: 0
        end: 899
        value: 1
      - start: 900
        end: 1800
        value: 0
    water1:
      cycles:
      - start: 0
        end: 59
        value: 1
      - start: 60
        end: 599
        value: 0
      - start: 600
        end: 699
        value: 1
      - start: 700
        end: 1399
        value: 0
      - start: 1400
        end: 1499
        value: 0
      - start: 1500
        end: 1739
        value: 0
      - start: 1740
        end: 1800
        value: 1

Systems

ubuntu1:
  plan: hklab_box1
  start: 2014-02-01 00:00:00
  actuators:
    dummy1:
      plan: water1
      device: dummy1
      metric: random
    relay3:
      plan: light1
      device: relay3
      metric: socket
    relay2:
      plan: temp1
      device: relay2
      metric: socket
  sensors:
    dummy1:
      plan: water_humidity1
      device: dummy1
      metric: "random1"
    hygro_case1_ao:
      plan: water_humidity2
      device: hygro_case1_ao
      metric: "humidity"
rabbitmq1:
  plan: hklab_box1
  start: 2014-02-01 00:00:00
  actuators:
    relay1:
      plan: water1
      device: relay1
      metric: socket
    relay3:
      plan: light1
      device: relay3
      metric: socket
    relay2:
      plan: temp1
      device: relay2
      metric: socket
  sensors:
    hygro_case1_do:
      plan: water_humidity1
      device: hygro_case1_do
      metric: "humidity"
    water_humidity2:
      plan: water_humidity2
      device: hygro_case1_ao
      metric: "humidity"

Help with setup environment Command Line Interface.