power on
#1
how get i start xbmc (windows version) from the the buton "power on"Huh

it only says "Make sure XBMC webserver is enabled and xbmc is running"

is there a way to start xbmc from the phone?


(the remote works if i start manually xbmc from pc)

thx...great application
Reply
#2
Listen to the configured WOL port and start XBMC when a package arrives. Don't know what tool you could use on Windows, sorry.
XBMCLive Dharma beta 2 running on an ASRock ION 330 HT
Reply
#3
the_alien Wrote:Listen to the configured WOL port and start XBMC when a package arrives. Don't know what tool you could use on Windows, sorry.

Does anybody have a concrete suggestion how to achieve this? Any recommended windows utility that could be used?

Thx Nerd

ezpl
Reply
#4
ezpl Wrote:Does anybody have a concrete suggestion how to achieve this? Any recommended windows utility that could be used?

Thx Nerd

ezpl
I use the commandline tool wake.exe from http://masterbootrecord.de/english/wakeup.php
Example:
wake.exe 31-62-19-91-14-45 192.168.1.255

Just replace it with your MAC-Address and Broadcast-IP.
You can write this command in a batch file or include the call in tools like totalcommander etc. for a easy and comfortable use.

regards
Jarny
Hardware:
1) PointOfView Intel Atom 330 Mainboard
2) Scenic-PC (2.9 GHz) with onboard Intel-Graphic 915g
Reply
#5
When pressing the "power button", I think that it could be as easy as...

Code:
if xbmc_is_running then
  wake xbmc_is_running
else
  start xbmc_is_running
end if

But my coding skills are very limited so maybe it's not as easy as that.
Reply
#6
Ok... and how should the "start xbmc" happen? On linux you could open a ssh connection.. if ssh is installed and we know it is linux. What if now ssh server is installed? What if it is Windows? Connect through remote desktop? How should we determine if the host is up and running? Through ping? Most firewalls drop imcp requests...
No, that would be a total mess. Noone would understand the settings and people will start complaining why it wont start the app.
XBMCLive Dharma beta 2 running on an ASRock ION 330 HT
Reply
#7
Point taken. Like I said, I'm not very knowledgeable when it comes to this stuff Sad

Still a great app though Smile
Reply
#8
Thumbs Up 
I guess I cheat a little but it works, I just use wake on lan to start the pc with the power on in remote from off or standby position and as soon as it startsup and goes into windows Ive put xbmc in startup folder in windows so it starts automatically.

You need to have wake on lan enabled in bios and on your network card in windows
Reply
#9
i guess i could write 3rd party xbmc launcher for windows for u guys (and me too Tongue)

i have just question for devs:
lets say i would do something like this - open listening socket on the same port like xbmc http api - after client connected i would immidiately close connection and launch xbmc - how would remote react on such thing - i mean fake xbmc http server that will close as soon as some1 will connect to it?

--edit
ok, done rly quick & dirty windows app that do what i wrote above and it works but its kinda ugly Tongue
- xbmclauncher (as i quickly called it) will have to run in background all the time (if ppl would be interested in this, maybe i would rewrote it as windows service if its possible)
- when xbmc remote tries to connect to xbmc host, it actually connect first to xbmclauncher. connection is closed, xbmc remote is displaying message "connection refused" and real xbmc is launched. now just retry connection in xbmc remote and we can use it Wink

just need some time to make editable settings - right now my settings (which are 1. path to xbmc.exe 2. port of xbmc http api) are hardcoded Tongue

question for devs - the thing with connection refused is kinda ugly - if ppl would be interested in this maybe we could define some signature that xbmclauncher would send when remote is connecting to it, so the remote instead of refused connection would display "xbmc is launching, please wait"?
Reply
#10
Ok,
this is answer to the first post in this thread - how to start XBMC from phone while windows is running but XBMC isn't.

