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

History device Fibaro HC3


Fireman

Question

Dear Fibaro Fans,

 

Can i search history by device id?

 

Would like to see when, for example, the door was open/closed.

 

Thanks.

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

You can see all devices in  a selected room

Please login or register to see this attachment.

//Sjakie

Link to comment
Share on other sites

  • 0
  • Inquirer
  • Thanks for reaction.

     

    But i would like to see one device and not all. It's very cluttered when you have many devices in one room.

     

    Other option could be data export but there i can only select temperature and energy.

     

    Is there any other option?

    Link to comment
    Share on other sites

    • 0

    Hi Fireman, would be great to filter only one device, hope it is on the Fibaro backlog. But maybe you have to less rooms? 

    Link to comment
    Share on other sites

    • 0
    Guest deSmartHomeChef

    Hi Fireman,

     

    You could use the api.get function in LUA for this.  See example below (for HC3):

     

    local NumOfRec = xx -- Set number of event records
    local deviceID = xxx -- Set deviceID
    local data,status = api.get('/events/history?objectType=device&numberOfRecords='..NumOfRec..'&objectId='..deviceID)
    fibaro.debug('GETDeviceEvents'"List of last "..NumOfRec.." events of Device ID: "..deviceID)
    for key,value in pairs(data) do
        fibaro.debug('GETDeviceEvents',"-"..key.."- event id "..value.id.." @ ".. os.date("%c", value.timestamp).."; From: "..tostring(value.data.oldValue).." To: "..tostring(value.data.newValue))
    end

     

    Just copy & paste these lines in a new LUA scene (right Actions window). Change the device ID and the number of last event lines you like to see. Then run the scene and the values will be displayed in the console.

    Hopefully this works for you. Good luck!

     

     
     
     
    Link to comment
    Share on other sites

    • 0

    Nice report!

    I am wondering I did  a backup without history on the 19th June 08:31 just before to upgrade to FW 5.071.52 (beta)

    If I run the scene as you proposed it will go back to the 15th of June (I asked 100 events)

    If I ask 1000 events it will stop at 3rd of June  event 599, 5 backups back! All on FW 5.070.42

     

    So Fibaro details?

    //Sjakie

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • @deSmartHomeChef,

     

    Thanks for LUA function.   It works oke.

     

    It would be nice when Fibaro this implements in new update with nice graphics.

    Link to comment
    Share on other sites

    • 0
    Guest deSmartHomeChef

    @Fireman,

     

    You're welcome. Good to hear it works for you (as it does for me ?)!

     

    As I know the guys at Fibaro, this is probably somewhere on their 'Nice to have' list, but it didn't make it to the 'Need to have' list . But who knows... one day...?

    Link to comment
    Share on other sites

    • 0
    On 6/21/2021 at 7:27 PM, Sjakie said:

    Nice report!

    I am wondering I did  a backup without history on the 19th June 08:31 just before to upgrade to FW 5.071.52 (beta)

    If I run the scene as you proposed it will go back to the 15th of June (I asked 100 events)

    If I ask 1000 events it will stop at 3rd of June  event 599, 5 backups back! All on FW 5.070.42

     

    So Fibaro details?

    //Sjakie

    History is not included in the backup (to reduce file size), but existing history stays inside the running database. That's why you can see it.

    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...