Notice To Unregistered Users: By visiting this forum, you are automatically agreeing to the terms and conditions set forth in our Safety Notice & User Agreement. All electrical work shall be completed by a qualified and licensed electrician. Admins, moderators, and members do not accept any liability for the information posted here. Please make sure to read the Safety Notice & User Agreement for the full disclosure. To remove this message, please register for an account.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Raspberry Pi talk to Infinisolar
#31
(06-03-2018, 06:11 PM)daromer Wrote: Yes you run 3 instances of the software. Copy the folder for instance PIP1 PIP2 PIP3... Then configure each one of them. Setup Systemd if thats what you use and run it


But as I said the PI can have problem with many usb devices towards it. If so use external USB active hub

Oh ok. 
There is a parallel protocol for the PIP4048 inverter which could effectively allow your app to talk to all inverters connected via the communications cables. I am just not sure where to get it.

I have a strage issue. The past two mornings, I noticed that the solar_pip software stopped graphing any stats. Then I restart it, and it's fine.

Looking at the log, I saw this:

Code:
root@grafpi:~# tail -f /var/log/solar_pip.log
Jun  8 06:35:01 grafpi solar_pip[456]: [2018-06-08 06:35:01] info serial:/dev/hidraw0:SEND query/general_status
Jun  8 06:35:01 grafpi solar_pip[456]: [2018-06-08 06:35:01] info serial:/dev/hidraw0:SEND_RAW [{"type":"Buffer","data":[81,80,73,71,83,183,169,13]}]
Jun  8 06:35:14 grafpi solar_pip[456]: [2018-06-08 06:35:14] ERR! serial:/dev/hidraw0 Reciving reached threshold 12406ms (10000ms)
Jun  8 06:35:14 grafpi solar_pip[456]: [2018-06-08 06:35:14] WARN serial:/dev/hidraw0 Close serial port
Jun  8 06:35:14 grafpi solar_pip[456]: [2018-06-08 06:35:14] info serial:/dev/hidraw0 Open serial port
Jun  8 06:35:14 grafpi solar_pip[456]: [2018-06-08 06:35:14] ERR! serial:/dev/hidraw0 Error: Error Resource temporarily unavailable Cannot lock port
Jun  8 06:35:14 grafpi solar_pip[456]: [2018-06-08 06:35:14] ERR! serial:/dev/hidraw0     at Error (native)
Jun  8 06:35:14 grafpi solar_pip[456]: [2018-06-08 06:35:14] ERR! serial:/dev/hidraw0  { Error: Error Resource temporarily unavailable Cannot lock port
Jun  8 06:35:14 grafpi solar_pip[456]: [2018-06-08 06:35:14] ERR! serial:/dev/hidraw0     at Error (native)
Jun  8 06:35:14 grafpi solar_pip[456]: [2018-06-08 06:35:14] ERR! serial:/dev/hidraw0   stack: 'Error: Error Resource temporarily unavailable Cannot lock port\n          at Error (native)' }
^C
root@grafpi:~# dmesg | grep hidraw


Have you seen this before?
Reply
#32
Yes its due to the connection between nthe raspberry pi and the inverter. The issue is that the raspberry pi drops the connection in a strange way or even locks the port. With that said we are just testing a work around in the software to cope with it.
I dont get that error that often in my system but had it with the old wires.
It might be that we just simply need to set delay between close and open to avoid most of the issues.
The Ultimate DIY Solar and build place
YouTube / Forum system setup / My webpage  Diy Tech & Repairs

Current: 10kW Mpp Hybrid | 4kW PIP4048 | 2x PCM60x | 83kWh LiFePo4 | 10kWh 14s 18650 |  66*260W Poly
Upcoming: 14S 18650~30kWh | Automatic trip breakers, and alot more
Reply
#33
Btw *experimental*

in the folder you run it run "npm update" We have an updated version and i suspect you havent installed that. That version have fixes for above.

Before you do that make sure to make a backup of all ur files!!

Im about to test it out this weekend before i push it into new iso
The Ultimate DIY Solar and build place
YouTube / Forum system setup / My webpage  Diy Tech & Repairs

