Sensors

From LinuxMCE
Revision as of 00:16, 23 October 2007 by Bulek (Talk | contribs)

Jump to: navigation, search

Sending events from command line

There is a utility in LinuxMCE (/usr/pluto/bin) that allows sending proper DCE message from command line. If you want for instance to trip motion sensors on/off you can achieve this in simple way (ID means ID of particular device that you send event for) :

Event "tripped on"

ID -1000 2 9 25 1

Event "tripped off"

ID -1000 2 9 25 0

Event "temperature changed"

ID  -1000 2 25 30 temperature_value

Event "output on"

ID  -1000 2 28

Event "output off"

ID  -1000 2 29


For instance -

A. tripping security sensor with ID of 195 to ON :
/usr/pluto/bin/MessageSend dcerouter 195 -1000 2 9 25 1
B. play media (/home/public/data/tts/0.wav) on Xine player with ID of 44 :
/usr/pluto/bin/MessageSend localhost 0 44 1 37 29 "" 41 "" 42 "" 59 "/home/public/data/tts/0.wav"


Standard Thermostat

I've tested possible commands and events below. But I'm not sure of true meaning of values and if thermostat or Climate Plugin does anything with them ?

Command: Set Fan to "1" or "0" (not shown on floorplan!?)

/usr/pluto/bin/MessageSend localhost 0 ID 1 279 8 "1" 

Command: Set Heat/Cool to "H" (Heat), "C" (Cool), "A" (Auto)

/usr/pluto/bin/MessageSend localhost 0 ID 1 280 8 "H"

Command: Set Temperature to "value" /usr/pluto/bin/MessageSend localhost 0 172 1 278 5 "18.3"

Command: Set Thermostat to ON

/usr/pluto/bin/MessageSend localhost 0 172 1 192 97 "" 98 ""

Command: Set Thermostat to OFF

/usr/pluto/bin/MessageSend localhost 0 172 1 193 97 "" 98 ""


Event: Temperature changed to value - 14.2

/usr/pluto/bin/MessageSend dcerouter 172 -1000 2 25 30 14.2

Event: Humidity changed to value of 40 (not shown on floorplan!?)

/usr/pluto/bin/MessageSend dcerouter 172 -1000 2 26 30 40

Event: SetPoint changed to value of 16 (not shown on floorplan!?)

/usr/pluto/bin/MessageSend dcerouter 172 -1000 2 27 30 16

Event: Climate system changed to ON (not shown on floorplan!?)

/usr/pluto/bin/MessageSend dcerouter 172 -1000 2 28

Event: Climate system changed to OFF (not shown on floorplan!?)

/usr/pluto/bin/MessageSend dcerouter 172 -1000 2 29

I'm still missing something about this device. What are true meanings of commands and events. For instance, when you send command ON/OFF, change is shown on Floorplan. But when you send event ON/OFF state is not changed... Also, why are not all parameters saved in state ? Only AUTO/HEAT/COOL/ON/OFF and temperature setpoint are shown on floorplan. I'm also not sure what does 100 means in state of thermostat - "OFF/100(19.2)". After some messages it's value changed to "OFF/1 (19.2)" - but I guess this must be some mixup in code that probably truncates state text to show on floorplan. Also value of 100 doesn't change with any above commands or events...

Anyone has more insight into this ?