Closed cronusfortunam closed 1 year ago
Did you look at the service example i provided in the README? Your has a wrong combination of background & interactive options
Did you look at the service example i provided in the README? Your has a wrong combination of background & interactive options
I did, I followed your README. But I am afraid I do not understand. What do you mean I've got a wrong combination of background and interactive options? what should it be in my case?.
thanks for the quick response.
Should I delete the -z
from my airplay.service file?
What are the Interactive options?
Thanks @philippe44
It is explained in the README, make sure you read it entirely and use the service example. Your mod wanted to leave airconnect being interactive (ie receiving commands from keyboard) but backgrounded. As the README says, it's not possible
Thanks @philippe44 I have edited my airplay.service to look like this:
[Unit]
Description=Aircast bridge
After=network-online.target
Wants=network-online.target
[Service]
ExecStart=/home/hoobs/aircast-linux-arm
Restart=on-failure
RestartSec=30
[Install]
WantedBy=multi-user.target
It's diferent than the example you provided but its the only way I can make it to appear in my Apple devicesafter sereral tryouts.
I also tryed replacing -z
for -Z
but this method worked just after the first reboot, after another reboot, the service hanged in:
Nov 29 17:39:35 hoobs aircast-linux-arm[830]: [17:39:35.918605] Start:662 Binding to <IP>
The README is very completed, im sure its everything there. But I am new to this wold so many of the terms and new to me as you probably notice. XD
Please let me know if I got it right this time. and if so, this issue can be consider as closed
A big thanks to you !!!
As per what's said here https://github.com/philippe44/AirConnect#common-information, you should use -Z in a service, otherwise the app might eat all CPU when it is running as a daemon, which systemd does.
The issue after a reboot is not related. If we are talking about a reboot of your computer, this has to be a totally different issue, like when you reboot the IP address is not given properly or too late or I don't know what and omitting -Z just make the app eating CPU and makes things slow enough so that the IP address is obtained when it starts. Something like that.
Correct! My CPU was running at +27% without -Z
and I did not notice
It Works! It always worked 🙃 but I was not patient enough; it can take up to 6 minutes after boot for the service to add the cast device.
CPU runs now under 7% after adding -Z
back to my airplay.service.
I just don't understand what my interactive options where and how where they in conflict with the background before?
Nevertheless, I could not be more great full @philippe44.
Interactive means that it reads keyboard input and respond to a few commands. A background process cannot do that obviously and trying to access stdin (standard input) from such process has the CPU consumption issue
Thanks a lot!!!
Dear @philippe44 thanks for AirConnect!
I have
chmod +x aircast-linux-arm
in a Raspberry Pi 4 runing Hoobs and set systemd so that it runs after booting. When I run./aircast-linux-arm -z
, it work and my Google-Home-Mini shows up in all of my Apple devices and it streams. Whoever, when I reboot the Pi, the Google-Home-Mini does not show up anymore butjournalctl
shows that the Service has succeeded.Here is the output after boot:
journalctl -u airplay.service
This is my airplay.service file
cat /lib/systemd/system/airplay.service
I also tried placing it in/etc/systemd/system/
So, unfortunately, now every time I reboot the Pi I must run the executable.
How can I set it automaticly? What did I do wrong? Does anyone have a similar issue?
I thank you in advance.
Cronus