MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000113WebSolarLogBackendpublic2013-07-12 10:422013-09-28 22:24
ReporterHertog 
Assigned Tomfrijmann 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionwon't fix 
PlatformRaspberry PiOSLinuxOS Version
Product VersionRelease 1.0.0 
Target VersionRelease 1.1.0Fixed in VersionRelease 1.1.0 
Summary0000113: P1/Smartmeter data not retrieved from device
DescriptionI have added a SmartMeter device to the configuration, and configured the path to the script reading the data from the smart meter. Both scripts work when called from the command line, but it looks as though the scripts never get called from within WebSolarLog itself.

No connection to the smartmeter is made at any time (as is evident by some leds I placed on the readout cable)
Additional InformationUsing Trunk, 1088
Not using the rPi image, but installed it by hand.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000117)
Hertog (reporter)
2013-07-12 10:54

From /var/log/nginx/error.log:
2013/07/12 10:48:33 [error] 2393#0: *685 FastCGI sent in stderr: "PHP message: PHP Notice: Trying to get property of non-object in /usr/share/nginx/www/websolarlog/classes/services/LiveSmartMeterService.php on line 57
PHP message: PHP Notice: Trying to get property of non-object in /usr/share/nginx/www/websolarlog/classes/services/LiveSmartMeterService.php on line 58
PHP message: PHP Notice: Trying to get property of non-object in /usr/share/nginx/www/websolarlog/classes/services/LiveSmartMeterService.php on line 59
PHP message: PHP Notice: Trying to get property of non-object in /usr/share/nginx/www/websolarlog/classes/services/LiveSmartMeterService.php on line 60
PHP message: PHP Notice: Trying to get property of non-object in /usr/share/nginx/www/websolarlog/classes/services/LiveSmartMeterService.php on line 61
PHP message: PHP Notice: Trying to get property of non-object in /usr/share/nginx/www/websolarlog/classes/services/LiveSmartMeterService.php on line 62
PHP message: PHP Notice: Trying to get property of non-object in /usr/share/nginx/www/websolarlog/classes/services/LiveSmartMeterService.php on line 63
PHP message: PHP Notice: Trying to get property of non-object in /usr/share/nginx/www/websolarlog/classes/services/LiveSmartMeterService.php on line 64
PHP message: PHP Notice: Trying to get property of non-object in /usr/share/nginx/www/websolarlog/classes/services/LiveSmartMeterService.php on line 65
PHP message: PHP Notice: Trying to get property of non-object in /usr/share/nginx/www/websolarlog/classes/services/LiveSmartMeterService.php on line 66
PHP message: PHP Notice: Trying to get property of non-object in /usr/share/nginx/www/websolarlog/classes/services/LiveSmartMeterService.php on line 67
PHP message: PHP Notice: Trying to get property of non-object in /usr/share/nginx/www/websolarlog/classes/services/LiveSmartMeterService.php on line 68" while reading response header from upstream, client: 192.168.1.8, server: localhost, request: "GET /websolarlog/api.php/Live HTTP/1.1", upstream
(0000118)
Hertog (reporter)
2013-07-12 11:08

No invertor has been configured yet, as the Omniksol is not (yet? ;)) supported. I'm not sure if a configured inverter is a requirement?
(0000120)
Hertog (reporter)
2013-07-14 21:29

Problem seems related to permissions on the tty. Root can execute the wslP1.php script without a hitch, any other user has problems opening up the device. Looking into it.
(0000121)
broeken (reporter)
2013-07-14 21:39
edited on: 2013-07-14 21:44

You might have to place the user in the dialout group?

what user is running the script? www-data user?

root@raspberrypi:~# adduser www-data dialout
Adding user `www-data' to group `dialout' ...
Adding user www-data to group dialout
Done.

(0000122)
Hertog (reporter)
2013-07-14 22:01

Adding www-data to group dialout made it possible for the wslP1.php script to be run on the command line as user www-data, as it would be (I imagine) when called by Apache/nginx).

Also, I see data appearing in the liveSmartMeter-table, so I guess, reading data from the meter is working.
Solution as broeken suggested: add user www-data to group dialout.

This bug can be closed.
(0000123)
broeken (reporter)
2013-07-14 22:04

How did you manage to look at the tables?

I am having similar issues but the script runs fine.
I just don't see any data anywhere.

how do I debug?
(0000124)
broeken (reporter)
2013-07-14 22:22

PHP Notice: Undefined property: SmartMeterAddon::$deviceHistory in /usr/share/nginx/www/addon/SmartMeterAddon.php on line 34
PHP Fatal error: Call to a member function changeDeviceStatus() on a non-object in /usr/share/nginx/www/addon/SmartMeterAddon.php on line 34
not running, starting
/usr/bin/nohup: redirecting stderr to stdout
(0000125)
Hertog (reporter)
2013-07-14 22:43

@Broeken, I don't use the default sqlite database anymore, I changed the database.conf.php, and pointed it to my mysqlserver. That way I can look at the data any way I want it :)

mysql> select * from liveSmartMeter;
+----+------------+---------+----------+----------+---------+------------+-----------+-----------+----------+------------+-----------+
| id | time | invtnum | deviceId | gasUsage | liveGas | highReturn | lowReturn | highUsage | lowUsage | liveReturn | liveUsage |
+----+------------+---------+----------+----------+---------+------------+-----------+-----------+----------+------------+-----------+
| 1 | 1373834174 | 1 | 1 | 2815 | 0 | | 27751 | | 34050 | 0000000 | 0000590 |
+----+------------+---------+----------+----------+---------+------------+-----------+-----------+----------+------------+-----------+

energySmartMeter stays empty though, debugging now.
(0000126)
broeken (reporter)
2013-07-14 22:45

I do see some data

sqlite> select * from liveSmartMeter;
id|time|invtnum|deviceId|gasUsage|liveGas|highReturn|lowReturn|highUsage|lowUsage|liveReturn|liveUsage
1|1373827195|1|1|160878 |0|18545 |13268 |352898 |380995 |0000000 |0000160
2|1373826875|1|1|160878 |160878|18545 |13268 |352898 |380980 |0000000 |0000150
3|1373831634|3|3|160879 |0|18545 |13268 |352898 |381499 |0000000 |0000450
4|1373834577|5|5|160907 |0|18545 |13268 |352898 |381844 |0000000 |0000240


sqlite> select * from energySmartMeter;
id|invtnum|gasUsageT|highReturnT|lowReturnT|highUsageT|lowUsageT|gasUsage|highReturn|lowReturn|highUsage|lowUsage|liveReturn|liveUsage|time
1|1|160878 |18545 |13268 |352898 |380992 |0|0|0|0|43|||1373827203
2|3|0|0|0|0|0|0|0|0|0|0|||1373831401
3|5|160907 |18545 |13268 |352898 |381756 |28|0|0|0|122|||1373834407
(0000127)
broeken (reporter)
2013-07-14 23:24

I'm giving up. no data appears in my dashboard and I have no idea where to look.
Debug option gives me nothing.
(0000128)
mfrijmann (administrator)
2013-07-15 08:34

WSL needs a (solar) inverter so it can combine the data from the inverter with the data from the SmartMeter. This behavior is caused by the fact that we (martin and me) first got our solarpanels. Also we didn't expect people to use WSL for only the SmartMeter.

We need to do some code change, so WSL can display data when there is only a SmartMeter connected.
(0000185)
mfrijmann (administrator)
2013-08-29 15:24

We made some changes to the graphs.
Could you see if this issue is still there?
(0000189)
mfrijmann (administrator)
2013-09-04 19:56

No response.
I will close this ticket within a few days.
(0000192)
mfrijmann (administrator)
2013-09-07 10:54

no response...

- Issue History
Date Modified Username Field Change
2013-07-12 10:42 Hertog New Issue
2013-07-12 10:54 Hertog Note Added: 0000117
2013-07-12 11:08 Hertog Note Added: 0000118
2013-07-14 21:29 Hertog Note Added: 0000120
2013-07-14 21:39 broeken Note Added: 0000121
2013-07-14 21:44 broeken Note Edited: 0000121 View Revisions
2013-07-14 22:01 Hertog Note Added: 0000122
2013-07-14 22:04 broeken Note Added: 0000123
2013-07-14 22:22 broeken Note Added: 0000124
2013-07-14 22:43 Hertog Note Added: 0000125
2013-07-14 22:45 broeken Note Added: 0000126
2013-07-14 23:24 broeken Note Added: 0000127
2013-07-15 08:34 mfrijmann Note Added: 0000128
2013-08-15 16:12 mfrijmann Status new => confirmed
2013-08-15 16:12 mfrijmann Product Version => Release 1.0.0
2013-08-15 16:12 mfrijmann Target Version => Release 1.1.1
2013-08-29 15:24 mfrijmann Note Added: 0000185
2013-08-29 15:24 mfrijmann Assigned To => mfrijmann
2013-08-29 15:24 mfrijmann Status confirmed => feedback
2013-09-04 19:56 mfrijmann Note Added: 0000189
2013-09-07 10:54 mfrijmann Note Added: 0000192
2013-09-07 10:54 mfrijmann Status feedback => closed
2013-09-07 10:54 mfrijmann Resolution open => won't fix
2013-09-28 22:22 mdiphoorn Fixed in Version => Release 1.1.0
2013-09-28 22:24 mdiphoorn Target Version Release 1.1.1 => Release 1.1.0


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker