PepperDash / epi-biamp-tesira

Plugin for controlling Biamp Tesira DSPs from within Essentials.
1 stars 2 forks source link

[BUG]-Switcher inputs and outputs throws invalid cast exception when labels are configured #57

Closed jkdevito closed 1 year ago

jkdevito commented 2 years ago

Describe the bug When using the switcher object, the plugin throws an invalid cast exception when the switcher object configuration includes input and output labels.

This issue has been identified in release 2.0.10.

Stacktrace

image

To Reproduce Steps to reproduce the behavior:

  1. Configured the plugin to use a switcherObject (see configuration snippets below)
  2. When Essentials is loading the plugin, there will be an invalid cast exception thrown if the switcherInputs and switcherOutputs have a label property configured.

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context The configuration that causes the invalid cast exception

{
    "system": {},
    "template": {
        "devices": [
            {
                "key": "processor",
                "uid": 0,
                "type": "cp3",
                "name": "CP3",
                "group": "processor",
                "supportedConfigModes": [
                    "compliance",
                    "essentials"
                ],
                "supportedSystemTypes": [
                    "hudType",
                    "presType",
                    "vtcType",
                    "custom"
                ],
                "supportsCompliance": true,
                "properties": {}
            },
            {
                "key": "dsp1",
                "uid": 4,
                "type": "tesiradsp",
                "name": "Biamp Tesira Plugin",
                "group": "dsp",
                "properties": {
                    "control": {
                        "method": "ssh",
                        "tcpSshProperties": {
                            "address": "192.168.1.101",
                            "port": 22,
                            "username": "default",
                            "password": "default",
                            "autoReconnect": true,
                            "autoReconnectIntervalMs": 5000
                        }
                    },
                    "faderControlBlocks": {
                        "fader1": {
                            "label": "Room",
                            "enabled": true,
                            "bridgeIndex": 1,
                            "isMic": true,
                            "hasLevel": false,
                            "hasMute": true,
                            "unmuteOnVolChange": false,
                            "permissions": 0,
                            "levelInstanceTag": "ROOM",
                            "muteInstanceTag": "ROOM",
                            "incrementAmount": "2.0",
                            "index1": 1,
                            "index2": 0
                        }
                    },
                    "presets": {
                        "1": {
                            "label": "Room Default",
                            "presetIndex": 1,
                            "presetName": "LEVELS_RESET"
                        }
                    },
                    "switcherControlBlocks": {
                        "SwitcherControl01": {
                            "enabled": true,
                            "label": "switcher1",
                            "index1": 1,
                            "switcherInstanceTag": "SRCSEL",
                            "type:": "sourceSelector",
                            "bridgeIndex": 1,
                            "switcherInputs": {
                                "1": {
                                    "label": "Input 1"
                                },
                                "2": {
                                    "label": "Input 2"
                                },
                                "3": {
                                    "label": "Input 3"
                                }
                            },
                            "switcherOutputs": {
                                "1": {
                                    "label": "Output 1"
                                },
                                "2": {
                                    "label": "Output 2"
                                }
                            }
                        }
                    }
                }
            },
            {
                "key": "dsp1-bridge",
                "uid": 5,
                "name": "Bridge Dsp",
                "group": "api",
                "type": "eiscApiAdvanced",
                "properties": {
                    "control": {
                        "tcpSshProperties": {
                            "address": "127.0.0.2",
                            "port": 0
                        },
                        "ipid": "C4",
                        "method": "ipidTcp"
                    },
                    "devices": [
                        {
                            "deviceKey": "dsp1",
                            "joinStart": 1
                        }
                    ]
                }
            }
        ],
        "info": {
            "comment": "",
            "lastModifiedDate": "2017-03-06T23:14:40.290Z",
            "lastUid": 5,
            "processorType": "cp3",
            "requiredControlSofwareVersion": "",
            "systemType": "huddle"
        },
        "rooms": [],
        "tieLines": []
    }
}

The configuration that resolves the invalid cast exception

{
    "system": {},
    "template": {
        "devices": [
            {
                "key": "processor",
                "uid": 0,
                "type": "cp3",
                "name": "CP3",
                "group": "processor",
                "supportedConfigModes": [
                    "compliance",
                    "essentials"
                ],
                "supportedSystemTypes": [
                    "hudType",
                    "presType",
                    "vtcType",
                    "custom"
                ],
                "supportsCompliance": true,
                "properties": {}
            },          

            {
                "key": "dsp1",
                "uid": 4,
                "type": "tesiradsp",
                "name": "Biamp Tesira Plugin",
                "group": "dsp",
                "properties": {
                    "control": {
                        "method": "ssh",
                        "tcpSshProperties": {
                            "address": "192.168.1.101",
                            "port": 22,
                            "username": "default",
                            "password": "default",
                            "autoReconnect": true,
                            "autoReconnectIntervalMs": 5000
                        }
                    },
                    "faderControlBlocks": {
                        "fader1": {
                            "label": "Room",
                            "enabled": true,
                            "bridgeIndex": 1,
                            "isMic": true,
                            "hasLevel": false,
                            "hasMute": true,
                            "unmuteOnVolChange": false,
                            "permissions": 0,
                            "levelInstanceTag": "ROOM",
                            "muteInstanceTag": "ROOM",
                            "incrementAmount": "2.0",
                            "index1": 1,
                            "index2": 0
                        }
                    },
                    "presets": {
                        "1": {
                            "label": "Room Default",
                            "presetIndex": 1,
                            "presetName": "LEVELS_RESET"
                        }
                    },
                    "switcherControlBlocks": {
                        "SwitcherControl01": {
                            "enabled": true,
                            "label": "switcher1",
                            "index1": 1,
                            "switcherInstanceTag": "SRCSEL",
                            "type:": "sourceSelector",
                            "bridgeIndex": 1,
                            "switcherInputs": {},
                            "switcherOutputs": {}
                        }
                    }
                }
            },
            {
                "key": "dsp1-bridge",
                "uid": 5,
                "name": "Bridge Dsp",
                "group": "api",
                "type": "eiscApiAdvanced",
                "properties": {
                    "control": {
                        "tcpSshProperties": {
                            "address": "127.0.0.2",
                            "port": 0
                        },
                        "ipid": "C4",
                        "method": "ipidTcp"
                    },
                    "devices": [
                        {
                            "deviceKey": "dsp1",
                            "joinStart": 1
                        }
                    ]
                }
            }
        ],
        "info": {
            "comment": "",
            "lastModifiedDate": "2017-03-06T23:14:40.290Z",
            "lastUid": 5,
            "processorType": "cp3",
            "requiredControlSofwareVersion": "",
            "systemType": "huddle"
        },
        "rooms": [],
        "tieLines": []
    }
}
TrevorPayne commented 1 year ago

Resolved