I’d like to leverage Home Assistant in a more industrial setting. In particular I’d like to deploy a number of ESPHome based NFC Tagreaders such that they can be used to identify staff when accessing the existing Production Management System.
To fill the gap between Home Assistant and the Production Management System (aka the database) I’m using Node-RED to process tag scan events and log them in the database. This flow will first check to see if the tagreader exists in the database (if not register it), then will see if the tag exists in the database (if not register it) and finally log the tag scan event.
Operationally I need to pair each tagreader with a Desktop or iPad and pair each tag with a staff member and this happens within the database. Each Desktop / iPad will then check its device record for the tag_id of the tag which has recently been scanned by its associated tag reader. Just like an access control system can be set to only unlock certain doors for certain staff the plan is to use a similar strategy within the database but with NFC tags rather than username/password. Coincidently the keychain fobs currently used for factory access are compatible with the ESPHome based tagreaders.
The information flow is operational but its all based on tag_id and device_id as that is essentially all Node-RED gets from Home Assistant, however they are not really nice for humans to understand.
What I’d like to do is have my database access Home Assistant via the REST API to extract and possibly update Tag and Device details such that they are consistent in both interfaces so as to make matching easier.
I’ve been interrogating the REST API with Postman but don’t seem to be able to see any details of my Tagreaders or my tags … both of which are clearly accessible within Home Assistant.
I’d like to be able to set the tag name to that of the Staff members to which its assigned and I’d like to extract the Device name of the tagreader and possibly access its MAC address, IP address, status, etc, etc.
Can this be done via the REST API?
In the future I’d like to be able to enhance the tagreader to also measure Temp, Humidity and Air Quality then have this data linked to the factory location and staff member present at the location.