• Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    "time"-value for Digital Input on unipi?

    Official EVOK API
    2
    2
    72
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      Lasse last edited by

      It is not:

      • Epoch
      • Seconds/Milliseconds since last change
        So what is it?
        I would like to check when the value last changed, to implement some delay in later processing to slow down the effect of a flapping input, but cannot understand what 'time' is related here.
        This is one example:
      {"bitvalue": 1, "glob_dev_id": 0, "value": 1, "circuit": "1", "time": 1012811606, "debounce": 0, "counter_mode": false, "dev": "input"}
      
      $ date --date @1012811606
      Mon 04 Feb 2002 08:33:26 AM UTC
      

      Like 18 years off...
      The same parameter on the 1-wire looks correct:

      {"interval": 3.0, "value": 31.55, "circuit": "28FA2A790B00001C", "address": "28FA2A790B00001C", "time": 1606155885.72539, "typ": "DS18B20", "lost": false, "dev": "temp"}
      
      1 Reply Last reply Reply Quote 0
      • M
        martin_triska administrators last edited by

        Hello @Lasse ,

        this value is Unipi 1.1 specific and comes from pigpio subsystem tick value. From documentation:

        tick: the number of microseconds since system boot. It wraps around after 1h12m
        
        1 Reply Last reply Reply Quote 0
        • First post
          Last post