cabellop5 / RaspiInverter

Php app for connect Axpert MKS Inverter with Raspberry Pi
0 stars 1 forks source link

Wrong CurrentValues data #3

Open Stephan28 opened 4 years ago

Stephan28 commented 4 years ago

Hello,

First thanks for this project. It works good!

For other users, who doesn't run apache/php as root, you need to change the device owner:

chown user:user /dev/DEVICE

Then this script works.

My problem is, I read the inverter every minute 1 times (cronjob *).

Sometimes the results are good, sometimes wrong.

Good: {"grid_voltage":231,"grid_frecuency":50,"ac_output_voltage":231,"ac_output_frecuency":50,"ac_output_power_va":0,"ac_output_active_power":0,"output_load_percent":0,"bus_voltage":466,"battery_voltage":24.26,"battery_charging_current":0,"battery_capacity":76,"temperature":589,"pv_input_current_for_battery":0,"pv_input_voltage":0,"battery_voltage_from_scc":24.24,"battery_discharge_current":0,"device_status":"10010000","mask_b":1,"mask_c":4,"pv_active_power":0}

Bad: {"grid_voltage":230,"grid_frecuency":13,"ac_output_voltage":230,"ac_output_frecuency":50,"ac_output_power_va":13,"ac_output_active_power":3000,"output_load_percent":3000,"bus_voltage":24,"battery_voltage":24.5,"battery_charging_current":21,"battery_capacity":29,"temperature":27,"pv_input_current_for_battery":1,"pv_input_voltage":30,"battery_voltage_from_scc":60,"battery_discharge_current":0,"device_status":"1","mask_b":3,"mask_c":0,"pv_active_power":1}

Do you have an idea for this? If I look at the devices, there are always "0" for Load. No times 3000. And frequency isn't low on device.

Thanks!

cabellop5 commented 4 years ago

Sorry, near 3 months to response.

In file app/config.php has one field called number_retries.

This is the number of retries that execute while not has data.

My inverter also have this problem, sometimes not get the data as the first retry, I have configured in 3 retry in production environment.

I do not known the cause of this, it is posible bad comunication with USB Device, with retries I solved this.

Thanks and sorry for later response

Stephan28 commented 4 years ago

Hello,

Thanks for your response. But I have solved it some time ago.

It’s an bad USB-Port in my device. I have bought an USB Hub with Power-Adapter (active hub) and it works without issues