navitron
 
Renewable Energy and Sustainability Forum
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Anyone wishing to register as a new member on the forum is strongly recommended to use a "proper" email address. Following continuous spam/hack attempts on the forum, "disposable" email addresses like Gmail, Yahoo and Hotmail tend to be viewed with suspicion, and the application rejected if there is any doubt whatsoever
 
Recent Articles: Navitron Partners With Solax to Help Create A More Sustainable Future | Navitron Calls for Increased Carbon Footprint Reduction In Light of Earth Overshoot Day | A plea from The David School - Issue 18
   Home   Help Search Login Register  
Pages: 1 [2] 3 4 5 6   Go Down
  Print  
Author Topic: RaspberryPi Python3 App for uploading Eco-Eye SmartPV serial o/p to PVOutput.org  (Read 48213 times)
PaulOckenden
Sr. Member
****
Offline Offline

Posts: 402


« Reply #15 on: April 16, 2015, 07:41:01 PM »

Can you upload it Jim? I'm sure that a few people here would be interested.

Ta.

P.
Logged
JST200
Jr. Member
**
Offline Offline

Posts: 58


« Reply #16 on: April 16, 2015, 08:00:33 PM »

DONE - see 1st post

Hi Paul,

Sorry I have been very remiss of late (or rather this last year)! In fact, since I sent a copy to Cliff I have had to make some more changes to support the latest updates to Raspian which support the new Pi 2.

I will try an get around in the next couple of days to upload the new version, with some notes about all the features I have added and bugs I have fixed. It was on my to do list, honest!

Cheers, Jim
« Last Edit: April 17, 2015, 06:16:18 PM by JST200 » Logged
JST200
Jr. Member
**
Offline Offline

Posts: 58


« Reply #17 on: April 17, 2015, 04:29:47 PM »

Here is a list of all the settings that can be adjusted within eespvo (Updated to v3-08-01).
Hopefully they are self explanatory. But if you have a question about any specific setting just shout!

These variables can be set in either eespvo.ini (recommended) which is read once at the beginning or eespvo.dbg which is read every short cycle interval.
The can also be hardwired into the code if you prefer (not recommended!).

Note:
All settings are case insensitive
"These variables can be set here in the code or can be set in either eespvo.ini, which is read once at the beginning, or eespvo.dbg, which is read every short cycle interval (they can also be hardwired into the code if you prefer, though this is not recommended!)."
By default eespvo.dbg is renamed eespvo.dbgR after it is read so that is is not read continuously. The rename can be inhibited by using dbgDsblDFRen=True.

