Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to Transform to allow the bulbs to be turned on and off #2

Open
Djelibeybi opened this issue Mar 19, 2020 · 5 comments
Open

Comments

@Djelibeybi
Copy link
Collaborator

It's currently possible to turn a bulb on and run a waveform using the following JSON:

{
    "command": "transform",
    "args": {
    	"matcher": {
    		"serial": "d073d5xxxxxx"
    	},
    	"transform": {
    		"color": "red",
    		"effect": "breathe",
    		"cycles": 2,
    		"period": 0.5,
    		"transient": true,
    		"power": "on"
    	}
    }
}

It would be super peachy keen if transient applied to the power status of the bulb as well, i.e. if I'm turning the bulb on and I'm setting transient to true and the bulb was off, then the bulb should turn be turned off again afterwards too.

Perhaps an addition to transform_options called transient_power as a boolean?

@delfick
Copy link
Owner

delfick commented Mar 19, 2020

I'd do that as a transient_power option in the transform_options like we did for transient_color https://github.com/delfick/photons-core/blob/master/photons_control/transform.py#L75

@Djelibeybi
Copy link
Collaborator Author

I could've sworn I said the same thing at the end of my post. 😂 I'll test to see if transient_power is true and if the bulb is off, send a final power packet at the end of the pipeline.

@delfick delfick transferred this issue from delfick/photons-core Jul 3, 2020
@delfick
Copy link
Owner

delfick commented Aug 9, 2020

I'm confused why I didn't say this isn't possible.

You can't tell the device to execute a command in the future, and I don't want to put a sleep in the message.....

@Djelibeybi
Copy link
Collaborator Author

I'm confused why I didn't say this isn't possible.

I think you were pondering doing it as a pseudo tile-like animation.

@delfick
Copy link
Owner

delfick commented Aug 9, 2020

oh right, this would be specific to the interactor. I'll leave this till I have a scheduler then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants