jorgebooks / measureit

Automatically exported from code.google.com/p/measureit
0 stars 0 forks source link

Not uploading to PVoutput, or providing any logging #52

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Using the provided RasPi image, I cannot get data to upload to PVOutput (and 
can't find any log files for errors).

I can view the current usage, and its reading from the sensor fine.

Have tried updating data_input.py with the version detailed in other issue, and 
have tried putting the API key in only the sensor, only the main settings, and 
both, but still nothing.

Original issue reported on code.google.com by mick.dy...@gmail.com on 5 Feb 2014 at 9:43

GoogleCodeExporter commented 9 years ago
Hi Mick,
I have the same problem, so I opened a new issue providing a detailed log.

You can have a detailed log too.

You have to follow these siple steps:

Open a new session using a ssh terminal and log in your raspberry with 'pi' 
user.
type: sudo -s
type: cd /..
type: svc -d service/measureit (this command stop the execution of data_input.py
type: /usr/bin/python /usr/local/measureit/python/data-input.py debug v

Now under /tmp, you have a detailed log file named measureit.log.

Try to find this error:
2014-02-11 09:22:12,356 ERROR Can not connect to the serial device: Traceback 
(most recent call last):
  File "/usr/local/measureit/python/data-input.py", line 811, in <module>
    sensor_data_check( s, watt_sum, tmpr )
  File "/usr/local/measureit/python/data-input.py", line 448, in sensor_data_check
    sensor_data_pvoutput_status( sensor, watt, tmpr )
  File "/usr/local/measureit/python/data-input.py", line 574, in sensor_data_pvoutput_status
    sensor_data_pvoutput_status_generate( sensor )
  File "/usr/local/measureit/python/data-input.py", line 593, in sensor_data_pvoutput_status_generate
    url = 'http://pvoutput.org/service/r2/addstatus.jsp?key='+sensor_settings[sensor]['pvoutput_api']+'&sid='+str(sen
sor_settings[sensor]['pvoutput_id'])+'&d='+sensors[sensor]['pvoutput_watt_sum'][
'day']+'&t='+sensors[sensor]['pvoutpu
t_watt_sum']['time']+'&'+type+'='+str(sum)+'&v5='+str(tmpr);
UnboundLocalError: local variable 'tmpr' referenced before assignment

This is the error reported by my logfile.

Enrico

Original comment by e.pilo...@gmail.com on 11 Feb 2014 at 8:51

GoogleCodeExporter commented 9 years ago
I solved using grabber r371 version:
http://code.google.com/p/measureit/source/browse/trunk/measureit_system_files/py
thon/data-input.py?spec=svn428&r=371

Original comment by e.pilo...@gmail.com on 11 Feb 2014 at 11:02

GoogleCodeExporter commented 9 years ago
Solved in version 116 that is available to download

Original comment by lalelu...@gmail.com on 19 Apr 2014 at 10:06