Thread Rating:
  • 4 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Esperyd´s Raspberry PI project
(07-17-2018, 09:48 AM)Frnandu Martiński Wrote:
(07-11-2018, 01:45 PM)SiverNodashi Wrote:
(07-04-2018, 12:36 PM)daromer Wrote: Solar-sis you can define the commands in the config file. You then use the API to poke the system to do certain things.

Hi, 

How do you "poke the API"?  i.e. how do you access the API?

like I wrote above (check what port you have configured, mine is 3001, adjust accordingly):

curl http://localhost:3001/output_source_priority?source=00 

curl http://localhost:3001/utility_max_charging?current=10
I tried the commands and I get this error

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Internal Server Error</pre>
</body>
</html>

Any idea ?
Reply
Hello,
What a great project to read out the Inverters with a Rasp Pi.
But I do need some help... I'm using a Rasp Pi 3B. And I'm using the image V8. I also use a USB to serial converter. When I fire up terminal and input the command "/energy-logger/solar-sis/example/PIP4084 $ sudo systemctl status solar" I get the following output. My question is, should "Loaded: loaded (/etc/system/solar_pip.service; disabled) not be set to "enabled"? And how do I get this set to "enabled


pi@grafpi /energy-logger/solar-sis/example/PIP4084 $ sudo systemctl status solar_pip.service -l
● solar_pip.service - PIP4048 inverter
  Loaded: loaded (/etc/systemd/system/solar_pip.service; disabled)
  Active: active (running) since Fri 2020-01-10 21:27:51 CET; 57s ago
Main PID: 2747 (node)
  CGroup: /system.slice/solar_pip.service
          └─2747 /usr/bin/node /energy-logger/solar-sis/example/PIP4084/project.js

