AdyRock / com.onvif

Homey app for ONVIF cameras
GNU General Public License v3.0
6 stars 6 forks source link

Invalid image buffer #10

Closed Oooklart closed 2 years ago

Oooklart commented 4 years ago

I have tried to add the camera a bunch of times but still no picture. Invalid_picture_buffer Screenshot_20200913_081812_app homey

Oooklart commented 4 years ago

Strange 🤔 I pushed send plenty of times. I can't the text is moving so I can't select it and past it here.

Oooklart commented 4 years ago

I managed to select and copy the log now 😊 The strange thing is I removed the camera from homey and installed it again, for now the motion is working but I don't know for how long.

Log ID: 2020-09-19T07:19:30.098Z App version 1.1.13

+0:0:0.000: parseSOAPString: <?xml version="1.0" encoding="UTF-8"?>

http://192.168.68.155:8000/onvif/PullSubManager?Idx=00_02020-09-19T07:19:30Z2020-09-19T07:23:00Z +0:0:0.017: _request: { "protocol": "http:", "slashes": true, "auth": null, "host": "192.168.68.155:8000", "port": "8000", "hostname": "192.168.68.155", "hash": null, "search": "?Idx=00_0", "query": "Idx=00_0", "pathname": "/onvif/PullSubManager", "path": "/onvif/PullSubManager?Idx=00_0", "href": "http://192.168.68.155:8000/onvif/PullSubManager?Idx=00_0", "headers": { "Content-Type": "application/soap+xml", "Content-Length": 1052, "charset": "utf-8" }, "method": "POST" } Body: adminfUc1ZES5551WxSFaKMCXAjgP5SY=WPwLmdhQxGEvlcFvqW4jWg==2020-09-19T07:19:28.894Zhttp://192.168.68.155:8000/onvif/PullSubManager?Idx=00_0PT60S +0:0:0.010: _request: { "protocol": "http:", "slashes": true, "auth": null, "host": "192.168.68.155:8000", "port": "8000", "hostname": "192.168.68.155", "hash": null, "search": "?Idx=00_0", "query": "Idx=00_0", "pathname": "/onvif/PullSubManager", "path": "/onvif/PullSubManager?Idx=00_0", "href": "http://192.168.68.155:8000/onvif/PullSubManager?Idx=00_0", "headers": { "Content-Type": "application/soap+xml", "Content-Length": 1084, "charset": "utf-8" }, "method": "POST" } Body: adminb4kwk9bMcRGjSAtBgeBJPLSG05c=SP0ElmIsq/zgV1eF1Z+Vkw==2020-09-19T07:19:28.904Zhttp://192.168.68.155:8000/onvif/PullSubManager?Idx=00_0PT5S10 +0:0:0.130: parseSOAPString: http://192.168.68.155:8000/onvif/PullSubManager?Idx=00_02020-09-19T07:20:00Z2020-09-19T07:19:30Z +0:0:4.858: _request: { "hostname": "192.168.68.155", "port": 8000, "agent": false, "path": "/onvif/device_service", "timeout": 70000, "headers": { "Content-Type": "application/soap+xml", "Content-Length": 261, "charset": "utf-8" }, "method": "POST" } Body: +0:0:0.889: parseSOAPString: ManualfalseGMT-1:00:00DST-2:00:00,M3.4.0/03:00:00,M10.4.0/02:00:00719352020919919352020919 +0:0:0.247: parseSOAPString: http://192.168.68.155:8000/onvif/PullSubManager?Idx=00_02020-09-19T07:19:36Z2020-09-19T07:24:00Z +0:0:0.058: _request: { "protocol": "http:", "slashes": true, "auth": null, "host": "192.168.68.155:8000", "port": "8000", "hostname": "192.168.68.155", "hash": null, "search": "?Idx=00_0", "query": "Idx=00_0", "pathname": "/onvif/PullSubManager", "path": "/onvif/PullSubManager?Idx=00_0", "href": "http://192.168.68.155:8000/onvif/PullSubManager?Idx=00_0", "headers": { "Content-Type": "application/soap+xml", "Content-Length": 1052, "charset": "utf-8" }, "method": "POST" } Body: admintGXqxnDFAfKukAXl2DwRdViBcpk=OohGCntYoaRd4vWAdTlmng==2020-09-19T07:19:35.078Zhttp://192.168.68.155:8000/onvif/PullSubManager?Idx=00_0PT60S +0:0:0.039: _request: { "protocol": "http:", "slashes": true, "auth": null, "host": "192.168.68.155:8000", "port": "8000", "hostname": "192.168.68.155", "hash": null, "search": "?Idx=00_0", "query": "Idx=00_0", "pathname": "/onvif/PullSubManager", "path": "/onvif/PullSubManager?Idx=00_0", "href": "http://192.168.68.155:8000/onvif/PullSubManager?Idx=00_0", "headers": { "Content-Type": "application/soap+xml", "Content-Length": 1084, "charset": "utf-8" }, "method": "POST" } Body: adminPlVwRaF67h0rtzP3GwXYTRpUZBU=+rZzYliTzlc/dMsqtSYmJw==2020-09-19T07:19:35.123Zhttp://192.168.68.155:8000/onvif/PullSubManager?Idx=00_0PT5S10 +0:0:0.263: parseSOAPString: http://192.168.68.155:8000/onvif/PullSubManager?Idx=00_02020-09-19T07:20:00Z2020-09-19T07:19:36Z +0:0:3.963: Sending log +0:0:1.882: parseSOAPString: http://192.168.68.155:8000/onvif/PullSubManager?Idx=00_02020-09-19T07:19:42Z2020-09-19T07:26:00Z +0:0:0.021: _request: { "protocol": "http:", "slashes": true, "auth": null, "host": "192.168.68.155:8000", "port": "8000", "hostname": "192.168.68.155", "hash": null, "search": "?Idx=00_0", "query": "Idx=00_0", "pathname": "/onvif/PullSubManager", "path": "/onvif/PullSubManager?Idx=00_0", "href": "http://192.168.68.155:8000/onvif/PullSubManager?Idx=00_0", "headers": { "Content-Type": "application/soap+xml", "Content-Length": 1052, "charset": "utf-8" }, "method": "POST" } Body: adminTEjULQ1+mjku/Q6QkbWN9J9pbs8=4LkM4p1JcwuniyA6sheC6Q==2020-09-19T07:19:41.253Zhttp://192.168.68.155:8000/onvif/PullSubManager?Idx=00_0PT60S +0:0:0.021: _request: { "protocol": "http:", "slashes": true, "auth": null, "host": "192.168.68.155:8000", "port": "8000", "hostname": "192.168.68.155", "hash": null, "search": "?Idx=00_0", "query": "Idx=00_0", "pathname": "/onvif/PullSubManager", "path": "/onvif/PullSubManager?Idx=00_0", "href": "http://192.168.68.155:8000/onvif/PullSubManager?Idx=00_0", "headers": { "Content-Type": "application/soap+xml", "Content-Length": 1084, "charset": "utf-8" }, "method": "POST" } Body: adminN/g8WH5JF8VprtiCwWZfVtzz6mo=gApJ7MuI+mCvgI3bKsyyrw==2020-09-19T07:19:41.273Zhttp://192.168.68.155:8000/onvif/PullSubManager?Idx=00_0PT5S10 +0:0:0.214: parseSOAPString: http://192.168.68.155:8000/onvif/PullSubManager?Idx=00_02020-09-19T07:20:00Z2020-09-19T07:19:42Z
AdyRock commented 4 years ago

