1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Hyperion/HyperCon Android Development

Discussion in 'Development' started by BioHaZard1, 8 July 2016.

  1. BioHaZard1

    BioHaZard1 Member Developer

    Messages:
    39
    Hardware:
    RPi2, RPi3, 32/64bit, +Arduino
    Yeah that's a good point I agree. Hopefully, Kodi does not enable the secure flag at all.

    It already scans for ZeroConf device on launch. It discovers ZeroConf device and adds them above the saved ones. ;)
     
  2. Rick164

    Rick164 Administrator Staff Member Administrator

    Messages:
    169
    Hardware:
    RPi2, +Arduino, +AtmoOrb
    Looks awesome!

    [​IMG]
     
    • Thank you Thank you x 1
  3. ShadowXVII

    ShadowXVII New Member

    Messages:
    5
    Hardware:
    RPi3, +Arduino
    Question @BioHaZard1, does the app let you control brightness of colors on the color wheel, like the standard app?
    AFAIK that can't be done using protobuf alone, so is it perhaps achieved using a combination of protobuf & JSON?

    Reason I ask, is that I'm building integration between two LED systems; it uses protobuf exclusively (due to rapid, low-latency updates), and wondering whether I'm going to have to bring JSON into the fold...
     
  4. Brindosch

    Brindosch Administrator Administrator

    Messages:
    637
    Hardware:
    RPi1/Zero, RPi2, RPi3, +nodeMCU/ESP8266
    Greetings,
    The interface has been moved from proto to json as far as i know, because the protobuf interface is a lot behind the json interface in terms of functions.
    It is possible to expand the proto interface and make it as strong as the json is by simply copy the code with some adjustments. I had no time for it, maybe someone other can do it (commits are welcome).

    Sad, i can't help you for the moment.
     
  5. ShadowXVII

    ShadowXVII New Member

    Messages:
    5
    Hardware:
    RPi3, +Arduino
    Thanks for the info.

    Am I right in thinking the brightness and the color wheel is achieved using Set Colour and a Transform (e.g. value) in two commands via json?
     
  6. BioHaZard1

    BioHaZard1 Member Developer

    Messages:
    39
    Hardware:
    RPi2, RPi3, 32/64bit, +Arduino
    Do you mean brightness of the colour or the lights? If you are referring to the colour you can do this by the 'setcolor' command.
     
  7. ShadowXVII

    ShadowXVII New Member

    Messages:
    5
    Hardware:
    RPi3, +Arduino
    Yep, was referring to "Value" from the HSV model.
     
  8. ShadowXVII

    ShadowXVII New Member

    Messages:
    5
    Hardware:
    RPi3, +Arduino
    Oooh, sorry, ignore my question -- thought perhaps that Hyperion was doing something with the RGB and somehow adjust the brightness (V) independently. In my testing, I think it might have just been my script playing up :)

    The RGB suitably controls the brightness :facepalm:. Now to reduce latency!
     
  9. Rick164

    Rick164 Administrator Staff Member Administrator

    Messages:
    169
    Hardware:
    RPi2, +Arduino, +AtmoOrb
    @BioHaZard1 Any change of alpha / beta APK package or not ready for that yet? :)

    Really missing my remote with Hyperion.ng for testing and what not so would be great if we have something for Android again.
     
  10. BioHaZard1

    BioHaZard1 Member Developer

    Messages:
    39
    Hardware:
    RPi2, RPi3, 32/64bit, +Arduino
    Sure, I'll upload one as soon as I can. There are a few bugs, nothing major really:
    - Occasionally on the first launch, my app will refuse to initiate a connection with Hyperion, resulting in a constant spinning circle. Just kill the app and open it again and it will work. It's something to do with the new code I added to receive commands from Hyperion.
    - Sometimes I get a force close, it usually only happens when you're viewing a list (RecyclerView). It's a known Android bug (indexoutofboundsexception)

    Those are the main ones I can think of. Of course, it isn't finished yet so sections might not be complete or look right just yet. Most of the Hyperion side is working though, just a few minor bugs here and there.
     
    • Thank you Thank you x 1
  11. BioHaZard1

    BioHaZard1 Member Developer

    Messages:
    39
    Hardware:
    RPi2, RPi3, 32/64bit, +Arduino
    • Like Like x 3
    • Thank you Thank you x 1
  12. Rick164

    Rick164 Administrator Staff Member Administrator

    Messages:
    169
    Hardware:
    RPi2, +Arduino, +AtmoOrb
    Awesome, will try it out :D
     
  13. Brindosch

    Brindosch Administrator Administrator

    Messages:
    637
    Hardware:
    RPi1/Zero, RPi2, RPi3, +nodeMCU/ESP8266
    After a first hands on, i want to share my thoughts. Thank you so far @BioHaZard1 for your continued commitment.
    • Sadly, zeroconf doesn't work for me. Let me know how i can help here to get proper debug output as i found nothing related like "zeroconf: nothing found"
    • I suggest to hide SSH stuff unless the user wants it. Are there any SSH actions yet?
    • startup wizard: replace ssh with jsonserver, i assume this is mostly from your earlier dev days? Maybe a initial zeroconf scan and if empty a network scan (maybe display with hostname, as i assume that most people don't know which ip is what).
    • selection of calibration tab crashes app (?)
    • global on/off +notification if disabled
    Best wishes
    brindosch
     
  14. BioHaZard1

    BioHaZard1 Member Developer

    Messages:
    39
    Hardware:
    RPi2, RPi3, 32/64bit, +Arduino
    No problem, happy to hear your feedback

    - I had a feeling that would happen, zero-conf isn't great on Android unfortunately. Which phone are you using? I know this has some issues with Samsung devices but I thought I fixed it
    - I forgot to disable that section, as you can tell the SSH/Setup Wizard isn't finished anyway. The whole purpose of this was to enable the user to install Hyperion without the need of a computer or screen. I use mine headless so this would make the process much easier.
    - There is actually a zero-conf scan on startup, well it starts and continues to run. If it finds a device it will add it above saved devices. If you look at this screen capture below, the zero-conf device is the one at the top. I should really add a message up there e.g. "No zero-conf devices found"
    - Do you mean an option to turn Hyperion on/off?



    Thanks for the feedback.

    Edit: Fixed 2 force closes on the Calibration fragment.
     
    Last edited: 1 August 2017
  15. Brindosch

    Brindosch Administrator Administrator

    Messages:
    637
    Hardware:
    RPi1/Zero, RPi2, RPi3, +nodeMCU/ESP8266
    Weird, a Galaxy A5 2017
    Yes, the overall switch. Is maybe even better than the clearall command that you currently have at the top. You can place "clear this app prio" besides (if people miss it)

    Will check your update soon!
     
  16. BioHaZard1

    BioHaZard1 Member Developer

    Messages:
    39
    Hardware:
    RPi2, RPi3, 32/64bit, +Arduino
    Strange, I don't have any Samsung devices so it's hard for me to test, all my devices are Nexus. I did manage to try it on a Samsung Galaxy S5, S7 and S8 and it seems to work fine. I'll look into it, could you try with this app: https://play.google.com/store/apps/details?id=com.druk.servicebrowser&hl=en_GB This is the guy who developed the library I'm using for zero-conf.

    Okay, I've done that. :)
     
  17. Brindosch

    Brindosch Administrator Administrator

    Messages:
    637
    Hardware:
    RPi1/Zero, RPi2, RPi3, +nodeMCU/ESP8266
    No clue what happend, it works perfect now. The test app worked also perfect, showed even the TXT records.
     
  18. hissingshark

    hissingshark New Member

    Messages:
    3
    Hardware:
    RPi3, +Arduino
    Kudos for the work so far @BioHaZard1 ! I'm made up. This app is looking very sharp.

    Those of us using hyperion on the Vero4K are only able to get the on-board grabber working by being early adopters and compiling Hyperion-NG (which is also looking fab by the way). The loss of the android remote was a big hurt, for me personally at least, but even this alpha is already putting back lost functionality.

    Keep up the good work.
     
  19. Rick164

    Rick164 Administrator Staff Member Administrator

    Messages:
    169
    Hardware:
    RPi2, +Arduino, +AtmoOrb
    Yeah works very well and thanks again for creating it :)