lucacalcaterra / org.openhab.binding.melcloud

MelCloud binding for Openhab.
10 stars 6 forks source link

only devices on structure level of first building are listed #4

Closed thewiep closed 4 years ago

thewiep commented 5 years ago

The current implementation lists devices in the first building but not on any other level.

listDevicesResponse is set to the first building here: Connection.listDevicesResponse = gson.fromJson(response, ListDevicesResponse[].class)[0];

and the the list of devices is set to the devices found in the structure of the first building: deviceList = connection.getListDevicesResponse().getStructure().getDevices()

Ideally it would list all devices on all levels. A workaround is login to MELCloud and move the devices to the first building and then start discovery in openHAB. After all devices are added in openHAB you can move them to the desired level in MELCloud. Since openHAB now has the required info for each device, created Things will keep on working.

Thanks a lot for this nice binding Luca!

lucacalcaterra commented 5 years ago

Can you check the issue in new versions ? Thanks

thewiep commented 4 years ago

Hi Luca,

I checked the commits since the version I tested but don't see any changes that handles the listing differently. If specific changes for this issue are made I'll gladly test it.

thewiep commented 4 years ago

Hi Luca,

I created a PR for the base implementation of this enhancement.

lucacalcaterra commented 4 years ago

thanks @thewiep !!! I've merged the pr's