Foscam

foscam 平台允许您在 Home Assistant 中观看您的 Foscam IP 摄像头的实时视频流。

配置

要将 Foscam integration 添加到您的 Home Assistant 实例中,请使用此 My 按钮:

手动配置步骤

如果上述 My 按钮不起作用,您也可以手动执行以下步骤:

Note

在 Foscam 中似乎存在一些与较长密码和包含某些符号的密码相关的问题。确保检查您摄像头的文档。

可控制功能

如果您的摄像头支持,则会添加 “睡眠” 开关来将摄像头置于睡眠模式。

视频流

大多数 Foscam IP 摄像头支持两个视频流,默认情况下 Main 流是高质量流,而 Sub 流是低质量流。这些流可以在您的摄像头偏好设置中进行配置。

动作 foscam.ptz

如果您的 Foscam 摄像头支持 PTZ,您将能够平移或倾斜摄像头。

数据属性 描述
entity_id 指向摄像头的 entity_id 的字符串或字符串列表。使用 entity_id: all 来针对所有摄像头。
movement 移动的方向。允许值:updownleftrighttop_lefttop_rightbottom_leftbottom_right
travel_time (可选)旅行时间(秒)。允许值:从 0 到 1 的浮点数。默认值:0.125

动作 foscam.ptz_preset

如果您的 Foscam 摄像头支持 PTZ 预设,您将能够使用预设名称将摄像头移动到预定义的预设位置。

数据属性 描述
entity_id 指向摄像头的 entity_id 的字符串或字符串列表。使用 entity_id: all 来针对所有摄像头。
preset_name 要移动到的预设名称。可以在官方 Foscam 应用程序中创建预设。

带控制的示例卡片

显示使用图像元素和 PTZ 控制的 Foscam 摄像头的截图。 显示带有平移和倾斜控制的 Foscam 摄像头的示例。

使用以下卡片代码,您可以实现一个展示 Foscam 摄像头实时视频流的卡片,并在右下角提供摄像头移动的控制。

type: picture-elements
image: camera.bedroom
camera_image: camera.bedroom
camera_view: live
elements:
  - type: icon
    icon: "mdi:arrow-up"
    style:
      background: "rgba(255, 255, 255, 0.5)"
      right: 25px
      bottom: 50px
    tap_action:
      action: perform-action
      perform_action: foscam.ptz
      target:
        entity_id: camera.bedroom
      data:
        movement: up
  - type: icon
    icon: "mdi:arrow-down"
    style:
      background: "rgba(255, 255, 255, 0.5)"
      right: 25px
      bottom: 0px
    tap_action:
      action: perform-action
      perform_action: foscam.ptz
      target:
        entity_id: camera.bedroom
      data:
        movement: down
  - type: icon
    icon: "mdi:arrow-left"
    style:
      background: "rgba(255, 255, 255, 0.5)"
      right: 50px
      bottom: 25px
    tap_action:
      action: perform-action
      perform_action: foscam.ptz
      target:
        entity_id: camera.bedroom
      data:
        movement: left
  - type: icon
    icon: "mdi:arrow-right"
    style:
      background: "rgba(255, 255, 255, 0.5)"
      right: 0px
      bottom: 25px
    tap_action:
      action: perform-action
      perform_action: foscam.ptz
      target:
        entity_id: camera.bedroom
      data:
        movement: right
  - type: icon
    icon: "mdi:arrow-top-left"
    style:
      background: "rgba(255, 255, 255, 0.5)"
      right: 50px
      bottom: 50px
    tap_action:
      action: perform-action
      perform_action: foscam.ptz
      target:
        entity_id: camera.bedroom
      data:
        movement: top_left
  - type: icon
    icon: "mdi:arrow-top-right"
    style:
      background: "rgba(255, 255, 255, 0.5)"
      right: 0px
      bottom: 50px
    tap_action:
      action: perform-action
      perform_action: foscam.ptz
      target:
        entity_id: camera.bedroom
      data:
        movement: top_right
  - type: icon
    icon: "mdi:arrow-bottom-left"
    style:
      background: "rgba(255, 255, 255, 0.5)"
      right: 50px
      bottom: 0px
    tap_action:
      action: perform-action
      perform_action: foscam.ptz
      target:
        entity_id: camera.bedroom
      data:
        movement: bottom_left
  - type: icon
    icon: "mdi:arrow-bottom-right"
    style:
      background: "rgba(255, 255, 255, 0.5)"
      right: 0px
      bottom: 0px
    tap_action:
      action: perform-action
      perform_action: foscam.ptz
      target:
        entity_id: camera.bedroom
      data:
        movement: bottom_right

额外的 CGI 命令

支持 CGI 命令的 Foscam 网络摄像头可以通过 Home Assistant 进行控制(来源)。