SettingCommentDefaultTypeVersion
These must be set by the user!
pvo_keyPVOutput API KeyblankCharV3:06:06
pvo_sysidPVOutput System IDblankCharV3:06:06
These should be set by the user
ees_min_pvpMinimum watts PV system can outputlikely 1 watt per panel 4FloatV3:06:06
ees_max_pvpMaximum wats PV system can output 4000FloatV3:06:06
wu_keyWeatherUnderground API Key. Get key from wunderground.com. If null then WU data not acquirednullCharV3:06:06
wu_loc"WeatherUnderground location, use WU station e.g. ICHESHIR25. If lnull will use IP address location"nullCharV3:06:06
These may be set by the user
wu_updtTime of average day conditionse.g. Max Insolation time 12:00CharV3:06:06
ees_voltsLocal voltage 240FloatV3:06:06
flashLEDFlash Pi System Board Active (ACT) LEDTRUEBoolnV3:06:06
pvo_max_uplMax readings in a single PVO upload. If user has PV Donated status then may be set to 10030IntV3:06:06
logLevelLevel of logging. ONLY set to logSi if absolutely necessarylogErIntV3:06:06
logFileKeepNo. of old log files to keep 7IntV3:06:06
emailAddrEmail address for SMTP Warning emails. If blank emails not sentblankCharV3:06:06
smtpUsernmSMTP Account Logon Username. Often not required if you email and broadband provider are sameblankCharV3:06:06
smtpUserpwSMTP Account Logon Password. Often not required if you email and broadband provider are samenullCharV3:06:06
smtpHost"SMTP Host address, must be set if emailAddr set. Your email provider can provide "nullCharV3:06:06
smtpSSLSMTP SSL Encryption required. Your email provider can provideFALSEV3:06:06
smtpPort"SMTP Port address, must be set if emailAddr set. Your email provider can provide"nullIntV3:06:06
emailLevelLevel of email to send emaBrIntV3:06:06
webGUIUse the Web GuiTRUEBoolnV3:07:04
pvAddOuDly"Delay between updating PV Gen and Use data and Weather condition. 30s should be enough to allow PVOutput to process data, but increase if not"30IntV3:06:06
ees_deviceUSB device for monitoring Power Gen and Power Con/dev/ttyUSB0CharV3:06:06
imm_deviceUSB device for monitoring Solar Immersion device/dev/ttyUSB1CharV3:06:06
usbErrLmtUSB Consecutive Input Error Limit50IntV3:08:01
immPrsnt"Solar Immersion device present. immNon=No, immMt1=Monitor, immEst=Estimate"0IntV3:06:06
immExpLvlSolar Immersion Export Level in W0FloatV3:06:06
immExpTolSolar Immersion Export Level Tolerance in W.  Used in conjunction with immEst. Suggest always gt 00.5FloatV3:06:06
pcAvgNumNumber of Power Cons to store to calculate average Power Con (i.e. 12 = 60mins)12IntV3:06:06
csv4sCreate 4s csv file FALSEBoolnV3:06:06
csv4sKeepNo. of old 4s csv files to keep 1IntV3:06:06
csv5mCreate 5m csv file FALSEBoolnV3:06:06
csv5mKeepNo. of old 5m csv files to keep 1IntV3:06:06
dailyRebootReboot at midnight after EOD processing FALSEBoolnV3:06:06
ConTimeOutConnection timeout to PVO in sec. 10IntV3:06:06
These are primarily for debug use and should only be set with extreme care
pvo_fullDayOutput full dayor only when Generating TRUEBooln V3:06:06
logConsoleCreate console output FALSEBoolnV3:06:06
logFileCreate logfile output TRUEBoolnV3:06:06
dbgSimGCUSBSimulate Gen and Con USB input.  Enables 2nd instance of appFALSEBoolnV3:06:06
dbgSimImmUSBSimulate Imm and Oth USB input.  Enables 2nd instance of appFALSEBoolnV3:06:06
dbgUSBRdmCreate Randomised Sim USB input FALSEBoolnV3:06:06
dbgUSBRanCharRandomly insert char into USB Data StreamFALSEBoolnV3:08:01
dbgUSBIntInterval between Sim USB input in sec. 4IntV3:06:06
dbgNoUploadDon't actually upload to PVOutput if True FALSEBoolnV3:06:06
pvo_uplIntPVOutput Upload Interval in mins - MUST be 5. ONLY change when doing short debug runs5IntV3:06:06
pvo_uplDlyDelay PVoutput Upload process in sec.0IntV3:06:06
iniFilename.ini filename eespvo.iniCharV3:06:06
logFilename.log filename eespvo.logCharV3:06:06
logFileDir historical logfile directory /home/pi/eespvo/log/CharV3:06:06
dbgFilename.dbg filename eespvo.dbgCharV3:06:06
wrnFilenamewarning filename eespvo.warningCharV3:06:06
shortCycIntShort cycle interval in sec5IntV3:06:06
medCycIntMedium cycle interval in sec 3600IntV3:06:06
dbgDsblDFRenDisable .dbg file rename if True FALSEBoolnV3:06:06
ExtDataRndNo. of decimals to round Extended data 3IntV3:06:06
csv4sDir4sec data directory /home/pi/eespvo/csv4s/CharV3:06:06
csv5mDir5min  data directory /home/pi/eespvo/csv5m/CharV3:06:06
nowRebootReboot now! Mutually exclusive with dbgDsblDFRen. To stop race condition. dbgDsblDFRen takes precedenceFALSEBoolnV3:06:06
runOKFlag to say eespvo is running OK TRUEBoolnV3:06:06
« Last Edit: October 14, 2015, 03:32:41 PM by JST200 » Logged
JST200
Jr. Member
**
Offline Offline

Posts: 58


« Reply #18 on: April 17, 2015, 05:38:09 PM »

Due to the prod from CLIFFMCL  Smiley I have been kicked into action again, as can been seen from my recent few posts.

I have some things on my "to do" list, which may be of interested:

  • Implementing a web server capability (probably based on Apache) to enable:
    • A dashboard showing the 4sec data. This would provide a representation of the realtime data, via a web interface, similar to the information provided by EcoEye monitor (see image below)
    • Control of the eespvo .ini settings
  • Monitor of mains voltage using the yoctovolt (http://www.yoctopuce.com/EN/products/usb-sensors/yocto-volt)
  • Allow the use of a second EcoEye to monitor other power scenarios (e.g. in my case the amout of power being diverted to a Solar Immersion Switch) which are then displayed on the PVOutput Extended Data Graphs[/url])

