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
Error parsing body: Error: Non-whitespace before first tag. Line: 0 Column: 1 Char: - #5
Comments
I see from your screenshot that you have been using a previous version as the device IDs still contain colons. I removed colons from the IDs to be more consistent in 0.0.5. For this reason you should remove the existing devices and they will be re-created when events are recieved. I don't see why if parsing was working before that it isn't now though. I didn't change anything around that. Please turn debug on for the adapter and post the XML received here so I can see exactly what the camera is sending. Looks like we will need to trim whitespace before parsing or something. |
I see... whatever camera that is (what model is this?) it is sending the XML in part of a multipart message. Can you please copy/paste the data here properly (not in an image) so I can use as test data? |
Sorry but I don't know how to get this file. Model: DS-2DE2A404IW-DE3 and DS-2DE3A404IW-DE/W |
In the browser you are looking at, instead of taking the screenshot, just select the message, copy, then paste here. Alternatively, there is a 'DOWNLOAD LOG' button at the top of the ioBroker log screen. If you download that you can attach it here. However, those log files can be large and contain sensitive information so be careful. |
No. It's stripping lots of XML. Download the log locally, open it in your favourite text editor, find the payload and try copy that. |
Sample payloads from @BlackandGold1: --boundary Content-Disposition: form-data; name="AudioException.xml"; filename="AudioException.xml" Content-Type: application/xml Content-Length: 686
<?xml version="1.0" encoding="UTF-8"?>
<EventNotificationAlert version="2.0"
xmlns="http://www.hikvision.com/ver20/XMLSchema">
<ipAddress>10.11.12.101</ipAddress>
<portNo>8089</portNo>
<protocol>HTTP</protocol>
<macAddress>44:a6:42:a6:40:0d</macAddress>
<channelID>1</channelID>
<dateTime>2022-12-11T17:58:28+01:00</dateTime>
<activePostCount>1</activePostCount>
<eventType>audioexception</eventType>
<eventState>active</eventState>
<eventDescription>audioexception alarm</eventDescription>
<channelName>IPdome</channelName>
<AudioExceptionDetection>
<alarmType>increase</alarmType>
<audioDecibel>51</audioDecibel>
</AudioExceptionDetection>
</EventNotificationAlert>
--boundary-- --boundary Content-Disposition: form-data; name="MoveDetection.xml"; filename="MoveDetection.xml" Content-Type: application/xml Content-Length: 2266
<?xml version="1.0" encoding="UTF-8"?>
<EventNotificationAlert version="2.0"
xmlns="http://www.hikvision.com/ver20/XMLSchema">
<ipAddress>10.11.12.101</ipAddress>
<portNo>8089</portNo>
<protocol>HTTP</protocol>
<macAddress>44:a6:42:a6:40:0d</macAddress>
<channelID>1</channelID>
<dateTime>2022-12-11T17:58:28+01:00</dateTime>
<activePostCount>1</activePostCount>
<eventType>VMD</eventType>
<eventState>active</eventState>
<eventDescription>Motion alarm</eventDescription>
<DetectionRegionList>
<DetectionRegionEntry>
<regionID>3</regionID>
<sensitivityLevel>50</sensitivityLevel>
<RegionCoordinatesList>
<RegionCoordinates>
<positionX>383</positionX>
<positionY>0</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>638</positionX>
<positionY>0</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>638</positionX>
<positionY>284</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>383</positionX>
<positionY>284</positionY>
</RegionCoordinates>
</RegionCoordinatesList>
</DetectionRegionEntry>
<DetectionRegionEntry>
<regionID>5</regionID>
<sensitivityLevel>50</sensitivityLevel>
<RegionCoordinatesList>
<RegionCoordinates>
<positionX>7</positionX>
<positionY>178</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>244</positionX>
<positionY>178</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>244</positionX>
<positionY>517</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>7</positionX>
<positionY>517</positionY>
</RegionCoordinates>
</RegionCoordinatesList>
</DetectionRegionEntry>
<DetectionRegionEntry>
<regionID>6</regionID>
<sensitivityLevel>50</sensitivityLevel>
<RegionCoordinatesList>
<RegionCoordinates>
<positionX>39</positionX>
<positionY>401</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>216</positionX>
<positionY>401</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>216</positionX>
<positionY>691</positionY>
</RegionCoordinates>
<RegionCoordinates>
<positionX>39</positionX>
<positionY>691</positionY>
</RegionCoordinates>
</RegionCoordinatesList>
</DetectionRegionEntry>
</DetectionRegionList>
<channelName>IPdome</channelName>
</EventNotificationAlert>
--boundary-- |
Sorry I don't understand |
I extracted the payloads from the files you attached then deleted for your privacy. I will now work on a fix and report back. |
@BlackandGold1 ... I have added some logging as need to know what headers your cameras are sending. Could you please install the dev branch, run with debug, and send me the log file produced (email address on profile). To install the dev branch, go to your ioBroker install (generally
|
God I am stupid. Yes I installed it and he successfully made an update.
|
Hallo,
leider macht der Adapter bei mir nichts. Habe die aktuelle Version 0.0.5.
In den Objekten sind beide Kameras zu sehen anhand ihrer Mac und stehen immer auf false.
Im log habe ich folgendes stehen:
hikvision-alarmserver.0 | 2022-12-10 14:58:42.750 | error | Error parsing body: Error: Non-whitespace before first tag. Line: 0 Column: 1 Char: -
Die Einstellungen in den Cams sind gemacht und laut Test erreichbar.
leider weiß ich nicht weiter und hoffe auf Hilfe.
The text was updated successfully, but these errors were encountered: