Hyperion/HyperCon Android Development

  • Hi, over the past 2 weeks I have been building a Hyperion, native, android application. I only do this in my spare time so I have only spent around 10 hours or so building this app. So far everything is going well, I have my app controlling Hyperion. Essentially, it can do everything that is currently supported by ProtoBuf. However, I am new to ProtoBuf. I assume you need to add features on your end before my app can access/control them?


    If so, could you add the options for sending/receiving effects and and option to retrieve Hyperion version number.


    Although the app isn't finished yet, most of the functionally works fine. It works just like the Hyperion app in the Play Store. However, as mentioned above I can't retrieve or send effects. My long term (maybe not too long) are to add the ability to fully configure Hyperion through SSL via the app.



  • You are one of these guys who pushing forward such projects like Hyperion.
    Thank you for participating. Indeed we need new Apps(!), but we need people who could and are willing to work on this.


    If you want a dedicated repository for your Android code just ask. (Also in case you want to replace the current outdated android app with yours :))
    One question, you use ProtoBuf instead the JSON RPC. Is there a reason?


    So the point is now.
    1. An App that replaces the old one (color calibration(!))
    2. An App which uses the new function that are currently in development and is in sync when we release the next Hyperion version (We need much more time for it. So time goes by :))


    Zitat

    add the options for sending/receiving effects


    If people are interested and someone could to it :)


    @ Hyprion Development have a look at the last PRs.Currently many things need a rework.
    https://github.com/hyperion-project/hyperion.ng/issues


    Zitat

    I assume you need to add features on your end before my app can access/control them?


    @Paulchen-Panther is working on a JSON RPC writer to push changed settings to the current loaded .json
    In future you could detect the JSON RPC version level (already implemented) and the Hyperion version number (already implemented).
    And you could detect Hyperion with AVAHI (already implemented) ( no longer fiddle around with port configs)


  • The main reason to why I used ProtoBuf was simply because it was much easier to implement. Also, it was a little difficult to find any decent JSON RPC libraries which are regularly maintained. A lot of the current libraries no longer work correctly due to Google API changes. As it's still early days into development I could switch JSON if it's easier for you guys. If it comes to it, I could create a simple JSON RPC library to communicate with Hyperion.


    1. Do you have any example or documentation on how these JSON commands are constructed and sent?
    2. Where are the commands send to?


    Once I have communication (via JSON RPC) working adding all of the other commands should be simple. Google as recently added new ZeroConf API's so we should be able to get this working with just a few lines of code.

  • Yeah, I did notice a lot of these seem to be deprecated on hyperion-remote. No problem, I'll just change things accordingly.


    I've never done it myself, but I know they are screen recording API's built into Android. It should be possible to use a FrameBuffer too, not sure how many frames can be buffered though. I heard there was a limit to how many frames can be buffered, I think this is a size limit though, so if we decrease the resolution we should be able to hold more.


    Only real issues I can see from this are, mainly on 'lower end' devices, constantly pull/grabbing the screen --> processing the date --> sending via WiFi will overall decrease performance and hammer the battery life.


    When I get some free time though I will looks into this, if we can make it efficient enough I can see it being a good feature to have.

  • Sounds nice, people requested it, so i just wanted to ask you if you may able to implement it on top. You could send the picture to the proto port with a priority (like the kodi addon or the windows grabber). 10 pictures each second and 128x128 in size are enough for a good ambient light experience. More increases cpu load on your App and Hyperion (of course) which is for sure not noticeable (visual).

  • Hi,
    is there any alpha/beta of this app available?
    I also thought of writing a new android app for hyperion, but I'm a beginner with android development so maybe I could as a first step contribute or at least fork your project to get into it? :)

  • Just a hint:
    Use protobuf for sending image data (screen grabbing)
    And json for all other things.


    Json api is not fast enough for image data and in proto no hyperion control commands are available.


    Yeah I've already got ProtoBuf working, I implemented ProtoBuf before I switched over to JSON. I left the code in for testing sending image data. The only issue I am having is getting the screen from the Android device.

  • http://stackoverflow.com/quest…t-as-possible-through-adb


    it is adb i know, but may it helps you


    The problem with this is ADB isn't actually on Android it is a protocol which allows us to connect to an Android device from a PC etc. I did look into this before, there was a way to do it via ADB but it was very 'hacky' and it required us to establish an ADB connection before it would work. I didn't bother testing this method too much as it wasn't very practical and occasionally the connection can timeout so you need to start all over again. The only real way to do it is to access 'fb0' (FrameBuffer) but there is no API and is highly locked down as Google don't want us to access it at all.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!