Question: Example script like "Operation send mail"
cimba007 last edited by
I want to create a simple operation using scripting support and python.
The python file should be executed and the parameter to the pythonfile should be the reason the operation triggered.
It should be similar to the "send mail" operation but the parameters should be passed to a python script. Can anybodyd provide some basic information or an example as how to pass the parameters to a python script?
In the end I would like to run an other command from python:
yowsup-cli demos -l XXXX "Test"
where "Test" should be replaced with the trigger reason.
Thanks in advance!
jkandasa last edited by
MyController supports to execute operations from script. You can pass bindings as
JSONkey-values. For now we cannot pass dynamic detail from
Operations. But you have query options to communicate with MyController. You can get details like Node, Gateway, Sensors, Rules, Operations, etc., Refer MyController document on downloads page
MyController supports for
Pythonscripts. But by default it's not shipped with Python-Java support engine which is www.jython.org
Steps to add new script engine
Download jar file and place it under
mycontroller/lib/and restart MyController services.
For example if you want to add
Pythonsupport on MyController, you need to add
- Download jython-standalone-*.jar from Jython website.
- Place it under
- Stop MyContorller
- Start MyController