Jan 10 21:28:45 grafpi solar_pip[2747]: [2020-01-10 21:28:45] info serial:/dev/ttyUSB0:RECIVED query/general_status
Jan 10 21:28:46 grafpi solar_pip[2747]: [2020-01-10 21:28:46] info serial:/dev/ttyUSB0:SEND query/device_rated_information
Jan 10 21:28:46 grafpi solar_pip[2747]: [2020-01-10 21:28:46] info serial:/dev/ttyUSB0:SEND_RAW [{"type":"Buffer","data":[81,80,73,82,73,248,84,13]}]
Jan 10 21:28:46 grafpi solar_pip[2747]: [2020-01-10 21:28:46] info serial:/dev/ttyUSB0:RECIVED_RAW Data: (NAKss Length: 6
Jan 10 21:28:46 grafpi solar_pip[2747]: [2020-01-10 21:28:46] info serial:/dev/ttyUSB0:RECIVED query/device_rated_information
Jan 10 21:28:46 grafpi solar_pip[2747]: [2020-01-10 21:28:46] info influx:SEND pip_query_device_rated_information grid_rating_voltage=NaN,grid_rating_current=NaN,ac_output_rating_voltage=NaN,ac_output_rating_frecuency=NaN,ac_output_rating_current=NaN,ac_output_rating_apparent_power=NaN,ac_output_rating_active_power=NaN,battery_rating_voltage=NaN,battery_recharge_voltage=NaN,battery_under_voltage=NaN,battery_bulk_voltage=NaN,battery_float_voltage=NaN,battery_type=NaN,current_max_ac_charging=NaN,current_max_charging_current=NaN,input_voltage_range=NaN,output_source_priority=NaN,charger_source_priority=NaN,parallel_max_num=NaN,machine_type=NaN,topology=NaN,output_mode=NaN,battery_re_discharge_voltage=NaN,pv_condition=NaN,pv_power_balance=NaN
Jan 10 21:28:48 grafpi solar_pip[2747]: [2020-01-10 21:28:48] info serial:/dev/ttyUSB0:SEND query/general_status
Jan 10 21:28:48 grafpi solar_pip[2747]: [2020-01-10 21:28:48] info serial:/dev/ttyUSB0:SEND_RAW [{"type":"Buffer","data":[81,80,73,71,83,183,169,13]}]
Jan 10 21:28:48 grafpi solar_pip[2747]: [2020-01-10 21:28:48] info serial:/dev/ttyUSB0:RECIVED_RAW Data: (NAKss Length: 6
Jan 10 21:28:48 grafpi solar_pip[2747]: [2020-01-10 21:28:48] info serial:/dev/ttyUSB0:RECIVED query/general_status
Reply
(01-10-2020, 08:53 PM)Nibor Wrote: Hello,
What a great project to read out the Inverters with a Rasp Pi.
But I do need some help... I'm using a Rasp Pi 3B. And I'm using the image V8. I also use a USB to serial converter. When I fire up terminal and input the command "/energy-logger/solar-sis/example/PIP4084 $ sudo systemctl status solar" I get the following output. My question is, should "Loaded: loaded (/etc/system/solar_pip.service; disabled) not be set to "enabled"? And how do I get this set to "enabled


pi@grafpi /energy-logger/solar-sis/example/PIP4084 $ sudo systemctl status solar_pip.service -l
● solar_pip.service - PIP4048 inverter
  Loaded: loaded (/etc/systemd/system/solar_pip.service; disabled)
  Active: active (running) since Fri 2020-01-10 21:27:51 CET; 57s ago
Main PID: 2747 (node)
  CGroup: /system.slice/solar_pip.service
          └─2747 /usr/bin/node /energy-logger/solar-sis/example/PIP4084/project.js

Jan 10 21:28:45 grafpi solar_pip[2747]: [2020-01-10 21:28:45] info serial:/dev/ttyUSB0:RECIVED query/general_status
Jan 10 21:28:46 grafpi solar_pip[2747]: [2020-01-10 21:28:46] info serial:/dev/ttyUSB0:SEND query/device_rated_information
Jan 10 21:28:46 grafpi solar_pip[2747]: [2020-01-10 21:28:46] info serial:/dev/ttyUSB0:SEND_RAW [{"type":"Buffer","data":[81,80,73,82,73,248,84,13]}]
Jan 10 21:28:46 grafpi solar_pip[2747]: [2020-01-10 21:28:46] info serial:/dev/ttyUSB0:RECIVED_RAW Data: (NAKss Length: 6
Jan 10 21:28:46 grafpi solar_pip[2747]: [2020-01-10 21:28:46] info serial:/dev/ttyUSB0:RECIVED query/device_rated_information
Jan 10 21:28:46 grafpi solar_pip[2747]: [2020-01-10 21:28:46] info influx:SEND pip_query_device_rated_information grid_rating_voltage=NaN,grid_rating_current=NaN,ac_output_rating_voltage=NaN,ac_output_rating_frecuency=NaN,ac_output_rating_current=NaN,ac_output_rating_apparent_power=NaN,ac_output_rating_active_power=NaN,battery_rating_voltage=NaN,battery_recharge_voltage=NaN,battery_under_voltage=NaN,battery_bulk_voltage=NaN,battery_float_voltage=NaN,battery_type=NaN,current_max_ac_charging=NaN,current_max_charging_current=NaN,input_voltage_range=NaN,output_source_priority=NaN,charger_source_priority=NaN,parallel_max_num=NaN,machine_type=NaN,topology=NaN,output_mode=NaN,battery_re_discharge_voltage=NaN,pv_condition=NaN,pv_power_balance=NaN
Jan 10 21:28:48 grafpi solar_pip[2747]: [2020-01-10 21:28:48] info serial:/dev/ttyUSB0:SEND query/general_status
Jan 10 21:28:48 grafpi solar_pip[2747]: [2020-01-10 21:28:48] info serial:/dev/ttyUSB0:SEND_RAW [{"type":"Buffer","data":[81,80,73,71,83,183,169,13]}]
Jan 10 21:28:48 grafpi solar_pip[2747]: [2020-01-10 21:28:48] info serial:/dev/ttyUSB0:RECIVED_RAW Data: (NAKss Length: 6
Jan 10 21:28:48 grafpi solar_pip[2747]: [2020-01-10 21:28:48] info serial:/dev/ttyUSB0:RECIVED query/general_status

try:

sudo systemctl enable solar_pip
Reply
I started solar_pip.service with "sudo systemctl enable solar_pip".
With "sudo systemctl enable solar_pip.service -l" I see that there is a connection from my Rasp pi 3b to my MPP hybrid Inverter 3 KW. However, I do not see any measured values.
What should I do to visualize the values of the MPP inverter with "sudo systemctl status solar_pip.service -l"

Code:
pi@grafpi /energy-logger/solar-sis/example/PIP4084 $ sudo systemctl status solar_pip.service -l
● solar_pip.service - PIP4048 inverter
   Loaded: loaded (/etc/systemd/system/solar_pip.service; enabled)
   Active: active (running) since Sat 2020-01-11 00:17:03 CET; 11h ago
Main PID: 462 (node)
   CGroup: /system.slice/solar_pip.service
           └─462 /usr/bin/node /energy-logger/solar-sis/example/PIP4084/project.js

Jan 11 11:30:12 grafpi solar_pip[462]: [2020-01-11 11:30:12] info serial:/dev/ttyUSB0:RECIVED query/general_status
Jan 11 11:30:14 grafpi solar_pip[462]: [2020-01-11 11:30:14] info serial:/dev/ttyUSB0:SEND query/device_rated_information
Jan 11 11:30:14 grafpi solar_pip[462]: [2020-01-11 11:30:14] info serial:/dev/ttyUSB0:SEND_RAW [{"type":"Buffer","data":[81,80,73,82,73,248,84,13]}]
Jan 11 11:30:14 grafpi solar_pip[462]: [2020-01-11 11:30:14] info serial:/dev/ttyUSB0:RECIVED_RAW Data: (NAKss Length: 6
Jan 11 11:30:14 grafpi solar_pip[462]: [2020-01-11 11:30:14] info serial:/dev/ttyUSB0:RECIVED query/device_rated_information
Jan 11 11:30:14 grafpi solar_pip[462]: [2020-01-11 11:30:14] info influx:SEND pip_query_device_rated_information grid_rating_voltage=NaN,grid_rating_current=NaN,ac_output_rating_voltage=NaN,ac_output_rating_frecuency=NaN,ac_output_rating_current=NaN,ac_output_rating_apparent_power=NaN,ac_output_rating_active_power=NaN,battery_rating_voltage=NaN,battery_recharge_voltage=NaN,battery_under_voltage=NaN,battery_bulk_voltage=NaN,battery_float_voltage=NaN,battery_type=NaN,current_max_ac_charging=NaN,current_max_charging_current=NaN,input_voltage_range=NaN,output_source_priority=NaN,charger_source_priority=NaN,parallel_max_num=NaN,machine_type=NaN,topology=NaN,output_mode=NaN,battery_re_discharge_voltage=NaN,pv_condition=NaN,pv_power_balance=NaN
Jan 11 11:30:14 grafpi solar_pip[462]: [2020-01-11 11:30:14] info serial:/dev/ttyUSB0:SEND query/general_status
Jan 11 11:30:14 grafpi solar_pip[462]: [2020-01-11 11:30:14] info serial:/dev/ttyUSB0:SEND_RAW [{"type":"Buffer","data":[81,80,73,71,83,183,169,13]}]
Jan 11 11:30:15 grafpi solar_pip[462]: [2020-01-11 11:30:15] info serial:/dev/ttyUSB0:RECIVED_RAW Data: (NAKss Length: 6
Jan 11 11:30:15 grafpi solar_pip[462]: [2020-01-11 11:30:15] info serial:/dev/ttyUSB0:RECIVED query/general_status
Reply
Your log above indicates that the software do not have Contact with the inverter. IF it would have had that it would have container values.

Either wrong port configured or the Serial adaptor doesnt work
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
(01-11-2020, 11:56 AM)daromer Wrote: Your log above indicates that the software do not have Contact with the inverter. IF it would have had that it would have container values.

Either wrong port configured or the Serial adaptor doesnt work
Thanks for the info daromer. I'm not very experienced with RS232 communication. 

A little help I'd really appreciate.

I attached an USB to RS232 converter to the Raspi 3B. The USB to RS232 is recognized and on port ttyUSB0


Code:
pi@grafpi ~ $ dmesg | egrep --color 'serial|ttyUSB0'
[    0.000000] Kernel command line: 8250.nr_uarts=1 bcm2708_fb.fbwidth=1824 bcm2708_fb.fbheight=984 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000  dwc_otg.lpm_enable=0 console=tty1 root=PARTUUID=c06231d1-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles
[    0.085896] uart-pl011 3f201000.serial: could not find pctldev for node /soc/gpio@7e200000/uart0_pins, deferring probe
[    0.336402] bcm2835-aux-uart 3f215040.serial: could not get clk: -517
[    0.820379] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
[    0.821970] 3f215040.serial: ttyS0 at MMIO 0x0 (irq = 220, base_baud = 31250000) is a 16550
[    4.498460] usbcore: registered new interface driver usbserial
[    4.498781] usbcore: registered new interface driver usbserial_generic
[    4.498878] usbserial: USB Serial support registered for generic
[    4.501574] usbserial: USB Serial support registered for MCT U232
[    4.502878] usb 1-1.2: MCT U232 converter now attached to ttyUSB0
pi@grafpi ~ $

I used "Minicom" for the USB to RS232 converter. This are the settings.
Code:
A -    Serial Device      : /dev/ttyUSB0                              |
    | B - Lockfile Location     : /var/lock                                 |
    | C -   Callin Program      :                                           |
    | D -  Callout Program      :                                           |
    | E -    Bps/Par/Bits       : 115200 8N1                                |
    | F - Hardware Flow Control : Yes                                       |
    | G - Software Flow Control : No     

Hope this settings are correct?

Is there a easy way to test the rs232 connection in Rasp pi to my MPP Hybrid Inverter 3KW.
For example in "terminal" to send and receive some information from the MPP so that I can check or this connection works.

Thanks in advance
Reply
I tried program from " https://github.com/manio/skymax-demo"

With this program I can connect to the MPP inverter 3KW
The Leds TX and RX from the USB to serial converter are blinking now.

The output from skymax-demo is:

Code:
/dev/ttyS0 if you have a serial device,
#      /dev/ttyUSB0 if a USB<>Serial,
#      /dev/hidraw0 if you're connecting via the USB port on the inverter.

device=/dev/ttyUSB0

Mon Jan 13 20:35:42 2020 INVERTER: Current CRC: B4 DA
Mon Jan 13 20:35:42 2020 INVERTER: QPIWS reply size (36 bytes)
Mon Jan 13 20:35:42 2020 INVERTER: QPIWS: incorrect start/stop bytes.  Buffer: s
(NAK
s
(NAKss
(NAK

But what do I wrong wen I use the image raspv8.rar, with this image the USB to serial Rx signal is not blinking?

Someone any suggestions
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)