Page 3 of 3

Re: Question about notifications in dzVents

Posted: Thursday 05 January 2023 20:32
by waltervl
Those costs are only calculated when requested by the web user interface Log and reports and not stored in Domoticz.

Re: Question about notifications in dzVents

Posted: Friday 06 January 2023 2:04
by HvdW
Xavier82 wrote: Thursday 05 January 2023 16:04 My gas consumption is automatically updated every minute. I use a P1 cable which is connected to our Smart Energy meter (incl. gas) and directly to my Rpi.
The gas consumption is frighteningly accurate on day and montly level to what Essent counts and charges me.
Still wondering.
In my Domoticz gas from P1 is read every minute or so.
Electricity updates about once a minute.
In the same readings gas is measured as well.
Difference is that the tile in Domoticz updates about once an hour.

Or is it different in your setup.

Re: Question about notifications in dzVents

Posted: Friday 06 January 2023 8:58
by Xavier82
HvdW wrote: Friday 06 January 2023 2:04
Xavier82 wrote: Thursday 05 January 2023 16:04 My gas consumption is automatically updated every minute. I use a P1 cable which is connected to our Smart Energy meter (incl. gas) and directly to my Rpi.
The gas consumption is frighteningly accurate on day and montly level to what Essent counts and charges me.
Still wondering.
In my Domoticz gas from P1 is read every minute or so.
Electricity updates about once a minute.
In the same readings gas is measured as well.
Difference is that the tile in Domoticz updates about once an hour.

Or is it different in your setup.
Thats strange about your update time, I don't have any specific timer or something to update the switches, the switches are just updated, the same for temperature, weather and Utiliy devices by the way.

Re: Question about notifications in dzVents

Posted: Friday 06 January 2023 11:38
by waltervl
Today/this week (=ShortLog) Gas devices in Domoticz are always logged as bar graphs per hour. No option to change that (yet).

Re: Question about notifications in dzVents

Posted: Friday 06 January 2023 12:54
by HvdW
Next question.
Data being pushed by Google Cloud Messaging are displayed on one line, despite the '\n' found in @Xavier82 script.
Any idea how to force a new line?

Re: Question about notifications in dzVents

Posted: Saturday 14 January 2023 15:23
by HvdW
Thanks @Xavier82 for your contribution.
I implemented it.
Last part of the code I'm using:

Code: Select all

--Verzend informatie. Dit is 1 bericht, met alle informatie. regels uit -- ervoor anders ze ervoor weg halen om te krijgen
local subject = 'Mijn Energie overzicht : '
local message = 'Mijn Energie Overzicht : ' .. os.date("%d-%m-%Y")..'\n' ..
         --'--------------P1 Elektriciteitmeter-----------' .. '\n' .. 
        'Stroomkosten Totaal : € ' .. tonumber(dz.utils.round( (kwhPrijs * vandaagKwh) + kwhPrijsVast,2)).. '\n' ..
        'Stroomkosten Hoog : € ' .. tonumber(dz.utils.round( (kwhPrijs * vandaagKwhvh) ,2)).. '\n' .. 
        'Stroomkosten Laag : € ' .. tonumber(dz.utils.round( (kwhPrijs * vandaagKwhvl) ,2)).. '\n' .. 
        'Teruglevering Hoog : € ' .. tonumber(dz.utils.round( (kwhPrijs * vandaagKwhth) ,2)).. '\n' .. 
        'Teruglevering Laag : € ' .. tonumber(dz.utils.round( (kwhPrijs * vandaagKwhtl) ,2)).. '\n' .. 
        'Verbruik Hoog       : ' ..vandaagKwhvh.. ' kWh'.. '\n' ..
        'Verbruik Laag       : ' ..vandaagKwhvl.. ' kWh'.. '\n' ..
        'Teruglevering Hoog : ' ..vandaagKwhth.. ' kWh' .. '\n' ..
        'Teruglevering Laag : ' ..vandaagKwhtl.. ' kWh' .. '\n' ..
        'Totaal Verbruik Elektra vandaag : ' ..vandaagKwh.. ' kWh'.. '\n' .. 
		 --'--------------P1 Gasmeter---------------------' .. '\n' .. 
        'Gaskosten vandaag M3              : € ' .. tonumber(dz.utils.round( (gasM3Prijs * vandaagM3Gas) + gasM3PrijsVast,2))..'\n' ..
 		'Totaal Verbruik Gas vandaag     : ' ..vandaagM3Gas.. ' M3'.. '\n' .. 
--           '--------------Watermeter----------------------' .. '\n' ..
--           'Water : € ' .. tonumber(dz.utils.round( (waterM3Prijs * vandaagM3Water)/1000 + waterM3PrijsVast,2))..'\n' ..
--      	   'Totaal Verbruik Water vandaag   : ' ..vandaagM3Water.. ' M3'.. '\n' .. 
         --'--------------Zonnepanelen--------------------' .. '\n' .. 
          --'Totaal Opbrengst Zonnepanelen :  ' ..vandaagKwhzon.. ' kWh'.. '\n' ..
          --'Zonopbrengst Totaal € ' .. tonumber(dz.utils.round( (kwhPrijs * vandaagKwhzon) + kwhPrijsVast,2))..'\n' ..
          '-------------- Einde Dag Overzicht -------------'

 
-- Notificatie voor verschillende aanbieders
            dz.notify(subject, message, dz.PRIORITY_NORMAL)
When I do not add 'subject' to the message everything shows bold, plus the first lines are nicely one string one line.
After 5 lines things get mixed up.
What's happening here and how can I influence it.

I'm using Google Cloud messaging
Screenshot_20230114-152200.png
Screenshot_20230114-152200.png (268.25 KiB) Viewed 260 times
This is the popup that shows on my phone.
Screenshot_20230114-151835.png
Screenshot_20230114-151835.png (386.25 KiB) Viewed 260 times
This is the message as shown in the Domoticz app.
(differences explained above)

My question is on how to influence /n behaviour.
Why does it change after five lines in the bold text and why does it behave like it does when I add the subject to the push message.