This is application that will run XBMC when phone will try to remotely connect to XBMC. This application however must be running all the time in background (it doesn't have any user interface, so it won't be even noticed). It's good idea to put shell link (windows shortcut) to this application in autostart menu.

How to configure application:
  • First run of the application will result in displaying dialog with message "No XBMCLauncher_cfg.xml file detected - new one is created - update it with ur data and restart XBMCLauncher"
  • XBMCLauncher_cfg.xml file is created in folder containing XBMCLauncher.exe, You need to open it and edit this fields
    Code:
    <?xml version="1.0"?>
    <Config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <port>[u]8080[/u]</port>
      <path>[u]path_to_xbmc.exe[/u]</path>
    </Config>
    port - put there port specified in Your XBMC settings - as far as i remember it's 8080 (but don't rly know as i had to change it)
    path - i think it's selfexplained - full path to xbmc.exe

    this is how my config file looks:
    Code:
    <?xml version="1.0"?>
    <Config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <port>81</port>
      <path>H:\Tools\xbmc_new_code\project\Win32BuildSetup\BUILD_WIN32\Xbmc\XBMC.exe</path>
    </Config>
  • You need now restart XBMCLauncher.exe - there will be no notification that it's running - if You want to check it You can enter Task Manager (Windows XP - ctrl+alt+delete, Windows 7 - ctrl+shift+escape) and find there XBMCLauncher.exe on processes tab (You can also kill the application there if You need to)

I would also like to add that i realise that You guys would not want to use application from random guy with 4 posts on forum - so I also include source code of this application so You can check and build this application from source on Your own. It's in C# .NET 2.0 (maybe even 1.1 but VS 2010 doesn't even allow to build such applications). Also i would appreciate someone from XBMC team to inspect it, build it and place it here so people could use it without worries about malware software from random guy (me Tongue)

Files:
Reply
#11
grajen3 Wrote:question for devs - the thing with connection refused is kinda ugly - if ppl would be interested in this maybe we could define some signature that xbmclauncher would send when remote is connecting to it, so the remote instead of refused connection would display "xbmc is launching, please wait"?

What if you just listen to port 8081 and forward everything that is coming to 8081 to 8080? That way you won't have to close the port.
XBMCLive Dharma beta 2 running on an ASRock ION 330 HT
Reply
#12
the_alien Wrote:What if you just listen to port 8081 and forward everything that is coming to 8081 to 8080? That way you won't have to close the port.
when i will have some spare time i'll give it a try, but this will add another another link in chain of communication and i would try to avoid it

but i see that remote project has it's code placed and code.google.com's svn, maybe i'll investigate it (good that i know java and basics of android's app structure) and suggest patch there,

anyway thanks for reply!
Reply
#13
Or even better. Listen to a port of your choice and check if the WOL package arrives.
So your launcher would be configured to listen to port 12345 and the remote is configured to send the WOL to 12345.
This way you won't have to patch the remote.
XBMCLive Dharma beta 2 running on an ASRock ION 330 HT
Reply
#14
the_alien Wrote:Or even better. Listen to a port of your choice and check if the WOL package arrives.
So your launcher would be configured to listen to port 12345 and the remote is configured to send the WOL to 12345.
This way you won't have to patch the remote.
briliant! i'll do it this evening after i get back from work and let u guys know!

--edit
ok, when no1 was looking (Tongue) i rewrote application to use wake on lan packet to launch XBMC - here are updated files

Files:
there is change in cfg file - instead of port there is wake_on_lan_port which by default in remote xbmc is set to 9 (and i set such default in application), application seems to work - it detects when user press Power On in remote - didn't check with XBMC yet (in work we don't have luxury to use it Sad ), but it should work - ill edit my earlier post about detailed configuration later!

cheers!
Reply
#15
In my opinion if you could avoid using .NET would be the best. At least for those who are trying to keep the OS as minimal as possible.
Reply

Logout Mark Read Team Forum Stats Members Help
power on1