command protocol update
[svn42.git] / powersensordaemon / COMMANDS.txt
index ced3a29..a748b86 100644 (file)
@@ -1,10 +1,15 @@
 
 == Commands accepted by daemon ==
 
-COMMAND:= power $LICHTID (on|off) |  listen $EVENT | sample $SAMPLEDEV
-LICHTID:= werkzeug | stereo | labor | schreibtisch | logo | idee
-EVENT:= all | temp | movement | button
-SAMPLEDEV:=temp[0-9]+ 
+COMMAND:= power $POWERID (on|off) |  listen $EVENT | sample $SAMPLEDEV
+POWERID:= werkzeug | stereo | labor | schreibtisch | logo | idee
+EVENT:= all | temp | photo | movement | button
+SAMPLEDEV:=temp[0-9]+ | photo[0-9]+
+
+Notes:
+  * subscription to events is cummulativ
+  * the "sample" command instructs the daemon to immediately get new sensor data of device $SAMPLEDEV
+  * if listeners for sensors (temp | photo) exist, the daemon should periodically get and distribute sample data without waiting for a "sample" command
 
 == Replys of daemon ==
 
@@ -14,4 +19,4 @@ ERRORSTR:=no connection | unknown device | ....
 == Listener Data from Daemon ==
 (Temperature Data in Degrees Celsius)
 
-LISTENERDATA:=temp[0-9]+ [0-9]{1,3}\.[0-9]{2} | movement | button[0-9]
\ No newline at end of file
+LISTENERDATA:=temp[0-9]+: [0-9]{1,3}\.[0-9]{2} |  photo[0-9]+: [0-9]{1,3} | movement | button[0-9]
\ No newline at end of file