dzvents: Gas meter - deviation between 'counter' and 'gasUpdate'
Posted: Wednesday 01 November 2017 21:37
Status:
The (virtual) gasmeter displays the value of 28.482 in the Utility tab. This is also the value that is visible in the 'devices' page.
When I run a dzvents script and print the gasmeter.counter value, it also outputs 28.482
However, when I run the command gasmeter.updateGas(gasmeter.counter + 1) to simulate gas usage of 1dm3, the whole meter is gone haywire, displaying the impossible high value. I was able to delete the record with sqlbrowser via this topic. Only then I realized that the updateGas command requires the 'raw' value in dm3, meaning that I had to change the command to gasmeter.update(gasmeter.counter * 1000 + 1) to reach an appropriate value of 28.483
So, please either update the wiki page, explaining that the .counter displays in m3 and the .updateGas in dm3, or change dzvents to make .counter and .updateGas the same units (in that case, please inform upfront, so I can remove the factor 1000 from my script
)
The (virtual) gasmeter displays the value of 28.482 in the Utility tab. This is also the value that is visible in the 'devices' page.
When I run a dzvents script and print the gasmeter.counter value, it also outputs 28.482
However, when I run the command gasmeter.updateGas(gasmeter.counter + 1) to simulate gas usage of 1dm3, the whole meter is gone haywire, displaying the impossible high value. I was able to delete the record with sqlbrowser via this topic. Only then I realized that the updateGas command requires the 'raw' value in dm3, meaning that I had to change the command to gasmeter.update(gasmeter.counter * 1000 + 1) to reach an appropriate value of 28.483
So, please either update the wiki page, explaining that the .counter displays in m3 and the .updateGas in dm3, or change dzvents to make .counter and .updateGas the same units (in that case, please inform upfront, so I can remove the factor 1000 from my script