Code Monkey home page Code Monkey logo

simple-event-logger-smartapp's Introduction

Simple Event Logger SmartApp

SmartApp Simple Event Logger version 1.6 modified by Mariano Colmenarejo.

Author of this Smartapp: Kevin LaFramboise (krlaframboise)

NOTE

Kevin LaFramboise (krlaframboise) says to me: I don’t have time to review and test your version so I won’t be adding it to the SmartApp.

I’m sure there are others that are interested in the changes you made, but I’d rather not have 2 instances of the SmartApp linked to on this topic so I’d appreciate it if you could PM the code/link to any users that request it.

I put the Kevin smartthings community link:

https://community.smartthings.com/t/release-simple-event-logger/69879/568?u=mariano_colmenarejo

To avoid the loss of device event capture due to frequent delays or stops in the smatthings event history server during the month of July and possible future failures, I have modified the Simple Event Logger app to version 1.6, to set the start time of the next event capture period (startDate variable) at the time of the last event captured + 1 sec. In this way, if the event history is stopped or delayed, the time of the last event captured will be kept as the startDate value and no events will be lost when the history is restored.

The end time of the capture period (endDate variable) remains to the current time + the time selected as the events capture frequency.

I’ve tested it and it works fine, no live logging errors and no duplicate or missing events on google sheet appears.

  • Changelog:
  • 1.6 (08/01/2021) Modified by Mariano Colmenarejo
  •  -  Next get events Period calculation changed to avoid the loss of device event capture due to frequent delays or stops in the smatthings event history server in last month
    
  •  -  getNewEvents(startDate, endDate) peirod is calcualted "From" last event time downloaded + 1 sec (startDate) "To" logFrequency period seletec + now time (endDate)
    

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.