LinuxMCE Forums
June 20, 2013, 08:37:25 am GMT-1 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com
 
   Home   Help Search Chat Login Register  
Pages: [1]
  Print  
Author Topic: Execute shell-script using a scenario  (Read 1151 times)
aico
Veteran
***
Posts: 74


View Profile
« on: September 28, 2010, 06:22:21 am »

Hi,

first of all - all developers did a great job - LinuxMCE is the best peace of software - Thanks

At the moment i have in use or is planed:
1x Core/Hybrid - with two squeezeslaves - works great
1x Cisco 7970 - works great
1x MD - Asus EeeBook - Bedroom - works great
1x Eken M002 with WebOrbiter 2.0 - works great
1x MD for the Kitchen - not built
1x MD for the Bathroom - not built

Also in process is doing a template and ruby-code for the Biticino bus-system (light, climate, audio)

And now i whant to execute a shell-script using a scenario button - is this possible?
Is it also possible to shutdown the Eken M002 by sending the House to sleep-mode?

Regards
Johannes
Logged
sambuca
Guru
****
Posts: 422


View Profile
« Reply #1 on: September 28, 2010, 07:54:13 am »

Hi,

I think the AppServer device can run arbitrary commands like shell scripts. Just send the Spawn Application command to the app server on the core/md you want to execute the shell script.
There might be various reasons to do so, but if you tell us what you are trying to do, maybe there is a better way than running shell scripts?

As the Eken only runs the weborbiter, we have virtually no control of it. Its not like the browser provides a way for a website to shut down the device it runs on. It could maybe be possible on a device that runs a native orbiter..

best regards,
sambuca
Logged
aico
Veteran
***
Posts: 74


View Profile
« Reply #2 on: September 29, 2010, 05:35:50 am »

Hi sambuca,

yes you are right, the Eken runs as WbOrbiter. But i am looking arround to find some information to shutdown the Eken remote using e.g. a ssh connection or a Android App to control the Eken with the Core.

My installation looks like this:
In my bus-system there is a switch (I call it Party-Mode). On the Core I have a shell-script running (deamon) that checks two things every minute. First it checks the time. If it is not 10:00pm the script will exit. If it is 10:00pm or later it also checks the "Party-Mode" switch. If the "Party-Mode" switch ist pressed the script exits doing nothing. If the "Party-Mode" is turned off, the script starts to do a fiew things - e.g. turn off all audio components (bus-system), turn off all lights (bus-system), shutdown the Eken WebOrbiter, shutdown all MD's... May be it is possible to execute a LinuxMCE scenario (I do not know this).

One idea is to execute a shell script to shutdown the Eken via WLan.

Best Redars,
Johannes
Logged
tschak909
LinuxMCE God
****
Posts: 5117

DOES work for LinuxMCE.


View Profile
« Reply #3 on: September 29, 2010, 05:47:30 am »

Ew bro. You're all duct tape.

Why don't you actually learn DCE? Will make your life a lot simpler in the long run.

-Thom
Logged
aico
Veteran
***
Posts: 74


View Profile
« Reply #4 on: September 29, 2010, 06:51:06 am »

Hi Tom,

where do I find some information about DCE - the LinuxMCE Wiki does not tell very much about it...

Thanks
Johannes
Logged
posde
Administrator
LinuxMCE God
*****
Posts: 2637


Wastes Life On LinuxMCE Since 2007


View Profile WWW
« Reply #5 on: September 29, 2010, 06:54:26 am »

http://lmgtfy.com?q=dce+site:wiki.linuxmce.org

will get you quite a few hits...
Logged

tschak909
LinuxMCE God
****
Posts: 5117

DOES work for LinuxMCE.


View Profile
« Reply #6 on: September 29, 2010, 06:55:26 am »

Wiki, search for Developers Guide.

also look for DCEGen, and sql2cpp

-Thom
Logged
aico
Veteran
***
Posts: 74


View Profile
« Reply #7 on: September 29, 2010, 07:00:59 am »

Hi posde, Hi Tom,

thanks - this will be a very hard peace of work (for me) - but we will see...

Regards
Johannes
Logged
sambuca
Guru
****
Posts: 422


View Profile
« Reply #8 on: September 29, 2010, 12:17:35 pm »

My installation looks like this:
In my bus-system there is a switch (I call it Party-Mode). On the Core I have a shell-script running (deamon) that checks two things every minute. First it checks the time. If it is not 10:00pm the script will exit. If it is 10:00pm or later it also checks the "Party-Mode" switch. If the "Party-Mode" switch ist pressed the script exits doing nothing. If the "Party-Mode" is turned off, the script starts to do a fiew things - e.g. turn off all audio components (bus-system), turn off all lights (bus-system), shutdown the Eken WebOrbiter, shutdown all MD's... May be it is possible to execute a LinuxMCE scenario (I do not know this).

If you create a driver for this installation bus in LMCE, all this (and more) could easily be set up using different events and scenarios.

best regards,
sambuca
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!