Get min/max readings for sensors for 24hrs  [Solved]

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
kevster
Posts: 26
Joined: Tuesday 06 December 2016 23:14
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: UK
Contact:

Get min/max readings for sensors for 24hrs

Post by kevster »

Still new to dzvents but i'm trying to write an event that sends out statisics for the last 24 hours. So i'd like to read a temp sensors min/max values for ~24hrs. Heres a snip....

Code: Select all

 data = { temperatures = { history = true }}, 

   execute = function( dz )

        -- functions
        local function round(num, numDecimalPlaces)
            local mult = 10^(numDecimalPlaces or 0)
            return math.floor(num * mult + 0.5) / mult
        end
        -- Temperatures
        local outdoor_sensor = dz.devices('Temp - Barn')

    -- ----------------------------------------------------------------------------------------------

        dz.data.temperatures.add(outdoor_sensor.temperature)
        -- maximum value in 24 hours:
        local max = round(dz.data.temperatures.maxSince('24:00:00'),2)
        -- minimum value in 24 hours:
        local min = round(dz.data.temperatures.minSince('24:00:00'),2)
        
The values dont seem to come out correctly so kind of think I am not pulling these correctly ?

Thanks
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Get min/max readings for sensors for 24hrs

Post by waaren »

kevster wrote: Sunday 28 June 2020 9:02 Still new to dzvents but i'm trying to write an event that sends out statisics for the last 24 hours. So i'd like to read a temp sensors min/max values for ~24hrs.

The values dont seem to come out correctly so kind of think I am not pulling these correctly ?
Better to post the complete script to make it easier to spot potential issues...


A working script

Code: Select all

 return
 {
    on =
    {
        devices =
        {
            'temp Trigger',
        },
    },

    logging =
    {
        level = domoticz.LOG_DEBUG,
    },

     data =
     {
        temperatures =
        {
             history = true,
             maxHours = 36,
        },
    },

   execute = function( dz )

        local outdoor_sensor = dz.devices('Temp - Barn')

        dz.data.temperatures.add(dz.utils.round(outdoor_sensor.temperature,2))
        -- maximum value in 24 hours:
        local max = dz.data.temperatures.maxSince('24:00:00')
        -- minimum value in 24 hours:
        local min = dz.data.temperatures.minSince('24:00:00')
        dz.log(' min = ' .. min .. ', max = ' .. max,dz.LOG_DEBUG)
    end
}
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
kevster
Posts: 26
Joined: Tuesday 06 December 2016 23:14
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: UK
Contact:

Re: Get min/max readings for sensors for 24hrs

Post by kevster »

Thanks for the reply. I have exported my script in full below.

Code: Select all

return 
{
 on = { timer = { 'at 23:59' }},
 
 data = { temperatures = { history = true ,  maxHours = 36 }}, 

   execute = function( dz )

        -- functions
        local function round(num, numDecimalPlaces)
            local mult = 10^(numDecimalPlaces or 0)
            return math.floor(num * mult + 0.5) / mult
        end
        
        -- To
        local addressee = '[email protected]'
        
        -- Message Body
        local subject = "House Report"
        local message = "Here is todays statistics \\n \\n"

        -- Level Sensors
        local oil_tank = dz.devices('Oil-Percentage')
        local garage_water_tank = dz.devices('WaterButt-Garage-Percentage')
        local polytunnel_water_tank = dz.devices('WaterButt-Polytunnel-Percentage')
        -- oil_tank.dump()

        -- Weather
        local rain_sensor = dz.devices('Rain')
        
        -- Temperatures
        local outdoor_sensor = dz.devices('Temp - Garage')

    -- ----------------------------------------------------------------------------------------------

        dz.data.temperatures.add(outdoor_sensor.temperature)
        -- maximum value in 24 hours:
        local max = round(dz.data.temperatures.maxSince('23:00:00'),2)
        -- minimum value in 24 hours:
        local min = round(dz.data.temperatures.minSince('23:00:00'),2)


        -- Weather
        
            -- Outdoor
            message = message .. 'Outdoor Temp:  Max:  ' .. max .. ' Min:  ' .. min .. ' \\n'
        
        
            -- Rain
            if rain_sensor.rain > 0 then
                message = message .. 'Rain:  ' .. round(rain_sensor.rain, 2) .. ' mm of rain \\n'
            end
        
        -- Tanks
            message = message .. ' \\n'
            -- Oil
            message = message .. 'Oil Tank:  ' .. oil_tank.state .. ' % \\n'
            -- Garage Water
            message = message .. 'Garage Water Tank:  ' .. garage_water_tank.state .. ' % \\n'
            -- polytunnel_water_tank
            message = message .. 'PolyTunnel Water Tank:  ' .. polytunnel_water_tank.state .. ' % \\n'
        
        -- Send the email
        dz.email(subject, message, addressee)
        
    end
}
Can I ask a few questions.

1) In yours what does this do ? As I cant see how to insert it

Code: Select all

    {
        devices =
        {
            'temp Trigger',
        },
    },
2) Why does this get set to 36 hours ?

Code: Select all

        temperatures =
        {
             history = true,
             maxHours = 36,
        },
kevster
Posts: 26
Joined: Tuesday 06 December 2016 23:14
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: UK
Contact:

Re: Get min/max readings for sensors for 24hrs

Post by kevster »

The reason I ask is I added the maxHours part, but the min/max in the report are not correct still.

Code: Select all

Outdoor Temp: Max: 14.1 Min: 12.2
And yet todays values look like:

Code: Select all

