view service/piNode/config/frontdoor.n3 @ 1355:f2159312b0e7

update build and deps to use invoke and to use new lib layout, plus more stats collection Ignore-this: 78f09ba8a1898fd5f79cfc260cd36185 darcs-hash:500de704f71e24aafeb0b6ecf750a7c9f3f2a513
author drewp <drewp@bigasterisk.com>
date Thu, 25 Apr 2019 23:38:47 -0700
parents 42f333f7d088
children 69a84b3d1dfa
line wrap: on
line source

@prefix rdfs:     <http://www.w3.org/2000/01/rdf-schema#> .
@prefix :         <http://projects.bigasterisk.com/room/> .
@prefix order:    <http://projects.bigasterisk.com/room/ledColorOrder/> .
@prefix ha:       <http://bigasterisk.com/homeauto/> .
@prefix sensor:   <http://bigasterisk.com/homeauto/sensor/> .
@prefix houseLoc: <http://bigasterisk.com/homeauto/houseLoc/> .

@prefix pin: <http://bigasterisk.com/homeauto/piFrontdoor/pin/> .

ha:piFrontdoor a :PiBoard;
  :hostname "frontdoor";
  :onboardDevice ha:frontdoorPiTemp;
  :hasPin
    pin:GPIO4, # open
    pin:GPIO5, # motion
    pin:GPIO17, # OW temp
    pin:GPIO18 .   # rgb

ha:frontdoorPiTemp a :OnboardTemperature;
  :influxMeasurement "temperatureF";
  :influxTag [:key "location"; :value "frontdoorPi"] .

pin:GPIO4 :gpioNumber 4; :connectedTo :frontdoorOpenSwitch .
:frontdoorOpenSwitch a :Pushbutton; :style :inverted;
:influxMeasurement [
    :measurement "state";
    :predicate :buttonState;
    :tag [:key "host"; :value "frontdoor"],
      [:key "sensor"; :value "open"],
      [:key "location"; :value "frontDoor"]];.


pin:GPIO5 :gpioNumber 5; :connectedTo sensor:motionFrontdoorInside .
sensor:motionFrontdoorInside a :MotionSensor;
  :influxMeasurement [
    :measurement "presence";
    :predicate :sees;
    :tag [:key "host"; :value "frontdoor"],
      [:key "sensor"; :value "motion"],
      [:key "location"; :value "frontdoorInside"]];
  :sees :entryway .
# 17 5V
# 23 GPIO11 through 100R, and signal->220R->LED->gnd
# 25 gnd

pin:GPIO18 :gpioNumber 18; :connectedTo :frontdoorRgb .
:frontdoorRgb a :RgbPixels;
  :colorOrder order:GRB;
  :pixelGroup :frontdoorRgb .

:frontdoorRgb
  :startIndex 0;
  :endIndex 2;
  :src "rainbow.png";
  :x 199;
  :y 0;
  :height 3;
  :interpolate :slide;
  :rate 30 . # px/sec