Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

XBMC - as media center


Question

Posted

I thought that it would be nice to share and add and communicate around the XBMC possibilities with HC2.

There is new XBMC Frodo launched and I found some of the commands to send via HC2.

Note - You should change TCP port under virtual device from 8080 to 9090

These are commands that works for me (with beta currently):

Quit jsonrpc?{"jsonrpc":"2.0","method":"Application.Quit","id":1}

Home jsonrpc?{"jsonrpc":"2.0","method":"Input.Home","id":1}

Update Vid jsonrpc?{"jsonrpc":"2.0","method":"VideoLibrary.Scan","id":1}

Clean Vid jsonrpc?{"jsonrpc":"2.0","method":"VideoLibrary.Clean","id":1}

Hibernate jsonrpc?{"jsonrpc":"2.0","method":"System.Hibernate","id":1}

Reboot jsonrpc?{"jsonrpc":"2.0","method":"System.Reboot","id":1}

30Sec Forward jsonrpc?{"jsonrpc":"2.0","id":1,"method":"Player.Seek","params":{"playerid":1,"value":"smallforward"}}

30Sec Back jsonrpc?{"jsonrpc":"2.0","id":1,"method":"Player.Seek","params":{"playerid":1,"value":"smallbackward"}}

10Min Forward jsonrpc?{"jsonrpc":"2.0","id":1,"method":"Player.Seek","params":{"playerid":1,"value":"bigforward"}}

10Min Back jsonrpc?{"jsonrpc":"2.0","id":1,"method":"Player.Seek","params":{"playerid":1,"value":"bigbackward"}}

Play/Pause jsonrpc?{"jsonrpc":"2.0","id":1,"method":"Player.PlayPause","params":{"playerid":1}}

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

FF jsonrpc?{"jsonrpc":"2.0","id":1,"method":"Player.SetSpeed","params":{"playerid":1,"speed":"increment"}}

Rew jsonrpc?{"jsonrpc":"2.0","id":1,"method":"Player.SetSpeed","params":{"playerid":1,"speed":"decrement"}}

Enter jsonrpc?{"jsonrpc":"2.0","method":"Input.Select","id":1}

Up jsonrpc?{"jsonrpc":"2.0","method":"Input.Up","id":1}

Down jsonrpc?{"jsonrpc":"2.0","method":"Input.Down","id":1}

Left jsonrpc?{"jsonrpc":"2.0","method":"Input.Left","id":1}

Right jsonrpc?{"jsonrpc":"2.0","method":"Input.Right","id":1}

Back jsonrpc?{"jsonrpc":"2.0","method":"Input.Back","id":1}

Subtitle Off jsonrpc?{"jsonrpc":"2.0","id":1,"method":"Player.SetSubtitle","params":{"playerid":1,"subtitle":"off"}}

Subtitle On jsonrpc?{"jsonrpc":"2.0","id":1,"method":"Player.SetSubtitle","params":{"playerid":1,"subtitle":"on"}}

Select jsonrpc?{"jsonrpc":"2.0","method":"Input.Select","id":1}

Suspend jsonrpc?{"jsonrpc":"2.0","method":"System.Suspend","id":1}

Menu jsonrpc?{"jsonrpc":"2.0","method":"Input.ContextMenu","id":1}

Info jsonrpc?{"jsonrpc":"2.0","method":"Input.Info","id":1}

Show OSD jsonrpc?{"jsonrpc":"2.0","method":"Input.ShowOSD","id":1}

If someone has skills to create such scenes/buttons - play certain playlist(music) or start playing internet radio It would be great!

I'd like to make an wake up scene where light goes on smoothly(sunrise scene) and music starts playing quietly and increases it's volume step by step.

Lauri

Recommended Posts

  • 0
Posted

Hi Lauri,

I think you will find that the spadework is already done for you in the Sonos thread by Mark to make use of these.

The patterns he has used should work with small tweaks to JSON for most media players.

There is the issue of no callbacks so using Fibaro as a proper interface will take an external helper library pushing in or polling your player for status. I am not going to work on this myself just now for XBMC or squeezebox or any other media player.

