Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

Download & Filter HC3 History Data


l-i-n-k

Question

I tried multiple ways to work with the history data provided in the HC3 portal with no practical way…

 

The API can export a JSON or XML from a device - but the complexity of the data makes it hard to use for a normal user!

Any LUA scripts to print thousands of lines is unusable (the device creates a record each 6 minutes resulting in 7200 entries for one month)

 

While the history page exactly shows me the desired data in the desired format - but no export as a CSV or any othe TXT file 🤯

 

I don’t understand why there is no "simple" button to save the displayed history data 🤔😒 
 

 

Please login or register to see this attachment.

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0
  • Inquirer
  • The data already exists in HC, but I just want to transform the data into something I can analyze. It seems a complete overkill to write a QuickApp to export (and increasing the load of the Homecenter). The suggested database server is of no help without coding as well… and I don’t need storage at all. I want to find out the solar energy production at certain hours of the day to get the proper level to use in a scene.

     

    Update from yesterday's research:

    Starting point is the JSON from the HC API
    http://xxx.xxx.x.xxx/api/events/history?objectType=device&numberOfRecords=7200&objectId=###
    xxx.xxx.x.xxx = IP adress of HC3

    ### = device ID to read

     

    Next step: Head over to Gigasheet and transform the JSON to a table including the columns you need:

    Please login or register to see this link.

    Good to know: The app can convert the number of timestamp entries in readable date and time!
    Export to CSV

     

    Import to Numbers or Excel and Filter to your needs.

    Yeah 🕵️‍♂️

    Edited by l-i-n-k
    Link to comment
    Share on other sites

    • 0

    This amount of data is probably more suitable for a external database like InfluxDB and the QuickApp to export the data. 

    Link to comment
    Share on other sites

    • 0
    2 hours ago, l-i-n-k said:

    It seems a complete overkill to write a QuickApp to export (and increasing the load of the Homecenter).


    It is indeed overkill to write a QuickApp to export the data. Someone else already wrote the QuickApp to do so. 😀
     

    (Btw The data on your HC3 will not always be there, you will lose it at some point, for example after a firmware update and cleanup of logs)

    Link to comment
    Share on other sites

    • 0

    isnt it possible to export .csv from the general tab?

    Both on energy and temperature if it is that what you are looking for?

     

    Please login or register to see this image.

    /monthly_2023_05/image.png.a7da1ad668fa36004575addfa8dec520.png" />

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • @Brors94 As the label says: Only devices of temperature or energy type are exported. Lux (Light sensors) or my solar energy meter aren’t included.

    Because of this: No, unfortunately this export does not work.

     

    @SmartHomeEddy Appreciate your SolarEdge Monitor 🤩

     

    Currently, the API works just fine. With the

    Please login or register to see this link.

    , I can have the filtered CSV of a device within minutes. I would rather investigate in connecting the API to e.g. Gigasheet instead.

    • Like 1
    • Thanks 1
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Just realized that you can get nice and easy api access with the Swagger interface. This allows you to play withe parameters. 

    Link to comment
    Share on other sites

    • 0

    Hi all,

    My question is related to, but not exactly connecting to the topic.

    Is there a way, for example, to write out all the history on a daily basis to an excell or something?

    Not just energy and temperature. My client would like to have all user activity logged and stored.

    I am not great on coding, but this is one of the key requirement of the project. ( about 135 devices and 15 users with different rights would be involved...)

     

    Thank you in advance

    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...