Calculating Energy Costs - mathjs with variables


I am trying to calculate the costs for one time washing with my washing machine.
I have no problem to detect start and and, the flows are available.
Für the start, I can set a logic or better logic numerical variable with the meter reading.
However for both, logic and better logic, I don’t succeed defining the calculation. I don’t see, how to calculate with a variable. They don’t show up at the tags, also $variable$ and the like does not work.
I have searched the forum - found nothing.
Also, how do I use the result in a text message to push or simple log? I only see Boolean variables to chose from?
Nay help would be appreciated!
(Please not only screenshots, which don’t show me how to get this!)
Regards, Tomte

You did non find this?

Hello Jan,

Thank you for your reply. Yes, I did read this posting. I generated the variables on my mobile phone, while programming on my PC. The variables did not appear as tags, which was very confusing to me. Now, today, they show up! This means, there is a significant time lag between generation of the variables, ab update of the tag list?!?
Let’s see how far I get now!
Thanks again, Metatron

Someone made some really nice posts about this .

It’s more then that!


thank you, I found this before and followed this. It is working fine.
Then I wanted to extend it with cost calculation and encounterd the problem described above.


So reading this post only gives u boolean variables?
And sending a txt message with a Better Logic variable don’t work for u?
One of the lines is: “Make an extra variable and make it a number variable. In my case i called it “KwHtarief”.”
Where do u see boolean variables?


thanks again for your reply. So far, I had only managed the notification for the end of the washing machine. After that, I stopped for a couple of days. So, I only had some boolean variables to some day. Then I started to do the cost calculation thing one evening. So these variables were new and did not show up as tags. I was very confused. But all there was, there was a significant time lag, between the definition of the variables, and the appearance as tags. The next day, all variables showed up. This is/was true for both, logic and better logic, but I don’t know why.
Now, being aware of this, I will be careful and patient.
All fine, thanks!
Regards, Metatron

Probably you have to refresh pages to see the new variables, normally there is no delay.