TPLinkSmartDevices icon indicating copy to clipboard operation
TPLinkSmartDevices copied to clipboard

sysinfo was null after adding a 100

Open blubbll opened this issue 4 years ago • 3 comments

at https://github.com/anthturner/TPLinkSmartDevices/blob/master/TPLinkSmartDevices/TPLinkDiscovery.cs#L64

i had to

            if (sys_info != null || sys_info != new object { })
            {
                string model = (string)sys_info.model;
                if (model.StartsWith("HS110"))
                    device = new TPLinkSmartMeterPlug(ip.Address.ToString());
                else if (model.StartsWith("HS"))
                    device = new TPLinkSmartPlug(ip.Address.ToString());
                else if (model.StartsWith("LB"))
                    device = new TPLinkSmartBulb(ip.Address.ToString());

                if (device != null)
                    DiscoveredDevices.Add(device);
            }

because i keep getting an empty object.

is this normal? freshly set up plug.

thanks

blubbll avatar May 26 '20 08:05 blubbll

I'm having the same issue, any fix?

AndrewKlasen avatar Jul 10 '20 22:07 AndrewKlasen

Could you provide a full text dump for the sys_info JSON-object and/or the contents of the message variable?

TheBauwssss avatar Jul 11 '20 12:07 TheBauwssss

Content of message is: "{"system":{"get_sysinfo":null},"emeter":{"get_realtime":null}}"

bauland avatar Sep 29 '20 13:09 bauland