Jishar13 / pvbeancounter

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

Sunny Explorer not exporting with default 'log on as' set to local service #114

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
-I did a standard install and it just wouldn't read out of Sunny Explorer, no 
data showed in OutputHistory table. If I manually did a export to csv in SE 
then it would import into PVBC. So I ran the export command for SE from the 
command line (using the parameter copied from the pvservice.log) manually and 
it exported to a CSV ok. I then found if I changed the PVBC service to 'log on 
as' my logged in username it all works fine. 
I'm not an expert on service credentials and so not sure why others haven't 
been affected by this.
Actually in the PVBC log it says 'connection to plant failed'. So maybe PVBC 
was running SE as local service and that account didn't have access to start 
the bluetooth connection or something...? 
I could definitely see SE running in task manager for 30 seconds but bluetooth 
didn't show as connected until after this change. 

What version of the product are you using  - 1.7.0.6

Windows 7 64bit

Which Database Type -SQLite

Are there any unusual messages in PVService.log?
 15/09/2011 10:42:00 PM :T7 SunnyExplorerInverterManager :SunnyExplorerExtractCSV: Starting SunnyExplorer: "C:\PVRecords\SunnyExplorer.sx2" -userlevel user -password "0000" -exportdir "C:\PVRecords" -exportrange "20110915-20110915" -export energy5min
15/09/2011 10:42:00 PM :T7 SunnyExplorerInverterManager 
:SunnyExplorerExtractCSV: SunnyExplorer Started - waiting
15/09/2011 10:42:15 PM :T7 SunnyExplorerInverterManager 
:SunnyExplorerExtractCSV: SunnyExplorer Completed: exit code = 0
15/09/2011 10:42:15 PM :T7 SunnyExplorerInverterManager 
:SunnyExplorerExtractCSV: Sunny Explorer - Standard Output: 
CSV-Export: establishing connection to plant ...
CSV-Export: establishing connection to plant failed!
15/09/2011 10:42:15 PM :T7 SunnyExplorerInverterManager 
:SunnyExplorerExtractCSV: Sunny Explorer - Error Output: 

My settings.xml file is attached

Original issue reported on code.google.com by thomasrw...@gmail.com on 15 Sep 2011 at 1:35

GoogleCodeExporter commented 8 years ago
There are a number of past issues that relate to Bluetooth permissions and 
Bluetooth access from a service.

I choose to use Local Service for the PVBC service account as this is the 
account that Microsoft recommend for this type of activity. It has reduced 
permissions to protect your personal data from access by PVBC.

Local Service generally cannot access data in "My Documents" or any of the 
other personal folders owned by an individual user. You can change this by 
altering folder permissions but the default behaviour offers some protection 
from rogue service behaviour.

I have found that some Bluetooth stacks (driver software)cannot be accessed 
from Local Service. These seem to be in the minority. I have had success with 
Broadcom and Toshiba stacks on my computers. I replaced my original Toshiba 
Bluetooth with a Belkin usb dongle to solve reliability problems.

Other users have had trouble with Toshiba stacks (not many). I was unable to 
get a Blue Soliel stack to work at all for one user. It was replaced by dongle 
(possibly Broadcom). 

For many users changing the service from Local Service to SYSTEM solved the 
problem. Others needed to provide their personal login to get it to work.

I am reluctant to set permissions to SYSTEM at installation as this account has 
virtually not restrictions within the local system.

I am considering providing settings within the coinfiguration program to alter 
the service. It has had a lower priority to date.

I also suspect that some OEM Windows installations create Bluetooth installs 
that are not intended for service access. Perhaps they just didn't expect 
anyone to need it!

You could try the SYSTEM setting (it works for many but not all). This has the 
advantage of not being tied to your personal password.

Dennis M-F

Original comment by DennisMackayFisher on 15 Sep 2011 at 8:41

GoogleCodeExporter commented 8 years ago
I actually have a Toshiba stack, in a proper high end business Toshiba laptop. 
I'm happy with the setup I now have, if the problem isn't common then maybe 
just leave it, up to you - but I'd highly recommend putting it in the FAQ list 
of problems, then I wouldn't have needed to bother you :-)

Original comment by thomasrw...@gmail.com on 15 Sep 2011 at 11:46

GoogleCodeExporter commented 8 years ago
A Bluetooth help page is on my todo list. I believe it needs more than an FAQ 
entry as the issue is complex with many different responses for different 
situations.

I am please you have it working. 

The main issue with the solution you are using is that you must change the 
service login settings whenever you install a new version. I am considering 
expanded options to help here in future versions.

Dennis M-F

Original comment by DennisMackayFisher on 17 Sep 2011 at 12:01