Author Topic: Use device status in the scenario  (Read 4035 times)

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Use device status in the scenario
« on: August 27, 2010, 10:42:08 am »
Hi,

I'm trying to create a scenario which uses some device status in the condition. For example, I have X10 switch and motion sensor. I'd like to switch ON light when the sensor is tripped (it's easy) and switch is OFF. I checked the advanced scenario editor but didn't find possibility to add desired device status there. Maybe I missed something?

Any help will be very appreciated.
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Use device status in the scenario
« Reply #1 on: August 27, 2010, 11:11:48 am »
Can't really help, but what is the problem sending the ON command even if it already is ON?

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: Use device status in the scenario
« Reply #2 on: August 27, 2010, 12:22:43 pm »
Hi,

I'm trying to create a scenario which uses some device status in the condition. For example, I have X10 switch and motion sensor. I'd like to switch ON light when the sensor is tripped (it's easy) and switch is OFF. I checked the advanced scenario editor but didn't find possibility to add desired device status there. Maybe I missed something?

Any help will be very appreciated.


In the Advanced Scenario Editor you need to test the state of the sensor device and then take an action based on true/false - we sometimes use the state of a motion camera to do exactly that. you just need to find the right device to test against - it does work (very well).

All the best


Andrew
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Re: Use device status in the scenario
« Reply #3 on: August 27, 2010, 01:04:06 pm »
Quote
Can't really help, but what is the problem sending the ON command even if it already is ON?
In the most cases yes, it doesn't matter. But if the device uses one command to switch ON and OFF? Like TV, for example. Or another possible case if you'd like to check the status not just tripped sensor but plus status of some other sensor.
Quote
In the Advanced Scenario Editor you need to test the state of the sensor device and then take an action based on true/false - we sometimes use the state of a motion camera to do exactly that. you just need to find the right device to test against - it does work (very well).
I tried but didn't find anything like that. Maybe for motion camera it's possible but about simple devices like switch, dimmer, sensor etc?
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: Use device status in the scenario
« Reply #4 on: August 29, 2010, 11:08:41 am »
Quote
Can't really help, but what is the problem sending the ON command even if it already is ON?
In the most cases yes, it doesn't matter. But if the device uses one command to switch ON and OFF? Like TV, for example. Or another possible case if you'd like to check the status not just tripped sensor but plus status of some other sensor.
Quote
In the Advanced Scenario Editor you need to test the state of the sensor device and then take an action based on true/false - we sometimes use the state of a motion camera to do exactly that. you just need to find the right device to test against - it does work (very well).
I tried but didn't find anything like that. Maybe for motion camera it's possible but about simple devices like switch, dimmer, sensor etc?


Try 'Respond to events' in the left hand menu of Web Admin. Then select the 'Movement is Detected' event from the 'Event' menu. Noe select the right hand drop down of the 'What device?' section and select your PIR motion detector or Motion IP Camera etc etc etc.

All the best


Andrew
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Use device status in the scenario
« Reply #5 on: August 29, 2010, 01:24:42 pm »
totallymaxed,

could you create a sample wiki page detailing how to integrate the state of a light into a respond to event scenario?

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Re: Use device status in the scenario
« Reply #6 on: August 29, 2010, 10:59:13 pm »


Let me explain what I meant with that screenshot. As you may see it's possible to specify status for the main device - motion detector in our case. Also it's possible to add some other devices in the event condition. But you cannot add the status or value for that device, i.e. ON, or OFF, or dimmer level.
« Last Edit: August 29, 2010, 11:01:03 pm by nite_man »
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru