Open s118 opened 7 months ago
The script works only with opnedtu lower than V24.1.26
@s118 what opendtu version are you on? thanks for the updated script.
Hy. When I modified the original code, it was on version v24.2.12. I am currently on version v24.2.16 and everything is working without problems. Tomorrow I will test new versions, and in case of news, I will communicate them.
Hy. When I modified the original code, it was on version v24.2.12. I am currently on version v24.2.16 and everything is working without problems. Tomorrow I will test new versions, and in case of news, I will communicate them.
@s118 have you had a chance to test it? cheers
Hello. Today I tested it, and although it was a rainy day, the code worked perfectly. Attached graph that represents the percentage of the microinverter's work limit throughout the day. The production of the microinverter (HOYMILES HMS-2000) is also represented.
The code doesn't work. I pass the code with corrections, although the comments are in Spanish. I have added the "exportar" variable, in case you want to export some energy to the grid. If you do not want to export anything, exportar=0
!/usr/bin/env python3
import requests, time, sys from requests.auth import HTTPBasicAuth
Ajustar estos datos
serial = "xxxxxxxxxxxxxxx" # numero serie microinversor maximum_wr = 2000 # Máxima salida del microinversor minimum_wr = 100 # Minima salida del microinversor dtu_ip = 'xxxxxxxxxxxx' # IP Adresse OpenDTU basicdtu = HTTPBasicAuth('admin', 'xxxxxxxx') dtu_user = 'admin' # usuario openDTU dtu_pass = 'xxxxxxxxxxx' # OpenDTU Password basicShelly = HTTPBasicAuth('admin', 'xxxxxxx') shelly_ip = 'xxxxxxxxxx' # IP Adresse Shelly 3EM grid= 0 power = 0 reachable = 0 exportar = 1500 valor_seguridad = 0 while True: try:
Toma de datos de la API REST de openDTU y los convierte en json-Format