This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.

Screensavers

13

Comments

  • Since Firmware 0.10 the effects don't Rotate anymore. No spinning just stand still 
  • Erwin1Erwin1 Member
    edited September 2016
    @KoenMartens ; Same here! No spinning anymore after update to firmware 0.10...
  • Fixed in 0.10.1

    @KoenMartens, why not post this in the app store?
  • Anyone got a good led anitmation to simulate rain? I messed aroud a bit and came up with this (should resemble pooring rain) but I'm not completely satisfied but see no way to improve it either.
    //------------------- Raining Animation Start ---------------------------------------------------
    var frames_raining = [];
    var frame_raining = [];
    var randomNumbers = [];
    
    // for every pixel...
    for (var pixel = 0; pixel < 24; pixel++) {
        for (var i = 0; i < 8; i++) {
            randomNumbers[i] = randomPixel(0,23);
        }
    	if (isInArray(pixel, randomNumbers)) {
    		frame_raining.push({
    			r: 0, g: 0,	b: 255
    		});
        } else {
    		frame_raining.push({
    			r: 0, g: 0, b: 0
    		})
    	}
    }
    
    function randomPixel (low, high) {
        return Math.floor(Math.random() * (high - low + 1) + low);
    }
    function isInArray(value, array) {
      return array.indexOf(value) > -1;
    }
    
    frames_raining.push(frame_raining);
    
    var animation_raining = new Animation({
        options: {
            fps     : 1, 	// real frames per second
            tfps    : 12, 	// target frames per second. this means that every frame will be interpolated 60 times
            rpm     : 24,	// rotations per minute
        },
        frames    : frames_raining
    })
    
    animation_raining.register(function(err, result){
    	Homey.manager('ledring').registerScreensaver('raining', animation_raining)
    	if( err ) return Homey.error(err);
    	animation_green_swirl.on('screensaver_start', function( screensaver_id ){
    		Homey.log('Screensaver started')
    	})
    	animation_green_swirl.on('screensaver_stop', function( screensaver_id ){
    		Homey.log('Screensaver stopped')
    	})
    })
    //------------------- Rain Animation Stop ---------------------------------------------------
  • DieterKoblenzDieterKoblenz Member
    edited October 2016
    I am looking for this (rain ) as well!

    Is there a way to target individual pixels (randomly)?

  • Is there a way to target individual pixels (randomly)?
    My example does that already. It lights up 8 random leds out of the 24 each rotation. I first created a none rotating screensaver that lights some leds individually at random but this did not look very nice.
  • Hmm, not sure what else is possible then.. And to do pulsing with individual lights? So that led a goes from intensity 0 to 100 together with led c etc
  • Why isn't this on the appstore?
  • Yeah please make it available in the appstore
  • KoenMartensKoenMartens Member
    edited October 2016
    Never released it because I never found it finished. I can make it available no problems. Give it a day or 2 to get accepted.

    EDIT: Athom is faster than I imaged. App is approved and submitted in the store.
  • Great! I'd like to see the rain animation added @Phuturist @KoenMartens ;
  • Also, examples of how you guys use it would be great!
  • You could delete the locales folder in your app, they aren't needed (and are for the Yamaha receiver, lol)
  • EmileEmile Administrator, Athom
    I request a Knight Rider screensaver!
  • It's already there:


  • PhuturistPhuturist Member
    edited October 2016
    It's already there:


    But it can be improved! While tinkering with the possible settings of the screensaver I managed to create  one that was spinning backwards. Someone with proper coding skills might be able to create a screensaver that really goes back and forwards instead of going round ... ;-)
  • cool, back AND forwards would be great. but also rain animation!
  • Ohhh this is nice, thnx
  • @Phuturist @phil_s : Yes, only backwards or only forwards is absolutely no problem. The problem lies in the changing of these parameters upon an event happening. 
    According to https://developers.athom.com/library/ledring/ it is possible (see bold text), but I never got any updating of a screensaver to work. If any of you have suggestions, go ahead.

    If you can update the Frame(s), you can make completely interactive screensavers, and have infinite possibilities (i.e. you can just let the screensaver stand still, and update the pixels 30 times per second to some other values).
    Can @Emile help us out?

    // If this animation is also a screensaver, we must register it first.
    // 'weather' is the screensaver name defined in our app.json
    Homey.manager('ledring').registerScreensaver( 'weather', animation );
    
    animation.on('screensaver_start', function( screensaver_id ){
        // We can even update the frames when we want. In this case, when the weather has changed.
        animation.updateFrames([ ... ]); })
    animation.on('screensaver_stop', function( screensaver_id ){
    // The screensaver has stopped playing
    })
    })


  • I have a simple request. A screensaver that lets you turn Homey's LED ring on in a certain colour.
  • EdTst said:
    I have a simple request. A screensaver that lets you turn Homey's LED ring on in a certain colour.
    Yea, not simple. Screensavers are (as far as I know) initialized upon resetting Homey or upon (re-)installing the app. If I make a settings page in which you can change a colour, this will have no effect unless you re-install the app or reset Homey (i.e. pull-the-plug).
    Both are unfavourable.
  • Oops. And one that just makes the ring bright white, but steady? Like the white sleep, but without the sleep?
  • EdTst said:
    Oops. And one that just makes the ring bright white, but steady? Like the white sleep, but without the sleep?
    Sure that's technically possible. Any others who want a screensaver like this? (Just +1 this post or whatever)
  • keverjeroenkeverjeroen Member
    edited October 2016
    Great app. If I may, I have some requests:

    - A veeeerrryyyy slow rainbow animation. So like the original animation, but than really slow.
    - A fire effect. Like a candle of fire place
    - Some sort of green Matrix effect
  • First one I have, it's simple matter of changing the "rpm" to as low as you want (currently I have it set on 1 rotation per minute).


  • @keverjeroen ;
    Thanks!
    The problem I had with a veeerrryyy slow rainbow animation that it is in fact possible (see @DieterKoblenz's remark), but there are only 24 LEDs.
    In practice, this means that the rainbow is standing still, then jumps 1/24th of the ring, then stands still again. I didn't like the effect this created at all.

    I might look into the other two effects; I would really like a fireplace effect myself.
  • +1 for a fireplace effect. Would also be great start for a rain effect.
  • JonJon Member
    edited October 2016
    hi @KoenMartens I like your app Is it possible to add 'solid color' as a screensaver option as well?
    I am having a flow like this below, but it only sets the solid color for 1-2 seconds or so, that it returns to the "
    When Homey is idle..." option in the LED ring setting.
    What I would like it that it holds its solid color continuously after the flow has been triggered.


  • KoenMartensKoenMartens Member
    edited October 2016
    Jon said:
    hi @KoenMartens I like your app Is it possible to add 'solid color' as a screensaver option as well?
    I am having a flow like this below, but it only sets the solid color for 1-2 seconds or so, that it returns to the "
    When Homey is idle..." option in the LED ring setting.
    What I would like it that it holds its solid color continuously after the flow has been triggered.


    I'm afraid this exact functionality is impossible. This app is for screensavers (i.e. the behaviour of the LED ring when it is not doing anything). In flows, you can only change an animation of the LED ring (which is limited in time by definition).

    In regards to the question whether or not I can make solid screensavers of a certain colour: Read back in the thread for a better explanation, but shortly: I can't.
  • In flows, you can only change an animation of the LED ring (which is limited in time by definition).
    You can set a new screensaver from a flow.
Sign In or Register to comment.