Current: 10kW Mpp Hybrid | 4kW PIP4048 | 2x PCM60x | 83kWh LiFePo4 | 10kWh 14s 18650 |  66*260W Poly
Upcoming: 14S 18650~30kWh | Automatic trip breakers, and alot more
Reply
#34
(06-08-2018, 06:34 AM)daromer Wrote: Yes its due to the connection between nthe raspberry pi and the inverter. The issue is that the raspberry pi drops the connection in a strange way or even locks the port. With that said we are just testing a work around in the software to cope with it.
I dont get that error that often in my system but had it with the old wires.
It might be that we just simply need to set delay between close and open to avoid most of the issues.

I don't see if often either. In fact, I think the last time was about 3 weeks ago. And I couldn't figure out why it does it. A simple restart "fixes" the problem temporarily.
Reply
#35
(06-08-2018, 06:42 AM)daromer Wrote: Btw *experimental*

in the folder you run it run "npm update" We have an updated version and i suspect you havent installed that. That version have fixes for above.

Before you do that make sure to make a backup of all ur files!!

Im about to test it out this weekend before i push it into new iso

Hi,

Did the fix work on your side?
I see there are two updated files on github, "index.js" and "package.json", which I downloaded to the correct folder but this morning I got the error again:

Code:
root@grafpi:~# tail -f /var/log/solar_pip.log
Jun 19 06:36:07 grafpi solar_pip[2295]: [2018-06-19 06:36:07] info serial:/dev/hidraw0:SEND query/general_status
Jun 19 06:36:07 grafpi solar_pip[2295]: [2018-06-19 06:36:07] info serial:/dev/hidraw0:SEND_RAW [{"type":"Buffer","data":[81,80,73,71,83,183,169,13]}]
Jun 19 06:36:17 grafpi solar_pip[2295]: [2018-06-19 06:36:17] ERR! serial:/dev/hidraw0 Reciving reached threshold 10026ms (10000ms)
Jun 19 06:36:17 grafpi solar_pip[2295]: [2018-06-19 06:36:17] WARN serial:/dev/hidraw0 Close serial port
Jun 19 06:36:17 grafpi solar_pip[2295]: [2018-06-19 06:36:17] info serial:/dev/hidraw0 Open serial port
Jun 19 06:36:18 grafpi solar_pip[2295]: [2018-06-19 06:36:18] ERR! serial:/dev/hidraw0 Error: Error Resource temporarily unavailable Cannot lock port
Jun 19 06:36:18 grafpi solar_pip[2295]: [2018-06-19 06:36:18] ERR! serial:/dev/hidraw0     at Error (native)
Jun 19 06:36:18 grafpi solar_pip[2295]: [2018-06-19 06:36:18] ERR! serial:/dev/hidraw0  { Error: Error Resource temporarily unavailable Cannot lock port
Jun 19 06:36:18 grafpi solar_pip[2295]: [2018-06-19 06:36:18] ERR! serial:/dev/hidraw0     at Error (native)
Jun 19 06:36:18 grafpi solar_pip[2295]: [2018-06-19 06:36:18] ERR! serial:/dev/hidraw0   stack: 'Error: Error Resource temporarily unavailable Cannot lock port\n    at Error (native)' }


Interestingly, it's always at about the same time, though not always on the same day.

and there is no "nmp" command on the IS:

Code:
root@grafpi:/home/pi# cd /energy-logger/solar-sis/
root@grafpi:/energy-logger/solar-sis# nmp update
bash: nmp: command not found
root@grafpi:/energy-logger/solar-sis# apt-get install nmp
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package nmp
Reply
#36
"npm" not nmp... Wink But update will fail so hold off.
The Ultimate DIY Solar and build place
YouTube / Forum system setup / My webpage  Diy Tech & Repairs

Current: 10kW Mpp Hybrid | 4kW PIP4048 | 2x PCM60x | 83kWh LiFePo4 | 10kWh 14s 18650 |  66*260W Poly
Upcoming: 14S 18650~30kWh | Automatic trip breakers, and alot more
Reply
#37
(06-19-2018, 07:44 AM)daromer Wrote: "npm" not nmp... Wink But update will fail so hold off.

Hi,

Ok, so curiously, does it lock the port (I presume you mean the USB port?) or does something else happen?