"2020-06-28 00:00:00",79,12.2
"2020-06-28 00:05:00",79,12
"2020-06-28 00:10:00",79,12.1
"2020-06-28 00:15:00",79,12.1
"2020-06-28 00:20:00",79,12.1
"2020-06-28 00:25:00",79,12
"2020-06-28 00:30:00",79,11.8
"2020-06-28 00:35:00",79,11.8
"2020-06-28 00:40:00",80,11.7
"2020-06-28 00:45:00",80,11.7
"2020-06-28 00:50:00",80,11.7
"2020-06-28 00:55:00",81,11.7
"2020-06-28 01:00:00",81,11.7
"2020-06-28 01:05:00",81,11.7
"2020-06-28 01:10:00",82,11.7
"2020-06-28 01:15:00",82,11.7
"2020-06-28 01:20:00",82,11.7
"2020-06-28 01:25:00",82,11.7
"2020-06-28 01:30:00",82,11.7
"2020-06-28 01:35:00",82,11.8
"2020-06-28 01:40:00",82,11.8
"2020-06-28 01:45:00",83,11.8
"2020-06-28 01:50:00",83,11.8
"2020-06-28 01:55:00",83,11.8
"2020-06-28 02:00:00",83,11.9
"2020-06-28 02:05:00",83,12
"2020-06-28 02:10:00",83,11.9
"2020-06-28 02:15:00",83,12
"2020-06-28 02:20:00",83,12
"2020-06-28 02:25:00",83,11.9
"2020-06-28 02:30:00",83,11.9
"2020-06-28 02:35:00",83,11.9
"2020-06-28 02:40:00",83,11.9
"2020-06-28 02:45:00",83,11.9
"2020-06-28 02:50:00",83,11.9
"2020-06-28 02:55:00",83,11.9
"2020-06-28 03:00:00",83,11.9
"2020-06-28 03:05:00",83,11.9
"2020-06-28 03:10:00",83,12
"2020-06-28 03:15:00",83,11.9
"2020-06-28 03:20:00",83,11.8
"2020-06-28 03:25:00",83,11.7
"2020-06-28 03:30:00",83,11.6
"2020-06-28 03:35:00",83,11.6
"2020-06-28 03:40:00",83,11.5
"2020-06-28 03:45:00",83,11.5
"2020-06-28 03:50:00",83,11.5
"2020-06-28 03:55:00",83,11.4
"2020-06-28 04:00:00",83,11.3
"2020-06-28 04:05:00",83,11.3
"2020-06-28 04:10:00",83,11.3
"2020-06-28 04:15:00",83,11.1
"2020-06-28 04:20:00",83,11.1
"2020-06-28 04:25:00",83,11.1
"2020-06-28 04:30:00",83,11.2
"2020-06-28 04:35:00",83,11.2
"2020-06-28 04:40:00",83,11.1
"2020-06-28 04:45:00",83,11
"2020-06-28 04:50:00",83,11
"2020-06-28 04:55:00",83,11
"2020-06-28 05:00:00",84,10.9
"2020-06-28 05:05:00",84,10.9
"2020-06-28 05:10:00",84,10.8
"2020-06-28 05:15:00",83,11
"2020-06-28 05:20:00",83,11
"2020-06-28 05:25:00",83,11.1
"2020-06-28 05:30:00",83,11.1
"2020-06-28 05:35:00",83,11
"2020-06-28 05:40:00",84,11.1
"2020-06-28 05:45:00",84,11.1
"2020-06-28 05:50:00",84,11
"2020-06-28 05:55:00",84,11
"2020-06-28 06:00:00",84,11
"2020-06-28 06:05:00",84,11.1
"2020-06-28 06:10:00",84,11.3
"2020-06-28 06:15:00",85,11.4
"2020-06-28 06:20:00",85,11.5
"2020-06-28 06:25:00",85,11.7
"2020-06-28 06:30:00",85,11.8
"2020-06-28 06:35:00",85,12.1
"2020-06-28 06:40:00",84,12.1
"2020-06-28 06:45:00",84,12.1
"2020-06-28 06:50:00",84,12.4
"2020-06-28 06:55:00",84,13
"2020-06-28 07:00:00",84,13.2
"2020-06-28 07:05:00",84,13.2
"2020-06-28 07:10:00",83,13.8
"2020-06-28 07:15:00",83,13.8
"2020-06-28 07:20:00",82,13.7
"2020-06-28 07:25:00",82,13.7
"2020-06-28 07:30:00",80,14.2
"2020-06-28 07:35:00",80,14.4
"2020-06-28 07:40:00",80,14.4
"2020-06-28 07:45:00",80,14.4
"2020-06-28 07:50:00",78,14.5
"2020-06-28 07:55:00",78,14.5
"2020-06-28 08:00:00",78,14.4
"2020-06-28 08:05:00",78,14.4
"2020-06-28 08:10:00",78,15.4
"2020-06-28 08:15:00",78,15.4
"2020-06-28 08:20:00",76,16
"2020-06-28 08:25:00",76,16.5
"2020-06-28 08:30:00",76,16.5
"2020-06-28 08:35:00",76,16.5
"2020-06-28 08:40:00",76,16.5
"2020-06-28 08:45:00",76,16.5
"2020-06-28 08:50:00",69,16.8
"2020-06-28 08:55:00",70,16.9
"2020-06-28 09:00:00",70,16.9
"2020-06-28 09:05:00",68,17.8
"2020-06-28 09:10:00",67,18
"2020-06-28 09:15:00",67,18
"2020-06-28 09:20:00",67,18
"2020-06-28 09:25:00",67,18
"2020-06-28 09:30:00",66,18.9
"2020-06-28 09:35:00",64,18.9
"2020-06-28 09:40:00",63,19.3
"2020-06-28 09:45:00",63,19.3
"2020-06-28 09:50:00",62,19.2
"2020-06-28 09:55:00",62,19.2
"2020-06-28 10:00:00",62,19.2
"2020-06-28 10:05:00",62,19.2
"2020-06-28 10:10:00",62,19.2
"2020-06-28 10:15:00",62,19.2
"2020-06-28 10:20:00",63,18.9
"2020-06-28 10:25:00",63,18.9
"2020-06-28 10:30:00",63,18.9
"2020-06-28 10:35:00",64,18.1
"2020-06-28 10:40:00",64,18.1
"2020-06-28 10:45:00",63,18.1
"2020-06-28 10:50:00",63,18.1
"2020-06-28 10:55:00",62,17.8
"2020-06-28 11:00:00",62,17.8
"2020-06-28 11:05:00",62,18.5
"2020-06-28 11:10:00",61,19.3
"2020-06-28 11:15:00",61,19.3
"2020-06-28 11:20:00",60,19
"2020-06-28 11:25:00",60,19
"2020-06-28 11:30:00",60,19
"2020-06-28 11:35:00",60,19
"2020-06-28 11:40:00",60,19
"2020-06-28 11:45:00",60,19
"2020-06-28 11:50:00",60,19
"2020-06-28 11:55:00",60,19
"2020-06-28 12:00:00",60,19
"2020-06-28 12:05:00",60,19
"2020-06-28 12:10:00",60,19
"2020-06-28 12:15:00",59,19.1
"2020-06-28 12:20:00",59,19.1
"2020-06-28 12:25:00",60,18.1
"2020-06-28 12:30:00",60,18.1
"2020-06-28 12:35:00",60,18.1
"2020-06-28 12:40:00",65,18.7
"2020-06-28 12:45:00",64,18.7
"2020-06-28 12:50:00",64,18.7
"2020-06-28 12:55:00",64,18.7
"2020-06-28 13:00:00",64,18.7
"2020-06-28 13:05:00",61,18.9
"2020-06-28 13:10:00",61,18.9
"2020-06-28 13:15:00",61,18.9
"2020-06-28 13:20:00",61,18.9
"2020-06-28 13:25:00",61,18.9
"2020-06-28 13:30:00",63,18.3
"2020-06-28 13:35:00",63,18.3
"2020-06-28 13:40:00",63,18.3
"2020-06-28 13:45:00",63,18.3
"2020-06-28 13:50:00",63,18.3
"2020-06-28 13:55:00",63,18.3
"2020-06-28 14:00:00",63,18.3
"2020-06-28 14:05:00",63,18.3
"2020-06-28 14:10:00",59,19
"2020-06-28 14:15:00",57,19.2
"2020-06-28 14:20:00",57,19.2
"2020-06-28 14:25:00",57,19.2
"2020-06-28 14:30:00",57,19.2
"2020-06-28 14:35:00",57,19.2
"2020-06-28 14:40:00",59,19.4
"2020-06-28 14:45:00",59,19.4
"2020-06-28 14:50:00",59,19.4
"2020-06-28 14:55:00",59,19.4
"2020-06-28 15:00:00",59,19.4
"2020-06-28 15:05:00",58,18.1
"2020-06-28 15:10:00",58,18.1
"2020-06-28 15:15:00",58,18.1
"2020-06-28 15:20:00",58,18.1
"2020-06-28 15:25:00",64,17.4
"2020-06-28 15:30:00",63,17.4
"2020-06-28 15:35:00",62,17.2
"2020-06-28 15:40:00",62,17.6
"2020-06-28 15:45:00",62,17.6
"2020-06-28 15:50:00",62,17.6
"2020-06-28 15:55:00",62,17.6
"2020-06-28 16:00:00",62,17.6
"2020-06-28 16:05:00",62,17.6
"2020-06-28 16:10:00",59,17.4
"2020-06-28 16:15:00",60,17.5
"2020-06-28 16:20:00",60,17.5
"2020-06-28 16:25:00",60,18.3
"2020-06-28 16:30:00",59,17.9
"2020-06-28 16:35:00",59,17.9
"2020-06-28 16:40:00",58,17.3
"2020-06-28 16:45:00",58,17.3
"2020-06-28 16:50:00",58,17.3
"2020-06-28 16:55:00",60,16.9
"2020-06-28 17:00:00",60,16.7
"2020-06-28 17:05:00",61,16.2
"2020-06-28 17:10:00",61,16.2
"2020-06-28 17:15:00",61,16.2
"2020-06-28 17:20:00",61,16.7
"2020-06-28 17:25:00",60,16.9
"2020-06-28 17:30:00",60,16.9
"2020-06-28 17:35:00",60,16.9
"2020-06-28 17:40:00",60,16.9
"2020-06-28 17:45:00",60,16.9
"2020-06-28 17:50:00",60,16.9
"2020-06-28 17:55:00",62,16
"2020-06-28 18:00:00",62,16
"2020-06-28 18:05:00",62,16
"2020-06-28 18:10:00",61,16.1
"2020-06-28 18:15:00",62,16.1
"2020-06-28 18:20:00",62,16.1
"2020-06-28 18:25:00",62,16.1
"2020-06-28 18:30:00",62,16.1
"2020-06-28 18:35:00",66,15.3
"2020-06-28 18:40:00",66,15.3
"2020-06-28 18:45:00",68,14.9
"2020-06-28 18:50:00",69,14.7
"2020-06-28 18:55:00",69,14.8
"2020-06-28 19:00:00",69,14.5
"2020-06-28 19:05:00",69,14.5
"2020-06-28 19:10:00",69,14.5
"2020-06-28 19:15:00",68,14.2
"2020-06-28 19:20:00",68,14.2
"2020-06-28 19:25:00",68,14.1
"2020-06-28 19:30:00",69,14.1
"2020-06-28 19:35:00",69,14.1
"2020-06-28 19:40:00",69,14.1
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Get min/max readings for sensors for 24hrs

