Manual Inversor: {{ :tecnologia:luzparaeleko:manual_inversor.pdf |}}
Parámetros actuales en el inversor (2/7/2022):
{{:tecnologia:luzparaeleko:datosinversor.jpg?400|}}
Manual Monitorización con PC: {{ :tecnologia:luzparaeleko:manual_monitorizacion.pdf |}}
Manual protocolo de comunicación: {{ :tecnologia:luzparaeleko:pip-gk_mk_protocol.pdf |}}
====== Monitorizar con raspberry ======
Conectamos el cable que viene con el inversor. Al inversor el exttremo RJ45 y por el otro lado es serial. Compramos un cable serial a USB y lo conectamos a este cable (por el serial) y a la raspberry
Ahora miramos los puertos USB de la raspberry
pi@raspberrypi:~ $ lsusb
Bus 001 Device 004: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 001 Device 005: ID 0665:5161 Cypress Semiconductor USB to Serial
Bus 001 Device 006: ID 0424:7800 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
{{:tecnologia:luzparaeleko:inversor_01.png|}}
Nos quedamos con la línea que pone USB to Serial:
Bus 001 Device 005: ID 0665:5161 Cypress Semiconductor USB to Serial
La que pone "Prolific Technology, Inc. PL2303 Serial Port" es del puerto RJ45 que veremos mas tarde.
Como root buscamos el puerto:
root@raspberrypi:~# ls -l /dev/hidraw*
crw------- 1 root root 244, 0 Jun 22 15:41 /dev/hidraw0
Es el puerto hidraw0
Ahora ejecutamos python y lanzamos estos comandos:
Python 2.7.16 (default, Oct 10 2019, 22:02:15)
[GCC 8.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
import os,sys
fd = open('/dev/hidraw0', 'r+')
fd.write('QPIGS\xB7\xA9\r')
res = fd.read(110).encode('string-escape')
res = res.split("\\")
res = res[0][1:].split(" ")
print 'res=', res
Nos tiene que devolver algo como esto:
res= ['000.0', '00.0', '230.0', '50.0', '0252', '0246', '005', '370', '53.30', '001', '100', '0044', '0006', '127.6', '53.18', '00000', '00010110', '00', '00', '00319', '010']
El mapeo de los valores sería el siguiente:
|0| |000.0|
|1| |00.0|
|2|AC output voltage|230.0|
|3|AC output frequency|50.0|
|4|AC output apparent power|0184|
|5|AC output active power|0109|
|6|Output load percent|003|
|7|BUS voltage|370|
|8|Battery voltage|53.20|
|9|Battery charging current|000|
|10|Battery capacity|100|
|11|Inverter heat sink temperature|0043|
Pruebas del puerto:
root@raspberrypi:~# lsusb -v -d 0665:5161
Bus 001 Device 005: ID 0665:5161 Cypress Semiconductor USB to Serial
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x0665 Cypress Semiconductor
idProduct 0x5161 USB to Serial
bcdDevice 0.02
iManufacturer 3 STMicroelectronics
iProduct 1 HID in FS Mode
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0022
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 27
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 32
can't get device qualifier: Resource temporarily unavailable
can't get debug descriptor: Resource temporarily unavailable
Device Status: 0x0001
Self Powered