AlexxIT / WebRTC

Home Assistant custom component for real-time viewing of almost any camera stream using WebRTC and other technologies.
https://github.com/AlexxIT/Blog
MIT License
1.52k stars 180 forks source link

webrtc broken after update to core 2022.7 #321

Closed Claudio1L closed 2 years ago

Claudio1L commented 2 years ago

after update to 2022.7, logged "login attempt failed"

sesardelaisla commented 2 years ago

I don’t see WebRTC video feed in dashboard either after updating HA to 2022.7.0. However, I cannot see MotionEye cameras in dashboard too, despite they are displayed in MotionEye config. I think this is an issue related to how the cameras are handled in dashboards in the new HA version, not with WebRTC or MotionEye integrations themselves. Just saying in case it gives a clue about where the problem is.

gody01 commented 2 years ago

+1

fotis3d commented 2 years ago

+1 here. I get Login failed. Though the same rtsp in VLC works just fine.

aljubori commented 2 years ago

Same here after upgrading to 2022.7.0.

edwRoland commented 2 years ago

+1 same here

pickonedev commented 2 years ago

Same problem, login failed, ban ip :-)

sesardelaisla commented 2 years ago

Just in case it helps, I just realized that MotionEye cameras started working again in dashboards. However, WebRTC cameras don't, so it seems the issue is related to some sort of HA Core 2022.7.0 - WebRTC compatibility issue. I have read somewhere that it could be related to the fact that python version was updated in HA Core 2022.7.0, so it might be needed to update WebRTC accordingly.

miit86 commented 2 years ago

same as #318 also you can use the fix in #318

Claudio1L commented 2 years ago

same as #318 also you can use the fix in #318

not working for me. For this reason opened another bug

miit86 commented 2 years ago

@Claudio1L did you follow the steps? it is the same bug..!

I've tested it on android, edge, chrome and an old android (had to clear cache and reboot) tested from LAN and WAN both fully functional with Sound. when you use ip-ban make sure you don't open the stream until you cleared the cache, else it will put your ip on the list.

  1. you have to replace "webrtc-camera.js"
  2. remove the pycache from the webrtc folder
  3. clear the cache from HA app in android.
  4. clear browsing data in chrome/edge.
Claudio1L commented 2 years ago

@miit86 just did again from scratch. Removed webrt integration, redownloaded from hacs, rebooted, applied https://github.com/AlexxIT/WebRTC/pull/320/commits/38c77b400f86f20a42e0b8103bb01f6a0a7377eb

rebooted

results: immagine

Claudio1L commented 2 years ago

The only point I don't understand is the following: I have no reference related to IP_Ban in the configuration.yaml Have to add something?

miit86 commented 2 years ago

@Claudio1L

did you clear the cache on your android or browser? can you try a inprivate window?

no if you don't use the ipban in you config. you dont have to worry about getting banned.

Claudio1L commented 2 years ago

Yes, cleared everything, used different browsers from my Mac. Nothing

On 7 Jul 2022, at 14:06, miit86 @.***> wrote:

@Claudio1L https://github.com/Claudio1L did you clear the cache on your android or browser? no if you don't use the ipban in you config. you dont have to do anyhting

— Reply to this email directly, view it on GitHub https://github.com/AlexxIT/WebRTC/issues/321#issuecomment-1177503879, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXK6MPTJBIGTOEQSVVKXRBLVS3B4DANCNFSM524CXYVQ. You are receiving this because you were mentioned.

miit86 commented 2 years ago

hmmzz, I havent got a mac, so I can't test it for you. do you have a windows PC or an Android device. and test it?

Claudio1L commented 2 years ago

Same from a windows vm

On 7 Jul 2022, at 14:10, miit86 @.***> wrote:

hmmzz, I havent got a mac, so I can't test it for you. do you have a windows PC or an Android device. and test it?

— Reply to this email directly, view it on GitHub https://github.com/AlexxIT/WebRTC/issues/321#issuecomment-1177508517, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXK6MPQNMVE5TP53LL3BIT3VS3CJZANCNFSM524CXYVQ. You are receiving this because you were mentioned.

Claudio1L commented 2 years ago

Anyway thanks @miit86 for your effort. Let's wait for a consolidated fix

miit86 commented 2 years ago

oke, did you remove the pycache from folder: \config\custom_components\webrtc after your replaced webrtc-camera.js

DT00689 commented 2 years ago

I replaced the webrtc-camera.js file, removed the pycache folder, restarted HA, cleared browser cache. Still getting the same issue. Feed says restart connection after a few seconds

lexstoj commented 2 years ago

where do i find webrtc-camera.js file?

vmakeev commented 2 years ago

@Claudio1L try to apply https://github.com/AlexxIT/WebRTC/pull/320 and remove special characters from camera's login/password (if exists). It works for me. And change "version" at webrtc-camera.js file

