# HG changeset patch
# User drewp@bigasterisk.com
# Date 1516013992 28800
# Node ID e2865f1034a9fccb15a8564f2289ca91c8a012fe
# Parent f420207c7fb455a9c7194f0e76b633734bf72ada
frontbed config
Ignore-this: 615b26b5f518db98d2f53f7777755bf2
diff -r f420207c7fb4 -r e2865f1034a9 service/piNode/config/main.n3
--- a/service/piNode/config/main.n3 Fri Oct 20 02:19:53 2017 -0700
+++ b/service/piNode/config/main.n3 Mon Jan 15 02:59:52 2018 -0800
@@ -286,11 +286,14 @@
:hostname "frontdoor";
:onboardDevice ha:frontdoorPiTemp;
:hasPin
- board8pin:GPIO4 .
+ board8pin:GPIO4, # open
+ board8pin:GPIO11, # motion
+ board8pin:GPIO17, # OW temp
+ board8pin:GPIO18 . # rgb
ha:frontdoorPiTemp a :OnboardTemperature;
:influxMeasurement "temperatureF";
- :influxTag [:key "location"; :value "downBathPi"] .
+ :influxTag [:key "location"; :value "frontdoorPi"] .
board8pin:GPIO4 :gpioNumber 4; :connectedTo :frontdoorOpenSwitch .
:frontdoorOpenSwitch a :Pushbutton; :style :inverted;
@@ -300,3 +303,92 @@
:tag [:key "host"; :value "frontdoor"],
[:key "sensor"; :value "open"],
[:key "location"; :value "frontDoor"]];.
+
+
+board8pin:GPIO11 :gpioNumber 11; :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
+
+board8pin:GPIO18 :gpioNumber 18; :connectedTo :frontdoorRgb .
+:frontdoorRgb a :RgbPixels;
+ :colorOrder order:GRB;
+ :pixels (:frontdoorRgb0 :frontdoorRgb1 :frontdoorRgb2) .
+
+
+
+@prefix board9pin: .
+@prefix board9ow: .
+
+ha:node9 a :PiBoard;
+ :hostname "frontbed";
+ :onboardDevice ha:frontbedPiTemp;
+ :hasPin
+ board9pin:GPIO17,
+ board9pin:GPIO18,
+ board9pin:GPIO19,
+ board9pin:GPIO23,
+ board9pin:GPIO26
+ .
+
+ha:frontbedPiTemp a :OnboardTemperature;
+ :influxMeasurement "temperatureF";
+ :influxTag [:key "location"; :value "downBathPi"] .
+
+# pin number ignored; see /boot/config.txt
+board9pin:GPIO17 :gpioNumber 17; :connectedTo board9ow: .
+board9ow: a :OneWire; :connectedTo board9ow:dev-000003a5be13 .
+board9ow:dev-000003a5be13 a :TemperatureSensor;
+ :position houseLoc:frontbed;
+ :influxMeasurement [
+ :measurement "temperatureF";
+ :predicate :temperatureF;
+ :tag [:key "host"; :value "frontbed"], [:key "location"; :value "frontbedUnderDesk"]] .
+
+
+board9pin:GPIO4 :gpioNumber 4; :connectedTo :frontbedOpenSwitch ;
+:influxMeasurement [
+ :measurement "state";
+ :predicate :buttonState;
+ :tag [:key "host"; :value "frontbed"],
+ [:key "sensor"; :value "open"],
+ [:key "location"; :value "frontbed"]].
+
+board9pin:GPIO23 :gpioNumber 23; :connectedTo :starTrekLight .
+:starTrekLight a :LedOutput .
+
+board9pin:GPIO26 :gpioNumber 26; :connectedTo sensor:motionLoftDesk .
+sensor:motionLoftDesk a :MotionSensor;
+ :xxinfluxMeasurement [
+ :measurement "presence";
+ :predicate :sees;
+ :tag [:key "host"; :value "frontbed"],
+ [:key "sensor"; :value "motion"],
+ [:key "location"; :value "loftbed"]];
+ :sees :loftDesk .
+
+board9pin:GPIO19 :gpioNumber 19; :connectedTo sensor:motionLoftbed .
+sensor:motionLoftbed a :MotionSensor;
+ :xxinfluxMeasurement [
+ :measurement "presence";
+ :predicate :sees;
+ :tag [:key "host"; :value "frontbed"],
+ [:key "sensor"; :value "motion"],
+ [:key "location"; :value "loftbed"]];
+ :sees :loftbed .
+
+board9pin:GPIO18 :gpioNumber 18; :connectedTo :frontbedRgb .
+:frontbedRgb a :RgbPixels;
+ :colorOrder order:GRB;
+ :pixels (:frontbedRgb0 :frontbedRgb1 :frontbedRgb2
+ :frontbedRgb3
+:frontbedRgb4) .
+