Homey Community Forum

[APP] Splines

Introduction

Splines are two dimensional functions that can be very helpful for your home automation with Homey. Basically you can assign Y values (i.e. brightness, volume,…) to an given X value (i.e. time). The spline will then interpolate between these nodes. This app provides an UI that allows you to easily create/edit splines and it’s visual representation and provides some flow cards that you can use in your automations to make use of these splines.

Get it over here!

Usage

  • Go to the app configuration and click on ‘create’. Give the spline a name and setup it’s boundaries. Bellow you see a visual representation of the spline and you can also add/remove and modify the nodes. Bellow you find the exact values of the nodes.
  • If you would like to control the brightness of your lights trough the day you would setup multiple nodes like that: [0,50], [8,50], [9,100], [17,100] [18,50], [24,50] -> this would translate to ‘until 8:00 set a brightness of 50%, until 9:00 gradually fade to 100%’ and so on.
  • Create a trigger flow card ‘Query a spline’ or ‘Query a spline (time based)’ and select the desired spline
  • Create a second flow that used the ‘Query completed’ trigger card which contains the calculated position on the spline to set the brightness of your lights for example

Examples

  • automatically apply the brightness or color temperature of your lights during the day
  • fade in/out the volume of your speakers or the brightness of your lights with a custom pattern, i.e. start slowly and accelerate at the end
8 Likes

[reserved]

[reserved as well]

[Reserved too]

Cool! will definitely experiment with this when I’ve got a bit of spare time :wink:

Interesting, have to think about some useful use case’s. Maybe you can add a third dimension (z), which can be used for day of week? In that case this can be used as program for a thermostat for instanc?

1 Like

I was waiting for a solution exactly like this, so big KUDOS.

I have created my first Spline, for the toilet lights (motion detector or button) to automatically dim to a certain percentage. So I have a flow that queries the Spline. But now how to dim the light to exactly the value set in the Spline? I would think that the spline is availalbe as a TAG, but it is not. So not sure how to set the dim level now.

Edit: I should read your description better…

So I read the description, but still unsure how to change the 10% dim level to the queried value.

If this is in the app, let me know, but for me this would make the app much better.

  • Create a flow, that queries the Spline value, then writes the Value to a TAG
  • Being able to use the TAG value in another flow

I haven’t been able to try it myself yet, but can’t you write the spline value to a variable?
As soon as the variable changes you can take the value as TAG in several flows.
But I agree with you. If the spline values were directly available as TAG it would be helpful.

Btw, the way you set up your flow, doesn’t the light turn on directly at 10% dimming level no matter if motion is detected or not?
The trigger of the flow is the query of the spline value. So if the query of the spline value is completed, then the dimming level is set to 10%. With Hue lamps, for example, the lamp is then switched on immediately (at a dimming level of 10%).

Greetings from neighborhood… :wink:

Hi @fantross .

The flow I showed, used to be starting with “when this flow is started”. And works flawlessly. This Hue Lamp turns on actually when using, dim to xx %. It does not need to be on, or turned on. Dimming to a value is enough. But I can’t figure out how to get the queried value into the dim card.

I guess this app is only useful if the spline behaviour is nonlinear? Most slow dimming would otherwise be easier with transitions. Or are there other uses?

But the flow will also be executed when „Query completed WC Boven“. Or am I wrong?

This is what I said.

Create a numeric variable and this flow:

Every time the spline „Dimmlevel“ changed, the variable „VariableSpline“ will be updated with the „Dimmlevel“ value.
The „VariableSpline“ can now be used as TAG for whatever you want.

I still can not figure out how to get the spline calculated value in the logic.
What am I missing here?

You need the localtag from Splines. But in the Homey Web App the localtag from Splines isn’t shown. I guess this is a bug of HWA.
So please use the Homey App.

This explains a lot.
I almost never use the app, as I completely dislike the interface on my phone.

Now I got the value into the logic and can use it.
Thank you for figuring this out for me.

Hi @fantross, what does HWA stand for?

Homey Web App
I was too lazy to write out the words… :wink:

If you don’t like the interface on your phone, you can also use Homey Flow.
But I didn’t checked, if there is the same problem with the localtag.

Yes, it is an issue in the Homey Web App, the tag does appear in the Homey Flow webpage, which used to be my go to before the web app. Do you know where I can report an issue with the HWA?

The feedback button is not always visible for me. You may need to allow trackers, popups, etc. for the page.