Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Need help for a Linux script file to run on startup.

  1. #11
    Join Date
    Oct 2012
    Location
    UK
    Posts
    66
    Total Downloaded
    0
    Minicom is a terminal emulator so will be expecting interactive use...

    To detach it from the calling process you can use 'screen'.

    look at the instructions for screen.

    You'll invoke it something like this:

    screen -S myminicom -fa -d -m 'minicom -D /dev/ttyUSB0 -b 57600'

    You can then reconnect to that minicom 'session' using:

    screen -R myminicom

    when reattached 'ctrl-a' followed by 'd' will detach back to the shell

  2. #12
    Join Date
    Sep 2014
    Location
    Australia
    Posts
    7
    Total Downloaded
    0
    think of cron as being the same as the task scheduler on Windows. you create an entry that runs every "x" minutes/seconds/hours ....

    I'm not 100% sure how you're using minicom to download data from the EnviR ... by default a "modern" PC has a 57600 baud serial port by default, and minicom is a pretty old school dialler/terminal program - think 1980's - 1990's before web browsers.

    I don't have access to an EnviR, but the method pvoutput recommend for uploading data via Linux is using the integration service published by PVOutput that you can download from here pvoutput / PVOutput Integration Service / Downloads — Bitbucket

    there is also a third party app that's not Java based - Measureit by lalelunet I've used this in the past, and it's probably a little lighter on the operating system given it will run on a raspberry pi. Instructions are here for how to install it on Linux Measureit on Linux * lalelunet/measureit Wiki * GitHub

  3. #13
    p38arover's Avatar
    p38arover is offline Major part of the heart and soul of AULRO.com
    Administrator
    I'm here to help you!
    Gold Subscriber
    Join Date
    Jan 1970
    Location
    Western Sydney
    Posts
    30,706
    Total Downloaded
    1.63 MB
    I am using the PVOutput Integration Service. The Linux instructions are sparse and expect one to be proficient in Linux. Other people have tried using the instructions and have also given up. I've been using the Windows version for over 7 years on different PCs. This is my first attempt at using it with Linux.

    Re baud rate, this version of Ubuntu 12.04.01 seems to default the baud rate to 38K whereas the EnviR is expecting 57K. (This laptop won't run a later version of Linux as the laptop is a Pentium M Celeron without PAE support.)

    Re measureit, I knew of it but thought it was Raspberry Pi only. I'll look into the Linux version.

    My system is uploading but I have to start it manually. p38arover 6.460kW | Live Output

    The next issue is getting the generation data to upload. On my previous inverter, I had an RS232 connection to the laptop used by the EnviR and both generation and consumption data were uploaded.

    With the new inverters (now 2 systems), the generation data is collected via WiFi from the inverter and uploaded to the inverter manufacturer. Uploads from there to PVO are hourly but for some reason, I can only get generation data uploaded if I stop uploading consumption data, e.g., p38arover 6.460kW | Live Output
    Ron B.
    VK2OTC

    2003 L322 Range Rover Vogue 4.4 V8 Auto
    2007 Yamaha XJR1300
    Previous: 1983, 1986 RRC; 1995, 1996 P38A; 1995 Disco1; 1984 V8 County 110; Series IIA



    RIP Bucko - Riding on Forever

  4. #14
    Join Date
    Sep 2014
    Location
    Australia
    Posts
    7
    Total Downloaded
    0
    just looking at the PVOutput Help pages now I can see you've got Sungrow inverters - have you looked at something like Herculis GitHub - meltaxa/herculis: Use AWS Lambda to fetch your Sungrow Solar metrics and send these to the PVOutput website. or sungrow2pvoutput GitHub - kronicd/sungrow2pvoutput: Takes data from the sungrow inverter API and sends it to pvoutput.org ?

    they look to be fairly basic, but do the job as long as your inverters are registered with the Sungrow API service which appears to track import and export power, which enables PVOutput to calculate consumption.

    sungrow2pvoutput is fairly messy code, but doesn't require an additional third party (AWS Lamda)

  5. #15
    p38arover's Avatar
    p38arover is offline Major part of the heart and soul of AULRO.com
    Administrator
    I'm here to help you!
    Gold Subscriber
    Join Date
    Jan 1970
    Location
    Western Sydney
    Posts
    30,706
    Total Downloaded
    1.63 MB
    Thanks Drew.

    I am using meltaxa's Herculis scripts for uploading my generation data. I will look into sungrow2pvoutput.
    Ron B.
    VK2OTC

    2003 L322 Range Rover Vogue 4.4 V8 Auto
    2007 Yamaha XJR1300
    Previous: 1983, 1986 RRC; 1995, 1996 P38A; 1995 Disco1; 1984 V8 County 110; Series IIA



    RIP Bucko - Riding on Forever

  6. #16
    p38arover's Avatar
    p38arover is offline Major part of the heart and soul of AULRO.com
    Administrator
    I'm here to help you!
    Gold Subscriber
    Join Date
    Jan 1970
    Location
    Western Sydney
    Posts
    30,706
    Total Downloaded
    1.63 MB
    My lack of knowledge is showing...


    I'm testing that sungrow2pvoutput on a Windows 10 machine. I installed Python. The powah.py script needed some minor editing of the print commands for Python 3.6.5 (syntax errors).

    I have a few more things to resolve. The modules called in the script:
    import urllib2
    import urllib
    import json
    from StringIO import StringIO
    import sys
    import httplib
    import math

    ...don't work with Python 3. It might be best for a neophyte like me to revert to an earlier version of Python!

    It's a learning exercise which ain't all bad!
    Ron B.
    VK2OTC

    2003 L322 Range Rover Vogue 4.4 V8 Auto
    2007 Yamaha XJR1300
    Previous: 1983, 1986 RRC; 1995, 1996 P38A; 1995 Disco1; 1984 V8 County 110; Series IIA



    RIP Bucko - Riding on Forever

  7. #17
    p38arover's Avatar
    p38arover is offline Major part of the heart and soul of AULRO.com
    Administrator
    I'm here to help you!
    Gold Subscriber
    Join Date
    Jan 1970
    Location
    Western Sydney
    Posts
    30,706
    Total Downloaded
    1.63 MB
    Quote Originally Posted by BennehBoy View Post
    Minicom is a terminal emulator so will be expecting interactive use...

    To detach it from the calling process you can use 'screen'.

    look at the instructions for screen.

    You'll invoke it something like this:

    screen -S myminicom -fa -d -m 'minicom -D /dev/ttyUSB0 -b 57600'

    You can then reconnect to that minicom 'session' using:

    screen -R myminicom

    when reattached 'ctrl-a' followed by 'd' will detach back to the shell
    Ahh. I saw references to screen but the refs were written in such a way that I thought it replaced minicom.

    I'll try running the app without setting the baud rate. It's possible the EnviR will transfer the data happily.
    Ron B.
    VK2OTC

    2003 L322 Range Rover Vogue 4.4 V8 Auto
    2007 Yamaha XJR1300
    Previous: 1983, 1986 RRC; 1995, 1996 P38A; 1995 Disco1; 1984 V8 County 110; Series IIA



    RIP Bucko - Riding on Forever

Page 2 of 2 FirstFirst 12

Tags for this Thread

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search AULRO.com ONLY!
Search All the Web!