FORUM FIBARO
Forum systemu FIBARO

| FAQ |  Search |  Memberlist |  Usergroups |
| Register |  Log in |

Previous topic «» Next topic
Home Center - Xbmc
Author Message
Lode 

Age: 46
Joined: 31 Dec 2012
Posts: 570
Location: Dilsen-Stokkem Belgium
Posted: 2013-08-21, 22:30   

Shad wrote:
Check your log.


I checked the log but can't see anything special.
It won't work. :-(
_________________
Fibaro HC2 v 4.018 Beta
 
 
ADN 

Age: 26
Joined: 16 Aug 2013
Posts: 19
Location: France
Posted: 2013-08-22, 11:33   

Hi Lode,

First check if your XBMC have the WebServer Active in Settings/Services/Webserver : (Like "XBMC WebServer.jpg")

After, the two box must be selected in Settings/Services/Remote Control (Like "XBMC control.jpg")

Create new Virtual device in your HC2 with one bouton in Lua Code (like "Lua XBMC Shutdown.jpg")

The code lua is :
Replace 192.168.0.2 by your Raspberry Ip address and 80 by your XBMC HTTP Port (Specified in WwebServer page).
If you have make a password in XBMC (Parameters/Services/Webserver) remove the -- before "HC2:setBasicAuthentication("admin","admin")" and replace user and password.

Code:

HC2 = Net.FHttp("192.168.0.2", 80);
--HC2:setBasicAuthentication("admin","admin")

response = HC2:GET('/jsonrpc?request={"id":1,"jsonrpc":"2.0","method":"System.Shutdown"}');

resultat = json.decode(response);

if resultat.result == "OK"
then
  fibaro:log("Extinction d'XBMC");
else
  fibaro:log("XBMC ne doit pas être démarré !");
end


This script allow to shutdown XBMC with bouton of virtual device

XBMC WebServer.jpg
Active XBMC WebServer
134 Time(s) 49.31 KB

Lua XBMC ShutDown.jpg
Lua Script for ShutDown XBMC
183 Time(s) 62.77 KB

XBMC Control.jpg
XBMC allow access control
122 Time(s) 49.7 KB

 
 
Lode 

Age: 46
Joined: 31 Dec 2012
Posts: 570
Location: Dilsen-Stokkem Belgium
Posted: 2013-08-22, 21:03   

Hi ADN

Thank you so much for putting so much effort into my problem.
I really appreciate that :-)

And YESSSS it works now.
I've been struggling a little bit with port 80 because my ISP blocks port 80.
I did a portforwarding and everything looks ok now.

Now i'm going to try to use the cam plugin from Shad.

I already asked this before but what do i have to do to watch normal tv while xbmc is running.
I want notifications coming up or streaming from cam while i watch normal TV.
It won't be very usefull if you only get notifications while watching movies or listening music from xbmc.

Again, thank you very much for your help ;-)
_________________
Fibaro HC2 v 4.018 Beta
 
 
Shad

Age: 31
Joined: 28 Jan 2013
Posts: 991
Location: Gabon
Posted: 2013-08-22, 21:53   

Give more information about your Tv for pvr.

[ Added: 2013-08-22, 23:04 ]
http://wiki.xbmc.org/?title=PVR

[ Added: 2013-08-29, 22:01 ]
update, if somebody know how to do a action on shutdown or reboot. tell me ^^
_________________
How to:
- Your own sms Gateway
- Plugin Xbmc
- Philips HUE
 
 
rb338 

Joined: 02 Apr 2013
Posts: 76
Location: NL
Posted: 2013-08-30, 07:36   

Hi Shad,

Can you give some more info about the latest change? How would we set up the virtual device? Please show some example use :)

Thanks for the great work!
 
 
Shad

Age: 31
Joined: 28 Jan 2013
Posts: 991
Location: Gabon
Posted: 2013-08-30, 08:44   

You just need to upload icon for xbmc turn on, xbmc pause, xbmc movie and xbmc music.
Put the number of the virtual device and the name of each icon in xbmc, the name in hc2 is going to be thing like 1000,1001,1002,1003....

So after icon on virtual is going to change alone.
The only problem, I didn't find how to change icon when you shutdown xbmc.

I must do my icon and I am going to put screenshot.

