Im looking to run a shell command from magic, wondering how to do it in there.
I installed the command launcher plugin.
Actually i want to run espeak…
–John
Im looking to run a shell command from magic, wondering how to do it in there.
I installed the command launcher plugin.
Actually i want to run espeak…
–John
Hi John,
You’re on the right path. The commandlauncher plug-in readme has an espeak example:
Got that, and have setup espeak on a thing, and i can execute it under “My events” and it runs and works.
I must have somthing wrong in the magic, i have this setup:
ThingAction {
id: left_utv_trailer_tire_low
thingId: “738a7969-e414-4e52-a97c-b287bad15569” // Speak Tire Low // The id of the notification thing
actionName: “trigger”
}
and im trying to trigger it in an if statement using: left_utv_trailer_tire_low.execute
–John
FYI, i got this working using automatic magic rules, but would rather have it in code…humm, does automatic magic rules just create magic scripts somewhere i can look at and steal code from?
–John
it should with the example code above by calling
left_utv_trailer_tire_low.execute({})
The {} is important currently… I suppose nymea could be tweaked to not require it when no parameters are required…