COMMAND:= power (on|off) $POWERID | listen $EVENT | sample $SAMPLEDEV | log <logtext>
POWERID:= werkzeug | stereo | labor | schreibtisch | logo | idee
-EVENT:= all | request | temp | photo | movement | button | none
-SAMPLEDEV:=temp[0-9]+ | photo[0-9]+
+EVENT:= all | request | sensor | movement | button | none
+SAMPLEDEV:=temp[0-9]+ | photo[0-9]+ | <sensor???>[0-9]+
Notes:
* subscription to events is cummulativ
== Listener Data from Daemon ==
(Temperature Data in Degrees Celsius)
-LISTENERDATA:=temp[0-9]+: [0-9]{1,3}\.[0-9]{2} | photo[0-9]+: [0-9]{1,3} | movement | button[0-9]
+LISTENERDATA:=temp[0-9]+: [0-9]{1,3}\.[0-9]{2} | photo[0-9]+: [0-9]{1,3} | <sensor???>[0-9]+: <data> | movement | button[0-9]
boolean pb_postth_state=0;
unsigned int pb_time=0;
-void echoCommand(char command)
+void sensorEchoCommand(char command)
{
+ Serial.print("Sensor ");
Serial.print(command);
Serial.print(": ");
}
send_frame(words[D2_OFF]);
else if(command == 'T')
{
- echoCommand(command);
+ sensorEchoCommand(command);
printTemperature(onShieldTemp);
}
else if(command == 'P')
{
- echoCommand(command);
+ sensorEchoCommand(command);
printLightLevel();
}
else