Does Habmin has restful API for scan, add deivce?

Hi all,

I can manage to use Habmin to scan both zwave switch and wifi switch.
1 But first we need to click to scan button,
2 and then when device is detected, we need to choose which device and click button to add
3 After that, we also operate to create a item and link to a channel

Do we have some restful api for Habmin, like we have in doc/index.html page of openhab web server to do the samething?

Thank you very much.

What version of OH are you using? I guess OH2 since you talk about the doc/index? If so, then the API to create a device (ie a thing) is using the ESH API - not a HABmin API.

Hi Chris,

Yes. I am using openhab2.

Thank you very much for your response.

If so, then the API to create a device (ie a thing) is using the ESH API - not a HABmin API.
Yes. You are right.

But let us skip the point 3 at this time and have a look at point 1 and 2.
1 But first we need to click to scan button,
2 and then when device is detected, we need to choose which device and click button to add

As I do manually scan and add device by Habmin, both action is done by click button in Habmin.

Does Habmin provide some rest API to do the scan and add device action which we can do by manually clicking scan button and add button in Habmin?

Thank you for your attention.

No - this is using the ESH API.

Got it. Thank you very much.

As Chris mention below, scan and add device actions is done by ESH API.

Does any expert can provide some additional information or links for that?
Than you.

I suggest that you look through the REST documentation that comes with oh2 (located in /doc/index.html). Try looking at the discovery services.

Hi chris,

Thank you very much for your information.

I go to doc/index.html as you suggested, I tried both the two API under discovery.

1 For /discovery, I go a list of binding names.
2 For /discovery/bindings/{bindingId}/scan, I try to input some binding names, but I always get “no content” response body.

Would you please provide some more additional information for this /discovery/bindings/{bindingId}/scan, to help me to make it work?

Thank you very much.

It sounds like you are doing the right thing - why don’t you think it is working? I don’t think there is (currently) a response - that will change soon, but at the moment I think it’s right.

Hi Chris,

Thank you for your response.

So for this /discovery/bindings/{bindingId}/scan,
1 I guess it is pretty much the same as operation of + -> orvibo in Habmin.

2 By your information, am I correct to say that this rest API /discovery/bindings/{bindingId}/scan is still being developed, and the development will be finished soon?

Thank you very much.

No - this has been working for a long (long!) time. There is an update going on at the moment so it will return a different value, but it won’t change the API.

Thank you.

Am I correct to say?
1 “No” means that this API is not working.
2 I still need to wait for a while to use this REST API.

Thank you very much.

  1. The API is working. ‘No’ means that you are not correct to say that it is still being developed. It works fine.
  2. No - the API works fine right now. You can use it now.

Hi Chris,

Thank you very much for clarification.

1 Now I understand the different value you mentioned earlier is just for browser user information.
2 Anyway, the API is working background although “no content” returned at this moment.