Skip to content

pb with camera image and websocket integration #48

@raphy21310

Description

@raphy21310
  • hi !

like the other issue opened on May 10, the visonic app keeps disconnecting with Daves integration. So i remove it , and use websocket with yours. so i have a powerlink card , the proxy and your @msp1974 integration.
here is some issue from the proxy log: there's something wrong with the camera image. and may be another pb with the integration: If the integration module immediately detects all the alarm components and sensors, then everything disconnects afterwards. i have a pm33.

my config:
visonic proxy 1.1.2
PowerMaster-33E
JS703205 E19.324
PL7.5.92.2 raw

MC-302 PG2
KF-235 PG2
cam Next CAM PG2

2025-08-17 18:57:00,866 INFO     RECEIVED CAMERA IMAGE 1 of 11
2025-08-17 18:57:00,867 ERROR    got a <class 'PIL.UnidentifiedImageError'> failure during the execution of the request POST /scripts/pir_film.php
Traceback (most recent call last):
  File "/visonic_proxy/connections/httpserver/server.py", line 305, in _process_request
    response = await response
               ^^^^^^^^^^^^^^
  File "/visonic_proxy/connections/webserver.py", line 127, in default
    await self.decode_image(request.body)
  File "/visonic_proxy/connections/webserver.py", line 171, in decode_image
    im = Image.open(io.BytesIO(data))
  File "/usr/local/lib/python3.13/site-packages/PIL/Image.py", line 3580, in open
    raise UnidentifiedImageError(msg)
PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x7f126d63d850>
2025-08-17 18:57:01,355 DEBUG    received request POST /scripts/update.php
2025-08-17 18:57:01,355 DEBUG    found matching route UriRoute(path=re.compile('(.*?)'), http_method='POST', uri_variables=None, call_args=['self', 'request']) calling method <bound method MyHandler.default of <visonic_proxy.connections.webserver.MyHandler object at 0x7f126e57c980>>
2025-08-17 18:57:02,188 DEBUG    received request POST /scripts/pir_film.php
2025-08-17 18:57:02,188 DEBUG    found matching route UriRoute(path=re.compile('(.*?)'), http_method='POST', uri_variables=None, call_args=['self', 'request']) calling method <bound method MyHandler.default of <visonic_proxy.connections.webserver.MyHandler object at 0x7f126e57c980>>
2025-08-17 18:57:02,262 INFO     RECEIVED CAMERA IMAGE 1 of 11
2025-08-17 18:57:02,263 ERROR    got a <class 'PIL.UnidentifiedImageError'> failure during the execution of the request POST /scripts/pir_film.php
Traceback (most recent call last):
  File "/visonic_proxy/connections/httpserver/server.py", line 305, in _process_request
    response = await response
               ^^^^^^^^^^^^^^
  File "/visonic_proxy/connections/webserver.py", line 127, in default
    await self.decode_image(request.body)
  File "/visonic_proxy/connections/webserver.py", line 171, in decode_image
    im = Image.open(io.BytesIO(data))
  File "/usr/local/lib/python3.13/site-packages/PIL/Image.py", line 3580, in open
    raise UnidentifiedImageError(msg)
PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x7f126e556110>
2025-08-17 18:57:03,354 DEBUG    Running Alarm Watchdog
2025-08-17 18:57:03,354 DEBUG    Finished Alarm Watchdog run
2025-08-17 18:57:03,395 DEBUG    TASKS: ['Websocket Send Queue Processor', 'Visonic Client Send Queue Processor', 'WebServer', 'Flow Manager Send Queue Processor', 'Websocket Server', 'Task-122', 'ProxyRunner', 'Flow Manager Receive Queue Processor', 'KeepAlive timer']
2025-08-17 18:57:03,395 INFO     -------------------------------------------------------------------------------------------
2025-08-17 18:57:03,395 INFO     CONNECTIONS: Alarm: 1, Visonic: 1, HA: 1
2025-08-17 18:57:03,395 INFO     MODES: Disconnected Mode: False, Stealth Mode: False, Download Mode: False
2025-08-17 18:57:03,396 INFO     Queue Size: Receive: 0, Send: 0
2025-08-17 18:57:03,396 INFO     -------------------------------------------------------------------------------------------
2025-08-17 18:57:03,571 DEBUG    received request POST /scripts/pir_film.php
2025-08-17 18:57:03,571 DEBUG    found matching route UriRoute(path=re.compile('(.*?)'), http_method='POST', uri_variables=None, call_args=['self', 'request']) calling method <bound method MyHandler.default of <visonic_proxy.connections.webserver.MyHandler object at 0x7f126e57c980>>

thanks, Raphy

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions