LMS Event Trigger is a plugin for executing external commands triggered by LMS server events.
Example scenarios
- Send a notification that a library rescan has finished to an Android device (using Gotify)
- Power off the server after a playlist has finished
- Show song informaion on an attached display
More information on the homepage
Results 1 to 9 of 9
-
2019-03-17, 13:35 #1
- Join Date
- Aug 2012
- Location
- Austria
- Posts
- 1,150
[Announce] Event Trigger - execute commands triggered by LMS server events
Various SW: Web Interface | TUI | Playlist Editor / Generator | Music Classification | Similar Music | Announce | EventTrigger | Chiptunes | LMSlib2go | ...
Various HowTos: build a self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...
-
2020-11-02, 00:24 #2
- Join Date
- Dec 2008
- Posts
- 58
Hi Roland,
A couple of questions with this please.
1. Will this trigger on volume events ? I have tried "event":[["mixer"],["volume","+1"]]} and a few variations but not able to fire.
2. Is it possible to isolate to events from a specific player ?
thanks
-
2020-11-02, 20:41 #3
- Join Date
- Aug 2012
- Location
- Austria
- Posts
- 1,150
"event":[["mixer"], ["volume"]]
2. Is it possible to isolate to events from a specific player ?
Code:PL=$(echo $2|sed -e 's/.*player_id":"\(..:..:..:..:..:..\)".*/\1/') VOL=$(echo $2|sed -e 's/.*mixer volume":\([[:digit:]]*\).*/\1/') if [[ "$PL" == "00:11:22:33:44:55" ]]; then echo "volume: $VOL" fi
Various SW: Web Interface | TUI | Playlist Editor / Generator | Music Classification | Similar Music | Announce | EventTrigger | Chiptunes | LMSlib2go | ...
Various HowTos: build a self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...
-
2020-11-03, 16:32 #4
- Join Date
- Dec 2008
- Posts
- 58
Thanks
I will brush up on some shell scripting and have a play.
-
2020-12-23, 09:20 #5
- Join Date
- Feb 2008
- Posts
- 65
Hello Roland,
Here are the steps I took:
I installed your plugin from the repository
I created a conf file
Code:nano /etc/lmseventtrigger.json
{
"enabled": true,
"numStatusResults":1,
"events": [
{"cmd":"/usr/local/bin/lmsclient.sh","event":[["client"]]},
{"cmd":"/usr/local/bin/lmsplaylist.sh","event":[["playlist"],["newsong","pause"]]}
]
}
Then I tried as per your wiki to use the url http://10.144.1.1:9000/plugins/LMSeventTrigger/js.html without success
404 Not Found: plugins/LMSeventTrigger/js.html
JeanLast edited by bidule; 2020-12-23 at 09:24.
-
2020-12-24, 01:03 #6
- Join Date
- Aug 2012
- Location
- Austria
- Posts
- 1,150
- Does the plugin appear in the LMS Web interface > Settings > Plugins > Active plugins list ?
- If so, switch logging to debug for the plugin (LMS Web interface > Settings > Advanced > Logging > plugin.lmseventtrigger) and check the server log.
You should have something like:
Code:[20-12-24 08:45:56.3320] Plugins::LMSeventTrigger::Plugin::initPlugin (74) LMSeventTrigger init start [20-12-24 08:45:56.3327] Plugins::LMSeventTrigger::Plugin::initSubscriptions (113) LMSeventTrigger: using /usr/local/etc/lmseventtrigger.json [20-12-24 08:45:56.3360] Plugins::LMSeventTrigger::Plugin::initSubscriptions (120) LMSeventTrigger: parsed lmseventtrigger.json
Various SW: Web Interface | TUI | Playlist Editor / Generator | Music Classification | Similar Music | Announce | EventTrigger | Chiptunes | LMSlib2go | ...
Various HowTos: build a self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...
-
2020-12-24, 02:27 #7
- Join Date
- Feb 2008
- Posts
- 65
Thank you Rolland,
Yes the plugin in active.
Here is a part of the log file
[20-12-24 09:22:41.5877] Plugins::LMSeventTrigger::Plugin::initPlugin (74) LMSeventTrigger init start
[20-12-24 09:22:41.5895] Plugins::LMSeventTrigger::Plugin::initSubscription s (110) LMSeventTrigger: using /etc/lmseventtrigger.json
[20-12-24 09:22:41.5909] Plugins::LMSeventTrigger::Plugin::initSubscription s (122) LMSeventTrigger: error parsing lmseventtrigger.json
[20-12-24 09:22:41.5919] Plugins::LMSeventTrigger::Plugin::initSubscription s (128) LMSeventTrigger: no valid configuration found, disabling plugin
[20-12-24 09:22:41.5929] Plugins::LMSeventTrigger::Plugin::initPlugin (85) LMSeventTrigger initialized (v0.0.2)
-
2020-12-24, 05:56 #8
- Join Date
- Feb 2008
- Posts
- 65
Hello Rolland,
I had a look at where any squeezelite.log could be, I'm using DietPi.
Here is the result:
/var/lib/dietpi/dietpi-ramlog/storage/squeezelite.log
/var/log/squeezelite.log
/var/tmp/dietpi/logs/dietpi-ramlog_store/squeezelite.log
EDIT:
Sorry this message has no relation to this subject, it is related the other post.
JeanLast edited by bidule; 2020-12-24 at 06:01.
-
2020-12-24, 07:24 #9
- Join Date
- Aug 2012
- Location
- Austria
- Posts
- 1,150
Various SW: Web Interface | TUI | Playlist Editor / Generator | Music Classification | Similar Music | Announce | EventTrigger | Chiptunes | LMSlib2go | ...
Various HowTos: build a self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...