hoymiles icon indicating copy to clipboard operation
hoymiles copied to clipboard

Read data from Layout and Devices tab.

Open giacomitti opened this issue 4 years ago • 6 comments

Will be very nice if the data on layout (panels) and devices (microinverters) can be readed also.

giacomitti avatar Aug 18 '21 16:08 giacomitti

Hi, thank you for your suggestion!

Would you explain better?

dmslabsbr avatar Sep 29 '21 03:09 dmslabsbr

In layout tab, you have the last status o panels, like this:

image

and the historic data also.

giacomitti avatar Sep 30 '21 19:09 giacomitti

This will required protobuf decoding in python, I was not able to decode it using python. I'm attaching data and proto json demofile2.txt

Cosik avatar Mar 08 '22 13:03 Cosik

So, I tried to decode demofile2.txt with protobuf-decoder 0.3.0, which can be found at https://pypi.org/project/protobuf-decoder/. However, I'm unable to extract any meaningful structure from the output. Here you can see the output that i got from my code below: output2.txt

decoder.py

# Definition of a recursive function for printing the data
def format_data(parsed_result, indent=0):
    result_str = ""
    result_str += "  " * indent
    result_str += "Field {0}: {1}\n".format(parsed_result.field, parsed_result.data)

    if parsed_result.wire_type == 'length_delimited' and hasattr(parsed_result.data, 'results'):
        for sub_result in parsed_result.data.results:
            result_str += format_data(sub_result, indent + 1)

    return result_str

# Open the binary file
with open('demofile2.txt', 'rb') as file:
    binary_data = file.read()

# Convert the binary data to a hexadecimal string
hex_data = ' '.join(f'{byte:02X}' for byte in binary_data)

# Use the Parser to parse the data
parsed_data = Parser().parse(hex_data)

# Open the output file
with open('output2.txt', 'w') as output_file:
    for result in parsed_data:
        output_file.write(format_data(result))```

SenorSTriKeR avatar Nov 05 '23 14:11 SenorSTriKeR

@MrMusk good job. I will need much more time to analyze it. Also I will need to find some some real data and compare it and figure out how to interpret it.

Cosik avatar Nov 06 '23 13:11 Cosik

Update 25 February 2024 : protobuf-decoder 0.4.0

New to integrate device value in HA ? (I'm used the stable version !)

fcarlier avatar Aug 01 '24 16:08 fcarlier