I ask, cause this morning again, the data stopped updating just at 06:52am, yet the log doesn't give the error I saw last. Instead, the logs don't run, it "hung" here:


Code:
root@grafpi:/energy-logger#
root@grafpi:/energy-logger# tail -f /var/log/solar_pip.log
Jun 21 19:17:02 grafpi solar_pip[462]: [2018-06-21 19:17:02] info serial:/dev/hidraw0:SEND query/general_status
Jun 21 19:17:02 grafpi solar_pip[462]: [2018-06-21 19:17:02] info serial:/dev/hidraw0:SEND_RAW [{"type":"Buffer","data":[81,80,73,71,83,183,169,13]}]
Jun 21 19:17:03 grafpi solar_pip[462]: [2018-06-21 19:17:03] info serial:/dev/hidraw0:RECIVED_RAW Data:
Jun 21 19:17:03 grafpi solar_pip[462]: [2018-06-21 19:17:03] info serial:/dev/hidraw0:RECIVED query/general_status
Jun 21 19:17:03 grafpi solar_pip[462]: [2018-06-21 19:17:03] info influx:SEND pip_query_general_status grid_voltage=217.3,grid_frecuency=50,ac_output_voltage=217.3,ac_output_frecuency=50,ac_output_power_va=217,ac_output_active_power=118,output_load_percent=4,bus_voltage=437,battery_voltage=54,battery_charging_current=1,battery_capacity=100,inverter_heat_sink_temperature=52,pv_input_current_for_battery=0,pv_input_voltage_1=0,battery_voltage_from_scc=0,battery_discharge_current=0,device_status=00010101,charging_scc=1,charging_ac=0,charging_scc_acc=1
Jun 21 19:17:05 grafpi solar_pip[462]: [2018-06-21 19:17:05] info serial:/dev/hidraw0:SEND query/general_status
Jun 21 19:17:05 grafpi solar_pip[462]: [2018-06-21 19:17:05] info serial:/dev/hidraw0:SEND_RAW [{"type":"Buffer","data":[81,80,73,71,83,183,169,13]}]
Jun 21 19:17:06 grafpi solar_pip[462]: [2018-06-21 19:17:06] info serial:/dev/hidraw0:RECIVED_RAW Data:
Jun 21 19:17:06 grafpi solar_pip[462]: [2018-06-21 19:17:06] info serial:/dev/hidraw0:RECIVED query/general_status
Jun 21 19:17:06 grafpi solar_pip[462]: [2018-06-21 19:17:06] info influx:SEND pip_query_general_status grid_voltage=217.2,grid_frecuency=50,ac_output_voltage=217.2,ac_output_frecuency=50,ac_output_power_va=216,ac_output_active_power=110,output_load_percent=4,bus_voltage=437,battery_voltage=54,battery_charging_current=0,battery_capacity=100,inverter_heat_sink_temperature=52,pv_input_current_for_battery=0,pv_input_voltage_1=0,battery_voltage_from_scc=0,battery_discharge_current=0,device_status=00010101,charging_scc=1,charging_ac=0,char


In this case I run "systemctl restart solar_pip" and it started logging again.
But when it gives that other error, "systemctl restart solar_pip" doesn't work.

And it seems like my Pi ran fine for 3 days without getting the error this time.
Reply
#38
Hi,

I see this morning it crashed again, and interestingly, it crashed at roughly the same time as last:

Code:
root@grafpi:~# tail -f /var/log/solar_pip.log
Jul  7 06:38:58 grafpi solar_pip[13943]: [2018-07-07 06:38:58] info serial:/dev/hidraw0:SEND query/device_rated_information
Jul  7 06:38:58 grafpi solar_pip[13943]: [2018-07-07 06:38:58] info serial:/dev/hidraw0:SEND_RAW [{"type":"Buffer","data":[81,80,73,82,73,248,84,13]}]
Jul  7 06:39:08 grafpi solar_pip[13943]: [2018-07-07 06:39:08] ERR! serial:/dev/hidraw0 Reciving reached threshold 10030ms (10000ms)
Jul  7 06:39:08 grafpi solar_pip[13943]: [2018-07-07 06:39:08] WARN serial:/dev/hidraw0 Close serial port
Jul  7 06:39:08 grafpi solar_pip[13943]: [2018-07-07 06:39:08] info serial:/dev/hidraw0 Open serial port
Jul  7 06:39:08 grafpi solar_pip[13943]: [2018-07-07 06:39:08] ERR! serial:/dev/hidraw0 Error: Error Resource temporarily unavailable Cannot lock port
Jul  7 06:39:08 grafpi solar_pip[13943]: [2018-07-07 06:39:08] ERR! serial:/dev/hidraw0     at Error (native)
Jul  7 06:39:08 grafpi solar_pip[13943]: [2018-07-07 06:39:08] ERR! serial:/dev/hidraw0  { Error: Error Resource temporarily unavailable Cannot lock port
Jul  7 06:39:08 grafpi solar_pip[13943]: [2018-07-07 06:39:08] ERR! serial:/dev/hidraw0     at Error (native)
Jul  7 06:39:08 grafpi solar_pip[13943]: [2018-07-07 06:39:08] ERR! serial:/dev/hidraw0   stack: 'Error: Error Resource temporarily unavailable Cannot lock port\n    at Error (native)' }
^C
root@grafpi:~# tail -f /var/log/solar_pip.log
Jul  7 06:38:58 grafpi solar_pip[13943]: [2018-07-07 06:38:58] info serial:/dev/hidraw0:SEND query/device_rated_information
Jul  7 06:38:58 grafpi solar_pip[13943]: [2018-07-07 06:38:58] info serial:/dev/hidraw0:SEND_RAW [{"type":"Buffer","data":[81,80,73,82,73,248,84,13]}]
Jul  7 06:39:08 grafpi solar_pip[13943]: [2018-07-07 06:39:08] ERR! serial:/dev/hidraw0 Reciving reached threshold 10030ms (10000ms)
Jul  7 06:39:08 grafpi solar_pip[13943]: [2018-07-07 06:39:08] WARN serial:/dev/hidraw0 Close serial port
Jul  7 06:39:08 grafpi solar_pip[13943]: [2018-07-07 06:39:08] info serial:/dev/hidraw0 Open serial port
Jul  7 06:39:08 grafpi solar_pip[13943]: [2018-07-07 06:39:08] ERR! serial:/dev/hidraw0 Error: Error Resource temporarily unavailable Cannot lock port
Jul  7 06:39:08 grafpi solar_pip[13943]: [2018-07-07 06:39:08] ERR! serial:/dev/hidraw0     at Error (native)
Jul  7 06:39:08 grafpi solar_pip[13943]: [2018-07-07 06:39:08] ERR! serial:/dev/hidraw0  { Error: Error Resource temporarily unavailable Cannot lock port
Jul  7 06:39:08 grafpi solar_pip[13943]: [2018-07-07 06:39:08] ERR! serial:/dev/hidraw0     at Error (native)
Jul  7 06:39:08 grafpi solar_pip[13943]: [2018-07-07 06:39:08] ERR! serial:/dev/hidraw0   stack: 'Error: Error Resource temporarily unavailable Cannot lock port\n    at Error (native)' }


The first time (that I recorded), it crashed at "2018-06-08 06:35:01" and then "2018-06-19 06:36:07", now today at "2018-07-07 06:38:58".


I have looked through the crons (i.e. "crontab -l" /etc/cron.daily, /etc.cron.weekly, etc) and cannot see anything that runs at that time, but it's also clear that it it doesn't happen on the same day of the week, nor exactly say 10 days apart. But it happens at about 6:30am.

Are you perhaps aware of any services running at that time that could cause the problem?


And, I also noticed that the logs, i.e. /var/log/solar_pip disappear. For example, I wanted to see every time it crashed, but it only kept the last few days in the log:

This is the first entry:
Code:
Jul  7 06:17:02 grafpi solar_pip[13943]: [2018-07-07 06:17:02] info serial:/dev/hidraw0:SEND query/general_status
Reply


