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

Dashcast stopped working after updating to HA 2024.3 #15

Closed
Lamarqe opened this issue Mar 7, 2024 · 16 comments · Fixed by #16
Closed

Dashcast stopped working after updating to HA 2024.3 #15

Lamarqe opened this issue Mar 7, 2024 · 16 comments · Fixed by #16
Assignees
Labels
bug Something isn't working

Comments

@Lamarqe
Copy link

Lamarqe commented Mar 7, 2024

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:
home-assistant-libs/pychromecast@540fd67

This seems to be part of home assistants effort to improve their APIs:
home-assistant-libs/pychromecast#779

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

@AlexxIT AlexxIT added the bug Something isn't working label Mar 7, 2024
@AlexxIT AlexxIT self-assigned this Mar 7, 2024
@llewy
Copy link

llewy commented Mar 7, 2024

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

Using my Nest Hub as a baby monitor 😉

@Lamarqe
Copy link
Author

Lamarqe commented Mar 7, 2024

is there a workaround any of you guys know of?

Use the automatically generated backup and revert to 2024.2.

@BeeSci
Copy link

BeeSci commented Mar 9, 2024

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
Copy link

llewy commented Mar 9, 2024 via email

@BeeSci
Copy link

BeeSci commented Mar 9, 2024

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. 👍

  • Remove webrtc camera and dashcast in the HA integrations section.
  • Delete both integrations in HACS.
  • Restart HA.
  • Add integration webrtc camera in HACS, select Master for download.
  • Add integration dashcast in HACS
  • Add both integrations in HA integrations section.
  • Restart HA.
  • Upgrade HA core to version 2024.3.0
    Thank you so much @llewy

@rralex89
Copy link

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
Copy link

rralex89 commented Apr 2, 2024

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
Copy link
Owner

AlexxIT commented Apr 7, 2024

@AlexxIT AlexxIT closed this as completed Apr 7, 2024
@rralex89
Copy link

rralex89 commented Apr 7, 2024

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
Copy link
Owner

AlexxIT commented Apr 7, 2024

Show exact error

@rralex89
Copy link

rralex89 commented Apr 7, 2024

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
Copy link
Owner

AlexxIT commented Apr 7, 2024

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

@rralex89
Copy link

rralex89 commented Apr 7, 2024

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
Copy link

rralex89 commented Apr 7, 2024

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
Copy link

rralex89 commented Apr 7, 2024

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

@AlexxIT
Copy link
Owner

AlexxIT commented Apr 7, 2024

Thanks! Got it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants