There seems to be no way to get #HomeAssistant to set off a bash script on another machine over ssh if that script takes more than 60 seconds to complete. This is very VERY frustrating.
Conversation
Notices
-
Embed this notice
Miakoda (hellomiakoda@pdx.social)'s status on Sunday, 07-Sep-2025 21:14:46 JST
Miakoda
-
Embed this notice
Miakoda (hellomiakoda@pdx.social)'s status on Sunday, 07-Sep-2025 21:18:58 JST
Miakoda
@vague How do I do that triggered by Home Assistant?
-
Embed this notice
Jari (vague@social.linux.pizza)'s status on Sunday, 07-Sep-2025 21:18:59 JST
Jari
@hellomiakoda run it in tmux or screen?
-
Embed this notice
Daniel Lakeland (dlakelan@mastodon.sdf.org)'s status on Sunday, 07-Sep-2025 21:20:49 JST
Daniel Lakeland
@hellomiakoda
Send a message via MQTT and have the other machine listen for that message and fire off the script when received? -
Embed this notice
Miakoda (hellomiakoda@pdx.social)'s status on Sunday, 07-Sep-2025 21:20:49 JST
Miakoda
@dlakelan I have no idea I could have a server listen for MQTT
-
Embed this notice
Miakoda (hellomiakoda@pdx.social)'s status on Sunday, 07-Sep-2025 21:40:51 JST
Miakoda
@dlakelan I just found another solution...
First, using the ssh integration instead of the shell command integration.
And second, instead of nohup and &, I sent the stdout to a text file. No idea why that worked. I was only trying to see how far in it was failing. -
Embed this notice
Daniel Lakeland (dlakelan@mastodon.sdf.org)'s status on Sunday, 07-Sep-2025 21:40:52 JST
Daniel Lakeland
@hellomiakoda
Theres a command line tool for mqtt messages, mqtt-cli. It can subscribe to a topic and will block until the message is received then print the message. So your shell script can loop on reading a message from a pipe and doing a thing. Basically a little shell script server. Does that help? -
Embed this notice
Miakoda (hellomiakoda@pdx.social)'s status on Sunday, 07-Sep-2025 21:49:21 JST
Miakoda
@dlakelan I wonder if this is something weird with plextraktsync. The whole reason I went on this quest to get it to work this way is it wasn't working with cron. I wonder if I have the cron script output to file if it'll work.
-
Embed this notice
Miakoda (hellomiakoda@pdx.social)'s status on Sunday, 07-Sep-2025 21:50:50 JST
Miakoda
@platymew That was still failing
-
Embed this notice
Multi Purr Puss :verified: (platymew@layer8.space)'s status on Sunday, 07-Sep-2025 21:50:51 JST
Multi Purr Puss :verified:
@hellomiakoda perhaps you can run the script detached in the background, using the ampersand (&)?
-
Embed this notice
Miakoda (hellomiakoda@pdx.social)'s status on Sunday, 07-Sep-2025 21:55:55 JST
Miakoda
@platymew Weirdly I got it to work by changing
nohup plextraktsync sync &
to
plextractsync sync >> stdout.txtI discovered that accidentally just trying to see how far along it was getting before timing out
-
Embed this notice
Multi Purr Puss :verified: (platymew@layer8.space)'s status on Sunday, 07-Sep-2025 21:55:56 JST
Multi Purr Puss :verified:
@hellomiakoda or perhaps a one-shot task scheduler, like a cronjob but immediate - isn't that what "at" does?
Mistral small 3 says:
echo "your_command_here" | at now -
Embed this notice
Miakoda (hellomiakoda@pdx.social)'s status on Monday, 08-Sep-2025 06:59:48 JST
Miakoda
@dlakelan Cron is fine with everything else I put it in it 🤷♀️️
-
Embed this notice
Daniel Lakeland (dlakelan@mastodon.sdf.org)'s status on Monday, 08-Sep-2025 06:59:49 JST
Daniel Lakeland
cron normally captures output and mails it to root. but maybe there's no mail delivery infrastructure on the machine and cron doesn't like it?
-
Embed this notice