I've been using Domoticz for the past ... 13 years at least now.
My setup is somehow specific because I've been using numerous MySensors devices.
One of these devices is sending the actual usage of wooden pellet for my Mom's stove.
It is base on the V_VOLUME device for the MySensors family that is relying on .. RFXMeter devices on demotics.
I've been using 2025.1 (build 16598) for a while now because it took me some time to upgrade to Trixie on my Raspberry PI.
Once I've done the migration (to the lastest beta version), my famous V_VOLUME device had been having some trouble.
The updating value was: 3439258 but after a couple of minutes, Domoticz gave me a strange error:
Code: Select all
Error: GetJSonDevices: exception occurred: 'stoll' (3048/Conso Pellet Moteur)
Which is basically: 2^64-855709184 ... and -855709184 is the int32 version of 3439258112 (the transformed float version of 3439258*1000.0f).
So, in a nuttshell, it comes from a bady typed conversion.
I've created a small fix on my setup. To do so, I've change the
Code: Select all
decode-RFXMeterCode: Select all
mainworker.cppI've replaced this line:
Code: Select all
unsigned long counter = (pResponse->RFXMETER.count1 << 24) + (pResponse->RFXMETER.count2 << 16) + (pResponse->RFXMETER.count3 << 8) + pResponse->RFXMETER.count4;
Code: Select all
uint32_t counter = (static_cast<uint32_t>(pResponse->RFXMETER.count1) << 24) + (static_cast<uint32_t>(pResponse->RFXMETER.count2) << 16) + (static_cast<uint32_t>(pResponse->RFXMETER.count3) << 8) + static_cast<uint32_t>(pResponse->RFXMETER.count4);I've looked back to the history of code and I really don't understand what could have changed. May be it's a matter of compilation on my raspberry pi ... any hint ?
Regards,
Qq.