Post by waaren »

kevster wrote: Sunday 28 June 2020 20:39
1) In yours what does this do ? As I cant see how to insert it

Code: Select all

    {
        devices =  {         'temp Trigger',        },    },
Only for testing the script using a virtual switch as trigger
2) Why does this get set to 36 hours ?

Code: Select all

        temperatures =
        {
             history = true,
             maxHours = 36,
        },
Must be a bit over 24 hours to be able to get the min max or average since 24 hours. Could be 24 hours and 5 minutes or 25 hours. I choose 36 hours.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Get min/max readings for sensors for 24hrs

Post by waaren »

kevster wrote: Sunday 28 June 2020 20:43 The reason I ask is I added the maxHours part, but the min/max in the report are not correct still.
It will be correct once the script has been active for 24 hours. It has to build the 24 hours data first.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
kevster
Posts: 26
Joined: Tuesday 06 December 2016 23:14
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: UK
Contact:

Re: Get min/max readings for sensors for 24hrs

Post by kevster »

Ahh I see. So the script itself has to build the min/max values for each day. I kind of thought that would be data that Domo would store for each sensor, but I see.

Thanks for explaining and Ill test over the next few days.

I expect to send out a HTML report eventually but still learning dzVents !
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Get min/max readings for sensors for 24hrs

Post by waaren »

kevster wrote: Sunday 28 June 2020 22:04 I kind of thought that would be data that Domo would store for each sensor
Domoticz does that as well but the script to retrieve that and interpret that data would be a lot more complex.
It would have to collect that data with a call like
http://<domoticz ip:domoticz:port>/json.htm?type=graph&sensor=temp&idx=<ID>&range=day
This will return something like
Spoiler: show

Code: Select all