Claudio1L commented 2 years ago

@Claudio1L try to apply #320 and remove special characters from camera's login/password (if exists). It works for me. And change "version" at webrtc-camera.js file

was working from 3 month at least. Why should login/password be corrupted now?

freirejc commented 2 years ago

+1

robertoleonardo commented 2 years ago

+1

canuckray commented 2 years ago

for what it's worth..... +1

atkjedi commented 2 years ago

+1 and I am not using ip_ban

luixal commented 2 years ago

+1 Here! :)

JunghaJungha commented 2 years ago

another +1 here

canuckray commented 2 years ago

I rolled back while a solution is worked on (I tried the workarounds discussed, but had no success).

On a positive note, I'm happy to report that Home Assistant backup rollback functionality works awesome! Haha

vmakeev commented 2 years ago

was working from 3 month at least. Why should login/password be corrupted now?

Double URL encoding I think

VolkerLaude commented 2 years ago

+1

WMWong78 commented 2 years ago

+1 rolled back to previous HA version and working again.

Murder3D commented 2 years ago

+1, after the last HA update it isn't working anymore.

It doesn't load the stream from a Windows PC running Chrome. It doesn't load the stream from the iOS Companion App. It doesn't load the stream from Fully Kiosk Browser running on a tablet.

Getting the same error on every device I use:

Login attempt failed Login attempt or request with invalid authentication from blablabla (192.168.1.xxx). See the log for details.

MRBetes commented 2 years ago

Same problem,

dandanarsk commented 2 years ago

Strange that this happens same time as the camera authorisation problems from Synology DSM... #74630

JunghaJungha commented 2 years ago

Also reolink camera issues with 2022.7 HA. https://github.com/fwestenberg/reolink_dev/issues/525#issue-1290622078

mariusnauj commented 2 years ago

Yes, not working even with version 7.1. I replaced the webrtc-camera.js file, removed the pycache folder, restarted HA, cleared browser cache. Tryied with different browsers. Still getting the same issue. Feed says restart connection after a few seconds

Claudio1L commented 2 years ago

after update to core 2022.7.1 Cameras are working again without touching anything! I left there all the fix from https://github.com/AlexxIT/WebRTC/pull/320/commits, I haven't tried without them because I don't want to touch anything now that is working.

immagine

miit86 commented 2 years ago

@Claudio1L

would you mind to check the version of "webrtc-camera.js" you have. is it the patched one or the original?

Just Curious, because after an update the cache is cleared.

Claudio1L commented 2 years ago

not clear where to check the version of "webrtc-camera.js". I don't see any "version" field inside the file. It should be the orgiginal with applied the fixes from https://github.com/AlexxIT/WebRTC/pull/320/commits

I deleted pycache content multiple times during testing yersterday

Claudio1L commented 2 years ago

unfortunately, from iphone the issue is still there, both in local and from Nabucasa Cloud WhatsApp Image 2022-07-08 at 12 35 28 .

mariusnauj commented 2 years ago

Tryied reinstall WebRTC, confgure from new, bet result the same still not working.

J0nnyBr4v0 commented 2 years ago

same here. have also ip bans activated and due to connection fails to the cams. HA also bann all my clients which tries to load the lovelace view. `http: ip_ban_enabled: true login_attempts_threshold: 4 use_x_forwarded_for: true trusted_proxies:

Gferretta commented 2 years ago

@Claudio1L did you follow the steps? it is the same bug..!

I've tested it on android, edge, chrome and an old android (had to clear cache and reboot) tested from LAN and WAN both fully functional with Sound. when you use ip-ban make sure you don't open the stream until you cleared the cache, else it will put your ip on the list.

  1. you have to replace "webrtc-camera.js"
  2. remove the pycache from the webrtc folder
  3. clear the cache from HA app in android.
  4. clear browsing data in chrome/edge.

This hack work perfectly in 2022.7.0 also 2022.7.1 Thanks

harambe88 commented 2 years ago

Same here: no stream, but Frigate NVR is recording video and clips.

mariusnauj commented 2 years ago

For me this hack not working always appearing message restart connection.

DT00689 commented 2 years ago

Hack did not work for me in 7.0 or 7.1

Maison-GIDON commented 2 years ago

this hack works perfectly ! thanks !!! https://github.com/AlexxIT/WebRTC/pull/320/commits/8f057469562900eaed34ce271d85476a1edeb64a

thefunkygibbon commented 2 years ago

just replaced the webrtc-camera.js from the latest commit and restarted, get the exact same issue. running 2022.7.1

Gferretta commented 2 years ago

just replaced the webrtc-camera.js from the latest commit and restarted, get the exact same issue. running 2022.7.1

Not "only replaced" All the step and order are important and then all cameras working fine!