https://github.com/robertmuth/mqtt2cast
MQTT to Google Cast Bridge
https://github.com/robertmuth/mqtt2cast
chromecast mqtt python3
Last synced: 29 days ago
JSON representation
MQTT to Google Cast Bridge
- Host: GitHub
- URL: https://github.com/robertmuth/mqtt2cast
- Owner: robertmuth
- License: gpl-3.0
- Created: 2020-02-17T16:45:28.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-03-31T03:01:59.000Z (about 5 years ago)
- Last Synced: 2025-06-04T20:24:00.242Z (about 1 year ago)
- Topics: chromecast, mqtt, python3
- Language: Python
- Homepage:
- Size: 44.9 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## MQTT <-> Google Cast Bridge
Mote: this is very much work in progress.
Typical invocation
```
./mqtt2cast.py --verbose --use_zeroconf --mqtt_broker MQTT-BROKER
```
### MQTT messages
#### Messages that the bridges is listening for
* `mqtt2cast/action/CAST-DEVICE/play_media` ` []`
Play/Show the given media file (can be a playlist
* `mqtt2cast/action/CAST-DEVICE/load_url` ``
Display a URL (does not work for all URLs)
* `mqtt2cast/action/CAST-DEVICE/queue_next`
Skip current song - extremely flaky, needs more work
* `mqtt2cast/action/CAST-DEVICE/set_volume` ``
CAST-DEVICE is on off:
* ip-address
* friendly name
* empty string which means all devices will receive the command
Testing
```
mosquitto_pub -h BORKER -t "mqtt2cast/action/CAST-DEVICE/play_media" -m "http://somafm.com/lush130.pls"
```
#### Message that the bridge is emitting
* `mqtt2cast/event/FRIENDLY-NAME/` ``
Testing
```
mosquitto_sub -v -h MQTT-BROKER -t "mqtt2cast/#"
```
### Webserver
A simple webserver shows the most recents events for each device. Default port is localhost:7777
### Deps
* pychromecast
* paho.mqtt
### Author
robert@muth.org