Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 107465

REST sensor polling does not work from the second scan

$
0
0

Hello Everyone,

I am trying to use the RESTful platform to fetch data from a Hikvision Access Control Terminal DS-K1T805MBFWX (a fingerprint reader and keypad). Data is collected fine the first time it is polled (upon restart or after “rest entities” reload is performed). However, from the moment the scan_interval is reached the first time and until it is reloaded manually again, attributes dissapear and do not load again unless I reload REST.

Should I do anything to fix this or isn’t the rest platform the right choice for this kind of sensor data fetching?

rest:
  - authentication: digest
    username: "admin"
    password: "xxxxxx"
    scan_interval: 10
    resource: http://192.168.0.75/ISAPI/AccessControl/AcsEvent?format=json
    method: POST
    payload: >-
        {"AcsEventCond": {"searchID": "1","searchResultPosition": 0,"maxResults": 10,"major": 0,"minor": 0,"startTime": "2025-04-17T00:00:00+02:00","endTime": "2035-04-18T23:59:59+02:00","timeReverseOrder": true}}
    sensor:
      - name: "HikReader"
        json_attributes_path: "$.AcsEvent.InfoList[0]"
        value_template: "HikReader"
        json_attributes:
          - "major"
          - "minor"
          - "time"
          - "type"
          - "serialNo"
          - "netUser"
          - "remoteHostAddr"
          - "cardType"
          - "name"
          - "cardReaderNo"
          - "doorNo"
          - "employeeNoString"
          - "userType"
          - "currentVerifyMode"

sensor data upon first polling:

sensor data after second scan:

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 107465

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>