StephanJoubert / home_assistant_solarman

Home Assistant component for Solarman collectors used with a variety of inverters.
Apache License 2.0
510 stars 190 forks source link

Solarman LSW-5 (V3 protocol) - how to connect with HA? #337

Open lpawlak opened 1 year ago

lpawlak commented 1 year ago

I have WiFI Stock Logger LSW-5 (I think it's V3 protocol). Device serial number3503193325. Can I use solarman integration to connect with HA? https://d2l38nissjun1p.cloudfront.net/wp-content/uploads/2022/10/Stick-Logger-WiFi-LSW-5.pdf

thhomesystem commented 10 months ago

Die you Find a sollution ?

siesiu78 commented 1 month ago

I have WiFI Stock Logger LSW-5 (I think it's V3 protocol). Device serial number3503193325. Can I use solarman integration to connect with HA? https://d2l38nissjun1p.cloudfront.net/wp-content/uploads/2022/10/Stick-Logger-WiFi-LSW-5.pdf

I have the same problem with Afore - did you resolve it?

psunny28 commented 1 month ago

I tried communicating, I was able to get Socket check

import socket
def main():
    sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
    sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    sock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
    sock.settimeout(1.0)
    request = "WIFIKIT-214028-READ"
    address = ("<Your Data logger Stick IP>", 48899)
    sock.sendto(request.encode(), address)
    while True:
        try:
            data = sock.recv(1024)
        except socket.timeout:
            break
        keys = dict.fromkeys(["ipaddress", "mac", "serial"])
        values = data.decode().split(",")
        print(data.decode())
        result = dict(zip(keys, values))
        print(result)
if __name__ == "__main__":
    main()

Appart from I was not able to find Any thing