ignore gateways that don't implement required commands

This commit is contained in:
Jack Robison 2018-10-19 16:13:43 -04:00
parent 87e9617499
commit 392ec2fc13
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -179,7 +179,12 @@ class Gateway:
await gateway.discover_commands(soap_socket)
requirements_met = all([required in gateway._registered_commands for required in required_commands])
if not requirements_met:
log.debug("found gateway, but it does not implement required soap commands")
not_met = [
required for required in required_commands if required not in gateway._registered_commands
]
log.warning("found gateway %s at %s, but it does not implement required soap commands: %s",
gateway.manufacturer_string, gateway.location, not_met)
ignored.add(datagram.location)
continue
else:
log.debug('found gateway device %s', datagram.location)