Waiting for some more features.

  • 0
  • Inquirer
  • Posted

    Hmm.. I tried but didn't get any of them working at the moment.. I'll keep trying.

    • 0
    Posted

    I will try to find time later this month. I have a razb p so it will be a good exercise

    • 0
  • Inquirer
  • Posted

    Thinking of buying rasperry pi aswell, to use it as media center with xbmc... currently testing things with pc.

    • 0
    Posted

    Yes Razp P looks great.

    My interest is that while Logitech has dumped squeeze players, you can use the razp p as a player. So multiroom player for the price of a PI

    Please login or register to see this image.

    /emoticons/default_icon_smile.gif" alt=":-)" /> full sync etc for zone.

    • 0
    Guest skyhooper
    Posted

    Hi,

    Got the http commands from polish forum

    POST /xbmcCmds/xbmcHttp?command=SendKey(270) HTTP/1.1

    0x0D0x0A

    POST /xbmcCmds/xbmcHttp?command=SendKey(271) HTTP/1.1

    0x0D0x0A

    POST /xbmcCmds/xbmcHttp?command=SendKey(272) HTTP/1.1

    0x0D0x0A

    POST /xbmcCmds/xbmcHttp?command=SendKey(273) HTTP/1.1

    0x0D0x0A

    POST /xbmcCmds/xbmcHttp?command=SendKey(256) HTTP/1.1

    0x0D0x0A

    //Pause

    Please login or register to see this link.

    )

    //Mute

    Please login or register to see this link.

    )

    and from XBMC http api

    //Stop

    Please login or register to see this link.

    )

    //touche info

    Please login or register to see this link.

    )

    //zoom

    Please login or register to see this link.

    )

    //context

    Please login or register to see this link.

    )

    sortir

    Please login or register to see this link.

    )

    //sous titres

    Please login or register to see this link.

    )

    //OSD

    Please login or register to see this link.

    )

    //FFORWARD

    Please login or register to see this link.

    )

    //REWIND

    Please login or register to see this link.

    )

    //VOLUME UP

    Please login or register to see this link.

    )

    //VOLUME low

    Please login or register to see this link.

    )

    //NEXT

    Please login or register to see this link.

    )

    //PREVIOUS

    Please login or register to see this link.

    )

    //PAGE UP

    Please login or register to see this link.

    )

    //PAGE DOWN

    Please login or register to see this link.

    )

    //ESCAPE

    Please login or register to see this link.

    )

    you most convert all HEXA to DEC ex: (0xF051) to (61521)

    Please login or register to see this link.

    Good luck

    • 0
    Guest skyhooper
    Posted

    By the way if you use it to control your XBMC from you IPAD or Iphone you have full support remote by xbmc remote and i can suject you Constellation for Ipad.

    JSON dont work with regular version 1.047 .

    • 0
  • Inquirer
  • Posted
    Hi,

    Got the http commands from polish forum

    POST /xbmcCmds/xbmcHttp?command=SendKey(270) HTTP/1.1

    0x0D0x0A

    POST /xbmcCmds/xbmcHttp?command=SendKey(271) HTTP/1.1

    0x0D0x0A

    POST /xbmcCmds/xbmcHttp?command=SendKey(272) HTTP/1.1

    0x0D0x0A

    POST /xbmcCmds/xbmcHttp?command=SendKey(273) HTTP/1.1

    0x0D0x0A

    POST /xbmcCmds/xbmcHttp?command=SendKey(256) HTTP/1.1

    0x0D0x0A

    //Pause

    Please login or register to see this link.

    )

    //Mute

    Please login or register to see this link.

    )

    and from XBMC http api

    //Stop

    Please login or register to see this link.

    )

    //touche info

    Please login or register to see this link.

    )

    //zoom

    Please login or register to see this link.

    )

    //context

    Please login or register to see this link.

    )

    sortir

    Please login or register to see this link.

    )

    //sous titres

    Please login or register to see this link.

    )

    //OSD

    Please login or register to see this link.

    )

    //FFORWARD

    Please login or register to see this link.

    )

    //REWIND

    Please login or register to see this link.

    )

    //VOLUME UP

    Please login or register to see this link.

    )

    //VOLUME low

    Please login or register to see this link.

    )

    //NEXT

    Please login or register to see this link.

    )

    //PREVIOUS

    Please login or register to see this link.

    )

    //PAGE UP

    Please login or register to see this link.

    )

    //PAGE DOWN

    Please login or register to see this link.

    )

    //ESCAPE

    Please login or register to see this link.

    )

    you most convert all HEXA to DEC ex: (0xF051) to (61521)

    Please login or register to see this link.

    Good luck

    I'm afraid these do not work with new XBMC Frodo.. They worked fine with last version.

    • 0
    Guest deraaij
    Posted

    I also use the json over TCP method with good result for a couple of months.

    • 0
    Guest skyhooper
    Posted

    thanks for the info ,iam using Openelec with autoupdate so i will wait and see

    Please login or register to see this image.

    /emoticons/default_icon_mrgreen.gif" alt=":mrgreen:" />

    Regards,

    • 0
    Guest deraaij
    Posted
    thanks for the info ,iam using Openelec with autoupdate so i will wait and see

    Please login or register to see this image.

    /emoticons/default_icon_mrgreen.gif" alt=":mrgreen:" />

    Regards,

    I am also using openelec

    Please login or register to see this image.

    /emoticons/default_icon_smile.gif" alt=":-)" /> the frodo release

    • 0
    Posted

    Is this right? I cant get it to work, so i guess i made something wrong

    Please login or register to see this image.

    /emoticons/default_icon_confused.gif" alt=":-?" />

    Please login or register to see this attachment.

    • 0
    Posted

    I think is missing a litlle part in your request.

    Please login or register to see this link.

    "jsonrpc":"2.0","method":"Input.Home","id":1}

    • 0
  • Inquirer
  • Posted
    Is this right? I cant get it to work, so i guess i made something wrong

    Please login or register to see this image.

    /emoticons/default_icon_confused.gif" alt=":-?" />

    For me this is working flawlessly with XBMC FRODO and PC. I see that you have Mac? Maybe there is some difference? (but there shouldn't)

    • 0
    Guest deraaij
    Posted
    Is this right? I cant get it to work, so i guess i made something wrong

    Please login or register to see this image.

    /emoticons/default_icon_confused.gif" alt=":-?" />

    For me it works like that. You are sure you enabled it in XBMC?

    • 0
    Posted

    Works with this command:/jsonrpc?request={"jsonrpc":"2.0","method":"Input.Home","id":1}

    and ip + port in virtual device

    • 0
    Posted

    Hi,

    It's doesn't work for me, i have XBMC stable release.

    • 0
    Guest deraaij
    Posted

    I used have {"jsonrpc": "2.0", "method": "Player.PlayPause", "params": { "playerid": 1 }, "id": 1} for play pause, IP address xbmc and enabled the settings in xbmc.

    • 0
  • Inquirer
  • Posted
    Hi,

    It's doesn't work for me, i have XBMC stable release.

    Is it 12.0 Frodo release or older one? If older, then you have to use these commands:

    POST /xbmcCmds/xbmcHttp?command=SendKey(270) HTTP/1.1

    0x0D0x0A

    POST /xbmcCmds/xbmcHttp?command=SendKey(271) HTTP/1.1

    0x0D0x0A

    POST /xbmcCmds/xbmcHttp?command=SendKey(272) HTTP/1.1

    0x0D0x0A

    POST /xbmcCmds/xbmcHttp?command=SendKey(273) HTTP/1.1

    0x0D0x0A

    POST /xbmcCmds/xbmcHttp?command=SendKey(256) HTTP/1.1

    0x0D0x0A

    etc...

    • 0
    Posted
    Hi,

    It's doesn't work for me, i have XBMC stable release.

    Is it 12.0 Frodo release or older one? If older, then you have to use these commands:

    POST /xbmcCmds/xbmcHttp?command=SendKey(270) HTTP/1.1

    0x0D0x0A

    POST /xbmcCmds/xbmcHttp?command=SendKey(271) HTTP/1.1

    0x0D0x0A

    POST /xbmcCmds/xbmcHttp?command=SendKey(272) HTTP/1.1

    0x0D0x0A

    POST /xbmcCmds/xbmcHttp?command=SendKey(273) HTTP/1.1

    0x0D0x0A

    POST /xbmcCmds/xbmcHttp?command=SendKey(256) HTTP/1.1

    0x0D0x0A

    etc...

    Hi,

    I have a frodo version but i activate lua code and its doesnt work, put this line with no lua code:

    /jsonrpc?{"jsonrpc":"2.0","method":"Input.Home","id":1}

    bye

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...