Now when there is the new process event handler (many thanks for a good feature). I made some experiments with it and came up with a way how to get from owfs data to mango. (see www.owfs.org)
I have been using scripts to feed data from owfs to mysql and mango is then reading the data base with SQL data source. This works but it is not too easy to setup for beginners.
Here comes an easier way using HTTP receiver datasource. It works quite twisted way with a simple script making calls with wget to the receiver. No mysql needed in between.
I made a virtual data source and a point with "alternate" change type. Then defined event detector to create events on change. So this point is periodically making events. The process handler is calling /var/lib/tomcat6/webapps/ROOT/test.sh
I have made a text file named test.sh into the ROOT folder and which has the following content
wget -q "http://127.0.0.1:8080/httpds?test1=
This method can be used also for witing to owfs (sending commands to 1 wire devices)
make the script running all the time(launched in system start) and make a loop structure with sleep. This is not under control of mango but might be even easier. Something like this (not tested)
#!/bin/bash while true; do wget -q "http://127.0.0.1:8080/httpds?test1=`cat /mnt/owfs/some_sensor/temperature`" wget -q "http://127.0.0.1:8080/httpds?test2=`cat /mnt/owfs/ampther_sensor/temperature`" sleep 30 done
the instruction works for linux(ubuntu). For windows it should be possible similar way but using .bat file. There is wget also for Windows, but some research needed.
The owfs needs to have "--allow_other" to make the ow filesystem readable for the tomcat process.
the .sh file properties needs to be set as executable and in option A have permission for the tomcat user(chmod 777, should do the trick)