{"id":18748035,"url":"https://github.com/andrasbiro/arducastcontrol","last_synced_at":"2025-10-03T20:39:26.840Z","repository":{"id":55440692,"uuid":"309195112","full_name":"andrasbiro/ArduCastControl","owner":"andrasbiro","description":"Chromecast control library for arduino/platformio","archived":false,"fork":false,"pushed_at":"2020-12-30T20:19:27.000Z","size":27,"stargazers_count":12,"open_issues_count":0,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-26T16:39:05.761Z","etag":null,"topics":["arduino","arduino-library","chromecast","chromecast-api","chromecast-audio","platformio","platformio-arduino"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andrasbiro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-01T21:49:05.000Z","updated_at":"2024-11-06T08:02:23.000Z","dependencies_parsed_at":"2022-08-15T00:20:38.609Z","dependency_job_id":null,"html_url":"https://github.com/andrasbiro/ArduCastControl","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrasbiro%2FArduCastControl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrasbiro%2FArduCastControl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrasbiro%2FArduCastControl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrasbiro%2FArduCastControl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrasbiro","download_url":"https://codeload.github.com/andrasbiro/ArduCastControl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248642311,"owners_count":21138350,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","arduino-library","chromecast","chromecast-api","chromecast-audio","platformio","platformio-arduino"],"created_at":"2024-11-07T16:32:25.868Z","updated_at":"2025-10-03T20:39:26.755Z","avatar_url":"https://github.com/andrasbiro.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ArduCastControl\n\nChromecast control library for platformio/arduino. It supports requesting some\ninformation of the casting (e.g. artist and title), as well as a minimal control\n(pause, previous, next, seek and volume).\n\n## Dependencies\n\nThe library depends on [ArduinoJson](https://arduinojson.org/) and\n[nanopb](https://jpa.kapsi.fi/nanopb/). This is already set for platformio.\n\nIt has a significant RAM footprint, which is usually not an issue for wifi\ncapable boards. It was only tested on ESP8266.\n\n## References\n\n- [Node-castv2](https://github.com/thibauts/node-castv2) has a great readme\n  describing the protocol.\n- [pychromecast](https://github.com/home-assistant-libs/pychromecast) was used\n  as a reference when implementing this\n- [CastVolumeKnob](https://github.com/WebmasterTD/CastVolumeKnob/) is a similar\n  project in micropython, but it only targets volume control.\n- [Google's documentation on protocol\n  buffers](https://developers.google.com/protocol-buffers/docs/encoding)\n\n## Flow of connection\n\nUnderstanding how the CASTV2/chromecast protocols work took me a while, so\nhere's a quick summary on what this library does.\n\n1. TCP/TLS connection is opened to the device. Self-signed certificates are\n   sufficient\n2. An application layer connection to the device itself (\"receiver-0\") is\n   established\n3. Status is requested from the device with GET_STATUS messages on the receiver\n   namespace\n    1. Reported status include volume information\n4. When something casts to the device, chromecast reports an application is\n   running with a sessionId\n5. An application layer connection to the application (sessionid) is established\n6. Status is requested from the application with GET_STATUS messages on the\n   media namespace\n    1. Reported status includes all sort of information of the currently playing\n       track\n    2. As well as a mediaSessionId, which is changed with every track change\n7. Control messages can be sent to the application on the media namespace using\n   a specified mediaSessionId\n\n## Useful values saved\n\nAll of the following are public fields of the class, which are updated when the\nclass' loop() function is called on a given status.\n\n- **volume** - The volume set on the device, between 0 and 1\n- **isMuted** - True if the device is muted\n- **displayName** - Typically the application casting, like \"Spotify\"\n- **statusText** - A short status, e.g. \"Casting: Whole Lotta Love\"\n- **playerState** - State of playback, e.g. \"PLAYING\"\n- **title** - Title of the current song, e.g. \"Whole Lotta Love\"\n- **artist** - Artist of the current song, e.g. \"Led Zeppelin\"\n- **duration** - Duration of the current song in seconds, e.g. 333.89\n- **currentTime** - Current time in the song in seconds, e.g. 2.27\n\nThis list can be easily extended by saving more when processing MEDIA_STATUS or\nRECEIVER_STATUS.\n\n## Control methods\n\nThe following controls are accessible as methods in the class:\n\n- **play()** - Plays (resumes) the current song\n- **pause()** - Pauses/Resumes the current song\n- **prev()** - Previous track\n- **next()** - Next track\n- **seek()** - Seeks in song\n- **setVolume()** - Volume control\n- **setMute()** - Mute control\n\nI think this covers all possible controls except casting and playlist features.\nHowever, extending it should be fairly easy, using the play() or setVolume()\nmethod as a template (for media/device commands respectively)\n\n## Further documentation\n\nFor further documentation, please refer to the comments in ArduCastControl.h and\nthe example, which demonstrates the main features.\n\n## Further developement\n\nDon't expect any new features/bugfixes, as I'm quite happy with the featureset\nas is. However, I do accept pull requests.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrasbiro%2Farducastcontrol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrasbiro%2Farducastcontrol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrasbiro%2Farducastcontrol/lists"}