[ Added: 2013-08-30, 10:37 ]
Does somebody have icon same style for movie, music and pause please.
_________________
How to:
- Your own sms Gateway
- Plugin Xbmc
- Philips HUE
 
 
Kuuno 


Joined: 20 Mar 2012
Posts: 407
Location: Estonia
Posted: 2013-09-02, 17:12   

have you figured out how to make custom page in xbmc? would be nice to have one page like weather in xbmc but instead display your favorite info from HC2 (temps and etc)
i think this could be used:
http://wiki.xbmc.org/inde...og_via_skinning
_________________
Get Your preconfigured Fibaro solutions here: http://shop.indome.ee/

Tell us what You need and we ship it to You configured so just "plug & play"
 
 
Shad

Age: 31
Joined: 28 Jan 2013
Posts: 991
Location: Gabon
Posted: 2013-09-02, 17:16   

I would like to do that, but I have to time for that and remove the default weather.
But that is a big job (don't know python) and need more time.
I try to do that some night.
_________________
How to:
- Your own sms Gateway
- Plugin Xbmc
- Philips HUE
 
 
Kuuno 


Joined: 20 Mar 2012
Posts: 407
Location: Estonia
Posted: 2013-09-02, 17:58   

im working on this now. dont need to remove weather. add new button in main menu an add new window with custom labels and etc
_________________
Get Your preconfigured Fibaro solutions here: http://shop.indome.ee/

Tell us what You need and we ship it to You configured so just "plug & play"
 
 
Shad

Age: 31
Joined: 28 Jan 2013
Posts: 991
Location: Gabon
Posted: 2013-09-02, 18:45   

I would like to remove weather to do my own page with my weather from HC2.
_________________
How to:
- Your own sms Gateway
- Plugin Xbmc
- Philips HUE
 
 
Kuuno 


Joined: 20 Mar 2012
Posts: 407
Location: Estonia
Posted: 2013-09-02, 19:34   

i played around a little and got fibaro button on xbmc home screen

i also looked at weather and it might be good way to change wunderground api to hc2 api
_________________
Get Your preconfigured Fibaro solutions here: http://shop.indome.ee/

Tell us what You need and we ship it to You configured so just "plug & play"
 
 
Shad

Age: 31
Joined: 28 Jan 2013
Posts: 991
Location: Gabon
Posted: 2013-09-02, 20:00   

I start to check, I think is not going to be so difficult.
I am going to try tonight to prepare the design to work on the code tomorrow.

But it would be nice if we can get picture from fibaro to have the same design.
_________________
How to:
- Your own sms Gateway
- Plugin Xbmc
- Philips HUE
 
 
Kuuno 


Joined: 20 Mar 2012
Posts: 407
Location: Estonia
Posted: 2013-09-04, 19:31   

can someone check this, im getting parse error

curl -i -X POST -H "Content-type: application/json" -d "{"jsonrpc": "2.0", "method": "Player.GetItem", "params": {"playerid":0 }, "id": 1}" http://xx.xx.xx.xx:8080/jsonrpc

it shoul return current playing music item

thanks
_________________
Get Your preconfigured Fibaro solutions here: http://shop.indome.ee/

Tell us what You need and we ship it to You configured so just "plug & play"
 
 
Shad

Age: 31
Joined: 28 Jan 2013
Posts: 991
Location: Gabon
Posted: 2013-09-04, 20:13   

Try that.

{"jsonrpc": "2.0", "method": "Player.GetItem", "params": {"playerid":1 }, "id": 1}"

But what do you want to do ???
_________________
How to:
- Your own sms Gateway
- Plugin Xbmc
- Philips HUE
 
 
Kuuno 


Joined: 20 Mar 2012
Posts: 407
Location: Estonia
Posted: 2013-09-04, 20:36   

i want to get status and use it in label to display what is XBMC doing
currently i have script showing if xbmc is on or off but would like to see if it is active and what is playing

you have ideas?

ps-playerid 1 is for video and 0 for audio...
_________________
Get Your preconfigured Fibaro solutions here: http://shop.indome.ee/

Tell us what You need and we ship it to You configured so just "plug & play"
 
 
Display posts from previous:   
Reply to topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
Add this topic to your bookmarks
Printable version

Jump to:  

Powered by phpBB modified by Przemo © 2003 phpBB Group
Theme created by kemustek from Forum PC
Page generated in 0.11 second. SQL queries: 14