{"id":22352084,"url":"https://github.com/bertreb/pimatic-sounds-basic","last_synced_at":"2025-08-27T03:03:19.539Z","repository":{"id":57324347,"uuid":"308142654","full_name":"bertreb/pimatic-sounds-basic","owner":"bertreb","description":"Basic plugin to cast to chromecast devices","archived":false,"fork":false,"pushed_at":"2020-12-18T07:58:26.000Z","size":86,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-04T15:10:50.595Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CoffeeScript","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/bertreb.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","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-10-28T21:15:15.000Z","updated_at":"2020-12-30T00:49:45.000Z","dependencies_parsed_at":"2022-08-25T21:11:36.793Z","dependency_job_id":null,"html_url":"https://github.com/bertreb/pimatic-sounds-basic","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bertreb/pimatic-sounds-basic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertreb%2Fpimatic-sounds-basic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertreb%2Fpimatic-sounds-basic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertreb%2Fpimatic-sounds-basic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertreb%2Fpimatic-sounds-basic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bertreb","download_url":"https://codeload.github.com/bertreb/pimatic-sounds-basic/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertreb%2Fpimatic-sounds-basic/sbom","scorecard":{"id":234702,"data":{"date":"2025-08-11","repo":{"name":"github.com/bertreb/pimatic-sounds-basic","commit":"b4c57aad34fd9f951b80e5b8dad9e792d21eeeb0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/8 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-17T05:25:12.309Z","repository_id":57324347,"created_at":"2025-08-17T05:25:12.309Z","updated_at":"2025-08-17T05:25:12.309Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272283141,"owners_count":24906618,"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","status":"online","status_checked_at":"2025-08-27T02:00:09.397Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-12-04T12:17:05.297Z","updated_at":"2025-08-27T03:03:19.519Z","avatar_url":"https://github.com/bertreb.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pimatic-sounds\nPimatic plugin for playing mp3 files and tts sentences on Chromecast and Sonos devices. A typical chromecast device devices is Google Home or a Google chromecast dongle. The Ikea SYMFONISK is a Sonos device. There are 2 options for using Google devices.\n1. Use the Chromecast option (ChromecastDevice). This can be used without any action in the Google cloud. The announcement function works in limited cases (tested only with tuneIn). In some cases the currently playing stream with be stopped when an annoucement is played.\n2. Use the Assistant option (GoogleDevice). In this option an announcement will just pause the currently playing stream and the stream will continue after the announcement. For this option you need to configure 'an assistant device' in Google Cloud ([instructions](https://greghesp.github.io/assistant-relay/docs/introduction)). If you installed assistant-relay on an other system then you need to install the python library catt on your pimatic system (see [install catt](https://github.com/skorokithakis/catt)). Use 'sudo pip3 install catt' to get a systemwide command.\n\nInstall the plugin via the plugin page of Pimatic or add the following in config.json\n```\n {\n   \"plugin\": \"sounds\"\n }\n```\nAfter installation and restart activate the plugin and add the following to the plugin config\n```\n{\n  \"port\": 8088,     // or the port you like and is free\n  \"language\": \"en\", // or your own language\n  \"soundsDirectory\": \"directory for sounds, defaults is '/sounds' in pimatic home directory\"\n  \"tts\": [\"google-translate\",\"google-cloud\"] // select tts engine\n  \"googleCloudJson\": \"\u003cif tts engine is google-cloud the filename of the credential json file\u003e\" // incl .json extension\n  \"voice\": \"The name of the voice, format is \u003clanguage-code\u003e-Standard-[A,B,C,D]\"\n  \"pitch: \"The increase or decrease in semitones of the voice pitch (-20 to +20)\"\n  \"speakingRate: \"The speed of the voice (0.25 to 4.0)\"\n  \"assistantRelay: \"Enable to use for GoogleDevice (if assistant-relay is installed)\"\n  \"assistantRelayIp: \"The IP address of the assistant-relay server\"\n  \"assistantRelayPort: \"The Port number of the assistant-relay server\"\n  \"assistantRelayUser: \"The username for assistant-relay\"\n  \"debug\": true     // if you want\n}\n\n```\nThe IP address of the computer the plugin is running on, is automatically detected and used for the media server. It must be in the range 192.168.xxx.xxx.\n\n\nIf you are using assistant-relay you need to install it before you use that in this plugin. The installation instructions are [here](https://greghesp.github.io/assistant-relay/docs/introduction). Configure and activate assistant-relay first. You can install it on any computer as long it is in the same lan network pimatic and you're google devices are running on. The ip number of the computer assistant-relay is running on and the port number (default 3000) are used in this plugin. The username you used in configuring the google credentials is used also (linked to the downloaded json file with the secret).\n\nThe tts and googleCloudJson for the GoogleDevice are not used because the text to voice conversion is handled via assistant-relay.\nVia the management/config menu of assistant-relay you can set the language option, enable casting and announcement, etc.\n\n### Google Cloud text-to-speech\nCreate credential.json file by following [the procedure](https://cloud.google.com/text-to-speech/docs/quickstart-client-libraries?hl=en) and follow the 'before you begin' steps until step 4f (download the json file). Put the json file in your pimatic-app directory.\n\n### Chromecast Device\nCreate a Chromecast device with the following config.\n\n```\n{\n  \"id\": \"testcast\",         // id for usage within Pimatic\n  \"name\": \"testcast\",       // name for usage within Pimatic\n  \"class\": \"ChromecastDevice\"\n  \"ip\": \"192.168.xxx.xxx\",  // IP of your Chromecast device\n  \"playInit\": true          // plays initSound.mp3 after (re)start of device\n  \"xAttributeOptions\": [],\n}\n```\nThe Cromecast device types are a single, grouped or paired devices. The discovery will find them and they can be added and used in the rules\n\n### Google Device\nCreate a Google device with the following config.\n\n```\n{\n  \"id\": \"testcast\",         // id for usage within Pimatic\n  \"name\": \"testcast\",       // name for usage within Pimatic\n  \"class\": \"GoogleDevice\"\n  \"ip\": \"192.168.xxx.xxx\",  // IP of your Google device\n  \"playInit\": true          // plays initSound.mp3 after (re)start of device\n  \"xAttributeOptions\": [],\n}\n```\nThe GoogleDevice is found and added via the discovery.\n\n\n### Sonos Device\nCreate a Sonos device with the following config.\n\n```\n{\n  \"id\": \"testcast\",         // id for usage within Pimatic\n  \"name\": \"testcast\",       // name for usage within Pimatic\n  \"class\": \"SonosDevice\"\n  \"ip\": \"192.168.xxx.xxx\",  // IP of your Chromecast device\n  \"playInit\": true          // plays initSound.mp3 after (re)start of device\n  \"xAttributeOptions\": [],\n}\n```\n\n### Group Device\nCreate a Group device with the following config.\n\n```\n{\n  \"id\": \"testgroupcast\",      // id for usage within Pimatic\n  \"name\": \"testgroupcast\",    // name for usage within Pimatic\n  \"class\": \"GroupDevice\"\n  \"playInit\": true            // plays initSound.mp3 after (re)start of device\n  \"devices\": [                // list of SoundsDevices\n    \"name\": \"id of a SoundDevice\"\n    ]\n  \"xAttributeOptions\": [],\n}\n```\nThe GroupDevice is combining existing SoundsDevices to be used as an extra device.\nIn the GroupsDevice config you can select and add existing SoundsDevices.\nIn the rules the groups device will be available as an extra play device option.\n\n## Controlling the devices\n\nThe function of a device is controlled via rules\nThe ACTION rule syntax is:\n\n**play**  [text|ask|file|site|main|stop]  [\"$variable\"|\"text for tts\"]|[\"audio filename\"|\"$variable\"]  [**vol** [number|$variable]]  **on**  [ChromecastDevice | GoogleDevice | SonosDevice | GroupDevice] [**for** [xx|$variable] [seconds..years]]\n\nSome examples of command lines are:\n1. **play text** \"this is a nice text\" **vol** 50 **on** mysoundsdevice\n2. **play ask** \"what's the weather\" **on** **GoogleDevice**\n3. **play file** \"nice-music.mp3\" **vol** 25 **on** mysoundsdevice\n4. **play file** \"$that-funky-music\" vol $loud-music **on** mysoundsdevice\n5. **play file** \"$that-funky-music\" vol $loud-music **on** mysoundsdevice **for** 10 seconds\n5. **play site** \"http://\u003cstreaming-ip\u003e\" **on** mysoundsdevice **for** 10 seconds\n6. **play main** vol $loud-music **on** mysoundsdevice\n7. **play stop on** mysoundsdevice\n\nIn the main directory of Pimatic (mostly /home/pi/pimatic-app) a directory sounds is created. You can put mp3 files in that directory. You can create subdirectories in sounds and can use them in the rule.\n\nIn the text string you can use variables to create dynamic voice text.\n\nIn the file string you can also use variables to create dynamic selection of audio files. A variable-only file string must still be enclosed by \"\". The resulting filenames ***must be without spaces!***\n\nFor the volume variable a number or a variable can be used.\n\nThe 'vol [0-100]' after text or file is optional and will override the mainvolume. If not set, the value of the mainvolume is 20.\n\nThe duration option (for ...) is used when announcing/displaying info for a certain time. The value can be a number or a variable containing a number.\nWhen using a variable the unit (seconds..years) is fixed in the rule and the variable holds the value.\n\nWhen a TuneIn stream is playing and Sounds plays a text or file, the TuneIn stream stops and is resumed after the Sounds play is finished. \n\nOn a GoogleDevice you can ask a question ('play ask ...'). The answer is being played via the GoogleDevice. And you can stream a website with the command 'play site ...'. This is usefull for streaming video like camera's.\n\n## Attributes\nThe following 3 attributes are created:\n- status: the device status like playing, paused, etc\n- info: informatie about the currently playing/paused media\n- volume: the currently active volume level (0-100)\n\n### Credits\nThis plugin is build from several existing pieces of software. Sometimes the ideas and sometimes the real pieces of code. To mention are:\n- castv2-client from thibauts\n- node-red-contrib-castv2 from i8beef\n- node-sonos from bencevans\n- assistant-relay from greghesp\n---\nThe plugin is **only Node v8 or v10** compatible and in development.\n\nYou could backup Pimatic before you are using this plugin!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbertreb%2Fpimatic-sounds-basic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbertreb%2Fpimatic-sounds-basic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbertreb%2Fpimatic-sounds-basic/lists"}