"time"-value for Digital Input on unipi?



  • 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"}
    

  • administrators

    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
    

Log in to reply