VoxCommando

General Discussion => Off Topic (not related to VC) => Topic started by: Kalle on August 17, 2013, 10:35:38 AM

Title: VC state and XBMC now playing at real-time in iRule
Post by: Kalle on August 17, 2013, 10:35:38 AM
Hi guys, it was a wish by a user to show you how we can have a real-time "now playing" from XBMC and also the state of VoxCommando in iRule.

https://www.youtube.com/watch?v=FAqd4eiag5M (https://www.youtube.com/watch?v=FAqd4eiag5M)

This is only interest if you use the iRule remote app or plan to use it  ;)

http://iruleathome.com/ (http://iruleathome.com/)

You must have installed Eventghost with the DynamicWebserver plugin or any other Webserver running on your machine to have access to a html page on it.

Step 1: Activate the webserver addon in XBMC and use the default one (make sure that you enable "control XBMC over HTTP)

Step 2: open the iRule builder and go to the page where you want to have the "now playing" info or create a new page.

Step 3: insert from the iRule "widgets" a URL with drag'n drop on the panel and set in the URL properties following http://yourXbmcIP:8080/#remote adjust the width and height of the cells

Step 4: insert a second blank URL on a empty place in the same panel (you can set the cell width to 3 and height also to 3) save the settings (let the URL address field blank)

Step 5: start VoxCommando, open the command tree and create a new command group. As next insert a new command and open the LCB editor with a double-click on the command.

Step 6: Add first a logic block with following settings IF (A)==(B) and for (A)->{LastEvent} for (B)-> VC.On THEN action "File.Write" -> path to the a html file where you will write (example: drive:\pathVC\dynWeb\state.html) and as text ON (you can also type here a path of a picture that is stored on your machine (example: <img src="pics/mic_40_green.png">)
create two more logic blocks - one with VC.Standby and VC.Off and save the command.

Step 7: go back to iRule and paste followed URL address in the blank field from Step 4: http://IPofyourPC/state.html and save the settings - sync your iRule device.
(if you use the Eventghost Dynamic Webserver plugin, make sure that you set the port in the EG websever to 80)

Step 8: as next create 3 events to the created command VC.On VC.Standby VC.Off and restart VC

thats all - I hope I forgot nothing ::)
Title: Re: VC state and XBMC now playing at real-time in iRule
Post by: claymic on August 17, 2013, 02:54:20 PM
Very thanks to share Kalle.
Cool  ;)
Title: Re: VC state and XBMC now playing at real-time in iRule
Post by: jitterjames on August 17, 2013, 03:37:34 PM
Very nice.  Very clever and resourceful way to trick iRule into doing what you want!
Title: Re: VC state and XBMC now playing at real-time in iRule
Post by: mdsh on August 18, 2013, 01:01:47 AM
THANK YOU THANK YOU THANK YOU KALLE!!! This is really great stuff. Well done and well thought out! I will hopefully play with this real soon!
Title: Re: VC state and XBMC now playing at real-time in iRule
Post by: Kalle on August 18, 2013, 01:45:18 AM
 :hugs

Don't mention it!
Title: Re: VC state and XBMC now playing at real-time in iRule
Post by: Hiryu on August 20, 2014, 03:38:45 PM
Kalle -- wondering if you looked into OpenRemote when putting this together.  Any thoughts on the differences?  I'm not too familiar with either one, so just wanted your opinion.  Thanks.
Title: Re: VC state and XBMC now playing at real-time in iRule
Post by: Kalle on August 20, 2014, 04:28:09 PM
Hi Hiryu, sorry I can't help to do the same with OpenRemote, because I'm not familiar with this Software.
Title: Re: VC state and XBMC now playing at real-time in iRule
Post by: jitterjames on August 20, 2014, 05:11:15 PM
I'm not that familiar with OpenRemote  either, but from what I remember, OpenRemote  requires you to have an application running on your PC all the time.  One nice thing about iRule is that it can also work when your PC is off to control home automation and things like a Halx or iTach.

Of course if you are interested in using it with VC then it doesn't really matter because VC requires a PC to be on anyway.

Anyway it's possible that I'm wrong or that things have changed since the last time I looked.

iRule is a bit expensive too so OpenRemote is worth a look.