Integration : Home assistant - themactep/thingino-firmware GitHub Wiki

To configure camera in home assistant, add onvif integration. Then add a new camera and let it autodiscover. In my case autodiscovery failed but it prompted me for IP address of camera. Once entering auth details it added it correctly. (As of 1/26/25 there is a bug in thingino firmware which makes the authentication fail. to fix that, hard reset your camera, and then reconfigure everything from scratch. after reconfiguring it will authenticate fine).

When manually setting up the camera with ONVIF, the port will be "80" and the default username and password is "thingino". The login credentials can be changed from the settings > RTSP/ONVIF Access page of the Thingino interface.

The URL to get snapshot from camera is

http://thingino:thingino@[ipOfYourCamera]/image.jpg

Add white led in home assistant

For now it requires polling to get status.


light:
  - platform: template
    lights:
      z55_light:
        unique_id: "z55_light"
        turn_on:
          - action: rest_command.z55_camera_light_on
        turn_off:
          - action: rest_command.z55_camera_light_off
        #value_template: "{{ is_state('binary_sensor.z55_light_status', 'on') }}"
        value_template: "{{ states('binary_sensor.z55_light_status') }}"
template:
  - unique_id: z55_light_status_template
    trigger:
      - trigger: time_pattern
        seconds: /30
    action:
      - action: rest_command.z55_camera_light_status
        response_variable: z55_response
    binary_sensor:
      - name: z55_light_status
        unique_id: z55_light_status
        state: >
          {{ z55_response['content']['message']['white'] == 1 }}
        
      
rest_command:
  z55_camera_light_on:
    url: "http://z55.home/x/json-imp.cgi?cmd=white&val=1"
    username: root
    password: MyRootPassword
    verify_ssl: false
    method: get

  z55_camera_light_off:
    url: "http://z55.home/x/json-imp.cgi?cmd=white&val=0"
    username: root
    password: MyRootPassword
    verify_ssl: false
    method: get

  z55_camera_light_status:
    url: "http://z55.home/x/json-imp.cgi?cmd=white&val=read"
    username: root
    password: MyRootPassword
    verify_ssl: false
    method: get
    headers:
      Accept: "*/*"



Add a Picture Glance Card with PTZ Controls

The ONVIF implementation in Home Assistant does not expose PTZ controls as entities. You will need to add custom code to add the controls. The following is the full YAML for a Picture Glance Card with PTZ control. Be sure to update with the proper camera entity name.


camera_view: live
fit_mode: cover
type: picture-glance
title: [title]
image: http://[user]:[password]@[camera IP address]/image.jpg
entities:
  - entity: camera.camera_profile_0 #update to your entity name
    tap_action:
      action: call-service
      service: onvif.ptz
      service_data:
        entity_id: camera.camera.camera_profile_0 #update to your entity name
        pan: LEFT
        speed: 1
        distance: 0.1
        move_mode: ContinuousMove
    name: Pan Left
    show_state: false
    icon: mdi:arrow-left
    show_icon: true
  - entity: camera.camera.camera_profile_0 #update to your entity name
    tap_action:
      action: call-service
      service: onvif.ptz
      service_data:
        entity_id: camera.camera.camera_profile_0 #update to your entity name
        tilt: UP
        speed: 1
        distance: 0.1
        move_mode: ContinuousMove
    name: Tilt Up
    icon: mdi:arrow-up
  - entity: camera.camera.camera_profile_0 #update to your entity name
    tap_action:
      action: call-service
      service: onvif.ptz
      service_data:
        entity_id: camera.camera.camera_profile_0 #update to your entity name
        tilt: DOWN
        speed: 1
        distance: 0.1
        move_mode: ContinuousMove
    name: Tilt Down
    icon: mdi:arrow-down
  - entity: camera.camera.camera_profile_0 #update to your entity name
    tap_action:
      action: call-service
      service: onvif.ptz
      service_data:
        entity_id: camera.camera.camera_profile_0 #update to your entity name
        pan: RIGHT
        speed: 1
        distance: 0.1
        move_mode: ContinuousMove
    name: Pan Right
    icon: mdi:arrow-right
    show_icon: true
camera_image: camera.camera.camera_profile_0 #update to your entity name




Set Motion Guard

Since Thingino doesn't expose Motion Guard settings via the ONVIF interface, Home Assistant shows an error when using the built-in Enable/Disable Motion Detection actions. While enabling or disabling the Motion Guard service in Thingino is only possible through a websocket, changing the notification target is possible via a simple HTTP GET request.

The URL is http://[user]:[password]@[camera IP address]/x/json-motion.cgi?target=[target]&state=[true|false]

Where the target is one of: email | ftp | mqtt | telegram | webhook | ntfy | yadisk

See also the source in json-motion.cgi