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.
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.
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.
@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.
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.
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?
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:
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