{
"result": [
{
"d": "2020-06-27 00:00",
"te": 19.7
},
{
"d": "2020-06-27 00:05",
"te": 19.9
},
{
"d": "2020-06-27 00:10",
"te": 19.9
},
{
"d": "2020-06-27 00:15",
"te": 19.9
},
{
"d": "2020-06-27 00:20",
"te": 19.9
},
{
"d": "2020-06-27 00:25",
"te": 19.9
},
{
"d": "2020-06-27 00:30",
"te": 19.9
},
{
"d": "2020-06-27 00:35",
"te": 19.8
},
{
"d": "2020-06-27 00:40",
"te": 19.8
},
{
"d": "2020-06-27 00:45",
"te": 19.9
},
{
"d": "2020-06-27 00:50",
"te": 19.9
},
{
"d": "2020-06-27 00:55",
"te": 20.2
},
{
"d": "2020-06-27 01:00",
"te": 20.2
},
{
"d": "2020-06-27 01:05",
"te": 20.1
},
{
"d": "2020-06-27 01:10",
"te": 20.1
},
{
"d": "2020-06-27 01:15",
"te": 20
},
{
"d": "2020-06-27 01:20",
"te": 20
},
{
"d": "2020-06-27 01:25",
"te": 19.9
},
{
"d": "2020-06-27 01:30",
"te": 19.9
},
{
"d": "2020-06-27 01:35",
"te": 20
},
{
"d": "2020-06-27 01:40",
"te": 20
},
{
"d": "2020-06-27 01:45",
"te": 20.1
},
{
"d": "2020-06-27 01:50",
"te": 20.1
},
{
"d": "2020-06-27 01:55",
"te": 20.1
},
{
"d": "2020-06-27 02:00",
"te": 20.1
},
{
"d": "2020-06-27 02:05",
"te": 20.1
},
{
"d": "2020-06-27 02:10",
"te": 20.1
},
{
"d": "2020-06-27 02:15",
"te": 20.1
},
{
"d": "2020-06-27 02:20",
"te": 20.1
},
{
"d": "2020-06-27 02:25",
"te": 19.5
},
{
"d": "2020-06-27 02:30",
"te": 19.5
},
{
"d": "2020-06-27 02:35",
"te": 19.6
},
{
"d": "2020-06-27 02:40",
"te": 19.6
},
{
"d": "2020-06-27 02:45",
"te": 19
},
{
"d": "2020-06-27 02:50",
"te": 19
},
{
"d": "2020-06-27 02:55",
"te": 18.8
},
{
"d": "2020-06-27 03:00",
"te": 18.8
},
{
"d": "2020-06-27 03:05",
"te": 19
},
{
"d": "2020-06-27 03:10",
"te": 19
},
{
"d": "2020-06-27 03:15",
"te": 19.1
},
{
"d": "2020-06-27 03:20",
"te": 19.1
},
{
"d": "2020-06-27 03:25",
"te": 18.5
},
{
"d": "2020-06-27 03:30",
"te": 18.5
},
{
"d": "2020-06-27 03:35",
"te": 18.3
},
{
"d": "2020-06-27 03:40",
"te": 18.3
},
{
"d": "2020-06-27 03:45",
"te": 18.6
},
{
"d": "2020-06-27 03:50",
"te": 18.6
},
{
"d": "2020-06-27 03:55",
"te": 19.2
},
{
"d": "2020-06-27 04:00",
"te": 19.2
},
{
"d": "2020-06-27 04:05",
"te": 19.7
},
{
"d": "2020-06-27 04:10",
"te": 19.7
},
{
"d": "2020-06-27 04:15",
"te": 19.8
},
{
"d": "2020-06-27 04:20",
"te": 19.8
},
{
"d": "2020-06-27 04:25",
"te": 19.1
},
{
"d": "2020-06-27 04:30",
"te": 19.1
},
{
"d": "2020-06-27 04:35",
"te": 19.3
},
{
"d": "2020-06-27 04:40",
"te": 19.3
},
{
"d": "2020-06-27 04:45",
"te": 19.5
},
{
"d": "2020-06-27 04:50",
"te": 19.5
},
{
"d": "2020-06-27 04:55",
"te": 19.1
},
{
"d": "2020-06-27 05:00",
"te": 19.1
},
{
"d": "2020-06-27 05:05",
"te": 18.9
},
{
"d": "2020-06-27 05:10",
"te": 18.9
},
{
"d": "2020-06-27 05:15",
"te": 18.8
},
{
"d": "2020-06-27 05:20",
"te": 18.8
},
{
"d": "2020-06-27 05:25",
"te": 18.6
},
{
"d": "2020-06-27 05:30",
"te": 18.6
},
{
"d": "2020-06-27 05:35",
"te": 18.5
},
{
"d": "2020-06-27 05:40",
"te": 18.5
},
{
"d": "2020-06-27 05:45",
"te": 18.4
},
{
"d": "2020-06-27 05:50",
"te": 18.4
},
{
"d": "2020-06-27 05:55",
"te": 18.3
},
{
"d": "2020-06-27 06:00",
"te": 18.3
},
{
"d": "2020-06-27 06:05",
"te": 18.4
},
{
"d": "2020-06-27 06:10",
"te": 18.4
},
{
"d": "2020-06-27 06:15",
"te": 18.5
},
{
"d": "2020-06-27 06:20",
"te": 18.5
},
{
"d": "2020-06-27 06:25",
"te": 18.9
},
{
"d": "2020-06-27 06:30",
"te": 18.9
},
{
"d": "2020-06-27 06:35",
"te": 19.3
},
{
"d": "2020-06-27 06:40",
"te": 19.3
},
{
"d": "2020-06-27 06:45",
"te": 19.5
},
{
"d": "2020-06-27 06:50",
"te": 19.5
},
{
"d": "2020-06-27 06:55",
"te": 19.7
},
{
"d": "2020-06-27 07:00",
"te": 19.7
},
{
"d": "2020-06-27 07:05",
"te": 19.7
},
{
"d": "2020-06-27 07:10",
"te": 19.7
},
{
"d": "2020-06-27 07:15",
"te": 19.6
},
{
"d": "2020-06-27 07:20",
"te": 19.6
},
{
"d": "2020-06-27 07:25",
"te": 19.6
},
{
"d": "2020-06-27 07:30",
"te": 19.6
},
{
"d": "2020-06-27 07:35",
"te": 19.6
},
{
"d": "2020-06-27 07:40",
"te": 19.6
},
{
"d": "2020-06-27 07:45",
"te": 19.5
},
{
"d": "2020-06-27 07:50",
"te": 19.5
},
{
"d": "2020-06-27 07:55",
"te": 19.5
},
{
"d": "2020-06-27 08:00",
"te": 19.5
},
{
"d": "2020-06-27 08:05",
"te": 19.4
},
{
"d": "2020-06-27 08:10",
"te": 19.4
},
{
"d": "2020-06-27 08:15",
"te": 19.4
},
{
"d": "2020-06-27 08:20",
"te": 19.4
},
{
"d": "2020-06-27 08:25",
"te": 19.3
},
{
"d": "2020-06-27 08:30",
"te": 19.3
},
{
"d": "2020-06-27 08:35",
"te": 19.4
},
{
"d": "2020-06-27 08:40",
"te": 19.4
},
{
"d": "2020-06-27 08:45",
"te": 19.3
},
{
"d": "2020-06-27 08:50",
"te": 19.3
},
{
"d": "2020-06-27 08:55",
"te": 19.9
},
{
"d": "2020-06-27 09:00",
"te": 19.9
},
{
"d": "2020-06-27 09:05",
"te": 20.4
},
{
"d": "2020-06-27 09:10",
"te": 20.4
},
{
"d": "2020-06-27 09:15",
"te": 20.1
},
{
"d": "2020-06-27 09:20",
"te": 20.1
},
{
"d": "2020-06-27 09:25",
"te": 20.3
},
{
"d": "2020-06-27 09:30",
"te": 20.3
},
{
"d": "2020-06-27 09:35",
"te": 20.9
},
{
"d": "2020-06-27 09:40",
"te": 20.9
},
{
"d": "2020-06-27 09:45",
"te": 20.7
},
{
"d": "2020-06-27 09:50",
"te": 20.7
},
{
"d": "2020-06-27 09:55",
"te": 21
},
{
"d": "2020-06-27 10:00",
"te": 21
},
{
"d": "2020-06-27 10:05",
"te": 20.8
},
{
"d": "2020-06-27 10:10",
"te": 20.8
},
{
"d": "2020-06-27 10:15",
"te": 21.3
},
{
"d": "2020-06-27 10:20",
"te": 21.3
},
{
"d": "2020-06-27 10:25",
"te": 20.7
},
{
"d": "2020-06-27 10:30",
"te": 20.7
},
{
"d": "2020-06-27 10:35",
"te": 21
},
{
"d": "2020-06-27 10:40",
"te": 21
},
{
"d": "2020-06-27 10:45",
"te": 21.3
},
{
"d": "2020-06-27 10:50",
"te": 21.3
},
{
"d": "2020-06-27 10:55",
"te": 21.8
},
{
"d": "2020-06-27 11:00",
"te": 21.8
},
{
"d": "2020-06-27 11:05",
"te": 21.7
},
{
"d": "2020-06-27 11:10",
"te": 21.7
},
{
"d": "2020-06-27 11:15",
"te": 21.9
},
{
"d": "2020-06-27 11:20",
"te": 21.9
},
{
"d": "2020-06-27 11:25",
"te": 21.9
},
{
"d": "2020-06-27 11:30",
"te": 21.9
},
{
"d": "2020-06-27 11:35",
"te": 21.9
},
{
"d": "2020-06-27 11:40",
"te": 21.9
},
{
"d": "2020-06-27 11:45",
"te": 21.8
},
{
"d": "2020-06-27 11:50",
"te": 21.8
},
{
"d": "2020-06-27 11:55",
"te": 23.5
},
{
"d": "2020-06-27 12:00",
"te": 23.5
},
{
"d": "2020-06-27 12:05",
"te": 23.8
},
{
"d": "2020-06-27 12:10",
"te": 23.8
},
{
"d": "2020-06-27 12:15",
"te": 24.9
},
{
"d": "2020-06-27 12:20",
"te": 24.9
},
{
"d": "2020-06-27 12:25",
"te": 25.2
},
{
"d": "2020-06-27 12:30",
"te": 25.2
},
{
"d": "2020-06-27 12:35",
"te": 24.6
},
{
"d": "2020-06-27 12:40",
"te": 24.6
},
{
"d": "2020-06-27 12:45",
"te": 25
},
{
"d": "2020-06-27 12:50",
"te": 25
},
{
"d": "2020-06-27 12:55",
"te": 24.6
},
{
"d": "2020-06-27 13:00",
"te": 24.6
},
{
"d": "2020-06-27 13:05",
"te": 24.5
},
{
"d": "2020-06-27 13:10",
"te": 24.5
},
{
"d": "2020-06-27 13:15",
"te": 21.8
},
{
"d": "2020-06-27 13:20",
"te": 21.8
},
{
"d": "2020-06-27 13:25",
"te": 21.8
},
{
"d": "2020-06-27 13:30",
"te": 21.8
},
{
"d": "2020-06-27 13:35",
"te": 21.8
},
{
"d": "2020-06-27 13:40",
"te": 21.8
},
{
"d": "2020-06-27 13:45",
"te": 23.5
},
{
"d": "2020-06-27 13:50",
"te": 23.5
},
{
"d": "2020-06-27 13:55",
"te": 24.3
},
{
"d": "2020-06-27 14:00",
"te": 24.3
},
{
"d": "2020-06-27 14:05",
"te": 24.2
},
{
"d": "2020-06-27 14:10",
"te": 24.2
},
{
"d": "2020-06-27 14:15",
"te": 21.7
},
{
"d": "2020-06-27 14:20",
"te": 21.7
},
{
"d": "2020-06-27 14:25",
"te": 20.7
},
{
"d": "2020-06-27 14:30",
"te": 20.7
},
{
"d": "2020-06-27 14:35",
"te": 20.7
},
{
"d": "2020-06-27 14:40",
"te": 20.7
},
{
"d": "2020-06-27 14:45",
"te": 20.9
},
{
"d": "2020-06-27 14:50",
"te": 20.9
},
{
"d": "2020-06-27 14:55",
"te": 20.6
},
{
"d": "2020-06-27 15:00",
"te": 20.6
},
{
"d": "2020-06-27 15:05",
"te": 20.7
},
{
"d": "2020-06-27 15:10",
"te": 20.7
},
{
"d": "2020-06-27 15:15",
"te": 20.7
},
{
"d": "2020-06-27 15:20",
"te": 20.7
},
{
"d": "2020-06-27 15:25",
"te": 21.3
},
{
"d": "2020-06-27 15:30",
"te": 21.3
},
{
"d": "2020-06-27 15:35",
"te": 21
},
{
"d": "2020-06-27 15:40",
"te": 21
},
{
"d": "2020-06-27 15:45",
"te": 20.6
},
{
"d": "2020-06-27 15:50",
"te": 20.6
},
{
"d": "2020-06-27 15:55",
"te": 19.3
},
{
"d": "2020-06-27 16:00",
"te": 19.3
},
{
"d": "2020-06-27 16:05",
"te": 19.3
},
{
"d": "2020-06-27 16:10",
"te": 19.3
},
{
"d": "2020-06-27 16:15",
"te": 19.7
},
{
"d": "2020-06-27 16:20",
"te": 19.7
},
{
"d": "2020-06-27 16:25",
"te": 20
},
{
"d": "2020-06-27 16:30",
"te": 20
},
{
"d": "2020-06-27 16:35",
"te": 19.9
},
{
"d": "2020-06-27 16:40",
"te": 19.9
},
{
"d": "2020-06-27 16:45",
"te": 19.9
},
{
"d": "2020-06-27 16:50",
"te": 19.9
},
{
"d": "2020-06-27 16:55",
"te": 19.9
},
{
"d": "2020-06-27 17:00",
"te": 19.9
},
{
"d": "2020-06-27 17:05",
"te": 19.9
},
{
"d": "2020-06-27 17:10",
"te": 20.9
},
{
"d": "2020-06-27 17:15",
"te": 20.9
},
{
"d": "2020-06-27 17:20",
"te": 20.7
},
{
"d": "2020-06-27 17:25",
"te": 20.7
},
{
"d": "2020-06-27 17:30",
"te": 20.6
},
{
"d": "2020-06-27 17:35",
"te": 20.6
},
{
"d": "2020-06-27 17:40",
"te": 21.7
},
{
"d": "2020-06-27 17:45",
"te": 21.7
},
{
"d": "2020-06-27 17:50",
"te": 21.5
},
{
"d": "2020-06-27 17:55",
"te": 21.5
},
{
"d": "2020-06-27 18:00",
"te": 24.5
},
{
"d": "2020-06-27 18:05",
"te": 24.5
},
{
"d": "2020-06-27 18:10",
"te": 24.5
},
{
"d": "2020-06-27 18:15",
"te": 24.5
},
{
"d": "2020-06-27 18:20",
"te": 21.9
},
{
"d": "2020-06-27 18:25",
"te": 21.9
},
{
"d": "2020-06-27 18:30",
"te": 21.9
},
{
"d": "2020-06-27 18:35",
"te": 21.9
},
{
"d": "2020-06-27 18:40",
"te": 24.8
},
{
"d": "2020-06-27 18:45",
"te": 24.8
},
{
"d": "2020-06-27 18:50",
"te": 24.6
},
{
"d": "2020-06-27 18:55",
"te": 24.6
},
{
"d": "2020-06-27 19:00",
"te": 24.4
},
{
"d": "2020-06-27 19:05",
"te": 24.4
},
{
"d": "2020-06-27 19:10",
"te": 24.4
},
{
"d": "2020-06-27 19:15",
"te": 24.4
},
{
"d": "2020-06-27 19:20",
"te": 24.6
},
{
"d": "2020-06-27 19:25",
"te": 24.6
},
{
"d": "2020-06-27 19:30",
"te": 24.5
},
{
"d": "2020-06-27 19:35",
"te": 24.5
},
{
"d": "2020-06-27 19:40",
"te": 24.5
},
{
"d": "2020-06-27 19:45",
"te": 24.5
},
{
"d": "2020-06-27 19:50",
"te": 20.1
},
{
"d": "2020-06-27 19:55",
"te": 20.1
},
{
"d": "2020-06-27 20:00",
"te": 17.9
},
{
"d": "2020-06-27 20:05",
"te": 17.9
},
{
"d": "2020-06-27 20:10",
"te": 18.2
},
{
"d": "2020-06-27 20:15",
"te": 18.2
},
{
"d": "2020-06-27 20:20",
"te": 18.3
},
{
"d": "2020-06-27 20:25",
"te": 18.3
},
{
"d": "2020-06-27 20:30",
"te": 18.7
},
{
"d": "2020-06-27 20:35",
"te": 18.7
},
{
"d": "2020-06-27 20:40",
"te": 18.8
},
{
"d": "2020-06-27 20:45",
"te": 18.8
},
{
"d": "2020-06-27 20:50",
"te": 19.1
},
{
"d": "2020-06-27 20:55",
"te": 19.1
},
{
"d": "2020-06-27 21:00",
"te": 19.2
},
{
"d": "2020-06-27 21:05",
"te": 19.2
},
{
"d": "2020-06-27 21:10",
"te": 19.1
},
{
"d": "2020-06-27 21:15",
"te": 19.1
},
{
"d": "2020-06-27 21:20",
"te": 18.9
},
{
"d": "2020-06-27 21:25",
"te": 18.9
},
{
"d": "2020-06-27 21:30",
"te": 18.9
},
{
"d": "2020-06-27 21:35",
"te": 18.9
},
{
"d": "2020-06-27 21:40",
"te": 18.7
},
{
"d": "2020-06-27 21:45",
"te": 18.7
},
{
"d": "2020-06-27 21:50",
"te": 18.7
},
{
"d": "2020-06-27 21:55",
"te": 18.7
},
{
"d": "2020-06-27 22:00",
"te": 18.5
},
{
"d": "2020-06-27 22:05",
"te": 18.5
},
{
"d": "2020-06-27 22:10",
"te": 18.5
},
{
"d": "2020-06-27 22:15",
"te": 18.5
},
{
"d": "2020-06-27 22:20",
"te": 18.6
},
{
"d": "2020-06-27 22:25",
"te": 18.6
},
{
"d": "2020-06-27 22:30",
"te": 18.9
},
{
"d": "2020-06-27 22:35",
"te": 18.9
},
{
"d": "2020-06-27 22:40",
"te": 19
},
{
"d": "2020-06-27 22:45",
"te": 19
},
{
"d": "2020-06-27 22:50",
"te": 18.9
},
{
"d": "2020-06-27 22:55",
"te": 18.9
},
{
"d": "2020-06-27 23:00",
"te": 18.9
},
{
"d": "2020-06-27 23:05",
"te": 18.9
},
{
"d": "2020-06-27 23:10",
"te": 18.6
},
{
"d": "2020-06-27 23:15",
"te": 18.6
},
{
"d": "2020-06-27 23:20",
"te": 18.6
},
{
"d": "2020-06-27 23:25",
"te": 18.6
},
{
"d": "2020-06-27 23:30",
"te": 18.7
},
{
"d": "2020-06-27 23:35",
"te": 18.7
},
{
"d": "2020-06-27 23:40",
"te": 18.6
},
{
"d": "2020-06-27 23:45",
"te": 18.6
},
{
"d": "2020-06-27 23:50",
"te": 18.7
},
{
"d": "2020-06-27 23:55",
"te": 18.7
},
{
"d": "2020-06-28 00:00",
"te": 18.5
},
{
"d": "2020-06-28 00:05",
"te": 18.5
},
{
"d": "2020-06-28 00:10",
"te": 18.1
},
{
"d": "2020-06-28 00:15",
"te": 18.1
},
{
"d": "2020-06-28 00:20",
"te": 18.3
},
{
"d": "2020-06-28 00:25",
"te": 18.3
},
{
"d": "2020-06-28 00:30",
"te": 18.4
},
{
"d": "2020-06-28 00:35",
"te": 18.4
},
{
"d": "2020-06-28 00:40",
"te": 18.4
},
{
"d": "2020-06-28 00:45",
"te": 18.4
},
{
"d": "2020-06-28 00:50",
"te": 18.1
},
{
"d": "2020-06-28 00:55",
"te": 18.1
},
{
"d": "2020-06-28 01:00",
"te": 18.2
},
{
"d": "2020-06-28 01:05",
"te": 18.2
},
{
"d": "2020-06-28 01:10",
"te": 18.2
},
{
"d": "2020-06-28 01:15",
"te": 18.2
},
{
"d": "2020-06-28 01:20",
"te": 18.3
},
{
"d": "2020-06-28 01:25",
"te": 18.3
},
{
"d": "2020-06-28 01:30",
"te": 18.2
},
{
"d": "2020-06-28 01:35",
"te": 18.2
},
{
"d": "2020-06-28 01:40",
"te": 17.9
},
{
"d": "2020-06-28 01:45",
"te": 17.9
},
{
"d": "2020-06-28 01:50",
"te": 18.2
},
{
"d": "2020-06-28 01:55",
"te": 18.2
},
{
"d": "2020-06-28 02:00",
"te": 17.8
},
{
"d": "2020-06-28 02:05",
"te": 17.8
},
{
"d": "2020-06-28 02:10",
"te": 17.8
},
{
"d": "2020-06-28 02:15",
"te": 17.8
},
{
"d": "2020-06-28 02:20",
"te": 17.9
},
{
"d": "2020-06-28 02:25",
"te": 17.9
},
{
"d": "2020-06-28 02:30",
"te": 17.5
},
{
"d": "2020-06-28 02:35",
"te": 17.5
},
{
"d": "2020-06-28 02:40",
"te": 17.7
},
{
"d": "2020-06-28 02:45",
"te": 17.7
},
{
"d": "2020-06-28 02:50",
"te": 17.7
},
{
"d": "2020-06-28 02:55",
"te": 17.7
},
{
"d": "2020-06-28 03:00",
"te": 17.7
},
{
"d": "2020-06-28 03:05",
"te": 17.7
},
{
"d": "2020-06-28 03:10",
"te": 17.7
},
{
"d": "2020-06-28 03:15",
"te": 17.7
},
{
"d": "2020-06-28 03:20",
"te": 17.5
},
{
"d": "2020-06-28 03:25",
"te": 17.5
},
{
"d": "2020-06-28 03:30",
"te": 17.7
},
{
"d": "2020-06-28 03:35",
"te": 17.7
},
{
"d": "2020-06-28 03:40",
"te": 17.7
},
{
"d": "2020-06-28 03:45",
"te": 17.7
},
{
"d": "2020-06-28 03:50",
"te": 17.6
},
{
"d": "2020-06-28 03:55",
"te": 17.6
},
{
"d": "2020-06-28 04:00",
"te": 17.3
},
{
"d": "2020-06-28 04:05",
"te": 17.3
},
{
"d": "2020-06-28 04:10",
"te": 17.3
},
{
"d": "2020-06-28 04:15",
"te": 17.3
},
{
"d": "2020-06-28 04:20",
"te": 17.2
},
{
"d": "2020-06-28 04:25",
"te": 17.2
},
{
"d": "2020-06-28 04:30",
"te": 17.2
},
{
"d": "2020-06-28 04:35",
"te": 17.2
},
{
"d": "2020-06-28 04:40",
"te": 16.8
},
{
"d": "2020-06-28 04:45",
"te": 16.8
},
{
"d": "2020-06-28 04:50",
"te": 16.9
},
{
"d": "2020-06-28 04:55",
"te": 16.9
},
{
"d": "2020-06-28 05:00",
"te": 16.8
},
{
"d": "2020-06-28 05:05",
"te": 16.8
},
{
"d": "2020-06-28 05:10",
"te": 15.2
},
{
"d": "2020-06-28 05:15",
"te": 15.2
},
{
"d": "2020-06-28 05:20",
"te": 16.3
},
{
"d": "2020-06-28 05:25",
"te": 16.3
},
{
"d": "2020-06-28 05:30",
"te": 16
},
{
"d": "2020-06-28 05:35",
"te": 16
},
{
"d": "2020-06-28 05:40",
"te": 15.7
},
{
"d": "2020-06-28 05:45",
"te": 15.7
},
{
"d": "2020-06-28 05:50",
"te": 16.1
},
{
"d": "2020-06-28 05:55",
"te": 16.1
},
{
"d": "2020-06-28 06:00",
"te": 16.2
},
{
"d": "2020-06-28 06:05",
"te": 16.2
},
{
"d": "2020-06-28 06:10",
"te": 16.2
},
{
"d": "2020-06-28 06:15",
"te": 16.2
},
{
"d": "2020-06-28 06:20",
"te": 16
},
{
"d": "2020-06-28 06:25",
"te": 16
},
{
"d": "2020-06-28 06:30",
"te": 16
},
{
"d": "2020-06-28 06:35",
"te": 16
},
{
"d": "2020-06-28 06:40",
"te": 16.3
},
{
"d": "2020-06-28 06:45",
"te": 16.3
},
{
"d": "2020-06-28 06:50",
"te": 16.2
},
{
"d": "2020-06-28 06:55",
"te": 16.2
},
{
"d": "2020-06-28 07:00",
"te": 16.2
},
{
"d": "2020-06-28 07:05",
"te": 16.2
},
{
"d": "2020-06-28 07:10",
"te": 16.2
},
{
"d": "2020-06-28 07:15",
"te": 16.2
},
{
"d": "2020-06-28 07:20",
"te": 16.1
},
{
"d": "2020-06-28 07:25",
"te": 16.1
},
{
"d": "2020-06-28 07:30",
"te": 16.1
},
{
"d": "2020-06-28 07:35",
"te": 16.1
},
{
"d": "2020-06-28 07:40",
"te": 16.1
},
{
"d": "2020-06-28 07:45",
"te": 16.1
},
{
"d": "2020-06-28 07:50",
"te": 16.2
},
{
"d": "2020-06-28 07:55",
"te": 16.2
},
{
"d": "2020-06-28 08:00",
"te": 16.2
},
{
"d": "2020-06-28 08:05",
"te": 16.2
},
{
"d": "2020-06-28 08:10",
"te": 16.1
},
{
"d": "2020-06-28 08:15",
"te": 16.1
},
{
"d": "2020-06-28 08:20",
"te": 14.5
},
{
"d": "2020-06-28 08:25",
"te": 14.5
},
{
"d": "2020-06-28 08:30",
"te": 16.4
},
{
"d": "2020-06-28 08:35",
"te": 16.4
},
{
"d": "2020-06-28 08:40",
"te": 15.3
},
{
"d": "2020-06-28 08:45",
"te": 15.3
},
{
"d": "2020-06-28 08:50",
"te": 15.7
},
{
"d": "2020-06-28 08:55",
"te": 15.7
},
{
"d": "2020-06-28 09:00",
"te": 15.7
},
{
"d": "2020-06-28 09:05",
"te": 15.7
},
{
"d": "2020-06-28 09:10",
"te": 17.1
},
{
"d": "2020-06-28 09:15",
"te": 17.1
},
{
"d": "2020-06-28 09:20",
"te": 15.4
},
{
"d": "2020-06-28 09:25",
"te": 15.4
},
{
"d": "2020-06-28 09:30",
"te": 15.8
},
{
"d": "2020-06-28 09:35",
"te": 15.8
},
{
"d": "2020-06-28 09:40",
"te": 14.8
},
{
"d": "2020-06-28 09:45",
"te": 14.8
},
{
"d": "2020-06-28 09:50",
"te": 14.7
},
{
"d": "2020-06-28 09:55",
"te": 14.7
},
{
"d": "2020-06-28 10:00",
"te": 15.8
},
{
"d": "2020-06-28 10:05",
"te": 15.8
},
{
"d": "2020-06-28 10:10",
"te": 14.6
},
{
"d": "2020-06-28 10:15",
"te": 14.6
},
{
"d": "2020-06-28 10:20",
"te": 16.3
},
{
"d": "2020-06-28 10:25",
"te": 16.3
},
{
"d": "2020-06-28 10:30",
"te": 15.6
},
{
"d": "2020-06-28 10:35",
"te": 15.6
},
{
"d": "2020-06-28 10:40",
"te": 15.9
},
{
"d": "2020-06-28 10:45",
"te": 15.9
},
{
"d": "2020-06-28 10:50",
"te": 15.3
},
{
"d": "2020-06-28 10:55",
"te": 15.3
},
{
"d": "2020-06-28 11:00",
"te": 17.6
},
{
"d": "2020-06-28 11:05",
"te": 17.6
},
{
"d": "2020-06-28 11:10",
"te": 17.6
},
{
"d": "2020-06-28 11:15",
"te": 17.6
},
{
"d": "2020-06-28 11:20",
"te": 18.4
},
{
"d": "2020-06-28 11:25",
"te": 18.4
},
{
"d": "2020-06-28 11:30",
"te": 18.4
},
{
"d": "2020-06-28 11:35",
"te": 18.4
},
{
"d": "2020-06-28 11:40",
"te": 15.9
},
{
"d": "2020-06-28 11:45",
"te": 15.9
},
{
"d": "2020-06-28 11:50",
"te": 15.9
},
{
"d": "2020-06-28 11:55",
"te": 15.9
},
{
"d": "2020-06-28 12:00",
"te": 15.9
},
{
"d": "2020-06-28 12:05",
"te": 15.9
},
{
"d": "2020-06-28 12:10",
"te": 15.9
},
{
"d": "2020-06-28 12:15",
"te": 15.9
},
{
"d": "2020-06-28 12:20",
"te": 17.7
},
{
"d": "2020-06-28 12:25",
"te": 17.7
},
{
"d": "2020-06-28 12:30",
"te": 18
},
{
"d": "2020-06-28 12:35",
"te": 18
},
{
"d": "2020-06-28 12:40",
"te": 18
},
{
"d": "2020-06-28 12:45",
"te": 18
},
{
"d": "2020-06-28 12:50",
"te": 18.1
},
{
"d": "2020-06-28 12:55",
"te": 18.1
},
{
"d": "2020-06-28 13:00",
"te": 18.1
},
{
"d": "2020-06-28 13:05",
"te": 18.1
},
{
"d": "2020-06-28 13:10",
"te": 18.1
},
{
"d": "2020-06-28 13:15",
"te": 18.1
},
{
"d": "2020-06-28 13:20",
"te": 16.9
},
{
"d": "2020-06-28 13:25",
"te": 16.9
},
{
"d": "2020-06-28 13:30",
"te": 19.1
},
{
"d": "2020-06-28 13:35",
"te": 19.1
},
{
"d": "2020-06-28 13:40",
"te": 19.9
},
{
"d": "2020-06-28 13:45",
"te": 19.9
},
{
"d": "2020-06-28 13:50",
"te": 20.4
},
{
"d": "2020-06-28 13:55",
"te": 20.4
},
{
"d": "2020-06-28 14:00",
"te": 19.9
},
{
"d": "2020-06-28 14:05",
"te": 19.9
},
{
"d": "2020-06-28 14:10",
"te": 19.7
},
{
"d": "2020-06-28 14:15",
"te": 19.7
},
{
"d": "2020-06-28 14:20",
"te": 19.7
},
{
"d": "2020-06-28 14:25",
"te": 19.7
},
{
"d": "2020-06-28 14:30",
"te": 20.4
},
{
"d": "2020-06-28 14:35",
"te": 20.4
},
{
"d": "2020-06-28 14:40",
"te": 20.4
},
{
"d": "2020-06-28 14:45",
"te": 20.4
},
{
"d": "2020-06-28 14:50",
"te": 19.5
},
{
"d": "2020-06-28 14:55",
"te": 19.5
},
{
"d": "2020-06-28 15:00",
"te": 20.1
},
{
"d": "2020-06-28 15:05",
"te": 20.1
},
{
"d": "2020-06-28 15:10",
"te": 20.1
},
{
"d": "2020-06-28 15:15",
"te": 20.1
},
{
"d": "2020-06-28 15:20",
"te": 19.9
},
{
"d": "2020-06-28 15:25",
"te": 19.9
},
{
"d": "2020-06-28 15:30",
"te": 20.1
},
{
"d": "2020-06-28 15:35",
"te": 20.1
},
{
"d": "2020-06-28 15:40",
"te": 20.4
},
{
"d": "2020-06-28 15:45",
"te": 20.4
},
{
"d": "2020-06-28 15:50",
"te": 20.6
},
{
"d": "2020-06-28 15:55",
"te": 20.6
},
{
"d": "2020-06-28 16:00",
"te": 20.4
},
{
"d": "2020-06-28 16:05",
"te": 20.4
},
{
"d": "2020-06-28 16:10",
"te": 20.4
},
{
"d": "2020-06-28 16:15",
"te": 20.4
},
{
"d": "2020-06-28 16:20",
"te": 20.2
},
{
"d": "2020-06-28 16:25",
"te": 20.2
},
{
"d": "2020-06-28 16:30",
"te": 20.4
},
{
"d": "2020-06-28 16:35",
"te": 20.4
},
{
"d": "2020-06-28 16:40",
"te": 20.6
},
{
"d": "2020-06-28 16:45",
"te": 20.6
},
{
"d": "2020-06-28 16:50",
"te": 19.7
},
{
"d": "2020-06-28 16:55",
"te": 19.7
},
{
"d": "2020-06-28 17:00",
"te": 19.7
},
{
"d": "2020-06-28 17:05",
"te": 19.7
},
{
"d": "2020-06-28 17:10",
"te": 20.5
},
{
"d": "2020-06-28 17:15",
"te": 20.5
},
{
"d": "2020-06-28 17:20",
"te": 20.5
},
{
"d": "2020-06-28 17:25",
"te": 20.5
},
{
"d": "2020-06-28 17:30",
"te": 20.3
},
{
"d": "2020-06-28 17:35",
"te": 20.3
},
{
"d": "2020-06-28 17:40",
"te": 20.3
},
{
"d": "2020-06-28 17:45",
"te": 20.3
},
{
"d": "2020-06-28 17:50",
"te": 20.3
},
{
"d": "2020-06-28 17:55",
"te": 20.3
},
{
"d": "2020-06-28 18:00",
"te": 20.6
},
{
"d": "2020-06-28 18:05",
"te": 20.6
},
{
"d": "2020-06-28 18:10",
"te": 20.6
},
{
"d": "2020-06-28 18:15",
"te": 20.6
},
{
"d": "2020-06-28 18:20",
"te": 19.8
},
{
"d": "2020-06-28 18:25",
"te": 19.8
},
{
"d": "2020-06-28 18:30",
"te": 19.4
},
{
"d": "2020-06-28 18:35",
"te": 19.4
},
{
"d": "2020-06-28 18:40",
"te": 19.4
},
{
"d": "2020-06-28 18:45",
"te": 19.4
},
{
"d": "2020-06-28 18:50",
"te": 19.5
},
{
"d": "2020-06-28 18:55",
"te": 19.5
},
{
"d": "2020-06-28 19:00",
"te": 19.4
},
{
"d": "2020-06-28 19:05",
"te": 19.4
},
{
"d": "2020-06-28 19:10",
"te": 19.4
},
{
"d": "2020-06-28 19:15",
"te": 19.4
},
{
"d": "2020-06-28 19:20",
"te": 19.3
},
{
"d": "2020-06-28 19:25",
"te": 19.3
},
{
"d": "2020-06-28 19:30",
"te": 19.3
},
{
"d": "2020-06-28 19:35",
"te": 19.3
},
{
"d": "2020-06-28 19:40",
"te": 19.5
},
{
"d": "2020-06-28 19:45",
"te": 19.5
},
{
"d": "2020-06-28 19:50",
"te": 18
},
{
"d": "2020-06-28 19:55",
"te": 18
},
{
"d": "2020-06-28 20:00",
"te": 18
},
{
"d": "2020-06-28 20:05",
"te": 18
},
{
"d": "2020-06-28 20:10",
"te": 18.1
},
{
"d": "2020-06-28 20:15",
"te": 18.1
},
{
"d": "2020-06-28 20:20",
"te": 17.7
},
{
"d": "2020-06-28 20:25",
"te": 17.7
},
{
"d": "2020-06-28 20:30",
"te": 18
},
{
"d": "2020-06-28 20:35",
"te": 18
},
{
"d": "2020-06-28 20:40",
"te": 18
},
{
"d": "2020-06-28 20:45",
"te": 18
},
{
"d": "2020-06-28 20:50",
"te": 17.9
},
{
"d": "2020-06-28 20:55",
"te": 17.9
},
{
"d": "2020-06-28 21:00",
"te": 17.7
},
{
"d": "2020-06-28 21:05",
"te": 17.7
},
{
"d": "2020-06-28 21:10",
"te": 17.7
},
{
"d": "2020-06-28 21:15",
"te": 17.7
},
{
"d": "2020-06-28 21:20",
"te": 17.2
},
{
"d": "2020-06-28 21:25",
"te": 17.2
},
{
"d": "2020-06-28 21:30",
"te": 17.2
},
{
"d": "2020-06-28 21:35",
"te": 17.2
},
{
"d": "2020-06-28 21:40",
"te": 16.8
},
{
"d": "2020-06-28 21:45",
"te": 16.8
},
{
"d": "2020-06-28 21:50",
"te": 16.8
},
{
"d": "2020-06-28 21:55",
"te": 16.8
},
{
"d": "2020-06-28 22:00",
"te": 16.5
},
{
"d": "2020-06-28 22:05",
"te": 16.5
}
],
"status": "OK",
"title": "Graph temp day"
}
and then loop over all datapoints to get the min and max of the last 24 hours
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
MikeF
Posts: 350
Joined: Sunday 19 April 2015 0:36
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.2
Location: UK
Contact:

