So I am trying to use the REST API to add a Z-Stick, by Creating a new thing and adding it to the registry.
My Curl has the UID as “UID”: “zwave:serial_zstick:name”, which is 3 segments.
however, when I attempt to add a new device is returns an error message saying UID must have at least 3 segments
“class”: “java.lang.IllegalArgumentException”,
“message”: “UID must have at least 3 segments.”,
“http-code”: 500,
HABmin and PaperUI both use the REST interface, so if the error occurs on one, it will likely occur on both, and alos by using the REST interface directly.
It’s the only API available for browsers etc to interface to openHAB for configuration etc. Everything HABmin and PaperUI do is done through the REST API.
It would be helpful if you would post your actual curl command.
If I had to do this, I’d first add the device through one of the existing UIs and watch what calls are made with the debugging tools in the browser. You should be able to reproduce those calls in your application.
I actually was able to make it work successfully, the problem was something else and not the UID, the error message wasn’t display the right error I guess. I will share the codes for you to review once I have access to my laptop