Error while trying to enumerate devices
rboy1 opened this issue · comments
When I try enumerate all devices it throws an error:
Error Object reference not set to an instance of an object
Also when enumerating subscriptions it gives and Error 403 Error calling ListSubscriptions
Everything else is working, but devices are the key ones
Error is coming from line 32 of devices.cs
if (STClient.GetAllDevices().Items?.Count > 0)
It looks like Items is null, the underlying SmartThingsNet library isn't able to enumerate
Updated SDK, this should now be resolved
Yes that fixes one issue, but noticed another one causing a crash. Not all devices have rooms which is causing a crash in devices.cs line 153
roomName = STClient.GetAllRooms(device.LocationId).Items.Where(r => r.RoomId.ToString().Equals(device.RoomId))?.FirstOrDefault().Name;
It works fine with your SDK update and the patch above. Will you be releasing a new version?
Your fixes are merged!