Re: Get min/max readings for sensors for 24hrs

Post by MikeF »

I've created a version of this which writes to a text sensor, showing the min and max temperatures for my greenhouse, updating every 5 minutes.
Spoiler: show

Code: Select all

 return
 {
    on =
    {
        timer =
        {
            'every 5 minutes',
        },
    },

    logging =
    {
        level = domoticz.LOG_DEBUG,
    },
 
     data =
     {
        temperatures =
        {
             history = true,
             maxHours = 36,
        },
    },

   execute = function( dz )

        local outdoor_sensor = dz.devices('Greenhouse')
        local min_max_text = dz.devices('Greenhouse min/max')

        dz.data.temperatures.add(dz.utils.round(outdoor_sensor.temperature,2))
        -- maximum value in 24 hours:
        local max = dz.data.temperatures.maxSince('24:00:00')
        -- minimum value in 24 hours:
        local min = dz.data.temperatures.minSince('24:00:00')
        dz.log(' min = ' .. min .. ', max = ' .. max,dz.LOG_DEBUG)
        min_max_text.updateText(' min = ' .. min .. ' C, max = ' .. max .. ' C')
    end
}

Image

As @waaren said, you have to allow the script to build up 24 hours of data.
MikeF
Posts: 350
Joined: Sunday 19 April 2015 0:36
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.2
Location: UK
Contact:

Re: Get min/max readings for sensors for 24hrs

Post by MikeF »

I'm confused by this: although I've been running this for > 24 hours (every 5 minutes), I'm not getting min and max across the whole period.

Looking at the data file ( __data_greenhouse_min_max.lua), this is getting truncated to 100 entries (so at 17:00, for example, the earliest entry is for 08:45), even though I've specified maxHours = 36.

Any clues?
MikeF
Posts: 350
Joined: Sunday 19 April 2015 0:36
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.2
Location: UK
Contact:

Re: Get min/max readings for sensors for 24hrs

Post by MikeF »

OK - solved it (I think). I've changed maxHours = 36 to maxItems = 300 (24 hrs x 12 values per hour = 288), and data list is now starting to grow (will have to wait another 15 hours 40 minutes!).

But why limit of 100 using maxHours?
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Get min/max readings for sensors for 24hrs

Post by waaren »

MikeF wrote: Monday 29 June 2020 18:17 But why limit of 100 using maxHours?
the limit is to prevent having (too) many entries without realizing. Persistence data is written to OS files and too many entries can cause performance degradation.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
MikeF
Posts: 350
Joined: Sunday 19 April 2015 0:36
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.2
Location: UK
Contact:

Re: Get min/max readings for sensors for 24hrs

Post by MikeF »

Understood - and, for my purposes (running every 5 minutes), this becomes quite a large file - 288 values. And it's not just a numeric value - each entry is of the format

Code: Select all

                [1] = {
                        ["time"] = "2020-6-29 22:0:0.369";
                        ["data"] = 13.4;
                };
I found this script instead (which you wrote, waaren):
Spoiler: show

Code: Select all

-- getMaxTempHum

local httpResponses = "getMaxTempHum"
return {
    on      =   {
                    timer           =   { "at 17:38"    },                       -- Your preferred time
                    httpResponses   =   { httpResponses }
                },

    logging =   {
                    level           =   domoticz.LOG_DEBUG,
                    marker          =   httpResponses
                },

    execute = function(dz, item)
        -- ****************************** Your settings below this line ***************************************************
        temphumDevice           = dz.devices(766)          -- Replace with ID of Device you want to be notified on
        timeSpan                = 24                       -- If set longer then the amount of short log sensors data in domoticz it will look at all data available
        -- notificationSubsystem   = dz.NSS_PUSHOVER       -- Replace with your subsystem of choice or nil to get a notication on all  
        notificationSubsystem   = nil          -- This will cause the script to send a notification to all subsystems  
        -- ****************************** No changes required below this line *********************************************

        local extremes = {}

        local function logWrite(str,level)
            dz.log(tostring(str),level or dz.LOG_DEBUG)
        end

        local function triggerJSON()
            local  URLString   = dz.settings['Domoticz url'] .. "/json.htm?type=graph&sensor=temp&range=day&idx=" .. temphumDevice.id
            dz.openURL({    url = URLString,
                            method = "GET",
                            callback = httpResponses })
        end

        local function convertTime(timeString,check)
            _,_, year, month, day, hour, minute = string.find(timeString, "(%d+)-(%d+)-(%d+) (%d+):(%d+)")
            
            if check then
                local seconds = os.time({year=year, month=month, day=day, hour=hour, minute=minute, seconds=0 })
                return seconds
            else    
                local fmtString = os.date("%A, %d %B %Y (%H:%M)",os.time({year=year, month=month, day=day, hour=hour, minute=minute })):gsub(" 0"," ")
                return fmtString                                 -- outgoing format: ddd d mmmm yyyy (hh:mm)
            end
            
        end

        local function showResult(str)
            textDevice.updateText(str)
            logWrite(str,dz.LOG_FORCE)
        end

        local function getTimeWindow(hours)
            local to   = os.time(os.date("*t"))
            local from = os.date("%A, %d %B %Y (%H:%M)",to - hours * 3600)
            local to   = os.date("%A, %d %B %Y (%H:%M)",to)
            return from, to
        end

        local function notify(from,now)
            local notificationString =  "\nhigh Temperature: " .. extremes.high.temperature .. " Celsius at " .. convertTime(extremes.high.tTime) .. "\n"
            notificationString = notificationString .. "low temperature: " .. extremes.low.temperature .. " Celsius at " .. convertTime(extremes.low.tTime) .. "\n"
            notificationString = notificationString .. "high humidity: " .. extremes.high.humidity .. "% at " .. convertTime(extremes.high.hTime) .. "\n"
            notificationString = notificationString .. "low humidity:  " .. extremes.low.humidity .. "% at " .. convertTime(extremes.low.hTime)

            logWrite("\nExtremes between " .. from .. " and " .. now .. "\n" .. notificationString,dz.LOG_FORCE)
             dz.notify("Extremes between " .. from .. " and " .. now, notificationString, dz.PRIORITY_NORMAL, nil,nil, notificationSubsystem )
        end

        local function getExtremes(rt)
            extremes.low                = {}
            extremes.high               = {}
            extremes.low.temperature    = 10000
            extremes.low.humidity       = 100
            extremes.high.humidity      = 0
            extremes.high.temperature   = -256
            local sinceTime             = os.time(os.date('*t')) - timeSpan * 3600
            
            
            for key in ipairs(rt) do
                if tonumber(rt[key].hu) > extremes.high.humidity then
                    if convertTime(rt[key].d,true) >  sinceTime then
                        logWrite("New max humidity found on " .. convertTime(rt[key].d) .. " ==>> " .. rt[key].hu )
                        extremes.high.humidity = tonumber(rt[key].hu)
                        extremes.high.hTime = rt[key].d
                    end
                end
                if tonumber(rt[key].hu) < extremes.low.humidity then
                    if convertTime(rt[key].d,true) >  sinceTime then
                        logWrite("New min humidity found on " .. convertTime(rt[key].d) .. " ==>> " .. rt[key].hu )
                        extremes.low.humidity = tonumber(rt[key].hu)
                        extremes.low.hTime = rt[key].d
                    end
                end
                if tonumber(rt[key].te) > extremes.high.temperature then
                    if convertTime(rt[key].d,true) >  sinceTime then
                        logWrite("New max temperature found on " .. convertTime(rt[key].d) .. " ==>> " .. rt[key].te )
                        extremes.high.temperature = tonumber(rt[key].te)
                        extremes.high.tTime = rt[key].d
                    end
                end
                if tonumber(rt[key].te) < extremes.low.temperature then
                    if convertTime(rt[key].d,true) >  sinceTime then
                        logWrite("New min temperature found on " .. convertTime(rt[key].d) .. " ==>> " .. rt[key].te )
                        extremes.low.temperature = tonumber(rt[key].te)
                        extremes.low.tTime = rt[key].d
                    end
                end
            end
            return extremes
        end


        -- Main
        if not item.isHTTPResponse then
            triggerJSON()
        elseif item.ok then                                      -- statusCode == 2xx
            extremes = getExtremes(item.json.result)
            notify(getTimeWindow(timeSpan))
        else
            logWrite("Could not get (good) data from domoticz. Error (" .. (item.statusCode or 999) .. ")"  ,dz.LOG_ERROR)
            logWrite(item.data)
        end
    end
}
- gives min, max over 24 hours immediately.

One issue: minutes are displayed as 00 in all lines such as:

Code: Select all

2020-06-29 23:05:00.987 high Temperature: 28.1 Celsius at Monday, 29 June 2020 (14:00)
MikeF
Posts: 350
Joined: Sunday 19 April 2015 0:36
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.2
Location: UK
Contact:

Re: Get min/max readings for sensors for 24hrs  [Solved]

Post by MikeF »

MikeF wrote: Tuesday 30 June 2020 0:14
One issue: minutes are displayed as 00 in all lines such as:

Code: Select all

2020-06-29 23:05:00.987 high Temperature: 28.1 Celsius at Monday, 29 June 2020 (14:00)
Found it! This line:

Code: Select all

fmtString = os.date("%A, %d %B %Y (%H:%M)",os.time({year=year, month=month, day=day, hour=hour, minute=minute })):gsub(" 0"," ")
should be:

Code: Select all

fmtString = os.date("%A, %d %B %Y (%H:%M)",os.time({year=year, month=month, day=day, hour=hour, min=minute })):gsub(" 0"," ")
('min', not 'minute')
kevster
Posts: 26
Joined: Tuesday 06 December 2016 23:14
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: UK
Contact:

Re: Get min/max readings for sensors for 24hrs

Post by kevster »

Thanks for taking the time to reply.

I didn't end up getting the correct values in the end. I'm not convinced its a good way to do what I wanted anyway, especially with it having to seemingly store values.

I instead wrote a few lines of PowerShell that pulls the json for the sensor, gets todays values then easilly gets min/max temps. Works both remotely and on my Pi with PowerShell Core 7 which is cool.

It seems odd that Domoticz does not have a value for day/week for min/max etc in the DB when it does on the report view for months and years.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest