Forum Replies Created
-
Posted in: Allo USB Bundle
-
24. Februar 2024 at 10:37 #53081
Convlusion to this topic:
I’ve been able to inject audio stream from my tv to Squeezebox network BUTThe delay between the moment the sound goes out of the TV and it goes out of the speaker is about 2 or 3 seconds.
My TV only support a maximum delay of 500ms so it’s not usable for movies.
Eventually it could be used if nobody watch the image and notice the shift.16. Dezember 2022 at 1:18 #52535Finally I’ve bough a 3$ DAC on ali express that take a toslink fibler cable as input and two cinch output to convert the signal.
This is then given to a HifiBerry DAC + ADC PRO and streamed from Sqeezebox server 🙂
16. Dezember 2022 at 1:06 #52531Hi Mario,
Thank you once more for your help!
Taking a lot of time to assemble the corrects parts, here is my openHab3 ECMA function I use to call URL if it can help some of us.
var logger = Java.type('org.slf4j.LoggerFactory').getLogger('org.openhab.rule.' + ctx.ruleUID); var url = itemRegistry.getItem('http_get_command').state + ""; if(!!url){ var HTTP = Java.type("org.openhab.core.model.script.actions.HTTP"); var headers = []; if(url.startsWith("http://kitchen")){ headers["Authorization"] = "Basic dXNlcjpwYXNzd29yZA=="; logger.info("adding headers for kitchen"); }else if (url.startsWith("http://room2 headers["Authorization"] = "Basic dXNlcjpwYXNzd29yZA=="; logger.info("adding headers for room2"); } var result = HTTP.sendHttpGetRequest(url, headers, 15*1000); if(result == null){ logger.info("result: ERROR"); } else { logger.info("result: OK"); } } else{ logger.warn("Ooops url is empty"); }
This function is used as a trigger of a String value model nammed „http_get_command“.
The habPannel button panel send commands to this model value. The command contains the full URL.
As my players are password protected, you’ll need to adapt this with your user:password encoded in base 64. You can compute it in a terminal
echo -n user:password | base64
this example should output „dXNlcjpwYXNzd29yZA==“
Make the same with your real user:password and replace „dXNlcjpwYXNzd29yZA==“ in the code with it for each player.
I know it’s not really safe to stock this as clear text password in a script file…
I hope it’ll help.
- This reply was modified 2 years ago by Jack Bauer.
- This reply was modified 2 years ago by Jack Bauer.
- This reply was modified 2 years ago by Jack Bauer.
16. Dezember 2022 at 0:48 #52529Hi Mario!
Thank you very much for your Help !
I’v managed that tonight!
If it can help someone :
I’ve had to create a shell script that I’ll name runTelnetCommand.sh
#!/bin/bash if [ $1 == "connect" ] then echo "Send to $4:9090 to connect Player $2 on server $3" printf "$2 connect $3\nexit\n" | nc $4 9090 2>/dev/null | cut "-d " -f 3 echo "Done" else echo "Unknown command $1" fi
I’ve put this script on my openHab volume on path /openhab/userdata/etc/scripts/runTelnetCommand.sh (i’m using a dockerized openhab)
You just have to put this script somewhere openHab can access it.Check it’s runnable with
chmod +x /openhab/userdata/etc/scripts/runTelnetCommand.sh
On my docker container I’ve had to install nc which is not packaged
Connect manually to the container :
docker exec -it <containerId> /bin/bash
Install netCat to send telnet commands
apt-get update && apt-get install -y netcat
Within my ECMA javascript action for my openHab trigger script I’ve add a exec
var logger = Java.type('org.slf4j.LoggerFactory').getLogger('org.openhab.rule.' + ctx.ruleUID); var Exec = Java.type("org.openhab.core.model.script.actions.Exec"); var Duration = Java.type("java.time.Duration"); var serverScriptPath = '/openhab/userdata/etc/scripts/runTelnetCommand.sh'; var serverScriptCommand = 'connect'; var mac_room1 = 'aa:bb:cc:dd:ee:ff'; var mac_room2 = 'ff:ee:dd:cc:bb:aa'; var firstServerIp = '192.168.1.15'; var secondServerIp = '192.168.1.16'; logger.info("Result connection room1: " + Exec.executeCommandLine(Duration.ofSeconds(20), serverScriptPath, serverScriptCommand, mac_room1, firstServerIp, secondServerIp)); logger.info("Result connection room2: " + Exec.executeCommandLine(Duration.ofSeconds(20), serverScriptPath, serverScriptCommand, mac_room2, firstServerIp, secondServerIp));
It’s important to send commands to IP’s because DNS names does not seems to work.
Having those function I can switch players mac_room1 and mac_room2 from server 1 to server 2
I hope this will help 😉
- This reply was modified 2 years ago by Jack Bauer.
14. Oktober 2022 at 22:36 #52435Hi,
I’ve been able to build the openhab panel with individual volume control and a master „+“ button and a „-“ button.
As on a 7″ screen, sliders are not so userfirendly, I’ve chose + and – buttons for each SqueezelitePlayers.
Each buttons (+ – for a single player or master) send a text command to a model variable I’ve created „increment_volume_params“ defined as String.
When this variable recive a command, a JS code is executed (openhab rule).
In this code I check wether it is a plus command or a minus command and get the playerName encoded ex : plus_kitchen, minus_kitchen, plus_master, minus_master, etc)
The command is read with something like this :
var increment_volume_params_state = itemRegistry.getItem(‚increment_volume_params‘).state;For a player, I get the current volume with squeezebox binding and increment or decrement this value with a constant step (ex: 1) and sent this back to the current player.
For master volume I do that for each players of my network.
It’s very nice to use it
Thanks for the tip!
1. September 2022 at 14:21 #52380Indeed 🙂
The ony problem is that my moderne 2020 samsung tv has no jack output, but only toslink output or HDMI.
However, I’ll be able to use it for somthing else like playing music from a cd player.
30. August 2022 at 23:17 #52374As complement, here are my conclusions for URL bookmark for WaveInput
wavin:default -> works
wavin:plughw:0 -> works
wavin:plughw:1 -> KO
wavin:0 -> KO
wavin:1 -> KO30. August 2022 at 23:04 #52373Hi,
After a few more try / fail I’ve finally been able to stream music through LMS!!!
I’ve stoped the Squeezelite deamon
Thanks to this post : https://www.max2play.com/en/forums/topic/cannot-stream-the-line-in-from-hifiberry-dac-adc-through-squeezbox-server/
I went to the page /plugins/raspberrysettings/controller/Setup.phpand check „Disable Build-In-Audio“
-> then finally, „wavin:default“ works !!
30. August 2022 at 22:24 #52372Hello,
Thanks for help. I’ve taken the beta version.
I’ve installed the hifiberry plugin from the plugin page, it worked, thanks.I’ve selected Hifi Berry DAC+ ADC PRO (B+ / PI 2/3/4)
I’ve updated the RPI with sudo apt update / sudo apt upgrade
I’ve also updated the kernel version from the Setup.php page.
I’ve installed LMS on my RPI
I’ve add Spotify plugin (to test the server is working)
I’ve add Waveinput plugin
I’ve add a bookmark on the LSM server on
wavin:default
wavin:plughw:0
wavin:default
wavin:0
I’ve connected my phone with a male jack to the dac input jack
I’ve played some music (volume max on the phone)
I’ve tried each one of the bookmarks on my sqeezebox player (that works with lsm spotify plugin)
None of them works. When I play them on the jivelite screen I’ve got an error message.
I’ve also executed the following according to hifi berry doc (https://www.hifiberry.com/docs/software/integrate-analoge-audio-devices-into-your-multi-room-system/)
sudo usermod -G audio squeezeboxserverCould you help me figuring out what’s wrong or what’s not working properly ?
Thank you
30. August 2022 at 7:48 #52369Hi Mario,
Thank you for your answer. I’ve bought a HifiBerry DAC+ ADC Pro. When I burn the m2p_buster_rpi-v253_new.img (the current downloadable version) I’ve got an error message that ask me to upgrade the software while the raspberry pi Boot.
With the last beta version (m2p_buster_rpi-v256.img) it works but I can’t get the hifiberry panel from the admin page.
When I update my other max2play players the get the 2.56.
Could you release a new image with the v256 that is not a beta version ?
Thank you for help.
26. August 2022 at 8:37 #52366Hi, Have you been able with your raspberrypi and DAC+DSP to read audio signal from DSP optical input to your LMS server on a sqeezebox player ?
-