Skip to content

Latest commit

 

History

History
88 lines (66 loc) · 5.88 KB

snapshots.md

File metadata and controls

88 lines (66 loc) · 5.88 KB

Snapshots

Category: Camera Configuration - Image Options - Export PNG Snapshot.

Default: Enabled

Waring: Please keep in mind that the snapshot image will be not automatically deleted from your WWW folder while the PNG export is enable

The snapshots images are automatically stored in www (local) folder of HA, by default this function is enable. The Camera take a snapshot of the maps when the vacuum is "idle", "docked" or in "error" state if this option is enabled. It is possible to disable the PNG export from the camera options thanks @gunjambi as soon this option is OFF the PNG will be deleted from the WWW folder.

Screenshot 2024-03-13 at 17 19 15

When the vacuum battery get empty because of an error during a cleaning cycle, or in different conditions as per the below example. If the option is enable will be possible to create an automation to send the screenshot to your mobile. When using the below example HA editor please edit the automation in yaml because the snapshot attribute (used in this example) provides boolean values True or False. HA editor will translate to "True" (string) from the UI editor, home assistant will not notify you in this case.

Warning: Please keep in mind that the snapshot image will be not automatically deleted from your WWW folder while the PNG export is enabl)


alias: vacuum notification
description: ""
trigger:
  - platform: state
    entity_id:
      - camera.v1_your_vacuum_camera
    attribute: snapshot
    from: false
    to: true
condition: []
action:
  - service: notify.mobile_app_your_phone
    data:
      message: Vacuum {{states("vacuum.valetudo_your_vacuum")}}
      data:
        image: /local/snapshot_your_vacuum.png
mode: single

*Aside the image, this function store also a zip file with diagnostic data, we filter the data relative to this integration from the HA logs and those data are stored only if the log debug function in HA is active (we don't store any data in the www folder if the you do not log the data and export them).

Screenshot 2023-10-03 at 06 55 36

Once enabled the Debug log in the home assistant GUI home assistant collect the logs of the camera and other intregrations and add-on's in the instance.

Example Home Assistant log.

2024-01-26 09:27:39.930 DEBUG (MainThread) [custom_components.valetudo_vacuum_camera.camera] glossyhardtofindnarwhal System CPU usage stat (1/2): 0.0%
2024-01-26 09:27:39.930 INFO (MainThread) [custom_components.valetudo_vacuum_camera.camera] glossyhardtofindnarwhal: Image not processed. Returning not updated image.
2024-01-26 09:27:39.935 DEBUG (MainThread) [custom_components.valetudo_vacuum_camera.camera] glossyhardtofindnarwhal System CPU usage stat (2/2): 0.0%
2024-01-26 09:27:39.935 DEBUG (MainThread) [custom_components.valetudo_vacuum_camera.camera] glossyhardtofindnarwhal Camera Memory usage in GB: 0.93, 11.98% of Total.
***2024-01-26 09:27:59.524 ERROR (MainThread) [homeassistant.components.androidtv.media_player] Failed to execute an ADB command. ADB connection re-establishing attempt in the next update. Error: Reading from 192.1**.1**.2**:5555 timed out (9.0 seconds)
2024-01-26 09:28:01.524 WARNING (MainThread) [androidtv.adb_manager.adb_manager_async] Couldn't connect to 192.1**.1**.2**:5555.  TcpTimeoutException: Connecting to 192.1**.1**.2**:5555 timed out (1.0 seconds)
2024-01-26 09:28:02.967 WARNING (MainThread) [custom_components.localtuya.common] [204...991] Failed to connect to 192.1**.1**.1**: [Errno 113] Connect call failed ('192.1**.1**.1**', 6668)**
2024-01-26 09:28:37.649 INFO (MainThread) [custom_components.valetudo_vacuum_camera.valetudo.MQTT.connector] Received valetudo/GlossyHardToFindNarwhal image data from MQTT
2024-01-26 09:28:39.943 INFO (MainThread) [custom_components.valetudo_vacuum_camera.valetudo.MQTT.connector] No data from valetudo/GlossyHardToFindNarwhal or vacuum docked

The filtered logs are in a zip file that will be created in the .storage of the home assistant, this file will be not acceseble on the .config folder unless you select the oprtion to export the logs from the Camera Options.

Screenshot 2024-01-26 at 10 01 40

And then download it with the file editor of your coise or via SAMBA add-on.

Screenshot 2023-10-03 at 06 58 36

The filtered logs will be as per the example below not containing other integrations or add-on logs such as androidtv, custom_components.localtuya (see above) only the custom_components.valetudo_vacuum_camera logs are exported..

Example Valetudo Camera log.

2024-01-26 09:27:39.930 DEBUG (MainThread) [custom_components.valetudo_vacuum_camera.camera] glossyhardtofindnarwhal System CPU usage stat (1/2): 0.0%
2024-01-26 09:27:39.930 INFO (MainThread) [custom_components.valetudo_vacuum_camera.camera] glossyhardtofindnarwhal: Image not processed. Returning not updated image.
2024-01-26 09:27:39.935 DEBUG (MainThread) [custom_components.valetudo_vacuum_camera.camera] glossyhardtofindnarwhal System CPU usage stat (2/2): 0.0%
2024-01-26 09:27:39.935 DEBUG (MainThread) [custom_components.valetudo_vacuum_camera.camera] glossyhardtofindnarwhal Camera Memory usage in GB: 0.93, 11.98% of Total.
2024-01-26 09:28:37.649 INFO (MainThread) [custom_components.valetudo_vacuum_camera.valetudo.MQTT.connector] Received valetudo/GlossyHardToFindNarwhal image data from MQTT
2024-01-26 09:28:39.943 INFO (MainThread) [custom_components.valetudo_vacuum_camera.valetudo.MQTT.connector] No data from valetudo/GlossyHardToFindNarwhal or vacuum docked