Python to Node Red

Does the flow you posted actually work? It doesn't suffer from the context problem I warned about, but it shouldn't work at all, as you are not writing the running total back to context.

The code I posted was missing the context. It was a quick write to post something as I had deleted the original. The code I am running does include it. I have also moved the second write node into the main flow.

Are you doing the get, update, and set all in one function? You should do that.

Yes. I originally had a button and separate function to node to use when I refill the tank. I now have 2 buttons to input into the the main function which subtracts 1 for flow out or adds 10 to fill the tank in increments. For fine adjustments the other button subtracts 1. This allows me to partially fill the tank. All set & get are now in one node.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.