AlexxIT / DashCast

DashCast component for Home Assistant
https://github.com/AlexxIT/Blog
MIT License
128 stars 7 forks source link

Dashcast stopped working after updating to HA 2024.3 #15

Closed Lamarqe closed 3 months ago

Lamarqe commented 4 months ago

After updating to HA 2024.3, all my dashcast based automations fail with the following error:

  File "/config/custom_components/dash_cast/__init__.py", line 25, in play_media
    dash.load_url(url, force)
TypeError: DashCastController.load_url() takes 2 positional arguments but 3 were given

I guess it is caused by an additional parameter of load_url() which was recently added to pychromecast: https://github.com/home-assistant-libs/pychromecast/commit/540fd674201b15d4242e1d123560dcb737d7cb80

This seems to be part of home assistants effort to improve their APIs: https://github.com/home-assistant-libs/pychromecast/pull/779

This is the first step in refactoring the callback functions to accept a bool status and an optional response.

llewy commented 4 months ago

Same error over here, is there a workaround any of you guys know of?

Using my Nest Hub as a baby monitor 😉

Lamarqe commented 4 months ago

is there a workaround any of you guys know of?

Use the automatically generated backup and revert to 2024.2.

BeeSci commented 4 months ago

Same error message "TypeError: DashCastController.load_url() takes 2 positional arguments but 3 were given" here. Fix "dash.load_url(url, force=force)" was applied but did not help. Reverting to HA core V 2024.2.5 via backup solved the problem (temporarily).

llewy commented 4 months ago

Reinstalling both Dashcast and WebRTC with master branch did the trick for me. Don’t forget to reboot.

Op za 9 mrt 2024 om 19:01 schreef BeeSci @.***>

Same error message "TypeError: DashCastController.load_url() takes 2 positional arguments but 3 were given" here. Fix "dash.load_url(url, force=force)" was applied but did not help. Reverting to HA core V 2024.2.5 via backup solved the problem (temporarily).

— Reply to this email directly, view it on GitHub https://github.com/AlexxIT/DashCast/issues/15#issuecomment-1986932179, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEALR5M5Y57Q2UFQTJJ5SDYXNFAXAVCNFSM6AAAAABEKNJIMKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBWHEZTEMJXHE . You are receiving this because you commented.Message ID: @.***>

BeeSci commented 4 months ago

Reinstalling both Dashcast and WebRTC with master branch did the trick for me. Don’t forget to reboot. Op za 9 mrt 2024 om 19:01 schreef BeeSci @.***>

I can confirm that the @llewy procedure works. 👍

rralex89 commented 4 months ago

that solution didn't work for me. but maybe i did something wrong. i'll just wait for @AlexxIT to find enough time to give us an official resolution. Thanks for all the work!

rralex89 commented 3 months ago

gave it another go today, manually installing DashCast today after reinstalling webrtc. still no luck:

2024-04-02 05:58:26.728 ERROR (SyncWorker_30) [custom_components.webrtc.utils] Can't DashCast to ['media_player.office_display'] Traceback (most recent call last): File "/config/custom_components/webrtc/utils.py", line 191, in dash_cast entity.dashcast.load_url(url, force) TypeError: DashCastController.load_url() takes 2 positional arguments but 3 were given

AlexxIT commented 3 months ago

https://github.com/AlexxIT/DashCast/releases/tag/v1.1.0

rralex89 commented 3 months ago

hey Alex! Thanks for the code. it still doesn't work, same error. Question: does it work for you? Maybe i'm doing something wrong

AlexxIT commented 3 months ago

Show exact error

rralex89 commented 3 months ago

surething. i'm trying to run this script:

alias: Play BabyCam on Office Display
sequence:
  - service: webrtc.dash_cast
    data:
      entity_id: media_player.office_display
      force: true
      entity: camera.baby_s_room_hd_stream
      extra:
        mode: webrtc, mse
        media: audio, video
        muted: false
mode: single
icon: mdi:baby

and i'm getting this in debug:

Traceback (most recent call last): File "/config/custom_components/webrtc/utils.py", line 191, in dash_cast entity.dashcast.load_url(url, force) TypeError: DashCastController.load_url() takes 2 positional arguments but 3 were given 2024-04-07 10:09:39.481 ERROR (SyncWorker_4) [custom_components.webrtc.utils] Can't DashCast to ['media_player.office_display']

the mediaplayer itself is a google hub 2nd gen.

AlexxIT commented 3 months ago

You showing error from another integration. This error not related to this integration.

rralex89 commented 3 months ago

right. it's from WebRTC Camera, but that integrations works great. strams are working ok, i just can't use it to dashcast. let me open an issue in WebRTC as well. i believe it's also your creation :)

rralex89 commented 3 months ago

so no use for a new bug. i manually downloaded the latest code from the WebRTC master branch as i saw you fixed it in that. now it works. The problem was that i was using the latest release in HACS, that does not include your fix.

@AlexxIT thank you really muhc for your work! i assure you that it is higly appreciated!

rralex89 commented 3 months ago

@AlexxIT please accept my modest donation in your TRX account :) thank you for all your work

AlexxIT commented 3 months ago

Thanks! Got it.