Who read this thread?
82 User(s) read this thread:
gpn (04-26-2018, 12:51 AM), Johnny Battery (04-27-2018, 10:16 AM), Zvonko000 (04-15-2018, 02:34 PM), iomagico (06-10-2018, 04:53 PM), Oliman (06-22-2018, 05:48 PM), solar_18650 (06-22-2018, 08:43 AM), darkdaniel (04-17-2018, 11:52 PM), Peter T (07-03-2018, 02:59 PM), colibri1 (04-16-2018, 10:29 PM), Ibiza (06-14-2018, 08:51 PM), completelycharged (04-24-2018, 10:12 PM), Chablis_m (05-31-2018, 10:32 AM), mbrunton (06-08-2018, 09:39 PM), Riffraff (05-07-2018, 01:59 PM), thanar (05-11-2018, 07:05 AM), DK100 (06-03-2018, 09:21 AM), DonaldBitterman (06-18-2018, 05:05 PM), Crimp Daddy (04-17-2018, 06:02 PM), Redpacket (04-10-2018, 12:16 PM), SiverNodashi (08-03-2018, 08:16 PM), WynandV (04-20-2018, 05:41 AM), Max Tredi (04-29-2018, 11:01 AM), Riplash (07-07-2018, 04:54 PM), chris330 (06-20-2018, 08:03 AM), Bernhard Diersch (06-28-2018, 04:04 PM), Steven Lopes (06-13-2018, 11:11 AM), brickwall (07-07-2018, 08:01 AM), antenna (07-21-2018, 09:07 AM), gguillou (07-25-2018, 04:25 PM), kflmiami (07-24-2018, 01:07 AM), Timo Schulz (05-20-2018, 07:52 PM), Phil23 (05-17-2018, 10:30 PM), cesar.daniel.lopez@gmail.com (07-27-2018, 09:16 AM), Merdeka (04-28-2018, 08:01 AM), said (05-02-2018, 02:54 PM), oldserg (06-14-2018, 10:01 PM), neho83 (06-09-2018, 03:06 PM), dualrated2 (06-18-2018, 12:34 AM), Bubba (07-07-2018, 06:02 PM), bobirab (06-17-2018, 03:01 PM), johnaclee (08-09-2018, 09:51 AM), hbpowerwall (04-16-2018, 10:02 AM), jdeadman (06-22-2018, 12:04 PM), wim (07-07-2018, 10:03 AM), typ49 (06-22-2018, 06:47 AM), watts-on (07-07-2018, 10:57 AM), jesusangel (07-13-2018, 06:13 PM), IronSky (07-08-2018, 05:15 AM), Stefaan De Ridder (05-11-2018, 01:02 PM), Seedser (07-20-2018, 05:32 AM), Mike C (07-08-2018, 02:25 AM), Frnandu Martiński (04-25-2018, 02:15 PM), daromer (06-22-2018, 09:23 PM), mike (07-12-2018, 01:45 AM), Joaquinsfy (06-13-2018, 12:27 PM), NiVa (06-19-2018, 11:44 AM), Korishan (07-07-2018, 12:43 PM), A + A (04-27-2018, 07:27 AM), PAF (05-11-2018, 11:22 AM), Batrium (05-19-2018, 08:00 AM), ivnz (06-08-2018, 08:11 AM), Geek (07-09-2018, 12:42 AM), Rad (06-22-2018, 09:56 PM), vlmendezjr (06-23-2018, 04:05 AM), Charly144 (06-10-2018, 07:08 PM), SecondHandPower (04-27-2018, 12:34 AM), jm1 (04-18-2018, 03:03 AM), acidice333 (04-16-2018, 05:12 AM), brwainer (07-07-2018, 06:54 AM), HughF (05-12-2018, 09:22 AM), nrm21 (06-22-2018, 07:51 PM), CarelHassink (06-09-2018, 04:43 AM), not2bme (06-06-2018, 12:55 AM), Bloater (07-01-2018, 11:31 AM), floydR (04-28-2018, 02:45 PM), Swake (04-14-2018, 07:46 AM), Grumplestiltskin (06-03-2018, 11:41 PM), zag2me (07-09-2018, 01:28 PM), ChrisD5710 (06-03-2018, 09:09 AM), Geoffrey Seago (06-10-2018, 03:09 PM), cristof (06-08-2018, 08:07 AM), gregoinc (04-27-2018, 11:34 AM)

Forum Jump:


Users browsing this thread: 1 Guest(s)