Just found this on the web : https://www.rlatour.com/cast/index.html
Installed it and made a lua function :
Code: Select all
function Cast(ctext,cdevice,cvolume)
casttext=""
cvolume=tonumber(cvolume) if cvolume==0 or cvolume==nil then cvolume=40 end
if cdevice~=nil then casttext=casttext..' -device "'..cdevice..'"' end
if ctext~=nil then casttext=casttext..' -text "'..ctext..'"' end
casttext=casttext..' -volume '..tostring(cvolume)
casttext='start /b /realtime Cast.exe -background'..casttext
print(casttext)
os.execute(casttext)
end
I used the os.execute and this slows down a lot... so i added "start /b /realtime" to speed things a bit up.
Now a can let google home and other chromecast say things by calling this function.
sorry : I am not a coder and have no clue how to do it on RP or linux, i just try to find sollutions for my needs (and then share it) ...