Unique ID of Thing openHAB

89 views Asked by At

I just started working in openHAB and was wondering if there was an API to get the MAC-address of an item or some other unique ID that will not change if I for example disconnect/delete the device and reconnect it.

I want the unique ID so that I can put the Thing in a database without it creating a duplicate in case it disconnects or I delete the device.

1

There are 1 answers

0
meygrino On

I think the REST API is providing good information. https://www.openhab.org/docs/configuration/restdocs.html

for example openhaburl:8080/rest/things

You get a List of things containing, amongst other things, the UID and that contains the serial of the device.

Regards Michael