[DIY] AtmoOrb - A Hue like mood lamp based on Particle Photon with NeoPixel - *Tutorial added* (2 Viewers)

Lightning303

MP Donator
  • Premium Supporter
  • September 12, 2009
    798
    577
    Home Country
    Germany Germany
    The minimum input voltage is not the problem. But at what level your led chip thinks that a voltage is high.
    WS2812B datasheet says:

    Input voltage level
    VIH DIN,SET 0.7VDD —— —— V
    VIL DIN,SET —— —— 0.3 VDD V

    So everything from 0.7*Vdd is considered high (1). And everything below 0.3*Vdd is considered low. Lets say your power supply gives you a perfect 5V. Then you need 0.7*5=3.5V to get a clear and stable high signal. With 3.3V we just dont get there. Yeah there is a little room for error, but you should drive your electronics always in spec ;).
     

    ixdvc

    Portal Pro
    May 26, 2009
    227
    39
    Home Country
    Germany Germany
    I know. That's what I meant with "minimum input voltage". I could have been a little more precise there, but was already convinced to use the level shifter :D
     

    ixdvc

    Portal Pro
    May 26, 2009
    227
    39
    Home Country
    Germany Germany
    First of all, thank you all for the detailed instructions. Using them I have managed to build my AtmoOrb and (almost) everything is working fine.

    I have setup one hyperiond instance (on OpenElec) which controls my APA102 ambilight, but also acts as a forwarder to a second hyperiond instance for the AtmoOrb. If the second hyperiond is started via
    Code:
    /storage/hyperion/bin/hyperiond.sh /storage/.config/hyperion.config2.json </dev/null >/dev/null 2>&1 &
    everything is fine. Then I added this to the startup script in
    Code:
    /storage/.config/autostart.sh
    below the original startup line for hyperion. After a reboot the ambilight on the TV was still working, but the AtmoOrb just stayed whatever color it was before reboot. What am I doing wrong?
     

    Rick164

    MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,005
    Home Country
    Netherlands Netherlands
    Hyperion should reset the colors on startup of its daemon (hyperiond) so most likely it isn't running, couple of things to check:

    - Start htop in SSH session and check if 2 Hyperiond processes are running
    - Try adding the 2nd daemon to a cronjob instead and see if that works:

    Code:
    In SSH session:
    
    - Execute command: crontab -e
    - Add the following line to end and save with F2:
    
    @reboot /storage/hyperion/bin/hyperiond.sh /storage/.config/hyperion.config2.json </dev/null >/dev/null 2>&1 &
    
    - Reboot

    So you can run them correctly with the forwarding config just not after a reboot right?
    If not best to post both Hyperion configuration files.

    Btw there's a new Hyperion build coming up based on the latest Photon sketch which will offer more smoothing options and one small bugfix.
     
    Last edited:

    ixdvc

    Portal Pro
    May 26, 2009
    227
    39
    Home Country
    Germany Germany
    So you can run them correctly with the forwarding config just not after a reboot right?
    Exactly.
    Start htop in SSH session and check if 2 Hyperiond processes are running
    htop is not available on OpenElec. I used top and the output was the same: two hyperiond processes in both cases (both in autostart.sh; only one in autostart.sh and starting the other manually)
    Try adding the 2nd daemon to a cronjob instead and see if that works
    With the cronjob it did not work, too. There was only one hyperiond listed when running top.

    I have another question: The breathing status LED of the photon is really annoying if the other LEDs are off. I wanted to reduce the brightness using RGB.brightness();, but got an error
    Code:
    error: reference to 'RGB' is ambiguous
    because RGB is already defined in the FastLED library. How can I prevent this?
     

    Rick164

    MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,005
    Home Country
    Netherlands Netherlands
    With the cronjob it did not work, too. There was only one hyperiond listed when running top.

    Been a while since I used openelec but should be able to do sudo apt-get install htop to install it, are your sure both Hyperion configurations aren't using the same JSON and Protobuffer ports?
    As that is the most common mistake because you can't use the same ports on the same device :)

    because RGB is already defined in the FastLED library. How can I prevent this?

    Used the original square box cover it came in to cover it, it's the one with their logo on it and can cover the led and device perfectly without covering the led ring :)

    For testing I use tmux session, basically it's sort of like RDP where you can do split screen among other cool things in a persistent session.
    Not easy to use at first but can recommend it :)

    Couldn't find a nice software solution in their documentation but can always ask on the Particle forum as their are some very active people there with a wide knowledge (devs take longer to respond generally).
     
    Last edited:

    ixdvc

    Portal Pro
    May 26, 2009
    227
    39
    Home Country
    Germany Germany
    should be able to do sudo apt-get install htop to install it
    Apt-get is also not available on OpenElec. Maybe I should switch to Raspbian or OSMC, I only used OpenElec because testing was very simple with the included Kodi.
    are your sure both Hyperion configurations aren't using the same JSON and Protobuffer ports?
    Yes, I am sure. Otherwise it would not work if the second hyperiond is started manually, right?
    Couldn't find a nice software solution in their documentation but can always ask on the Particle forum as their are some very active people there with a wide knowledge (devs take longer to respond generally).
    Thanks, will do that.
     

    Rick164

    MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,005
    Home Country
    Netherlands Netherlands
    Apt-get is also not available on OpenElec. Maybe I should switch to Raspbian or OSMC, I only used OpenElec because testing was very simple with the included Kodi.

    Ah right, Raspbian docs tend to be a bit more technical so for the new user it was (slightly) harder to use.
    Really need to finish the revised Hyperion guide for it so that it will have 2 chapters, one legacy for Openelec and the other being Raspbian as the rate OpenElec is going it will most likely be halting development at some time this year.

    Yes, I am sure. Otherwise it would not work if the second hyperiond is started manually, right?

    Yep, it's probably something in the startup script(s) that is off or conflicting.
    Linux stores various logs and a few for startup so those might be worth checking:

    http://www.thegeekstuff.com/2011/08/linux-var-log-files/

    There's a new home for Hyperion in the works including a a new wiki with up2date info and forum, final stages at the moment so that will be up in 2 weeks or so.
     
    Last edited:

    ixdvc

    Portal Pro
    May 26, 2009
    227
    39
    Home Country
    Germany Germany
    I managed to get the status LED thing working. I just dimmed it to about five percent of the standard brightness (I used 5, standard is 96, maximum is 255) and it is not noticeable anymore when under the lamp. To achieve that I added
    Code:
        // DIM STATUS LED
        ::RGB.control(true);
        ::RGB.brightness(5);
        ::RGB.control(false);
    in void setup().
    To disable the LED completely you would have to use
    Code:
        // DIM STATUS LED
        ::RGB.control(true);

    Linux stores various logs and a few for startup so those might be worth checking
    I tried to check these and - surprise - there are no logs on OpenElec. So I used
    Code:
    journalctl --no-pager -b -0
    instead. There was nothing shown related to hyperion. This leads me to two possibilities: (a) leave the Pi on all the time and (b) use another distribution. I'll go for option (a) for now, and think about option (b) some day.

    But anyway, thanks for your help!
     

    Users who are viewing this thread

    Top Bottom