UniversalDevicesInc-PG3 / udi-poly-hue-emu

MIT License
1 stars 2 forks source link

Stuck in listen mode #10

Open jimboca opened 3 years ago

jimboca commented 3 years ago

This is due to

2021-07-03 10:55:12,957 Thread-2   hueUpnp            ERROR    hueUpnp:run: hueUpnp: Http Socket Error: [Errno 48] Address already in use

Full log:


2021-07-03 10:54:31,637 MainThread polyinterface      INFO     polylogger:set_basic_config: set_basic_config: enable=True level=30
2021-07-03 10:54:32,588 MainThread polyinterface      INFO     polyinterface:init_interface: Received Config from STDIN.
2021-07-03 10:54:32,590 MainThread polyinterface      INFO     __init__:<module>: UDI Polyglot v2 Interface 2.1.0 Starting...
2021-07-03 10:54:39,698 MainThread py.warnings        WARNING  warnings:_showwarnmsg: /var/polyglot/nodeservers/HueEmulator/ISYHueEmu.py:259: DeprecationWarning: invalid escape sequence \s
2021-07-03 10:54:39,698 MainThread py.warnings        WARNING  warnings:_showwarnmsg: /var/polyglot/nodeservers/HueEmulator/ISYHueEmu.py:259: DeprecationWarning: invalid escape sequence \s
2021-07-03 10:54:39,792 MainThread polyinterface      DEBUG    polyinterface:get_network_interface: gws: {'default': {2: ('192.168.86.1', 'igb0')}, 2: [('192.168.86.1', 'igb0', True)]}
2021-07-03 10:54:39,793 MainThread polyinterface      DEBUG    polyinterface:get_network_interface: gw: default=('192.168.86.1', 'igb0')
2021-07-03 10:54:39,794 MainThread polyinterface      DEBUG    polyinterface:get_network_interface: ifad: igb0=[{'addr': '192.168.86.66', 'netmask': '255.255.255.0', 'broadcast': '192.168.86.255'}]
2021-07-03 10:54:39,795 MainThread polyinterface      INFO     polyinterface:__init__: Connect: Network Interface: {'addr': '192.168.86.66', 'netmask': '255.255.255.0', 'broadcast': '192.168.86.255'}
2021-07-03 10:54:39,797 Interface  polyinterface      INFO     polyinterface:_startMqtt: Connecting to MQTT... localhost:1883
2021-07-03 10:54:39,826 MainThread polyinterface      INFO     HueEmuController:__init__: Initializing
2021-07-03 10:54:40,263 MQTT       polyinterface      INFO     polyinterface:_connect: MQTT Connected with result code 0 (Success)
2021-07-03 10:54:40,265 MQTT       polyinterface      INFO     polyinterface:_connect: MQTT Subscribing to topic: udi/polyglot/ns/4 -  MID: 1 Result: 0
2021-07-03 10:54:40,265 MQTT       polyinterface      INFO     polyinterface:_connect: MQTT Subscribing to topic: udi/polyglot/connections/polyglot -  MID: 2 Result: 0
2021-07-03 10:54:40,267 MQTT       polyinterface      INFO     polyinterface:_connect: Sent Connected message to Polyglot
2021-07-03 10:54:40,380 MQTT       polyinterface      INFO     polyinterface:_subscribe: MQTT Subscribed Succesfully for Message ID: 1 - QoS: (0,)
2021-07-03 10:54:40,449 MQTT       polyinterface      INFO     polyinterface:_subscribe: MQTT Subscribed Succesfully for Message ID: 2 - QoS: (0,)
2021-07-03 10:54:43,052 NodeServer polyinterface      INFO     HueEmuController:start: Starting
2021-07-03 10:54:43,055 NodeServer polyinterface      DEBUG    polyinterface:get_server_data: get_server_data: {'name': 'HueEmulator', 'docs': 'https://github.com/Einstein42/udi-poly-hue-emu', 'type': 'python3', 'executable': 'hue-emu-poly.py', 'install': 'install.sh', 'description': 'Hue Emulator Node Server', 'notice': 'Your disclaimer here', 'shortPoll': '5', 'longPoll': '60', 'profile_version': None, 'credits': [{'title': 'hue-emu: A NodeServer for Emulating a Hue Hub of ISY Devices', 'author': 'JimBoCA', 'version': '2.2.9', 'date': 'June 17, 2018', 'source': 'https://github.com/jimboca/udi-poly-hue-emu-python', 'license': 'https://raw.githubusercontent.com/Einstein42/udi-poly-template-python/master/LICENSE'}], 'version': '2.2.9'}
2021-07-03 10:54:43,056 NodeServer polyinterface      DEBUG    polyinterface:check_profile: check_profile: force=True build_profile=None
2021-07-03 10:54:43,063 NodeServer polyinterface      DEBUG    polyinterface:check_profile: check_profile:      customData={'last_version': '2.1.2', 'cver': 4, 'profile_version': None}
2021-07-03 10:54:43,070 NodeServer polyinterface      DEBUG    polyinterface:check_profile: check_profile: profile_version=None
2021-07-03 10:54:43,077 NodeServer polyinterface      WARNING  polyinterface:check_profile: check_profile: Force is enabled.
2021-07-03 10:54:43,084 NodeServer polyinterface      INFO     polyinterface:installprofile: Sending Install Profile command to Polyglot.
2021-07-03 10:54:43,164 NodeServer polyinterface      INFO     polyinterface:saveCustomData: Sending customData to Polyglot.
2021-07-03 10:54:43,167 NodeServer polyinterface      INFO     HueEmuController:start: Version 2.2.9
2021-07-03 10:54:43,168 NodeServer polyinterface      DEBUG    polyinterface:get_network_interface: gws: {'default': {2: ('192.168.86.1', 'igb0')}, 2: [('192.168.86.1', 'igb0', True)]}
2021-07-03 10:54:43,169 NodeServer polyinterface      DEBUG    polyinterface:get_network_interface: gw: default=('192.168.86.1', 'igb0')
2021-07-03 10:54:43,170 NodeServer polyinterface      DEBUG    polyinterface:get_network_interface: ifad: igb0=[{'addr': '192.168.86.66', 'netmask': '255.255.255.0', 'broadcast': '192.168.86.255'}]
2021-07-03 10:54:43,171 NodeServer polyinterface      INFO     polyinterface:saveCustomParams: Sending customParams to Polyglot.
2021-07-03 10:54:43,173 NodeServer polyinterface      INFO     HueEmuController:check_version: last_version=2.1.2 current_version=2.2.9
2021-07-03 10:54:43,174 NodeServer polyinterface      WARNING  HueEmuController:set_listen: Set to 1
2021-07-03 10:54:43,174 NodeServer polyinterface      INFO     polyinterface:reportDriver: Updating Driver controller - GV2: 1, uom: 2
2021-07-03 10:54:43,176 NodeServer polyinterface      INFO     HueEmuController:set_debug_level: 30
2021-07-03 10:54:43,176 NodeServer polyinterface      INFO     HueEmuController:set_debug_level: Set GV1 to 30
2021-07-03 10:55:12,957 Thread-2   hueUpnp            ERROR    hueUpnp:run: hueUpnp: Http Socket Error: [Errno 48] Address already in use
2021-07-03 10:55:41,633 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 5
2021-07-03 10:56:41,321 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 4
2021-07-03 10:57:41,322 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 3
2021-07-03 10:58:41,327 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 2
2021-07-03 10:59:41,335 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 1
2021-07-03 11:00:41,332 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:00:41,333 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:00:41,345 Thread-3   py.warnings        WARNING  warnings:_showwarnmsg: /usr/local/lib/python3.8/threading.py:932: ResourceWarning: unclosed <socket.socket fd=12, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=17, laddr=('192.168.86.66', 1900)>
2021-07-03 11:00:41,345 Thread-3   py.warnings        WARNING  warnings:_showwarnmsg: /usr/local/lib/python3.8/threading.py:932: ResourceWarning: unclosed <socket.socket fd=12, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=17, laddr=('192.168.86.66', 1900)>
2021-07-03 11:01:41,493 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:01:41,494 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:02:41,418 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:02:41,424 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:03:41,400 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:03:41,407 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:04:41,410 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:04:41,417 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:05:41,439 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:05:41,440 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:06:41,425 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:06:41,427 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:07:41,451 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:07:41,452 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:08:41,426 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:08:41,427 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:09:41,440 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:09:41,441 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:10:41,438 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:10:41,445 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:11:41,456 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:11:41,463 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:12:41,439 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:12:41,446 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:13:41,463 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:13:41,465 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:14:41,456 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:14:41,463 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:15:41,456 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:15:41,463 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:16:41,459 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:16:41,483 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:17:41,465 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:17:41,471 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:18:41,472 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:18:41,498 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:19:41,486 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:19:41,492 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:20:41,463 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:20:41,465 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:21:41,472 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:21:41,478 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:22:41,478 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:22:41,484 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:23:41,500 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:23:41,502 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:24:41,502 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:24:41,503 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:25:41,517 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:25:41,524 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:26:41,508 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:26:41,515 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:27:41,516 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:27:41,523 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:28:41,521 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:28:41,528 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:29:41,517 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:29:41,518 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:30:41,542 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:30:41,543 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:31:41,511 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:31:41,518 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:32:41,513 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:32:41,520 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:33:41,520 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:33:41,545 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:34:41,543 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:34:41,545 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:35:41,535 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:35:41,542 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:36:41,530 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:36:41,537 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:37:41,538 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:37:41,544 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:38:41,550 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:38:41,557 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:39:41,569 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:39:41,588 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:40:41,565 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:40:41,566 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:41:41,578 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:41:41,580 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:42:41,697 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:42:41,698 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:43:41,619 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:43:41,626 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:44:41,620 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:44:41,627 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:45:41,641 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:45:41,648 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:46:41,623 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:46:41,630 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:47:41,625 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:47:41,649 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:48:41,626 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:48:41,633 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:49:41,628 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:49:41,634 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:50:41,647 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:50:41,654 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:51:41,649 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:51:41,650 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:52:41,669 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:52:41,670 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:53:41,640 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:53:41,647 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:54:41,655 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:54:41,662 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:55:41,672 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:55:41,673 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:56:41,680 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:56:41,705 Controller polyinterface      WARNING  HueEmuController:set_listen: Set to 0
2021-07-03 11:57:41,669 Controller polyinterface      WARNING  HueEmuController:longPoll: Listen Count = 0
2021-07-03 11:57:41,670 Controller polyinterface      WARNING  
jimboca commented 3 years ago

this was happening because Polisy now uses port 8081 which was the default we used. So fixed the code to allow changing the port to something like 8082. Need to release another version which changes the default as well for future users.