danielwippermann / resol-vbus-java

A Java library for processing RESOL VBus data
7 stars 6 forks source link

KM2 - TcpDataSourceProvider.fetchInformation fails #16

Closed ramack closed 5 years ago

ramack commented 5 years ago

when calling TcpDataSourceProvider.fetchInformation on the IP of a KM2 device, an exception

Server returned HTTP response code: 502 for URL: http://xxxxxx:80/cgi-bin/get_resol_device_information is raised.

Edit: forgot to link the use case for this. It is here: https://community.openhab.org/t/new-binding-resol-vbus/2203/139

danielwippermann commented 5 years ago

Hmmm, I tried it with a minimal test case here and it worked:

        try {
            TcpDataSource ds = TcpDataSourceProvider.fetchInformation(Inet4Address.getByName("192.168.5.81"), 2000);
            System.out.println(ds.getName());
        } catch (IOException ex) {
            System.err.println(ex);
        }

Prints the name of the KM2 including the IP to the console.

Since the original poster mentioned that manually accessing the same URL yields the same error it must be something in the KM2 itself. Perhaps a restart will solve the problem? Or a firmware update?

I'll close this issue and continue disussing it over at "your place" :)

ramack commented 5 years ago

yes, perfect. Thanks for your support. Reporting it here was the only idea that I had because I neither have a KM2 tor try with nor do I know the device.