Utility - Incorrect values ...

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!
Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
Post Reply
D3ni3d
Posts: 1
Joined: Thursday 13 September 2018 20:48
Target OS: Raspberry Pi
Domoticz version:
Contact:

Utility - Incorrect values ...

Post by D3ni3d » Thursday 13 September 2018 21:19

Hi from France !

I need some help about strange values in the Utilty panel ...
First off all, here are my settings :
Version: 4.9700
Platform: PI 3 (up to date)

Description:
In fact, this is not only one problem, but two (maybe with the same origin ...)
  • The first is the value, probably incoming from the space, I've got when I want to reset my user variable in Domoticz :
    a.jpg
    a.jpg (39.31 KiB) Viewed 125 times
    As you can see, the value is 18446744073709552000 ...

    The code I use is here (sorry for french !):

    Code: Select all

    -- Ce script permet de remonter la durée de fonctionnement de la pompe dans un capteur virtuel de type "Counter Incremental"
    
     --------------------------------
     ------ Variables à éditer ------
     --------------------------------
     local switch = 'Pompe piscine'     -- Nom de l'interrupteur virtuel dans Domoticz
     local counter = 33                 -- Numéro idx du Counter Incremental dans Domoticz
     local current_date = (os.date("%d/%m/%Y"))      -- Date courante
     local current_heure = (os.date("%X"))         -- Heure courante
     --------------------------------
     -- Fin des variables à éditer --
     --------------------------------
    
    
     -------------------
     -- Fonction time --
     -------------------
     time = os.date("*t")
     local day = os.date("%A")
    
    commandArray = {}
    
    -----------------------------------------------------------------------------------------------------
    --------------------Calcul du temps de fonctionnement de la pompe------------------------------------
    -----------------------------------------------------------------------------------------------------
    
       -- Si pompe ON incrémentation de la variable Domoticz "Total_Compteur_Pompe" --
       if (otherdevices[switch]=='On') then
          if (day ~=  uservariables["Today"]) then
             commandArray['Variable:Total_Compteur_Pompe']= tostring(0)
             commandArray[7]={['Variable:Today']= tostring(day)}
          else
             commandArray['Variable:Total_Compteur_Pompe']= tostring(uservariables["Total_Compteur_Pompe"] +1)
          end
       end
    
       -- Envoi de la varaible valeur Total_Compteur_Pompe dans le Custom Counter Valeur_Compteur --
       Valeur_Compteur = tostring(uservariables["Total_Compteur_Pompe"])
     
       -- Envoi de la valeur dans le compteur "counter" --
       commandArray['UpdateDevice'] = counter .. '|0|' .. tostring(Valeur_Compteur)
    
       -- Envoi des informations dans le LOG si pompe ON --
       if (otherdevices[switch]=='On') then
          print("Cumul du temps de fonctionnement de la pompe  "..Valeur_Compteur.." Minutes".."  //  "..math.floor((Valeur_Compteur/60)).. " Heures")
       end
    return commandArray
    
  • The "Last Week" values are null ...
    As you can see I the picture abive, the "Last Week" are all = 0 ... While the "Last month" values looks to be correct ...
What's wrong ???
Can some one help me to resolve thoses matters ? I've seen similar problems on differents forums, but it was with previous versions of Dz ...

Many, many thanks in advance !!!!

zicht
Posts: 219
Joined: Sunday 11 May 2014 11:09
Target OS: Windows
Domoticz version: 3.8xxx
Location: NL
Contact:

Re: Utility - Incorrect values ...

Post by zicht » Friday 14 September 2018 21:18

I have no clue at all just trying to think out loud :

could it be that you have to set 2 values, one for the current moment and one for the day cummulative ?
This is how it works on a rain sensor.

commandArray['UpdateDevice']='1756|0|'..valuenow..';'..valuedaytotal
Rpi & Win x64. Using : cam's,Nest,RFXCom,Kaku,LaCrosse,RFY,IsAlive,Dummy,Wether Underground, standard Lua, Curl on windows,Domoticz Android App & Tasker,

"The only source of knowledge is experience (A.Einstein)"

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests