HomeBridge
tutasca opened this issue · 5 comments
Trying to cast a door-bell.mp3 file to google assistant to cast the ding dong sound
Achieved to create a cURL to broadcast a “dinner” message using Homebridge Http Switch Unlimited https://www.npmjs.com/package/homebridge-http-switch-unlimited
with the following json
{
"accessory": "HTTP-SWITCH-UNLIMITED",
"name": "test3",
"switchType": "stateless",
"timeout": 1000,
"onUrl": [
{
"url": "http://192.168.0.222:3000/assistant",
"method": "POST",
"body": {
"user": "asisteme",
"command": "dinner",
"broadcast": true
},
"headers": {
"Content-Type": "application/json"
}
}
]
}
However i am quite inexpert and don’t know the syntax to cast a local sound
Made different attempts all unsuccessfully like this one
{
"accessory": "HTTP-SWITCH-UNLIMITED",
"name": "doorbell",
"switchType": "stateless",
"timeout": 1000,
"onUrl": [
{
"url": "http://192.168.0.222:3000/assistant",
"method": "POST",
"body": {
"device": "Living Room speaker",
"source": "/tmp/Ding.mp3",
"type": "local",
"converse": true
},
"headers": {
"Content-Type": "application/json"
}
}
]
}
Would you be able to publish either the json syntax or the plugin for HomeBridge.
Thanks for your work and help
Jose.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Converse should not be true. That Might be your first problem. The best way to test it would be from the dashboard. Got to 192.168.0.222:3000 and click on "Cast Sandbox" at the top of the page. That will help you build the HTTP request.
Are you running inside of docker? Is the file reference within the docker image's filesystem or in the host filesystem?
Sorry, no idea about the docker or host filesystem, pardon my ignorance.
the assistant relay gets installed in the rasbperry pi with the user pi.
it works ok from the web.
I have managed to include the auth token on the POST but when sending the request in the raspberry from homebridge it replies file not found, i have tried using website, local and custom files but always replies the chosen file does not exist
Is it looking for a file with the token?
has it got something to do with the user systems in raspberry?
i have tried the same, with the same result with this
"device": "Living Room speaker",
"source": "/home/homebridge/hola/Ding.mp3",
"type": "local"
any idea? any chance you could build a plugin for homebridge?
:)