Many thanks for this component. I got it running with HassIO (0.84.6) and a USR-TCP232-E2 in my fresh second hand PowerMax Pro. Only using standard mode so far, because powerlink mode didn’t succeed yet.
I saw some errors when trusting on the default values of the parameters. Later when I added this 3 parameters explicitly, the errors went away. Could it be that the default value of e.g. the language
isn’t set well?
There also were some errors on this component not using id
's for sensors. But they also disappeared when using the parameters explicitly.
I hope this info is welcome to improve the component. But as said, you can work around it.
visonic:
device:
type: ethernet
host: 'SOME_IP'
port: SOME_PORT
# motion_off: 180
# language: 'EN'
force_standard: 'yes'
# sync_time: 'yes'
allow_remote_arm: 'yes'
allow_remote_disarm: 'yes'
2018-12-30 19:45:18 DEBUG (MainThread) [custom_components.pyvisonic] [handle_msgtypeA5] Zone Event sysStatus 0x0 sysFlags 0x21 eventZone 10 eventType 5 x10status 0x0
2018-12-30 19:45:18 ERROR (MainThread) [homeassistant.core] Error doing job: Fatal error on transport TCPTransport
Traceback (most recent call last):
File "uvloop/handles/stream.pyx", line 827, in uvloop.loop.__uv_stream_on_read_impl
File "/config/custom_components/pyvisonic.py", line 1004, in data_received
self.handle_received_byte(databyte)
File "/config/custom_components/pyvisonic.py", line 1085, in handle_received_byte
self.handle_packet(self.ReceiveData)
File "/config/custom_components/pyvisonic.py", line 1961, in handle_packet
self.handle_msgtypeA5(packet[2:-2])
File "/config/custom_components/pyvisonic.py", line 2347, in handle_msgtypeA5
log.debug("[handle_msgtypeA5] Event {0} in zone {1}".format(pmEventType_t[self.pmLang][eventType] or "UNKNOWN", eventZone))
KeyError: None
2018-12-30 19:45:18 ERROR (MainThread) [custom_components.pyvisonic] ERROR Connection Lost : disconnected due to exception <None>
NoneType: None
2018-12-30 19:45:23 ERROR (MainThread) [custom_components.visonic] PyVisonic has caused an exception None
2018-12-30 19:45:33 ERROR (MainThread) [custom_components.visonic] ........... attempting reconnection
2018-12-30 19:45:35 DEBUG (MainThread) [custom_components.pyvisonic] [pmSendPdu] waiting for message response ['0X2']
2018-12-30 19:45:36 INFO (MainThread) [custom_components.pyvisonic] [QueueMessage] Getting Status
2018-12-30 19:45:36 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 344, in _async_add_entity
raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: alarm_control_panel.visonic_alarm. Platform visonic does not generate unique IDs
2018-12-30 19:45:36 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 344, in _async_add_entity
raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: switch.visonic_alarm_panel. Platform visonic does not generate unique IDs
2018-12-30 19:45:45 INFO (MainThread) [custom_components.pyvisonic] [SendCommand] Re-Sending last message Initializing PowerMax/Master PowerLink Connection
2018-12-30 19:45:49 INFO (MainThread) [custom_components.pyvisonic] Zone name for 1 is Front door
2018-12-30 19:45:49 ERROR (MainThread) [homeassistant.core] Error doing job: Fatal error on transport TCPTransport
Traceback (most recent call last):
File "uvloop/handles/stream.pyx", line 827, in uvloop.loop.__uv_stream_on_read_impl
File "/config/custom_components/pyvisonic.py", line 1004, in data_received
self.handle_received_byte(databyte)
File "/config/custom_components/pyvisonic.py", line 1085, in handle_received_byte
self.handle_packet(self.ReceiveData)
File "/config/custom_components/pyvisonic.py", line 1959, in handle_packet
self.handle_msgtypeA3(packet[2:-2])
File "/config/custom_components/pyvisonic.py", line 2196, in handle_msgtypeA3
self.pmSensorDev_t[offset+i].pushChange()
File "/config/custom_components/pyvisonic.py", line 695, in pushChange
self._change_handler()
File "/config/custom_components/sensor/visonic.py", line 46, in onChange
self.schedule_update_ha_state()
File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 317, in schedule_update_ha_state
self.hass.add_job(self.async_update_ha_state(force_refresh))
AttributeError: 'NoneType' object has no attribute 'add_job'
2018-12-30 19:45:49 ERROR (MainThread) [custom_components.pyvisonic] ERROR Connection Lost : disconnected due to exception <'NoneType' object has no attribute 'add_job'>
NoneType: None
2018-12-30 19:45:54 ERROR (MainThread) [custom_components.visonic] PyVisonic has caused an exception 'NoneType' object has no attribute 'add_job'
2018-12-30 19:46:04 ERROR (MainThread) [custom_components.visonic] ........... attempting reconnection
2018-12-30 19:46:10 DEBUG (MainThread) [custom_components.pyvisonic] [handle_msgtypeA5] Zone Event sysStatus 0x0 sysFlags 0x1 eventZone 0 eventType 0 x10status 0x0
2018-12-30 19:46:10 ERROR (MainThread) [homeassistant.core] Error doing job: Fatal error on transport TCPTransport
Traceback (most recent call last):
File "uvloop/handles/stream.pyx", line 827, in uvloop.loop.__uv_stream_on_read_impl
File "/config/custom_components/pyvisonic.py", line 1004, in data_received
self.handle_received_byte(databyte)
File "/config/custom_components/pyvisonic.py", line 1085, in handle_received_byte
self.handle_packet(self.ReceiveData)
File "/config/custom_components/pyvisonic.py", line 1961, in handle_packet
self.handle_msgtypeA5(packet[2:-2])
File "/config/custom_components/pyvisonic.py", line 2367, in handle_msgtypeA5
if 0 <= sysStatus < len(pmSysStatus_t[self.pmLang]):
KeyError: None
2018-12-30 19:46:10 ERROR (MainThread) [custom_components.pyvisonic] ERROR Connection Lost : disconnected due to exception <None>
NoneType: None
2018-12-30 19:46:15 ERROR (MainThread) [custom_components.visonic] PyVisonic has caused an exception None
2018-12-30 19:46:25 ERROR (MainThread) [custom_components.visonic] ........... attempting reconnection
If needed I can supply complete logs, but I’m hesitating because of possible secure information.