Skip to content

sysinfo was null after adding a 100 #7

@blubbll

Description

@blubbll

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions