Skip to content

Add a rainbow cycle effect #477

Closed

Description

@chcore

Feature request

I would like to see a rainbow "cycle" effect added to HyperHDR. This is similar to the existing Rainbow Swirl effect, except the colour is the same for all LEDs and light bulbs. It smoothly cycles through the rainbow and lights up the entire room uniformly. I have some python code I was previously using with the Hyperion effects engine that might help.

import hyperion, time, colorsys

# Get the parameters
rotationTime = float(hyperion.args.get('rotation-time', 30.0))
brightness   = float(hyperion.args.get('brightness', 100))/100.0
saturation   = float(hyperion.args.get('saturation', 100))/100.0
reverse      = bool(hyperion.args.get('reverse', False))

# Calculate the sleep time and hue increment
sleepTime = 0.1
hueIncrement = sleepTime / rotationTime

# Switch direction if needed
if reverse:
	increment = -increment

# Start the write data loop
hue = 0.0
while not hyperion.abort():
	rgb = colorsys.hsv_to_rgb(hue, saturation, brightness)
	hyperion.setColor(int(255*rgb[0]), int(255*rgb[1]), int(255*rgb[2]))
	hue = (hue + hueIncrement) % 1.0
	time.sleep(sleepTime)

What problem does this feature solve?

Adds a nice new effect. I like it for an LED + light bulb combo, where the entire room is lit up a single colour at any point in time.

What does the proposed API look like?

N/A

How should this be implemented in your opinion?

Porting the provided python code (hopefully)

Are you willing to work on this yourself?

I'm not really a programmer unfortunately.

Activity

  1. self-assigned this
    on Feb 14, 2023
  2. awawa-dev commented on Jul 22, 2023

    @awawa-dev
    Owner

    Similar effect implemented in #607 "Rainbow waves"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions