Komentoriviltä tämä toimii mutta ei talologgerissa. Skriptin ajaminen kestää joitain sekunteja, voisiko vika tulla siitä viiveestä?
python /home/talo/bin/wd-parse.py -u http://192.168.1.11/myweb/uploads/clientraw.txt -o '{{4}},{{12}},{{13}},{{5}}'
Lisäksi raspiin ei saa enää yhteyttä ollenkaan ssh:n kautta. Kun SHELL1-rivit poistaa ja boottaa, sitten toimii taas..
Heti bootin jälkeen:
15.10.2013 07:38:02: SHELL1: ERROR: Error executing Shell data source command
Command: python /home/talo/bin/wd-parse.py -u http://192.168.1.11/myweb/uploads/clientraw.txt -o '{{4}},{{12}},{{13}},{{5}}'
Command output: Traceback (most recent call last):
File "/home/talo/bin/wd-parse.py", line 254, in <module>
main()
File "/home/talo/bin/wd-parse.py", line 241, in main
response = urllib.urlopen(url)
File "/usr/lib/python2.7/urllib.py", line 86, in urlopen
return opener.open(url)
File "/usr/lib/python2.7/urllib.py", line 207, in open
return getattr(self, name)(url)
File "/usr/lib/python2.7/urllib.py", line 344, in open_http
h.endheaders(data)
File "/usr/lib/python2.7/httplib.py", line 958, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 818, in _send_output
self.send(msg)
File "/usr/lib/python2.7/httplib.py", line 780, in send
self.connect()
File "/usr/lib/python2.7/httplib.py", line 761, in connect
self.timeout, self.source_address)
File "/usr/lib/python2.7/socket.py", line 571, in create_connection
raise err
IOError: [Errno socket error] [Errno 101] Network is unreachable
Myöhemmin:
15.10.2013 07:44:01: SHELL1: ERROR: Error executing Shell data source command
Command: python /home/talo/bin/wd-parse.py -u http://192.168.1.11/myweb/uploads/clientraw.txt -o '{{4}},{{12}},{{13}},{{5}}'
Command output:
15.10.2013 07:44:01: TaloLoggerThread: Received none or unknown data for command SHELL1.ulkokosteus.
15.10.2013 07:44:01: TaloLoggerThread: Received none or unknown data for command SHELL1.ulkolampo.
15.10.2013 07:44:01: TaloLoggerThread: Received none or unknown data for command SHELL1.sisalampo.
15.10.2013 07:44:01: TaloLoggerThread: Received none or unknown data for command SHELL1.sisakosteus.
15.10.2013 07:44:01: TaloLoggerThread:
Ulkolampo:
Ulkokosteus:
Sisalampo:
Sisakosteus:
Asetukset:
# Location of the shell script or executable
SHELL1:LOCATION = python
# Script or executable parameters
SHELL1:PARAMETERS = /home/talo/bin/wd-parse.py -u http://192.168.1.11/myweb/uploads/clientraw.txt -o '{{4}},{{12}},{{13}},{{5}}'
# Result value regexp.
SHELL1:REGEXP = ^\s*(?P<ulkolampo>[0-9\.\-]+)\s*,\s*(?P<sisalampo>[0-9\.\-]+)\s*,\s*(?P<sisakosteus>[0-9\.\-]+)\s*,\s*(?P<ulkokosteus>[0-9\.\-]+)\s*$
#############################################################################
# Logged measurement points and data store key configuration
#############################################################################
@MEASURE = Ulkolampo:SHELL1.ulkolampo
@MEASURE = Ulkokosteus:SHELL1.ulkokosteus
@MEASURE = Sisalampo:SHELL1.sisalampo
@MEASURE = Sisakosteus:SHELL1.sisakosteus