Turn on light for 12 hours from node red and blynk

Hey everyone!
I want to turn on light for exact 12 hours input from blynk button.
and after that it will turn off the light for 12 hours
again cycle repeated unless the blynk button does not goes off.

here it my flow I got problem in invert node as it accept the “0” from the inject node but not accept from the write node
if it accept from the write node then it will solve my problem.

because when the input (‘1’) given from blynk node the change node will change it to 0 and it goes to input of invert this will change it to 1 and output on parallel it will run the timer for 12 hours because some input came(‘0’)

so the cycle continue but invert node is not accepting the input from blynk node.
how can i solve this with different logic?


from blynk 1 and from inject 0

I got this values as a string but when i connect the inject into invert its work, not the blynk write.

As you’ve discovered, the data that comes from the Blynk nodes is a string.
You could either work with strings throughout the whole flow, or convert the strings into numbers (integers in this case).

You can use the Change node for this, and get the change node to do the inversion too if you wish, like this:

Take care to choose the correct variable type from the drop-down.


I did that way but not getting the output from the invert node
I changed it to true/false , 0/1 , but not turning the output on
but after installing the boolean logic ultimate i solve the problem.
which is working
thanks @PeteKnight for replying.