UniversalDevicesInc-PG3 / udi-poly-notification

Polyglot v2 NodeServer for Notifications
MIT License
2 stars 1 forks source link

Crash on restart #40

Closed jimboca closed 1 year ago

jimboca commented 2 years ago

Caused by missing service node name. Need to check for missing or null.

2022-05-04 09:00:13,371 MainThread udi_interface      INFO     polylogger:set_basic_config: set_basic_config: enable=True level=30
2022-05-04 09:00:19,112 MainThread udi_interface      INFO     __init__:<module>: UDI Python Interface for Polyglot version 3 3.0.43 Starting...
2022-05-04 09:00:19,191 MainThread udi_interface.interface INFO     interface:__init__: Initialization received from Polyglot V3 3.0.61  [ISY: 5.4.3, Slot: 8]
2022-05-04 09:00:19,193 MainThread udi_interface.interface INFO     interface:__init__: Connect: Network Interface: {'addr': '192.168.86.66', 'netmask': '255.255.255.0', 'broadcast': '192.168.86.255'}
2022-05-04 09:00:19,196 Interface  udi_interface.interface INFO     interface:_startMqtt: Connecting to MQTT... localhost:1888
2022-05-04 09:00:19,207 MainThread udi_interface.interface WARNING  interface:db_getNodeDrivers: controller not found in database.
2022-05-04 09:00:19,210 MainThread udi_interface.custom INFO     custom:_save: Sending data customtypedparams to Polyglot.
2022-05-04 09:00:19,211 MainThread udi_interface.interface WARNING  interface:send: MQTT Send waiting on connection :: {'set': [{'key': 'customtypedparams', 'value': [{'name': 'messages', 'title': 'Messages', 'desc': 'Your Custom Messages', 'isList': True, 'params': [{'name': 'id', 'title': 'ID (Must be integer greater than zero and should never change!)', 'isRequired': True}, {'name': 'title', 'title': 'Title (Should be short)', 'isRequired': True}, {'name': 'message', 'title': 'Message (If empty, assume same as title)', 'isRequired': False}]}, {'name': 'pushover', 'title': 'Pushover Service Nodes', 'desc': 'Config for https://pushover.net/', 'isList': True, 'params': [{'name': 'name', 'title': 'Name for reference, used as node name. Must be 8 characters or less.', 'isRequired': True}, {'name': 'user_key', 'title': 'The User Key', 'isRequired': True}, {'name': 'app_key', 'title': 'Application Key', 'isRequired': True, 'isList': False}]}, {'name': 'notify', 'title': 'Notify Nodes', 'desc': 'Notify Nodes to create', 'isList': True, 'params': [{'name': 'id', 'title': 'ID for node, never change, 8 characters or less', 'isRequired': True}, {'name': 'name', 'title': 'Name for node', 'isRequired': True}, {'name': 'service_node_name', 'title': 'Service Node Name Must match an existing Service Node Name', 'isRequired': True}]}, {'name': 'assistant_relay', 'title': 'Assistant Relay Service Node', 'desc': 'Config for https://github.com/greghesp/assistant-relay', 'isList': True, 'params': [{'name': 'host', 'title': 'Host', 'defaultValue': 'this_host_ip', 'isRequired': True}, {'name': 'port', 'title': 'Port', 'isRequired': True, 'isList': False, 'defaultValue': '3001'}, {'name': 'users', 'title': 'Users', 'isRequired': True, 'isList': True, 'defaultValue': ['someuser']}]}, {'name': 'telegramub', 'title': 'Telegram User Bot Service Node', 'desc': 'Config for https://github.com/greghesp/assistant-relay', 'isList': True, 'params': [{'name': 'name', 'title': 'Name for reference, used as node name. Must be 8 characters or less.', 'isRequired': True}, {'name': 'http_api_key', 'title': 'HTTP API Key', 'defaultValue': 'your_http_api_key', 'isRequired': True}, {'name': 'users', 'title': 'Users', 'isRequired': True, 'isList': True, 'defaultValue': ['someuserid']}]}]}]}
2022-05-04 09:00:19,509 MQTT       udi_interface.interface INFO     interface:_connect: MQTT Connected with result code 0 (Success)
2022-05-04 09:00:19,510 MQTT       udi_interface.interface INFO     interface:_connect: MQTT Subscribing to topic: udi/pg3/ns/clients/00:0d:b9:4e:37:ec_8 -  MID: 1 Result: 0
2022-05-04 09:00:19,548 MQTT       udi_interface.interface INFO     interface:_subscribe: MQTT Subscribed Succesfully for Message ID: 1 - QoS: (0,)
2022-05-04 09:00:20,535 MQTT       udi_interface.interface INFO     interface:_message: Successfully set controller :: ST to 1 UOM 25
2022-05-04 09:00:21,531 Command    udi_interface.interface ERROR    interface:_handleInput: _parseInput: node address mn_ebauth does not exist. {'address': 'mn_ebauth', 'cmd': 'DOF', 'query': {}}
2022-05-04 09:00:22,220 MainThread udi_interface.custom INFO     custom:_save: Sending data notices to Polyglot.
2022-05-04 09:00:22,222 MainThread udi_interface.interface INFO     interface:addNode: Adding node Notification Controller(controller) [None]
2022-05-04 09:00:22,224 MainThread udi_interface.interface INFO     interface:setController: Using node "controller", driver "ST" for connection status.
2022-05-04 09:00:22,629 Command    udi_interface.interface ERROR    interface:_handleInput: _parseInput: node address mn_ebauth does not exist. {'address': 'mn_ebauth', 'cmd': 'DON', 'query': {}}
2022-05-04 09:00:22,966 MQTT       udi_interface.interface INFO     interface:_message: Successfully set key = customtypedparams
2022-05-04 09:00:23,061 Thread-4   udi_interface      WARNING  Controller:handler_typed_data: No Telegram User Bot Entries in the config: []
2022-05-04 09:00:23,066 Thread-4   udi_interface      ERROR    udi_interface:write: Exception in thread
2022-05-04 09:00:23,068 Thread-4   udi_interface      ERROR    udi_interface:write: Thread-4
2022-05-04 09:00:23,069 Thread-4   udi_interface      ERROR    udi_interface:write: :
2022-05-04 09:00:23,069 Thread-4   udi_interface      ERROR    udi_interface:write: Traceback (most recent call last):
2022-05-04 09:00:23,070 Thread-4   udi_interface      ERROR    udi_interface:write: File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
2022-05-04 09:00:23,074 Thread-4   udi_interface      ERROR    udi_interface:write: self.run()
2022-05-04 09:00:23,075 Thread-4   udi_interface      ERROR    udi_interface:write: File "/usr/local/lib/python3.8/threading.py", line 870, in run
2022-05-04 09:00:23,078 Thread-4   udi_interface      ERROR    udi_interface:write: self._target(*self._args, **self._kwargs)
2022-05-04 09:00:23,079 Thread-4   udi_interface      ERROR    udi_interface:write: File "/var/polyglot/pg3/ns/00:0d:b9:4e:37:ec_8/nodes/Controller.py", line 459, in handler_typed_data
2022-05-04 09:00:23,083 Thread-4   udi_interface      ERROR    udi_interface:write: sname = node['service_node_name']
2022-05-04 09:00:23,084 Thread-4   udi_interface      ERROR    udi_interface:write: KeyError
2022-05-04 09:00:23,084 Thread-4   udi_interface      ERROR    udi_interface:write: :
2022-05-04 09:00:23,085 Thread-4   udi_interface      ERROR    udi_interface:write: 'service_node_name'
2022-05-04 09:00:23,170 Thread-6   udi_interface      WARNING  Controller:handler_config_done: Waiting for all handlers to complete start=None params=True data=True typed_data=None cnt=60