homematic-community / XML-API

HomeMatic CCU Addon implementing a xml request functionality
https://github.com/homematic-community/XML-API
GNU General Public License v3.0
123 stars 27 forks source link

Getting Device Names by ise_id #94

Open adb336 opened 6 months ago

adb336 commented 6 months ago

Dear all,

after reading the description for the 1.x and 2.x version of XML-API I have not found a way to get one device name by its ise_id.

Usage in my case: with PHP I am getting values by the corresponding ../xmlapi/state.cgi?datapoint_id=XXXXXX call to the XML-API. I am trying to find an easy way to get the device names, too.

Using devicelist.cgi I would have to implement some cumbersome PHP routines and lists to browse the XML for one device name which is clearly identyfied by its ise_id.

Can this be implemented like the combination of statelist.cgi and state.cgi?

E.g. devicelist.cgi for the complete list and device.cgi with parameter ise_id=XXXXXX?

Kind regards,

Alexander De Bernardi

Maik2208 commented 5 months ago

You can use devicelist by using the parameter device_id

adb336 commented 5 months ago

Dear all, with curl on Linux

curl -s -S http://CCU3Name/config/xmlapi/devicelist.cgi?device_id=13276

I am getting the whole bunch of devices as XML output again.

The API I am using is XML-API 1.22 since I have to rewrite for 2.x a lot of scripts.

The CCU3 is not accessible from remote.

Kind regards,

Alexander De Bernardi

Maik2208 commented 5 months ago

Please use the current version. The device_id paramater was only included in version 2.2

jens-maus commented 5 months ago

The API I am using is XML-API 1.22 since I have to rewrite for 2.x a lot of scripts.

That's the price you would have to pay for increased security. Thus, don't delay it any further and go for XML-API v2 to have all latest features+fixes of XML-API. There will be no backporting of any features or bugfixes to XML-API v1 anymore...