I have received the above log from you today. For some reason I do seem to lose one occasionally. You mentioned previously that when you plugged the camera in to the network the IP address changed. So I wonder if one of the camera parameters didn't refresh with new new IP as I think the constant failures were just after that. But I have 7 different apps and for some reason there has been a surge of strange issues over the last week so I am getting a bit confused :-)

One thing that I have noticed in the log though is it's going through the Renew path and not the Create path. I think the way I am handling a failure in the request might be to retry the Create again. That is one of the problems of using callbacks instead of promises as the order of operations can't be guaranteed. I don't think that will cause a problem but as there is no precise specification about the supported features and and sequence it has to be in the mix.

If things go wrong again then send the log of the failures.

Oooklart commented 4 years ago

Today my zigbee network on homey died 😔 so I have tried to fix this with a factory reset and Uninstalled all apps but without any luck. I will receive my new homey next week so I will continue to test the app then.

AdyRock commented 4 years ago

Oh, not good. Hope the new one comes soon and you get back up and running smoothly.

Oooklart commented 4 years ago

Alright! Now I'm up and running with my new pro 😃 The problem is still there, motion works for a while but then it stops and it won't start when I turn it off/on. Sent you a lot.

Here is a sample of the log. +0:0:0.010: !!!!! createPullPointSubscription error: {}

+0:0:0.005: !!!!! _eventPull error 1: {}

+0:0:1.067: !!!!! parseSOAPString error 2: {} --- xml: <?xml version="1.0" encoding="UTF-8"?>

SOAP-ENV:Sender
Oooklart commented 4 years ago

I'm not able to get motion sensor to work again, restarted the app and turned motion off/on

AdyRock commented 4 years ago

What camera is it? The data being sent appears to be OK but the cameras is rejecting it for some reason. Unfortunately the returned message doesn't actually contain a reason. If the cameras is not too expensive I might get one to try.

Oooklart commented 4 years ago

Oh, that's strange. The camera is a reolink RLC-410W 4MP. I bought it on Amazon.de, here is a link https://www.amazon.de/dp/B07CN1DZHH/ref=cm_sw_r_cp_apap_ApWZoKyBYP4E2

AdyRock commented 4 years ago

OK, I have ordered one and it should be here tomorrow.

Oooklart commented 4 years ago

Wow that's awesome 🙏 So you think it's the camera that causes this problem?

AdyRock commented 4 years ago

Well, I have a Hikvision camera and an H.View camera, both of which run 24/7 with motion detection on. We already know Reolink return a strange IP address in the reply to createPullPointSubscription (when it works) so there could be some other strange things happening. By having a camera I can try things much more rapidly and hopefully get to the seat of the problem.

AdyRock commented 4 years ago

The camera arrived this afternoon and it setup straight away. I'm quite impressed with it so far. Motion has been enabled in the Homey app for about 5 hours so far and hasn't missed a beat. It's had lots of events and my phone has been going crazy with notifications. How long would you say it takes yours to stop working?

Oooklart commented 4 years ago

Yes the images are really good, I have the highest quality 🙂 the motion sensor is very sensitive, even at the lowest, it trigger motion when a light turns on/off even sunlight. I have made some flows with timers so that motion won't trigger lights when lights turns off at night. My motion stops between 2 and 12 hours. Have you updated the camera? I have, maybe it can be something there. IMG_20200925_204847

Oooklart commented 4 years ago

Now I reboot my camera every 10 hours and so far motion seems to be working. I also think that I need to reboot the camera every time I have made a change on the cameras settings.

I have also some strange things in my flows. This one is working fine: Screenshot_2020-09-26-12-25-44-295_app homey

This one is not working, I have also one flow that take a snapshot and send it but then this flow should send a snapshot, right? Screenshot_2020-09-26-12-26-25-762_app homey

And this one don't work so good. Almost every time one of us get an blank image, if I deleted one of us it works fine. Screenshot_2020-09-26-12-27-25-720_app homey