Skip to content
This repository has been archived by the owner on Feb 4, 2021. It is now read-only.

Versio 1.07 bug? #8

Open
AL7DS opened this issue Apr 19, 2019 · 1 comment
Open

Versio 1.07 bug? #8

AL7DS opened this issue Apr 19, 2019 · 1 comment

Comments

@AL7DS
Copy link

AL7DS commented Apr 19, 2019

Get this:

Traceback (most recent call last):
File "LW-Delegation-Switcher.py", line 615, in
File "LW-Delegation-Switcher.py", line 106, in init
File "LW-Delegation-Switcher.py", line 282, in connectLWRP
File "LW-Delegation-Switcher.py", line 324, in findOutputLWRP
TypeError: 'NoneType' object is not iterable
[3700] Failed to execute script LW-Delegation-Switcher

Using this as config.json

{
"Title": "Livewire GPO Control",
"DeviceIP": "10.220.40.166",
"DevicePassword": "",
"DeviceOutputNum": 1,
"Columns": 1,
"CheckUpdatesAuto": false,
"GPI_DeviceIP": "10.220.40.166",
"GPI_DevicePassword": "",
"Sources": [
{
"Name": "Port 1 Pin 4/14",
"SourceNum": "0",
"GPI_IndicationOnly": true,
"DisableRouteChange": true,
"GPI_SwitchPort": 1,
"GPI_SwitchPin": 4,
"TriggerGPIO": [
{
"DeviceIP": "10.220.40.166",
"Type": "GPO",
"Port": 1,
"Pin": 14,
"State": "low",
"Momentary": 1
}
]
},
{
"Name": "Port 1 Pin 1/1",
"SourceNum": "0",
"GPI_IndicationOnly": true,
"DisableRouteChange": true,
"GPI_SwitchPort": 1,
"GPI_SwitchPin": 1,
"TriggerGPIO": [
{
"DeviceIP": "10.220.40.166",
"Type": "GPO",
"Port": 1,
"Pin": 1,
"State": "low",
"Momentary": 1
}
]
},
{
"Name": "Port 1 Pin 2/2",
"SourceNum": "0",
"GPI_IndicationOnly": true,
"DisableRouteChange": true,
"GPI_SwitchPort": 1,
"GPI_SwitchPin": 2,
"TriggerGPIO": [
{
"DeviceIP": "10.220.40.166",
"Type": "GPO",
"Port": 1,
"Pin": 2,
"State": "low",
"Momentary": 1
}
]
}
]
}

Using the Windows executable, but I also see it on the Raspberry Pi version.
The Config file is just a copy of your Delay sample with edits to support a real world GPIO Node.

Do you have syntax documentation on the config files? How do I do latching or toggle GPO?

Thanks for your effort on this code. I use it everywhere.

@AL7DS
Copy link
Author

AL7DS commented Apr 19, 2019

I think I know what is happening. My application was GPIO only, and I am only talking to a GPIO xNode. When I put the Device IP the same as the GPI_Device IP is throws the error. If I put Device IP to an unused Destination but valid IP of an audio xNode, it works. Perhaps some error checking is needed so that an invalid command to a GPIO xNode returns a NULL value, the program doesn't crash. Or better yet, a config.json line that indicates GPIO control and response only with no other routing done.

Modified config.json as follows:
{
"Title": "GPIO Switcher",
"DeviceIP": "10.220.40.165",
"DevicePassword": "",
"DeviceOutputNum": 7,
"Columns": 1,
"CheckUpdatesAuto": false,
"GPI_DeviceIP": "10.220.40.166",
"GPI_DevicePassword": "",
"Sources": [
{
"Name": "MIC",
"SourceNum": "0",
"GPI_IndicationOnly": true,
"DisableRouteChange": true,
"GPI_SwitchPort": 1,
"TriggerGPIO": [
{
"DeviceIP": "10.220.40.166",
"Type": "GPO",
"Port": 1,
"Pin": 1,
"State": "low",
"Momentary": 1
},
{
"DeviceIP": "10.220.40.166",
"Type": "GPI",
"Port": 1,
"Pin": 1,
"State": "low"
}
]
},
{
"Name": "PHONE",
"SourceNum": "0",
"GPI_IndicationOnly": true,
"DisableRouteChange": true,
"GPI_SwitchPort": 1,
"TriggerGPIO": [
{
"DeviceIP": "10.220.40.166",
"Type": "GPO",
"Port": 1,
"Pin": 2,
"State": "low",
"Momentary": 1
},
{
"DeviceIP": "10.220.40.166",
"Type": "GPI",
"Port": 1,
"Pin": 2,
"State": "low"
}
]
},
{
"Name": "EAS",
"SourceNum": "0",
"GPI_IndicationOnly": true,
"DisableRouteChange": true,
"GPI_SwitchPort": 1,
"TriggerGPIO": [
{
"DeviceIP": "10.220.40.166",
"Type": "GPO",
"Port": 1,
"Pin": 3,
"State": "low",
"Momentary": 1
},
{
"DeviceIP": "10.220.40.166",
"Type": "GPI",
"Port": 1,
"Pin": 3,
"State": "low"
}
]
},
{
"Name": "DOOR",
"SourceNum": "0",
"GPI_IndicationOnly": true,
"DisableRouteChange": true,
"GPI_SwitchPort": 1,
"TriggerGPIO": [
{
"DeviceIP": "10.220.40.166",
"Type": "GPO",
"Port": 1,
"Pin": 4,
"State": "low",
"Momentary": 1
},
{
"DeviceIP": "10.220.40.166",
"Type": "GPI",
"Port": 1,
"Pin": 4,
"State": "low"
}
]
},
{
"Name": "OFF AIR",
"SourceNum": "0",
"GPI_IndicationOnly": true,
"DisableRouteChange": true,
"GPI_SwitchPort": 1,
"TriggerGPIO": [
{
"DeviceIP": "10.220.40.166",
"Type": "GPO",
"Port": 1,
"Pin": 5,
"State": "low",
"Momentary": 1
},
{
"DeviceIP": "10.220.40.166",
"Type": "GPI",
"Port": 1,
"Pin": 5,
"State": "low"
}
]
}
]
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant