What value type is heating_power_request from getmeasure?

b.iurea94

Hi,

i'm getting the data from getmeasure and in the response I'm receiving this:
{
    "body": [
        {
            "value": [
                [
                    3048
                ],
                [
                    2642
                ],
                [
                    2471
                ],
                [
                    2189
                ],
                [
                    3073
                ],
                [
                    3495
                ]
            ],
            "beg_time": 1735815600,
            "step_time": 604800
        }
    ],
    "status": "ok",
    "time_exec": 0.03612208366394043,
    "time_server": 1738702403
}

In what format are the values? Is unix time minutes? is percentage in 1000% scale?
I compared two days where the measure on the app was at 50%. Here the result of the two days:
"1736506800":[1208],"1736593200":[2116]
if the scale is 1day, and on the app the chart show 50%, how this two numbers can be so different?

Please can you help me?

thanks
Bogdan

0

Comments

4 comments

  • Comment author
    Philippe HERMES
    • Edited

    Hello,

    The time seems to be in unix time as written on the documentation webpage (Local Unix Time in seconds): https://dev.netatmo.com/apidocumentation/control#getmeasure
    By default, it is in UTC time (Z for zoulou or UTC)
    1738702403 means 2025-02-04 20:53:23Z  
    1735815600 means 2025-01-02 11:00:00Z

    php program used to convert: 
    <?php
    $value="1738702403";
    printf(" ".$value." means ".date('Y-m-d H:i:s\Z',$value)." \n");

    $value="1735815600";
    printf(" ".$value." means ".date('Y-m-d H:i:s\Z',$value)." \n");
    ?>

    same for the two others unix time:
    1736506800 means 2025-01-10 11:00:00Z  
    1736593200 means 2025-01-11 11:00:00Z
    1736593200−1736506800 =  86400 seconds  or one day.
    The start of the unix time is 1970 january 1st.

    value for steptime: 604800
    It is in seconds 
    604800 / 3600 = 168 hours and 24 x 7 = 168.
    so 604800 seconds  means 7 days or 1 week.

    About the values, I don't know exactly, I think the best is to share what you are asking for?
    If you look at the documentation,  it can be "minutes" "energy" "price"...

    Hope this helps
    Phil [ just a user ]


     

    0
  • Comment author
    b.iurea94

    Good morning Phil,

    thank you for your answer. Very appreciated.

    I understand the unix time, but my question was on the values

    "value": [
                    [
                        3048
                    ],
                    [
                        2642
                    ],
                    [
                        2471
                    ],
                    [
                        2189
                    ],
                    [
                        3073
                    ],
                    [
                        3495
                    ]
                ]

    as i said..i'm sharing two days
    1736506800 = January 10th 2025, value = 1208

    1736593200 = January 11th 2025, value = 2116

    as we see in the chart (showing the data from a smart valve in a room) above.. these two days have SAME heating_power_request percentage. but in the api response.. this 50% is firstly 1208 and second 2116..
    I utilize optimize=false in the request to have the values indexed by timestamp, so i'm sure that the days we are talking about is correct.

    I cannot understand which are the calculations made by netatmo to get from this values, to percentage..

    thanks!

    Bogdan.

     

    0
  • Comment author
    Philippe HERMES

    Hello,
    Thank you
    I'm sorry I cannot make test, as I don't have these devices

    However I am sure @Leslie (community manager for [EN] API, automation and external services
    will answer to you.

    Phil 

    0
  • Comment author
    Philippe HERMES

    Hello, @b.iurea94

    You may contact her directly via: https://dev.netatmo.com/contact-us-form
    "I need support with the Netatmo API"

    This URL has been already shared by her on others posts.

    Kind regards

    Phil

    0

Please sign in to leave a comment.