If anyone has any other suggestions or requests then I am more than happy to hear them


* Dashboard.jpg (62.36 KB, 975x362 - viewed 659 times.)
« Last Edit: April 17, 2015, 06:15:19 PM by JST200 » Logged
CLIFFMCL
Newbie
*
Offline Offline

Posts: 3


« Reply #19 on: April 17, 2015, 08:34:40 PM »

Thanks again for all your help this last couple of weeks, Jim.

As you suggested here are some problems I cam-up against.

I installed the NOOBS version of Raspbian, thinking it was simply a way to install Raspbian without the hassle of installing other s/w on my PC. From comments I've since seen there are other subtle differences which may have caused my problems. I may rebuild the Pi sometime using a normal Raspbian install.

No matter what I did I couldn't get eespvo.py to run automatically via rc.local and eespvo.scr. Eventually I found a post on another forum which described auto starting programs using a cron job. To get it all working I did this:

1. Copy and paste the contents of eespvo.scr to a new file called start

2. Make start executableby right clicking on  it in File Manages, going to Properties, Permissions and in the Execute dropdown setting it to Everyone

3. In the terminal type: "sudo crontab -e"

4. In the file that opens go to the end and add: "@reboot sudo /home/pi/eespvo/start"

5. CTRL X and save the changes

6. If you have had eespvo running at all you should see a file "eespvo.warningM". Delete this.

7. Reboot and check that eespvo.warningM is produced.

Also I found that to get mine to run (even with the latest version, Jim) I had to set FlashLED=False in the .ini file. As I'm using a case that doesn't let me see the LEDs this isn't a big problem.

Hopefully this will be helpful to someone.
Cliff
Hopefully this
« Last Edit: April 17, 2015, 10:09:36 PM by CLIFFMCL » Logged
JST200
Jr. Member
**
Offline Offline

Posts: 58


« Reply #20 on: April 17, 2015, 09:02:36 PM »

Thanks for that.

Just one question,  Cliff.

You say "rc.conf". Is that a  typo? It should be "rc.local".
Logged
CLIFFMCL
Newbie
*
Offline Offline

Posts: 3


« Reply #21 on: April 17, 2015, 10:10:12 PM »

Jim

You're right rc.config was a typo. it's now corrected in the post
Logged
JST200
Jr. Member
**
Offline Offline

Posts: 58


« Reply #22 on: May 24, 2015, 07:09:52 PM »

Version v3-07-04 released.

It's highlight is that it provides a web based graphical interface of real-time data showing current Generation, Consumption and Imported/Exported Watts

See the first post: www.navitron.org.uk/forum/index.php/topic,22190.msg257804.html#msg257804
« Last Edit: May 24, 2015, 07:37:24 PM by JST200 » Logged
TheFairway
Guest
« Reply #23 on: May 24, 2015, 07:52:24 PM »

Nice.

Out of curiosity, is volts a static value or from the monitor? I contacted Peter at EcoEye about this and volts wasnt going to hapen with the ecoeye that i had but reading between the lines, might be on a future product. That was a long time ago and dont know if thats changed.

-Ian
Logged
JST200
Jr. Member
**
Offline Offline

Posts: 58


« Reply #24 on: May 24, 2015, 08:39:18 PM »

Hi Ian,

Currently it's a static value, established in the .ini file.

My plan is to integrate the yoctovolt device (www.yoctopuce.com/EN/products/usb-electrical-sensors/yocto-volt) as and when time and funds allow. The web based interface is taking up development time at the moment.

The yoctovolt is the only device I can find that can provide a voltage. So unless someone can help with identifying another (perhaps cheaper) solution than that's the way I will go.

It is difficult (if not impossible) for the existing eco-eye monitors to provide voltage, since they don't insert anything into the mains circuit to measure the voltage. I think Peter might have had a plan to create a new sensor device. But I've neither seen or heard anything about it.

Cheers, Jim
« Last Edit: May 24, 2015, 08:41:41 PM by JST200 » Logged
johng2
Newbie
*
Offline Offline

Posts: 5


« Reply #25 on: June 09, 2015, 12:38:04 PM »

Jim,
Wonderful to see that this thread is active again! I have been running a previous version of eespvo for over a year now without problems after initial angst getting it to run on the same Pi as Domoticz. At the moment it's uploading the eco-eye data to pvoutput and domoticz is downloading and incorporating it - a bit cumbersome and I plan to populate domoticz straight from eespvo.
The new additions look exciting and I'll download and update asap. I too am trying to find a way of logging the solar power switched to water heating without spending large sums. That third socket on the eco-eye transmitter is seriously frustrating!
Many thanks and keep up the good work. I'm not sure if you can log downloads from the dropbox but with 150 views of the screen dump there must be several people using it.
John G
Logged
JST200
Jr. Member
**
Offline Offline

Posts: 58


« Reply #26 on: June 09, 2015, 06:33:40 PM »

Hi John,

Thanks for the encouragement  Cheesy

I only now of 4 people who are using it for certain. 5 now with you.  extrahappy
Which is great news. I am really happy that it's out there, though I am surprised I haven't had more questions about it's installation, setup and running. Perhaps it's better than I though!!

Cheers, Jim
Logged
johng2
Newbie
*
Offline Offline

Posts: 5


« Reply #27 on: June 11, 2015, 11:41:52 AM »

Nice - very nice! (there was a bow-down-in-admiration smiley but it seems to have gone today...)
Did a new instal and all worked perfectly first time other than:-
1. Forgot to do a chmod -x on eespvo.scr
2. Initially couldn't get the network access to work, just getting the Apache 'Welcome no content' message in spite of having the eespvo's index php in /var/www. Eventually discovered that the Apache default installed index.htm which contains the default welcome message seems to take precedence over index.php. Deleted the index.htm and - voila!

Definitely more informative than eco-eye's single Big Number and seems more immediate than pvoutput.

A couple of points. I was watching early this morning and generation was flicking just over and under 1000w. It was slightly confusing that the scale of the bar chart flicked real time too so it looked as if generation was flicking wildly and in the opposite direction to actual. Also refreshing browser starts the chart from scratch and on an ipad, putting it to sleep and then accessing again leaves a long straight line between the last access and the new. Being too lazy too look, where is this run from, the python program or somewhere in /var/www?

Can't wait for the dashboard...

John G
Logged
JST200
Jr. Member
**
Offline Offline

Posts: 58


« Reply #28 on: June 11, 2015, 01:28:23 PM »

Thanks, John.    Smiley

I always use file manager to set my privs, etc.. it uit has downloaded the webpage from /var/wwwed to be a checkbox, but with the latest OS release it's changed to a selection.

I think I put that you had to delete or rename index.html in my installation notes (I'll check) but well found anyway.  genuflect  lol

Currently I use "morris graphs" to do the graphs and it does it's own thing regarding scaling. I have looked at switching to "google graphs", though I don't know if that will make any difference.  Something to investigate in the future.

Currently the web handling is done by the browser (I.e . Your device) once it has downloaded the web page from /var/www. To limit the traffic it only accesses the latest 4sec data update and only holds historical 4sec data (locally), since the last browser refresh. The future intention is to read the complete 4sec data, that eespvo can currently generate and is stored on the Pi. However,  the number of records in this file gets very large very quickly, so reading the data from your local browser to process and get recent 4sec data is way to network intensive and slow. That's why I have used .php rather than just.html, as .php is server (Pi) executed code. This means it can process a request for the relevant records on the Pi and then pass just what's needed. It also, incidentally overcomes access security issues.

Hope that makes sense.

Cheers, Jim
Logged
johng2
Newbie
*
Offline Offline

Posts: 5


« Reply #29 on: June 11, 2015, 11:00:07 PM »

I can see that I'll have to stretch my limited knowledge!

I'm still trying to get my head round what the buttons above the graph do; goto start, big go back, little go back, a number, little go forward, big go forward, goto end, refresh. The goto start starts the graphfrom zero but not sure about the others or what the refresh one does (it seems to put the number in the middle to 00:10:00). I'll have more of a play to work it out. It has already established that my water pump has a leak (short regular pulses about a minute apart) and much easier and quicker than taking the card out of the eco-eye and uploading it.

After running or a number of hours in Firefox/Windows 7, I am getting unresponsive script error messages pointing to components/raphael/raphael-min.js:10 & 11 and (if I click continue) to components/morrisjs/morris.min.js:6. Not a problem but may be interesting?

John G
Logged
Pages: 1 [2] 3 4 5 6   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines
SMFAds for Free Forums
Simple Audio Video Embedder
Valid XHTML 1.0! Valid CSS!