『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 8189|回复: 11

[技术探讨] 大方摄像头camera如何添加到新的ui-lovelace.yaml中

[复制链接]

166

主题

620

帖子

3663

积分

论坛元老

Rank: 8Rank: 8

积分
3663
金钱
3038
HASS币
0
发表于 2019-2-2 13:16:31 | 显示全部楼层 |阅读模式
请大神指点。
回复

使用道具 举报

6

主题

739

帖子

5608

积分

论坛元老

Rank: 8Rank: 8

积分
5608
金钱
4864
HASS币
20
发表于 2019-2-2 14:58:41 | 显示全部楼层
本帖最后由 mitu 于 2019-2-2 15:03 编辑

lovelace配置方式:
    - type: picture-entity
      camera_image: camera.dafang3
      entity: camera.dafang3
      name: 摄像头
      show_name: false
      show_state: false
开关和传感器配置:
    - type: glance
      action: toggle
      columns: 4
      entities:
        - entity: switch.dafang_h264_rtsp_server
          tap_action:
            action: toggle
        - entity: sensor.dafang_light_sensor
        - entity: switch.dafang_ir_filter
          tap_action:
            action: toggle
        - entity: switch.dafang_ir_led
          tap_action:
            action: toggle
        - entity: switch.dafang_night_mode
          tap_action:
            action: toggle
        - entity: switch.dafang_night_mode_auto
          tap_action:
            action: toggle
        - entity: switch.dafang_blue_led
          tap_action:
            action: toggle
        - entity: switch.dafang_yellow_led
          tap_action:
            action: toggle
        - entity: switch.dafang_motion_detection
          tap_action:
            action: toggle
        - entity: switch.dafang_motion_tracking
          tap_action:
            action: toggle
        - entity: camera.dafang_motion_snapshot
        - entity: cover.dafang_move_left_right
        - entity: cover.dafang_move_up_down
        - entity: binary_sensor.dafang_motion_sensor
      show_header_toggle: false



===========以下是configuration.yaml配置==============
最简单的配置方式:
  - platform: generic
    name: DaFang3
    username: root
    password: ismart12
    authentication: basic
    still_image_url: https://dafang/cgi-bin/currentpic.cgi
    verify_ssl: false
    scan_interval: 5

ffmpeg方式:
- platform: ffmpeg
  name: DaFang3
  input: -rtsp_transport tcp -i rtsp://dafang:8554/unicast

传感器和开关的分组配置方式
Dafang3:
    - camera.dafang
    - switch.dafang_h264_rtsp_server
    - switch.dafang_mjpeg_rtsp_server
    - sensor.dafang
    - device_tracker.dafang
    - sensor.dafang_light_sensor
    - switch.dafang_ir_filter
    - switch.dafang_ir_led
    - switch.dafang_night_mode
    - switch.dafang_night_mode_auto
    - switch.dafang_blue_led
    - switch.dafang_yellow_led
    - switch.dafang_motion_detection
    - switch.dafang_motion_tracking
    - camera.dafang_motion_snapshot
    - binary_sensor.dafang_motion_sensor
    - cover.dafang_move_leftright
    - cover.dafang_move_updown


回复

使用道具 举报

8

主题

864

帖子

5132

积分

论坛元老

Rank: 8Rank: 8

积分
5132
金钱
4268
HASS币
0
发表于 2019-2-2 15:47:53 | 显示全部楼层
学习学习
回复

使用道具 举报

166

主题

620

帖子

3663

积分

论坛元老

Rank: 8Rank: 8

积分
3663
金钱
3038
HASS币
0
 楼主| 发表于 2019-2-2 16:50:26 | 显示全部楼层
mitu 发表于 2019-2-2 14:58
lovelace配置方式:
    - type: picture-entity
      camera_image: camera.dafang3

搞定了,谢谢啊
回复

使用道具 举报

14

主题

253

帖子

1049

积分

金牌会员

Rank: 6Rank: 6

积分
1049
金钱
796
HASS币
0
发表于 2019-2-8 09:51:19 | 显示全部楼层
mitu 发表于 2019-2-2 14:58
lovelace配置方式:
    - type: picture-entity
      camera_image: camera.dafang3

请问,关于后边的开关、传感器之类的配置,属于通用的么?还是说只针对大方摄像头?
我的是“沃仕达”小牌IP CAM
回复

使用道具 举报

6

主题

739

帖子

5608

积分

论坛元老

Rank: 8Rank: 8

积分
5608
金钱
4864
HASS币
20
发表于 2019-2-8 11:49:21 | 显示全部楼层
maxims 发表于 2019-2-8 09:51
请问,关于后边的开关、传感器之类的配置,属于通用的么?还是说只针对大方摄像头?
我的是“沃仕达”小 ...

是大方HACKS固件专用的。。。
回复

使用道具 举报

8

主题

657

帖子

4191

积分

论坛元老

Rank: 8Rank: 8

积分
4191
金钱
3529
HASS币
0
QQ
发表于 2019-2-8 16:20:31 | 显示全部楼层
学习学习
回复

使用道具 举报

14

主题

253

帖子

1049

积分

金牌会员

Rank: 6Rank: 6

积分
1049
金钱
796
HASS币
0
发表于 2019-2-9 15:13:48 | 显示全部楼层
mitu 发表于 2019-2-8 11:49
是大方HACKS固件专用的。。。

谢谢!!!
回复

使用道具 举报

39

主题

2052

帖子

7709

积分

元老级技术达人

积分
7709
金钱
5642
HASS币
110
发表于 2019-3-1 09:35:11 | 显示全部楼层
mitu 发表于 2019-2-2 14:58
lovelace配置方式:
    - type: picture-entity
      camera_image: camera.dafang3

大佬 借楼多问一句:我在configuration.yaml 添加了
camera
- platform: generic
cgi的方式接入,实体产生了camera.dafang3
大方也开启了mqtt的两个服务都开了,mqtt设置了自动发现
然而大方的其他传感器在实体表里都没找到 lovelace添加了也无效
回复

使用道具 举报

6

主题

739

帖子

5608

积分

论坛元老

Rank: 8Rank: 8

积分
5608
金钱
4864
HASS币
20
发表于 2019-3-1 12:04:35 | 显示全部楼层
ghostist 发表于 2019-3-1 09:35
大佬 借楼多问一句:我在configuration.yaml 添加了
camera
- platform: generic

在configuration.yaml里加discovery:,打开自动发现新的设备,所有的传感器和开关都会自动添加的。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-5-3 18:32 , Processed in 3.493597 second(s), 32 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表