The jython integration was not really that complicated.
The most difficult part (at least for me) was to get the correct jython library to the maven repository.
I downloaded a jython library to the repository, but could not get it working. In the end I had to manually add the .jar file to the library before I was able to call the jython functions I wanted. I'm not really familiar with maven, so probably someone who knows what he is doing doesn't need to spend so much time with that
Python functions are called in a similar way as set, exec, etc. from the server: python,functionName('parameters')
Function parameters are passed as is and are not expanded. Parameter evaluation is done inside jython with eval() function.
From nethome server jython can access server and log instances, which are used for accessing items and writing to the log file.
Of course I'm willing to contribute to the project, if you think this would be useful.
I've done some other stuff too, which might be of interest to nethome users.
OnOffLogger
- this is like a lamp and has on and off actions, but instead of turning anything on/off, it logs the on/off times to a file.
SmsClient
- similar to XmppClient, but can send text messages via Dovado router.