Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

devicelist.cgi returns invalid xml if device_id is set #93

Open
Tommi2Day opened this issue Feb 17, 2024 · 1 comment · May be fixed by #95
Open

devicelist.cgi returns invalid xml if device_id is set #93

Tommi2Day opened this issue Feb 17, 2024 · 1 comment · May be fixed by #95

Comments

@Tommi2Day
Copy link

Thanks for this great addon

I think I found a small issue running raspberrymatic v3.73.9.20240130 with xml-api Addon 2.3

I call https://ccu.xxx/addons/xmlapi/devicelist.cgi?sid=xxx&device_id=4740,4763 and it returns an invalid xml (for golang)

<?xml version='1.0' encoding='ISO-8859-1' ?><deviceList><device name='Bewegungsmelder Garage' address='000955699D3D84' ise_id='4740' interface='HmIP-RF' device_type='HmIP-SMO' ready_config='true'><channel name='Bewegun
gsmelder Garage:0' type='30' address='000955699D3D84:0' ise_id='4741' direction='UNKNOWN' parent_device='4740' index='0' group_partner='' aes_available='false' transmission_mode='AES' visible='true' ready_config='true' operate='true' /><channel name='Bewegungsmelder Gara
ge' type='17' address='000955699D3D84:1' ise_id='4763' direction='SENDER' parent_device='4740' index='1' group_partner='' aes_available='false' transmission_mode='AES' visible='true' ready_config='true' operate='true' /><channel name='HmIP-SMO 000955699D3D84:2' type='17'
 address='000955699D3D84:2' ise_id='7802' direction='RECEIVER' parent_device='4740' index='2' group_partner='' aes_available='false' transmission_mode='AES' visible='true' ready_config='true' operate='true' /><channel name='HmIP-SMO 000955699D3D84:3' type='26' address='0
00955699D3D84:3' ise_id='7803' direction='UNKNOWN' parent_device='4740' index='3' group_partner='' aes_available='false' transmission_mode='AES' visible='false' ready_config='true' operate='true' /></device><device name='Bewegungsmelder Garage' address='000955699D3D84:1'
 ise_id='4763' interface='HmIP-RF' device_type='MOTIONDETECTOR_TRANSCEIVER' ready_config='true'></deviceList>

[Sat, 17 Feb 2024 14:13:14 CET] ERROR devicelist returned error: XML syntax error on line 1: element <device> closed by </deviceList>

the closing </device> before </devicelist> is missed.

Without the device_id parameter it has the correct output

@Maik2208
Copy link
Contributor

The problem occurs if you enter the ise_id of a channel and not of a device as device_id

Maik2208 added a commit to Maik2208/XML-API that referenced this issue Mar 14, 2024
Only process devices. This fixes homematic-community#93
@Maik2208 Maik2208 linked a pull request Mar 14, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants