[Watch app][SDK 2.0] XBMC Remote

Daniel19Daniel19 Posts: 46Member
edited February 2014 in Pebble Watchapp Directory
Hi Guys,

I'm working in a remote control for XBMC based on web JSON-RPC_API (http://wiki.xbmc.org/?title=JSON-RPC_API) and PebbleKit JS.

It's in mypebblefaces.com right now, but I expect to publish it in the pebble APPstore and in the APPStore.

I'm asking here for people to test it and give me feedback / issues / ideas.

v0.7
- Bug fixing
- Media Controls updated
- New seek bar (Thanks Katharine for the library)
- 10 sec Auto update information
- Changed FF and REV speeds with FF and REV jumps
- Skip and Previous track added to long click

v0.6
- Fixed Iphone issue (thanks to DidierArenzana)

v0.5
- Added Volume control
- Fixing bugs

v0.4
- Added "What is playing" in Medica Controls

v0.3
Fixed issues:
- Media Controls
- "undefined" user and password
v0.2
- Bug fixing

First release (V0.1):
Really first release, just basic functions, I'm working to improve it.
Media Controls:
- Play/Pause
- Stop (long Play/Pause)
- Rewind (sort and long click)
- Fast Forward (sort and long click)
Arrows and buttons
- Up 
- Down 
- Select 
- Back 
- Left 
- Right 
- Home 
- Title 
- Info


-----------------------
Buy me a beer!
Post edited by Daniel19 on
·
«13

