Totally new to this with little programming but want to try to use this node to control a terrarium. Found several threads that say this node can be programmed via the dashboard but I am unable to find the right wording. I have found several examples of how to program it but none show how to do it via code. The closest I have gotten is
}
but the node throws an error that says invalid character at json 5. If I look at the output it differs from the examples in that the input to the node is a string from my code and looks like it must be numeric from the examples I've found. I've tried multiple variations of the code but this one seems to be the closest but still doesn't work. Any help in pointing me to the right direction would be appreciated.
thanks
If that doesn't work feed it into a debug node and show us what you see.
Notice that the node says it needs at least two points and specifies what the first and last should be.
Well, I did blow right over the grave ticks versus back ticks versus single or double quotes, I did change it to the grave tick but no change in the code.
They need to be backticks. Copy/paste from my post or the link if you can't find the right key. On a UK keyboard it is on top left key but it varies with keyboard.
As I suggested earlier, feed the output of the function node into a debug node and see what it is generating. Always the first thing to do when something doesn't like some data is to look at the data.
[Edit] You have the ticks the wrong side of the :
With computers the details are important.
Oh, it seems you can't use template strings when setting up property names, I wonder why. Actually I am struggling to work out how exactly to code it.....
Edit, sorry haven't got time to look further at the moment, perhaps someone else will jump in.
WOW! I have absolutely no idea what your code does, it will take some long study to figure it out, but the output into the debug node looks great. I will need to do some testing to see if it's totally fixed but so far it works. Thanks for your obvious effort to help.
again, thanks
I spent a lot of time looking at that example but it doesn't show how to set the time and temp via a variable. In looking through the forum someone used the term wife factor. I needed the wife to be able to set the time and temp and she definitely isn't going to open up the editor to set the program so I needed to be able to do it via a dashboard. I think most of my code was working except I couldn't get the thermostat node programmed via a variable input. If I could find the author of the node I would ask him to put in an example of using variables to set the program. Colin apparently spent a lot of time and went to a huge amount of trouble to figure it out and I'd like to see his efforts preserved for the next person who wants to do what I did.