969
|
1 node config file:
|
|
2
|
|
3 board:b0 :device "/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A900cepU-if00-port0";
|
|
4 :boardTag "diecimila";
|
|
5 :connectedTo sensor:motion0 .
|
|
6
|
|
7 sensor:motion0 a :MotionSensor;
|
|
8 :pin board0:pin3
|
|
9 :sees :downhallway .
|
|
10
|
|
11 output:out0 a :GeneralOutput ;
|
|
12 :pin board0:pin3;
|
|
13 :controls :heater .
|
|
14
|
|
15 output:out1 a :ShiftBrite;
|
|
16 :shiftbriteL board0:pin5;
|
|
17 :shiftbriteD board0:pin11;
|
|
18 :shiftbriteC board0:pin12 .
|
|
19
|
|
20 output:out2 a :IrEmitter;
|
|
21 :pin board0:pin4
|
|
22 .
|
|
23
|
|
24 output:out3 a :RgbStrip;
|
|
25 :ledCount 10
|
|
26 .
|
|
27
|
|
28 output:out4 a :OneWireBus;
|
|
29 :pin board0:pin5
|
|
30 :connectedTo sensor:temp0, sensor:temp1 .
|
|
31
|
|
32 sensor:temp0 a :TemperatureSensor;
|
|
33 :oneWireAddress "12:14:35:23";
|
|
34 :feels :downhallway;
|
|
35 :location house:wall31;
|
|
36 :height "80cm"
|
|
37 :pollPeriod "60sec"
|
|
38 .
|
|
39
|
|
40 sensor:ir1 a :PowerMeterMonitor;
|
|
41 :reads :housePower;
|
|
42 .
|
|
43
|
|
44
|
|
45 linux side host:
|
|
46 read config. we may have any number of arduinos.
|
|
47 serve the complete arduino code to run.
|
|
48 poll inputs.
|
|
49 serve outputs.
|
|
50 upon request, build arduino code and deploy it.
|
|
51
|
|
52 emits this graph:
|
|
53 board:b0 a :connectedBoard;
|
|
54 :host :bang;
|
|
55 :lastSeen "-1sec" .
|
|
56 sensor:motion0
|
|
57 :sees :downhallway;
|
|
58 :motionState :noMotion;
|
|
59 :lastRead "16:30:00";
|
|
60 :lastMotion "16:02:00" .
|
|
61 sensor:theaterIrDetect
|
|
62 :sawCode "0e55cc" .
|
|
63 sensor:ir1 a :PowerMeterMonitor;
|
|
64 :currentWatts 462;
|
|
65 :lastPulseTime "16:09:00";
|
|
66 :kwhPerBlink 1.0;
|
|
67 |