Comments

  • RobJohnsonRobJohnson Posts: 14Member
    Hi.  Quite keen on making use of this, thanks for writing it!  However, I'm not sure how to set it up.  I'm using XBMC on a Raspberry Pi, and I've allowed all the HTTP stuff in the settings.  What exactly do I need to put in for the URL in the app settings?  I've tried it with the Pi's IP and the port, settings that already work for the remote (Yatse) on the phone.

    Pointers would be appreciated, and I'll certainly give some feedback once I've got something working.
    ·
  • Daniel19Daniel19 Posts: 46Member
    Hi Rob,

    I have part of the next release done and yes, it has error windows :-)

    Regarding your error, that is an example:

    ----- 
    XBMC ip: 192.168.0.10
    Port: 8080
    No user/pass

    XBMC User: 
    XBMC Pass:

    ·
  • RobJohnsonRobJohnson Posts: 14Member
    I was being a numpty, didn't clear the 'null' from user and password (I haven't added a user and password).

    So, it works :)  Apart from the media settings.  It won't play/pause etc.  The other options, like Up, Down, Select etc, all work fine.

    What would be most useful for me, would be easy access to the volume control.  I sometimes set XMBC to play music when I go to bed, and then have to use my phone to sort out the volume.  Would be nice to have it on my wrist instead.  Like how it works on Music Boss, with single up/down for volume, and long press for fast forward/rewind.
    ·
  • Daniel19Daniel19 Posts: 46Member
    Hi Rob,

    Thanks for you feedback!

    Could you please let me know if you are an Android or iOS user?

    Regarding the controls, I have to review media controls, because it works just fine for me (I'm using Rpi too). I want to add volume controls, but I'm not sure where yet.

    Daniel.
    ·
  • RobJohnsonRobJohnson Posts: 14Member
    Hi Daniel.  Thanks for the quick responses!

    I'm on Android.  I've tried it with Raspbmc on various different screens, but it didn't make a difference.
    ·
  • PatrickSimondsPatrickSimonds Posts: 23Member
    Is this intended for use with XBMC 12 (Frodo) or XBMC 13 (Gotham)? I can't remember but I think the JSON API has changed between versions. This issue is at least worth testing. Also, is this purely using the web interface, or do you somehow also communicate with the EventServer? Just curious :P
    ·
  • Daniel19Daniel19 Posts: 46Member
    Hi Patrick,

    I know that it works in Frodo because it's my XBMC, but I'm not sure in Gotham, I have to try.
    Thanks for the tip about the JSON API, I'll check it. Regarding the comunication, this first version is just asking to do things through the web, right, but the next version in what I'm working now is gonna be able to communicate with XBMC to get which movie is playing and this stuff.

    Daniel.  
    ·
  • Daniel19Daniel19 Posts: 46Member
    edited January 2014
    Hi folks,

    I just updated it, fixing (I hope) the issue that @RobJohnson had.

    Now there is two ways connection with XBMC and I'm working to add info about what is playing to the Media Controls layer.

    Fixed issues:
    - Media Controls
    - "undefined" user and password

    Added error alerts.


    Post edited by Daniel19 on
    ·
  • RobJohnsonRobJohnson Posts: 14Member
    Media control now working!  At first I had an error message about not being able to connect.  That was because there was an error message in XBMC on my Pi.  Used the select/back controls in this app to select and clear it, then was able to use the media controls fine.  Thanks :)
    ·
  • Daniel19Daniel19 Posts: 46Member
    Hi again,

    I just updated it with "What is playing" in Media Controls layer.

    I'm still working on it!
    ·
  • RobJohnsonRobJohnson Posts: 14Member
    Great :)  One observation on version 0.2 (not tried the newest one yet).  I was able to fast forward and rewind with the media controls.  But while I could FFwd through one track to the next one, I couldn't rewind any further back than the beginning of the current track - I couldn't go to the previous track.  Don't know if that's just me!  A way to just skip straight to the previous or next track would be great too (rather than moving through the whole track).  I am keeping this installed, and will keep updating it, it's very useful.
    ·
  • Daniel19Daniel19 Posts: 46Member
    Hi @RobJohnson

    I was thinking in you today... because I don't use XBMC to listen music, but I know that you do... There is no option to skip tracks just to ff or or rew, but it's in my to-do list with the volume control.

    Daniel.
    ·
  • AsafAsaf Posts: 49Member
    Hi!
    Can you add some Activity/Intent to start the app via Tasker?
    I want to launch it automatically when I open XBMC 
    ·
  • Daniel19Daniel19 Posts: 46Member
    Hi @Asaf

    That's a really cool function, I have some other basic functions that I have to add before, but I really like your idea, thanks!!

    ·
  • AsafAsaf Posts: 49Member
    @Daniel21, Thank you :) 
    Cant wait for that ability

    BTW, Awesome app!
    ·
  • DidierArenzanaDidierArenzana Posts: 13Member
    edited February 2014
    Hi,
    thanks for this app, I just downloaded it from the pebble app store.
    However, I can't get it to work; I have tried different settings for the url without success.
    Here is the logs for my last attempt:
    [INFO    ] configuration requested
    [INFO    ] JS: XBMC Remote: showing configuration
    [INFO    ] JS: XBMC Remote: configuration closed
    [INFO    ] JS: XBMC Remote: Options = {"server":"http://192.168.0.29:80","user":"","pass":""}
    [INFO    ] JS: XBMC Remote: Writting vars
    [INFO    ] JS: XBMC Remote: http://192.168.0.29:80
    [INFO    ] D main.c:146 DOWN!
    [INFO    ] Error: XBMC Remote: Invalid URL at line 56 in pebble-js-app.js

    I am using XBMC on a raspberry pi: http://www.raspbmc.com/ , XBMC 12.2. The settings for remote are OK, it works with the 'xbmcremote' app on my iPhone, and if I enter http://192.168.0.29/jsonrpc in my browser, I get a JSON result.

    Any thoughts? Is the source code available somewhere?
    Thanks,
    Didier.
    Post edited by DidierArenzana on
    ·
  • Daniel19Daniel19 Posts: 46Member
    Hi Didier,

    I'm still working in the source code, and I'm not proud of it, not yet... I'll release as soon as I have a final version of the app.

    Regarding your problem, it's unusual... did you try with http://192.168.0.29 as server instead of http://192.168.0.29:80? should be the same but just in case... are you sure that you can open that link (http://192.168.0.29:80/jsonrpc) from your smartphone?

    This error that you show me, could be normal, if you are not playing anything in this moment (as I told you, I'm not really proud of the code right now, I have no time to do it as good as I like).


    ·
  • DidierArenzanaDidierArenzana Posts: 13Member
    edited February 2014
    Hi,
    I managed to get it working, by changing the javascript source code. (since the pbw is a zip file, you can change the javascript source code inside)
    I have changed all of the following special characters in the URLs to get it to work:
    replace " by %22
    replace { by %7B
    replace } by %7C
    replace [ by %5B
    replace ] by %5D

    so, for instance, function button-up becomes :
     function button_up(){

    send_json_to_xbmc('/jsonrpc?request=%7B%22jsonrpc%22:%222.0%22,%22method%22:%22Input.Up%22,%22params%22:%5B%5D%7D');

    }

    Post edited by DidierArenzana on
    ·
  • Daniel19Daniel19 Posts: 46Member
    Hi,

    Thanks for your contribution! I'll change in my source! Maybe is because I use android...
    ·
  • DavidJonkerDavidJonker Posts: 2Member
    edited February 2014
    I can't get this to work.
    Using Raspbmc (XBMC on Raspberry Pi). iOS 7.0.4 jailbroken. Pebble 2.0.0.
    I am also running SmartWatch+.

    I have tried multiple variations for a URL with no luck. http://192.168.1.136:8080

    I have the default user/pass (user:pi - pass:raspberry). The XBMC remote iphone app works perfectly.

    SmartWatch+ should give http access for Pebble, but I also tried httpebble with no luck.


    EDIT: I checked the Raspbmc settings and I actually don't have a user/pass set for remote control. Still doesn't work. The XBMC remote iPhone app works with or without a user/pass set.
    Post edited by DavidJonker on
    ·
  • Daniel19Daniel19 Posts: 46Member
    Hi David,

    It seems that there is a kind of bug with my JS in iphone...

    I'm trying to have time to finish what I'm doing to include what @DidierArenzana told me.

    I'm sorry, but I'l fix as soon as possible.

    Daniel.
    ·
  • andrew23andrew23 Posts: 17Member
    Hey there...

    Glad to see someone working in this for the XBMC community. Nicely done.

    First run today with pebble/android.

    Entering:

    XBMC I.P.
    default username
    Unique password (just 2 characters)

    When I open the watch app and attempt a keypress.. Error claiming that it is unable to reach my local I.P
    ·
  • Daniel19Daniel19 Posts: 46Member
    Hi @andrew

    On the server box you have to use http://I.P. (it needs the protocol, http:// or https://)

    Daniel.
    ·
  • Jeff21Jeff21 Posts: 3Member
    Hi Daniel!

    Just updated to 2.0, found your app in the app store, but there's no option to load it?  I'm likely missing something.. ?
    ·
  • Daniel19Daniel19 Posts: 46Member
    Hi @Jeff

    It has to be something with you appstore... could you try to reboot the phone or force-close the app and open it again?


    ·
  • Jeff21Jeff21 Posts: 3Member
    Must be?  Here's what I see, after a force close and phone reboot for good measure: http://imgur.com/MHT0qT3
    ·
  • Daniel19Daniel19 Posts: 46Member
    So unexpected o_0

    I'm checking and it works in my android....
    ·
  • Daniel19Daniel19 Posts: 46Member
    @Jeff, you could download from http://www.mypebblefaces.com/apps/14228/9986/ anyway...

    Daniel.
    ·
  • Jeff21Jeff21 Posts: 3Member
    Ahhhh - ok thanks.  I'm seeing others that aren't showing up either.  App store issue it seems.
    ·
  • Daniel19Daniel19 Posts: 46Member
    Hi Folks!

    I just updated it again:

    V0.5
    - Added Volume control @RobJohnson
    - Fixing bugs

    @DidierArenzana, Could you try if it works now in your Iphone?

    Daniel.


    ·
«13
Sign In or Register to comment.