Dashcast app (Working Code + Help needed)

I was looking for a way to cast a HADashboard to my Chromecast, without having to cast a tab from a browser.
Luckily, pychromecast has support for DashCast. Unfortunately there seems to be no built-in way to use it from within HA, so I decided to write an AppDaemon app for it:

https://bitbucket.org/DarkFox/homeassistant/src/2e803eb5e913a09bd67e628d8278aabc2b317a8f/appdaemon/apps/dashcast.py?at=master&fileviewer=file-view-default

At the moment, it takes a URL and the IP address of the Cast device.

The stuff I need help with:
I’m running the AppDaemon add-on in hass.io, and it seems like it doesn’t have support for mdns/bonjour/autodisccovery, so unfortunately I can’t select the Cast device by friendly name like I wanted to (see commented out code).

I’ve spent some time trying to add the mdns packages, but I didn’t have any luck. Any help would be appreciated.

1 Like

the idea is nice, but i am afraid it wont work with hassio.
when i understood correctly, things that you want to discover from outside a docker or be visible on the network, need to be declared in the docker setup. (the addon creator needs to do that)

so unless you find a way to expose it through the dashboard, or the appdaemon api, i think you did run into hassio restrictions.

stuff like this is more advanced use from your server(s), hassio is more for people who dont want to tinker in a linux/python environment.

by the way, it could be that my answer is wrong, because i am confused with your question.
after reading the fourth time i am sure i have it wrong, but still dont know what it is you want, what doesnt work. :wink:

I think you’re partly right. What isn’t working, is the autodiscovery (by receiving the UDP broadcasts from the cast devices). It works just fine as long as I specify the IP address of the cast device, so it can connect directly.

if i understand that correctly, you are not able to listen to the network, but you can make a connection directly.
so only a minor disfunction.

for me that is fully functional. because i dont want autodiscover functions anyway (i rather give in settings myself then that my home automation changes settings)

ill take a closer look at it myself later on. to look if i can use this to send dashboards to my tv by using an automation.

I have tested Dashcast months ago and it worked. HASS GUI was sent to my TV. I didn’t have much time and didn’t look much into it but it seemed it didn’t work reliably. After some time if I used Chromecast for something else it wouldn’t be sent.

FYI I was using some ready made docker container.
I can share my configuration later if you wish.

Sure, I’d love to see different solutions to this issue. I’m also wondering if making it into a component could somehow make it easier to do autodiscovery, possibly leveraging the already-discovered cast devices.

Here it is:

MY docker-compose.yaml for the container:

version: '2.2'
 
services:
  dashcast:
    image: madmod/dashcast:latest
    container_name: dashcast
    restart: always
    network_mode: host
    environment:
      DASHBOARD_URL: '<dashboard URL>'
      DISPLAY_NAME: ''
      IGNORE_CEC: 'True'

After starting the container, and switching TV to chromecast I can see the dashboard webpage.

1 Like

Hi!

I really want to achieve casting my UI to a chromecast (See here: UI Authentication via single URL?)

I dunno much about AppDaemon or containers, or if this relevant to hassio.
Could someone please confirm if this can run on hassio and give me a step-by-step?

it can work on hassio, but you need appdaemon setup and add the dashcast lib to the addon setup.

it isnt something that can be done easy if you dont know anything about programming python and using appdaemon.

1 Like

Hello @DarkFox ,
how can I run your appdeamon dashcast app? I am using AppDeamon3 addon, I copied your dashcast.py , adde pychromecast package and altered apps.yaml Should I hardcode receiver and url into dashcast.py? Last log lines:

2018-11-24 17:35:20.392577 INFO dashcast: Init Dashcast
2018-11-24 17:35:20.392932 INFO AppDaemon: App initialization complete

What should I do next? Sorry but this is my first experiance with appdeamon.

Thank you.