[APP][Pro] Splines [Abandoned]

Which query interval do you use?
If you use e.g. an interval of 15 minutes, the X values should (theoretically) also be set in an interval of 15 minutes.
Example (following your example):
0/50 - 6/100 - 6,25/100 - 19/100 - 24/50

The 2 points at approx. 19 o’clock are not necessary. One point should be enough.

I query every 15 minutes

If I understand correctly, that should not matter, from everything I read, time based should be 24 (hours). And then the query will start when ever you need it, which is the whole intention of the Splines app anyway. I do use the timebased query card. The 24 value is only to show the number of hours, it could also be set to 1440 and using the time based query, it should move one X value every minute. So it will be a question of preference, and knowing the if you want to set a value at 13:15 it would translate to 13.25 in a X=24 Spline.

I think you are right, when looking at the Spline I had figured that out as will already. But was to lazy to really care. :wink:

Yes, that is correct, this is also what I assume.

Probably yes.

This is the shortest query interval you can get with a time-based flow (query every minute). But you have to distinguish between the self-defined query interval (every x minutes) and the calculation of the splines in the background.

Back to the query intervall and how to prevent values above 1.
How should I explain it understandably?
The problem is that the values are interpolated between 2 points (X/Y value). This is the reason why you get values greater than 1 (see Robert’s curve).
If you set additional X/Y points in the upper part of the curve at the interval of the query, then it doesn’t matter if the interpolated curve goes beyond 1.
I have tried to show this in the graphic. To make it easier to see I used a query interval of 2 hours. I hope this is understandable.

Note: Everything I have written here is based on assumptions. Therefore it would be helpful if @MadMonkey could make clear statements.

I’ll provide an update that allows you to define this behaviour:)

1 Like

The query completed trigger contains a tag with the result of the calcualtion. You should be able to use that in the dim card

Thx, I’ll consider this!

1 Like

Yes this is indeed an issue that will be fixed with the next release:)

2 Likes

@MadMonkey
Philippe, I have installed test version 1.2.0 and can confirm that both the max value is respected and the number of digits set to 0 is working. I have not tested if respecting the low value is fixed.

2 Likes

The calculation still seems to be incorrect. Or the flows are incorrect.

At about 14:40 the calculated value is 1 (see screenshot of the variable “SplineOGF_Dimm”). According to the curve, however, the value should be about 0.94.

The UI is interpolated and has some tension that might not make it absolutely even. Just add another node if you really need exactly this value there

Okay no problem.
Just to be sure, the calculated Y value won’t be greater than 1?

Installed Splines today as I hope to use it to vary Philips Hue bulb dim level and hue over a period of time. If I add a node is there a way to control where the node gets added? I ask because I decided to add one mid spline and it always goes where I don’t want and requires me to edit all the nodes.
Another problem is that after a spline created and saved it cannot be found in the Query spline card.

@MadMonkey You have made a nice splines app. In some cases it is maybe an overkill. Is it an idea to add the option to use linear splines instead of cubic splines for (selected) line segments?

Hi @Philip_Montgomery
I can not figure out what you try to ask here.

You can totally control your Hue bulb.
These are the steps to take.
Create a spline that has X = 0 - 24 (24 hours), and Y = 0 - 1 (0 to 100%). With the Hue values you want to have throughout the day.

Then create a flow takes the query value at some period of interval (I use 15 minutes, but could be anything, timewise).
Then create another flow, that starts from the splines query completed, then logic set #value to Spline Calculation Result.

Now you can use this logic value in any flow where you need it.

So basically you tell Homey in 1 flow to query the spline to calculate the value at that moment. And the second flow tells Homey that it should write the value into a logic when it has calculated a value.

See above, if you start the second flow with Splines Query Completed xxxx the Then will contain the Spline Calculation Result.

These two very simple flows calculate the Temperature for my Hue GU10 spot:
Flow 1, take Spline Calculation every 15 minutes:

Flow 2, when Calculation is finished, write the value to a logic, and write the value to Simple Log:

@DirkG
From my tests with 1.2.0 it never went over the Max set value again.

1 Like

If I add a node to an existing spline it is added in the middle

Regarding flow 1, The then card, Query a spline (time based) , tapping “select an item” brings up a grey screen with “no results” in the middle. I created the spline a couple hours ago. What am I wrong?
Really like the idea of having Hue dim and other variables change over time

Yes if the max is set to 1 it never would go over that value

1 Like

A new node always get’s added in the middle

1 Like

Currently this is not possible, maybe I can add this in the future but it will be quiet a lot of work