Take this sample code:
plugin.Name = "RokuTV";
plugin.OnChangeRequest = onChangeRequest;
plugin.OnConnect = onConnect;
plugin.OnDisconnect = onDisconnect;
plugin.OnPoll = onPoll;
plugin.OnSynchronizeDevices = onSynchronizeDevices;
plugin.PollingInterval = 1000;
function onChangeRequest(device, attribute, value) {
}
function onConnect() {
}
function onDisconnect() {
}
function onPoll() {
}
function onSynchronizeDevices() {
var device = new Device();
device.Id = plugin.Name;
device.DisplayName = "Roku TV";
plugin.Devices[plugin.Name] = device;
}
If I import that as a plugin and the device synchronizes, it adds a device with the name “RokuTv” (not “RokuTV”). Why might that be happening?
(Note that the plugin name comes in as “RokuTV”.)