I am working with the LightSwitch plugin and I have it working, however, when I request the Devices List I'm getting the following error: "ERR~Method not found: 'Byte MLS.HA.DeviceController.Common.Device.HaDevice.getlevel()'".
Here is the method that is having the issue:
private void sendDeviceList(Socket LightSwitchClientSocket) {
List
//Get Devices
foreach (var d in getDevices()) {
bool show = true;
//bool.TryParse(DevicePropertyValue.GetPropertyValue(d, "SHOWINLSLIST"), out show);
if (show) {
string devicestr = deviceToString(d);
if (!string.IsNullOrEmpty(devicestr)) {
lSdevices.Add(devicestr);
}
}
}
if (sortlist) {
lSdevices.Sort();
}
// Send to Client
foreach (string dstr in lSdevices) {
//sendMessagetoClientsSocket(LightSwitchClientSocket, "DEVICE~" + dstr + Environment.NewLine);
sendMessagetoClientsSocket(LightSwitchClientSocket, d_str + Environment.NewLine);
}
}
Any help is appreciated. Thank you.
LightSwitch Plugin
- 286 Views
- Last Post 30 January 2016
Nevermind. Got it working by commenting out a few lines.
private void sendDeviceList(Socket LightSwitchClientSocket) {
List
//Get Devices
foreach (var d in getDevices()) {
//bool show = true;
//bool.TryParse(DevicePropertyValue.GetPropertyValue(d, "SHOWINLSLIST"), out show);
///if (show) {
string device
if (!string.IsNullOrEmpty(devicestr)) {
lSdevices.Add(devicestr);
/// }
}
}
if (sortlist) {
lSdevices.Sort();
}
// Send to Client
foreach (string dstr in lSdevices) {
//sendMessagetoClientsSocket(LightSwitchClientSocket, "DEVICE~" + dstr + Environment.NewLine);
sendMessagetoClientsSocket(LightSwitchClientSocket, dstr + Environment.NewLine);
}
}