Author Topic: Power off MD at midnight? (timed events issue)  (Read 3044 times)

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5498
  • DOES work for LinuxMCE.
    • View Profile
Re: Power off MD at midnight? (timed events issue)
« Reply #15 on: May 09, 2009, 07:08:24 am »
events are emitted, and are stateless, so doing this as an event is not an option.

-Thom

donpaul

  • Guru
  • ****
  • Posts: 300
    • View Profile
Re: Power off MD at midnight? (timed events issue)
« Reply #16 on: May 09, 2009, 08:28:08 am »
events are emitted, and are stateless, so doing this as an event is not an option.

-Thom

Currently ;-)

If there was a way to set something (like we can currently set the room to "8th Dimension") when media is played, then we could only fire said event if that setting is _not_ (like if the room is not "8th Dimension"). Then when media stops playing, fire said event. Hope that made sense, probably not.

I suspend all MD anyway - playing media or not - at "lights out". Just thinking out loud for the benefit of others.
« Last Edit: May 09, 2009, 08:29:47 am by donpaul »

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5498
  • DOES work for LinuxMCE.
    • View Profile
Re: Power off MD at midnight? (timed events issue)
« Reply #17 on: May 09, 2009, 02:58:45 pm »
Oh no, I was merely stating that we'll have to implement a concept of states.

This will be _interesting_ because of the wide variety of devices LMCE can control, and the fact that most of these devices LMCE can't be sure if it really IS on or OFF....

I'd like this very much, actually.

-Thom

donpaul

  • Guru
  • ****
  • Posts: 300
    • View Profile
Re: Power off MD at midnight? (timed events issue)
« Reply #18 on: May 09, 2009, 03:51:13 pm »
Oh no, I was merely stating that we'll have to implement a concept of states.

This will be _interesting_ because of the wide variety of devices LinuxMCE can control, and the fact that most of these devices LinuxMCE can't be sure if it really IS on or OFF....

I'd like this very much, actually.

-Thom

I agree. I think it's important and would open up the possibility for a smarter home and more complicated events.

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Power off MD at midnight? (timed events issue)
« Reply #19 on: May 09, 2009, 11:18:14 pm »
What would be nice is if someone took on the task of coding a "logic module" type DCE device. Something that could store (in SQL), set and read an arbitrary number of user defined states, could intercept any events, and issue any DCE commands. And critically, from the web admin, or just a .conf file, you could build sequence logic blocks and add them as config entries to the device for it to process. Then it could act as a programable sequencer module.

Each block of "code" (could be a basic script-like definition the the event/command to trigger it, states to check, and resulting actions based on this testing) would be loaded up by the device on reload and subscribe to the necessary events, etc (not sure if you can do synchronous even interception, which would kind of be important for several different purposes) and then behave as a much more sophisticated programable sequencer for any part of LMCE.... we would finally be able to access the true power of the DCE messaging system :)

posde

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2989
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Power off MD at midnight? (timed events issue)
« Reply #20 on: May 10, 2009, 12:52:16 am »
At the moment a lot of logic is in the Event_Plugin ...

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Power off MD at midnight? (timed events issue)
« Reply #21 on: May 10, 2009, 01:29:21 am »
At the moment a lot of logic is in the Event_Plugin ...

Understood, but I am more talking about a generic framework device that allows users easily to add short config "scripts" that provide logic and sequencing facilities by accessing the events generated by the event plugin, other devices, commands, statuses stored in the database, even the ability to check for the existance of particular files, etc, and then trigger some action based on that, like sending other events or commands or even executing bash scripts, and so on. Like a simple state machine. The "Generic Sequencing Device"! A central, house-wide plugin, that has the framework for all this, and a user can simply configure the specifics by adding a "script".... does that make sense?

nosebreaker

  • Guru
  • ****
  • Posts: 202
    • View Profile
Re: Power off MD at midnight? (timed events issue)
« Reply #22 on: May 12, 2009, 04:49:39 pm »
Well, I guess for now I am just going to use rsh or a cron job to have it shut down at midnight then.  Any easy way to wake it up or send it a "magic packet"?

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5498
  • DOES work for LinuxMCE.
    • View Profile
Re: Power off MD at midnight? (timed events issue)
« Reply #23 on: May 12, 2009, 06:48:06 pm »
General Info Plugin > Wake Device.

-Thom

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4426
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: Power off MD at midnight? (timed events issue)
« Reply #24 on: May 12, 2009, 07:22:52 pm »
Hi,

I was more thinking about doing this under event handler or scenarios. For instance, don't make speech announcement if I'm playing video....

Possible ?

Unfortunately, I don't think it is possible. There is no way to check if video is playing. Maybe that can be added, but the functionality isn't there right now.

Well we hide events from the Orbiter when certain media types are playing... so I would guess we can tell when these media types are playing and if they are then optionally have some behaviour that either  waits until the media type is no longer in use on that MD or just goes ahead and powers off the MD.

Andrew
Andy Herron,
Convergent Home Technologies Ltd
United Kingdom

Read My Blog; http://ellipticalcurve.com

Contact me for Smart Home consulting advice here;
@herron on Twitter, totallymaxed+consulting@gmail.com via email or PM me here.

Get a Dianemo S License: http://forum.linuxmce.org/index.php?topic=8880.0
iOS Orbiter: http://wiki.linuxmce.org/index.php/Dianemo_iOS_Orbiter
Follow us on Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

Sales & Info:
http://www.dianemo.co.uk

seth

  • Guru
  • ****
  • Posts: 485
  • A day w/o LinuxMCE is like a day w/o sunshine!
    • View Profile
Re: Power off MD at midnight? (timed events issue)
« Reply #25 on: May 12, 2009, 07:55:54 pm »
 :)
Here is a snip from my "House to sleep mode" Lighting scenario in the master bedroom, (for when I turn in for the night)
1st Image.
And here is the "Timed Event" that I use to wake up the MD's (Power them on)
2nd Image

This is the ultimate home control system. It NEVER ceases to amaze me with its seemingly infinite potential.

Regards,

Seth
".....Because Once you've LinuxMCE'd....."
System stats located at my user page:

http://wiki.linuxmce.org/index.php/User:Seth

donpaul

  • Guru
  • ****
  • Posts: 300
    • View Profile
Re: Power off MD at midnight? (timed events issue)
« Reply #26 on: May 13, 2009, 04:40:26 am »
Well, I guess for now I am just going to use rsh or a cron job to have it shut down at midnight then.  Any easy way to wake it up or send it a "magic packet"?

Use the general info plugin -> halt to shutdown the device.

donpaul

  • Guru
  • ****
  • Posts: 300
    • View Profile
Re: Power off MD at midnight? (timed events issue)
« Reply #27 on: May 13, 2009, 04:43:34 am »
:)
Here is a snip from my "House to sleep mode" Lighting scenario in the master bedroom, (for when I turn in for the night)
1st Image.


Does the MD really turn off with your event? Because that never worked for me (and I just tried it again to verify). I had to use the general info -> halt to shutdown the MD.