trphoenix
2025-08-20 4e50d28745cfe052dc09ad6c42d060fd6b7742fb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="author" content="岱特智能科技(上海)有限公司" />
      <link rel="shortcut icon" href="../../../img/favicon.ico" />
    <title>系统初始化配置 - DT-HA</title>
    <link rel="stylesheet" href="../../../css/theme.css" />
    <link rel="stylesheet" href="../../../css/theme_extra.css" />
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/github.min.css" />
    
      <script>
        // Current page data
        var mkdocs_page_name = "\u7cfb\u7edf\u521d\u59cb\u5316\u914d\u7f6e";
        var mkdocs_page_input_path = "Usages\\initConfig\\initConfig.md";
        var mkdocs_page_url = null;
      </script>
    
    <!--[if lt IE 9]>
      <script src="../../../js/html5shiv.min.js"></script>
    <![endif]-->
      <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js"></script>
      <script>hljs.highlightAll();</script> 
</head>
 
<body class="wy-body-for-nav" role="document">
 
  <div class="wy-grid-for-nav">
    <nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
    <div class="wy-side-scroll">
      <div class="wy-side-nav-search">
          <a href="../../.." class="icon icon-home"> DT-HA
        </a><div role="search">
  <form id ="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
      <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" title="Type search term here" />
  </form>
</div>
      </div>
 
      <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
              <ul>
                <li class="toctree-l1"><a class="reference internal" href="../../..">首页</a>
                </li>
              </ul>
              <ul>
                <li class="toctree-l1"><a class="reference internal" href="../../../about/">关于</a>
                </li>
              </ul>
              <p class="caption"><span class="caption-text">使用教程</span></p>
              <ul class="current">
                  <li class="toctree-l1"><a class="reference internal" href="../../../install-guide/installHa/">安装</a>
                  </li>
                  <li class="toctree-l1 current"><a class="reference internal current" >使用</a>
    <ul class="current">
                <li class="toctree-l2"><a class="reference internal" href="../../usage/">使用概述</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../netconfig/netconfig/">配置网络</a>
                </li>
                <li class="toctree-l2 current"><a class="reference internal current" href="#">系统初始化配置</a>
    <ul class="current">
    <li class="toctree-l3"><a class="reference internal" href="#homeassistant_1">首次打开HomeAssistant</a>
    </li>
    <li class="toctree-l3"><a class="reference internal" href="#_1">更新必要的组件</a>
    </li>
    <li class="toctree-l3"><a class="reference internal" href="#-">配置-通用</a>
    </li>
    <li class="toctree-l3"><a class="reference internal" href="#-_1">配置-设置-加载项</a>
        <ul>
    <li class="toctree-l4"><a class="reference internal" href="#file-editor">安装File editor</a>
    </li>
    <li class="toctree-l4"><a class="reference internal" href="#samba-share">安装Samba share插件</a>
    </li>
    <li class="toctree-l4"><a class="reference internal" href="#terminal-ssh">安装Terminal &amp; SSH</a>
    </li>
    <li class="toctree-l4"><a class="reference internal" href="#mosquitto-broker">安装Mosquitto broker</a>
    </li>
    <li class="toctree-l4"><a class="reference internal" href="#node-red">安装Node-RED插件</a>
    </li>
    <li class="toctree-l4"><a class="reference internal" href="#go2rtc">安装go2rtc插件</a>
    </li>
    <li class="toctree-l4"><a class="reference internal" href="#vlc">安装VLC可以播放视频等功能,需要的话可以安装</a>
    </li>
        </ul>
    </li>
    <li class="toctree-l3"><a class="reference internal" href="#docker-postgresql">利用 Docker 安装 PostgreSQL</a>
        <ul>
    <li class="toctree-l4"><a class="reference internal" href="#_3">步骤</a>
    </li>
    <li class="toctree-l4"><a class="reference internal" href="#homeassistantpgsql">更改homeAssistant默认的数据库为pgSql</a>
    </li>
        </ul>
    </li>
    <li class="toctree-l3"><a class="reference internal" href="#hacs">安装HACS</a>
        <ul>
    <li class="toctree-l4"><a class="reference internal" href="#hacs_1">hacs简介</a>
    </li>
    <li class="toctree-l4"><a class="reference internal" href="#hacs_2">安装hacs</a>
    </li>
    <li class="toctree-l4"><a class="reference internal" href="#hacs_3">启用HACS</a>
    </li>
        </ul>
    </li>
    <li class="toctree-l3"><a class="reference internal" href="#homeassistantlogo">更改HomeAssistant左上角LOGO标题</a>
        <ul>
    <li class="toctree-l4"><a class="reference internal" href="#hass-faviconreleases">下载第三方插件hass-favicon的Releases到本地目录</a>
    </li>
    <li class="toctree-l4"><a class="reference internal" href="#_4">解压下载的源码</a>
    </li>
    <li class="toctree-l4"><a class="reference internal" href="#ha">将插件复制到ha上</a>
    </li>
        </ul>
    </li>
    <li class="toctree-l3"><a class="reference internal" href="#_5">安装米家集成插件</a>
        <ul>
    <li class="toctree-l4"><a class="reference internal" href="#_6">安装</a>
    </li>
    <li class="toctree-l4"><a class="reference internal" href="#_7">配置</a>
    </li>
        </ul>
    </li>
    <li class="toctree-l3"><a class="reference internal" href="#webrtc-camera">安装WebRTC Camera</a>
    </li>
    <li class="toctree-l3"><a class="reference internal" href="#motioneye">安装motionEye</a>
        <ul>
    <li class="toctree-l4"><a class="reference internal" href="#motioneye_1">motionEye 的一些特点:</a>
    </li>
    <li class="toctree-l4"><a class="reference internal" href="#_8">安装方法</a>
    </li>
        </ul>
    </li>
    </ul>
                </li>
    </ul>
                  </li>
                  <li class="toctree-l1"><a class="reference internal" >Q/A</a>
    <ul>
                <li class="toctree-l2"><a class="reference internal" href="../../QA/%E9%80%8F%E6%9E%90%E4%B8%AD%E5%BF%83HA%E7%8E%AF%E5%A2%83%E6%B8%A9%E5%BA%A6%E5%8F%91%E9%80%81%E5%88%B0%E8%83%9C%E9%80%8F%E7%9A%84%E6%93%8D%E4%BD%9C%E6%8C%87%E5%8D%97/">透析中心HA环境温度发送到胜透的操作指南</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../QA/errorsQA/">errorsQA</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../QA/HA-%E5%A6%82%E4%BD%95%E5%AE%9E%E7%8E%B0%E7%8A%B6%E6%80%81%E5%8F%8D%E8%BD%AC/">HA-如何实现状态反转</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../QA/TS88%E9%80%8F%E6%9E%90%E6%9C%BA%E8%81%94%E6%9C%BA%E9%80%9A%E4%BF%A1-%E4%B8%AD%E6%96%87%E7%89%88/">TS88透析机联机通信-中文版</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../QA/VMware-ESXi%E6%89%A9%E5%B1%95HomeAssistant%E7%A1%AC%E7%9B%98%E6%8C%87%E5%8D%97/">VMware-ESXi扩展HomeAssistant硬盘指南</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../QA/%E5%A6%82%E4%BD%95%E9%9B%86%E6%88%90%E5%92%8C%E9%A3%8E%E5%A4%A9%E6%B0%94%E7%BB%84%E4%BB%B6%E5%88%B0HA/">如何集成和风天气组件到HA</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../QA/%E5%A6%82%E5%8E%95%E9%A3%8E%E9%99%A9-%E4%BA%BA%E5%AD%98%E5%9C%A8%E4%BC%A0%E6%84%9F%E5%99%A8%E9%85%8D%E7%BD%AE%E6%96%B9%E6%B3%95/">如厕风险-人存在传感器配置方法</a>
                </li>
    </ul>
                  </li>
              </ul>
              <p class="caption"><span class="caption-text">其它教程</span></p>
              <ul>
                  <li class="toctree-l1"><a class="reference internal" >Node-red相关</a>
    <ul>
                <li class="toctree-l2"><a class="reference internal" href="../../../node-reds/%E5%AE%89%E8%A3%85node-red%E8%AE%B0%E5%BD%95/">安装node-red记录</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../../node-reds/%E5%A6%82%E4%BD%95%E6%8A%8Anode-red%E5%AE%89%E8%A3%85%E5%88%B0orangepiZero3/">如何把node-red安装到orangepiZero</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../../node-reds/ModbusPoll-v7.0.0%E4%BD%BF%E7%94%A8%E6%95%99%E7%A8%8B/">ModbusPoll-v7.0.0使用教程</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../../node-reds/node-red%E5%B8%B8%E7%94%A8%E7%BB%84%E4%BB%B6%E5%88%97%E8%A1%A8/">node-red常用组件列表</a>
                </li>
                <li class="toctree-l2"><a class="reference internal" href="../../../node-reds/node-red%E5%A6%82%E4%BD%95%E8%BF%9E%E6%8E%A5modbus%20_slave%E8%AE%BE%E5%A4%87/">node-red如何连接modbus _slave设备</a>
                </li>
    </ul>
                  </li>
              </ul>
      </div>
    </div>
    </nav>
 
    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
      <nav class="wy-nav-top" role="navigation" aria-label="Mobile navigation menu">
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../../..">DT-HA</a>
        
      </nav>
      <div class="wy-nav-content">
        <div class="rst-content"><div role="navigation" aria-label="breadcrumbs navigation">
  <ul class="wy-breadcrumbs">
    <li><a href="../../.." class="icon icon-home" aria-label="Docs"></a></li>
          <li class="breadcrumb-item">使用教程</li>
          <li class="breadcrumb-item">使用</li>
      <li class="breadcrumb-item active">系统初始化配置</li>
    <li class="wy-breadcrumbs-aside">
    </li>
  </ul>
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
            <div class="section" itemprop="articleBody">
              
                <h3 id="homeassistant">初始化配置HomeAssistant<a class="headerlink" href="#homeassistant" title="Permanent link">&para;</a></h3>
<h4 id="homeassistant_1">首次打开HomeAssistant<a class="headerlink" href="#homeassistant_1" title="Permanent link">&para;</a></h4>
<p>首次打开HomeAssistant通过,路由器为其分配的IP地址加端口号即可进行HomeAssistant.</p>
<p>格式如下:</p>
<div class="codehilite"><pre><span></span><code>http://Ip:Port
如:http://192.168.3.2:8123
基中:8123为其默认的端口后,当然,系统初始化成功后,可以改.
</code></pre></div>
 
<p>如下图所示:
<img src="https://dhcdn.leon056.com/bpfStudy/docs/20250416174015324.png" style="zoom:67%;" /></p>
<p>点击"创建我智能家家居"按进行下一步</p>
<p><img src="https://dhcdn.leon056.com/bpfStudy/docs/20250416174141899.png" style="zoom:67%;" /></p>
<p>在这里我们输入姓名,用户名,密码,确认密码
这里我们使用统一的信息</p>
<div class="codehilite"><pre><span></span><code>姓名:岱特智能
用户名:dtuser
密码:******
确认密码:*****
</code></pre></div>
 
<p><strong>注意:上述密码为了安全,没有显示,请咨询系统管理员获取真正的密码.</strong></p>
<p><img src="https://dhcdn.leon056.com/bpfStudy/docs/20250416174647992.png" style="zoom:67%;" /></p>
<p>点击"创建帐户",</p>
<p><img src="https://dhcdn.leon056.com/bpfStudy/docs/20250416174907500.png" style="zoom:67%;" /></p>
<p>这一步,会要求你输入位置,输入城市点获取,如果取下到会报错.没关系,直接下一步即可,系统配置完成后,还可更改.</p>
<p><img src="https://dhcdn.leon056.com/bpfStudy/docs/20250416175039994.png" style="zoom:67%;" /></p>
<p>这一步是要求,你输下所属的国家与地区,它会自动判断出来,国家,直接点下一步即可.</p>
<p>此时,它可能还会弹出一个对话框框,帮你检测位置 ,点确定即可</p>
<p><img src="https://dhcdn.leon056.com/bpfStudy/docs/1744797155585.png" style="zoom: 67%;" /></p>
<p>如果不想让其检测,直接点取消即可,因为其检测折可能很慢,所以,直接点取消,选择中国即可.</p>
<p><img src="https://dhcdn.leon056.com/bpfStudy/docs/20250416180125174.png" style="zoom:67%;" /></p>
<p>这里的几项,全部不用选,直接下一步</p>
<p><img src="https://dhcdn.leon056.com/bpfStudy/docs/20250416180225320.png" style="zoom:67%;" /></p>
<p>这一步,系统会自动扫描局域网中的能直接入的设备.直接点击完成,</p>
<p>然后,系统会转到如下界面</p>
<p><img src="https://dhcdn.leon056.com/bpfStudy/docs/20250416180400766.png" style="zoom:67%;" /></p>
<p>可能要持续一阵,等待其完成即可.</p>
<p><img src="https://dhcdn.leon056.com/bpfStudy/docs/20250416180639029.png" style="zoom:67%;" /></p>
<p>开始第一次,可能很慢</p>
<p>首次完成如下显示</p>
<p><img src="https://dhcdn.leon056.com/bpfStudy/docs/20250416180715339.png" style="zoom:67%;" /></p>
<h4 id="_1">更新必要的组件<a class="headerlink" href="#_1" title="Permanent link">&para;</a></h4>
<p>首次登录,可能会显示更新,如此时显示</p>
<p><img src="https://dhcdn.leon056.com/bpfStudy/docs/20250416181146547.png" style="zoom:67%;" /></p>
<p>提示更新Home Assistnat Operating System Update,点击如下按钮,以弹出的对话框中,点更新按钮
<img src="https://dhcdn.leon056.com/bpfStudy/docs/20250416181323600.png" style="zoom:67%;" /></p>
<p>如下图所示,系统将会,进行更新</p>
<p><img src="https://dhcdn.leon056.com/bpfStudy/docs/20250416181455221.png" style="zoom:67%;" /></p>
<p>注意,这个操作,一般是从两个地方获取更新包,一是github一个是docker的仓库,所以,<strong>要保持科学上网的畅通</strong>。这个过程 ,估计要几分钟,需要耐心等等,也有可能会更新失败,然后,再次更新。</p>
<p>更新时,如果网络有问题可能会出在日志 中报出如下错误</p>
<div class="codehilite"><pre><span></span><code>aiodns.error.DNSError: (12, &#39;Timeout while contacting DNS servers&#39;)
2025-04-16 17:26:15.438 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved (None)
aiodns.error.DNSError: (12, &#39;Timeout while contacting DNS servers&#39;)
2025-04-16 17:26:15.438 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved (None)
aiodns.error.DNSError: (12, &#39;Timeout while contacting DNS servers&#39;)
2025-04-16 17:26:15.438 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved (None)
aiodns.error.DNSError: (12, &#39;Timeout while contacting DNS servers&#39;)
2025-04-16 17:26:15.438 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved (None)
aiodns.error.DNSError: (12, &#39;Timeout while contacting DNS servers&#39;)
2025-04-16 17:26:15.438 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved (None)
aiodns.error.DNSError: (12, &#39;Timeout while contacting DNS servers&#39;)
2025-04-16 17:26:15.439 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved (None)
aiodns.error.DNSError: (12, &#39;Timeout while contacting DNS servers&#39;)
2025-04-16 17:26:15.440 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved (None)
aiodns.error.DNSError: (12, &#39;Timeout while contacting DNS servers&#39;)
2025-04-16 17:26:15.440 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved (None)
aiodns.error.DNSError: (12, &#39;Timeout while contacting DNS servers&#39;)
2025-04-16 17:26:15.440 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved (None)
aiodns.error.DNSError: (12, &#39;Timeout while contacting DNS servers&#39;)
[09:26:17] INFO: Home Assistant Core finish process exit code 0
[09:26:17] INFO: Home Assistant Core service shutdown
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun home-assistant (no readiness notification)
s6-rc: info: service legacy-services successfully started
2025-04-16 17:28:26.876 ERROR (MainThread) [homeassistant.components.homeassistant_alerts.coordinator] Timeout fetching homeassistant_alerts data
2025-04-16 17:51:56.276 WARNING (MainThread) [homeassistant.helpers.translation] Failed to load integration for translation: Invalid domain hassio.update
2025-04-16 17:51:56.278 WARNING (MainThread) [homeassistant.helpers.translation] Failed to load integration for translation: Invalid domain cloud.tts
2025-04-16 17:51:56.278 WARNING (MainThread) [homeassistant.helpers.translation] Failed to load integration for translation: Invalid domain mobile_app.notify
2025-04-16 17:51:56.278 WARNING (MainThread) [homeassistant.helpers.translation] Failed to load integration for translation: Invalid domain backup.sensor
2025-04-16 17:51:56.279 WARNING (MainThread) [homeassistant.helpers.translation] Failed to load integration for translation: Invalid domain energy.sensor
2025-04-16 17:51:56.279 WARNING (MainThread) [homeassistant.helpers.translation] Failed to load integration for translation: Invalid domain sun.sensor
2025-04-16 17:51:56.279 WARNING (MainThread) [homeassistant.helpers.translation] Failed to load integration for translation: Invalid domain homeassistant.scene
2025-04-16 17:51:56.279 WARNING (MainThread) [homeassistant.helpers.translation] Failed to load integration for translation: Invalid domain hassio.binary_sensor
2025-04-16 17:51:56.280 WARNING (MainThread) [homeassistant.helpers.translation] Failed to load integration for translation: Invalid domain hassio.sensor
</code></pre></div>
 
<p>上述错误多是由于网络问题引起的,要去检是科学上网是否还正常.</p>
<p>更完完成后,再次启动后,会显示没有可用的更新</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417092912822.png" /></p>
<h4 id="-">配置-通用<a class="headerlink" href="#-" title="Permanent link">&para;</a></h4>
<p>点击,开始,通用</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250416183224006.png" /></p>
<p>更改名称为:岱特智能
其它的不变</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250416183309109.png" /></p>
<p>#### 配置-网络-主机名</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417094434315.png" /></p>
<p>把主机名配置成为局域网中唯一的,实际让就是计算机名,因为同一局域网中,计算机名,不允许相同</p>
<h4 id="-_1">配置-设置-加载项<a class="headerlink" href="#-_1" title="Permanent link">&para;</a></h4>
<p>加载项中有许多必装组件,需要一一安装,首次进入时,可能会显示如下页面</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417102735914.png" /></p>
<p>点击下角的"加载项商店"</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/image-20250417103041576.png" /></p>
<h5 id="file-editor">安装File editor<a class="headerlink" href="#file-editor" title="Permanent link">&para;</a></h5>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/image-20250417103159193.png" /></p>
<p>File editor 是一个用于修改HA的配置文件的集成工具,属必装项,点击安装</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417103608598.png" /></p>
<p>点击安装,系统会在后台自动安装此插件,
<img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417104146679.png" /></p>
<p>安装完成后,会自动重启</p>
<p>有时也会提示安装失败</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417105230073.png" /></p>
<p>这种经查看日志 多为网强行问题无法访问.docker.io,这是因为科学上风的原因,重点排查网络,安装成功后,再次进入会显示如下界面</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417105547700.png" /></p>
<p>勾选,开机启动,自动恢复,显示于侧边栏</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417105644468.png" /></p>
<p>点击启动,或重启,将会在侧边栏看到此图标,点击打开网页界面</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417105820902.png" /></p>
<p>能看到如下界面,说明安装成功</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417105918681.png" /></p>
<p>此时加载项中,就多出了File editor选项</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417105949676.png" /></p>
<h5 id="samba-share">安装Samba share插件<a class="headerlink" href="#samba-share" title="Permanent link">&para;</a></h5>
<p>Samba share插件是一个提供共享目录的方式允行其它计算机用这种方式查看编辑ha的文件的组件.</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417111104287.png" /></p>
<p>点击安装</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417111140693.png" /></p>
<p>安装失败时,会有如下提下提示</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417111731068.png" /></p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417111959381.png" /></p>
<p>打开自动恢复</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417112429893.png" /></p>
<p>接下来我们需要到配置选项中</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417112959837.png" /></p>
<p>此处我们设置如下信息</p>
<div class="codehilite"><pre><span></span><code>Username:dtuser
Password:***** # 此处请咨询管理员
Workgroup:WORKGROUP # 保持不变
</code></pre></div>
 
<p>更改完成后,有如下配置</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417113757884.png" /></p>
<p>配置 完成后,点击启动</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417113840938.png" /></p>
<p>启动成功后,会出下图显示</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417114018464.png" /></p>
<p>此时,如果,与HA在同一局域网,我们可以使用如下方式查看HA的文件目录</p>
<p>在地址栏输入\HA的IP </p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417114610432.png" /></p>
<p>输入预设的用户名与密码,即可查看,编辑HA的各种文件。</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417114720695.png" /></p>
<h5 id="terminal-ssh">安装Terminal &amp; SSH<a class="headerlink" href="#terminal-ssh" title="Permanent link">&para;</a></h5>
<p>Terminal &amp; SSH 插件为HA提供了在web端使用控制台终端功能,及开启了ssh服务,使之可以远程使用SSH访问HA终端。</p>
<p>在搜索中输入Terminal &amp; SSH </p>
<p>结果有可能显示</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417115643048.png" /></p>
<p>搜索不到,这时,可能是因为仓库没有配置,还是使用的默认的仓库,我们可以增加一下仓库,如下:</p>
<div class="codehilite"><pre><span></span><code>https://github.com/AlexxIT/hassio-addons
</code></pre></div>
 
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417115838631.png" /></p>
<p>点击右上解的三个点,选中仓库</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417115914947.png" /></p>
<p>在弹出折对话框中输入,我们记录的仓库地址,然后点添加</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417120018086.png" /></p>
<p>完成后,点击关闭.</p>
<p>然后,点击返回,重新搜索</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417120233117.png" /></p>
<p>这次找到了Advance SSH &amp; Web Terminal</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417120233117.png" /></p>
<p>点击安装,打开如下页面</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417120802786.png" /></p>
<p>点击安装,有时会安装失败,</p>
<p>失败后,需再次安装,同时检查日志中提到的哪个网址无法访问 ,把其加科学上网的代理名单中.</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417122414637.png" /></p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417122910533.png" /></p>
<p>安装完成后,就变成如下</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417141712061.png" /></p>
<p>开启自动恢得,显示侧边栏</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417141740843.png" /></p>
<p>接下来,我们配置ssh的登录信息,如下</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417143151994.png" /></p>
<p>相关信息如下:</p>
<div class="codehilite"><pre><span></span><code>username:dtuser
passsword:**** # 此处需要咨询管理员
</code></pre></div>
 
<p>其它配置选项如下,注意选项,选错了ssh可能启不起来,sftp关闭,zsh关闭.compatibility_mode要开启</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417160113415.png" /></p>
<p>然后,点击启动按钮</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417143931697.png" /></p>
<p>启动后如下</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417143953506.png" /></p>
<p>我们可以通过两个地方进入</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/image-20250417144032876.png" /></p>
<p>在日志 端能看到 ssh已启动成功</p>
<div class="codehilite"><pre><span></span><code>s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-ssh: starting
s6-rc: info: service init-mysql: starting
s6-rc: info: service init-mosquitto: starting
s6-rc: info: service init-docker: starting
s6-rc: info: service init-docker successfully started
s6-rc: info: service init-mysql successfully started
s6-rc: info: service init-mosquitto successfully started
[14:51:05] WARNING: 
[14:51:05] WARNING: Logging in with a SSH password is security wise, a bad idea!
[14:51:05] WARNING: Please, consider using a public/private key pair.
[14:51:05] WARNING: What is this? https://kb.iu.edu/d/aews
[14:51:05] WARNING: 
[14:51:05] NOTICE: RSA host key missing, generating one...
Generating public/private rsa key pair.
Your identification has been saved in /data/ssh_host_rsa_key
Your public key has been saved in /data/ssh_host_rsa_key.pub
The key fingerprint is:
SHA256:+9pEl2QvyUqsu4B3gnPjhL/Ab71iBIDjWRdYvgZeg0c root@a0d7b954-ssh
The key&#39;s randomart image is:
+---[RSA 3072]----+
| .  oE.          |
|o .o+.           |
|..o+.=      o    |
| o. = o  . + +   |
|   . +  S + * .  |
|   ..+.  = o .   |
|    B.B.+ o      |
|     X+=.=       |
|     o=o=+o      |
+----[SHA256]-----+
[14:51:08] NOTICE: ED25519 host key missing, generating one...
Generating public/private ed25519 key pair.
Your identification has been saved in /data/ssh_host_ed25519_key
Your public key has been saved in /data/ssh_host_ed25519_key.pub
The key fingerprint is:
SHA256:MgbUsAJ+23skjVTwD0pWVRBCmZ0BjU3jwV/99gGnNVc root@a0d7b954-ssh
The key&#39;s randomart image is:
+--[ED25519 256]--+
|.   o+o*%O*.  . E|
|.. . .=+o*o  o =.|
| ...o+ o .. . = +|
|  ..*.+ o  . . .o|
|   . =+oS.     .o|
|     .+o        .|
|     . .         |
|      .          |
|                 |
+----[SHA256]-----+
s6-rc: info: service init-ssh successfully started
s6-rc: info: service init-user: starting
[14:51:08] NOTICE: Session sharing has been disabled!
s6-rc: info: service init-user successfully started
s6-rc: info: service ttyd: starting
s6-rc: info: service sshd: starting
s6-rc: info: service sshd successfully started
s6-rc: info: service ttyd successfully started
s6-rc: info: service legacy-services: starting
[14:51:09] INFO: Starting the ttyd daemon...
[14:51:09] INFO: Starting the SSH daemon...
s6-rc: info: service legacy-services successfully started
Server listening on 0.0.0.0 port 22.
Server listening on :: port 22.
</code></pre></div>
 
<p>配置成功后,可以通过如下命令来测试是否可以远程SSH连入</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417150734570.png" /></p>
<p>输入yes后会要求 输入密码,验证正确后,会进入看到如个图,就说明ssh已正常的开启成功了</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417155921995.png" /></p>
<p>以下界面是在ha中看到的内置的ssh</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417160212333.png" /></p>
<p>其它,当访问一些系统操作无权限时,可以关闭保护开关</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417171751950.png" /></p>
<h5 id="mosquitto-broker">安装Mosquitto broker<a class="headerlink" href="#mosquitto-broker" title="Permanent link">&para;</a></h5>
<p>Mosquitto broker是一个重要的插件,其提供的MQTT 服务为公司大多数数设备折集成,mqtt通信通道,所以,此为必装插件。</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417160954518.png" /></p>
<p>点击安装</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417161858614.png" /></p>
<p>看到如下界面,说明安装成功,
<img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417162347432.png" /></p>
<p>接下来是配置mqtt</p>
<h6 id="_2">开启自动恢复<a class="headerlink" href="#_2" title="Permanent link">&para;</a></h6>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417162755148.png" /></p>
<h6 id="mqtt">配置mqtt的用户名密码及定制配置<a class="headerlink" href="#mqtt" title="Permanent link">&para;</a></h6>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417165820612.png" /></p>
<div class="codehilite"><pre><span></span><code>username:dtuser
password:****** #此处的密码请咨询管理员
</code></pre></div>
 
<p>配置完成后,启动mqtt服务</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417163342388.png" /></p>
<p>日志中显示如下信息,说明成功</p>
<div class="codehilite"><pre><span></span><code>s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/mosquitto.sh
[16:33:27] INFO: Setting up user dtuser
[16:33:28] INFO: SSL is not enabled
cont-init: info: /etc/cont-init.d/mosquitto.sh exited 0
cont-init: info: running /etc/cont-init.d/nginx.sh
cont-init: info: /etc/cont-init.d/nginx.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun mosquitto (no readiness notification)
services-up: info: copying legacy longrun nginx (no readiness notification)
[16:33:29] INFO: Starting NGINX for authentication handling...
s6-rc: info: service legacy-services successfully started
[16:33:29] INFO: Starting mosquitto MQTT broker...
2025-04-17 16:33:29: Warning: Mosquitto should not be run as root/administrator.
2025-04-17 16:33:29: mosquitto version 2.0.20 starting
2025-04-17 16:33:29: Config loaded from /etc/mosquitto/mosquitto.conf.
2025-04-17 16:33:29: Loading plugin: /usr/share/mosquitto/go-auth.so
2025-04-17 16:33:29:  ├── Username/password checking enabled.
2025-04-17 16:33:29:  ├── TLS-PSK checking enabled.
2025-04-17 16:33:29:  └── Extended authentication not enabled.
2025-04-17 16:33:29: Opening ipv4 listen socket on port 1883.
2025-04-17 16:33:29: Opening ipv6 listen socket on port 1883.
2025-04-17 16:33:29: Opening websockets listen socket on port 1884.
2025-04-17 16:33:29: mosquitto version 2.0.20 running
2025-04-17 16:33:29: New connection from ::1:56336 on port 1883.
2025-04-17 16:33:29: Client &lt;unknown&gt; disconnected due to protocol error.
[16:33:30] INFO: Successfully send discovery information to Home Assistant.
[16:33:31] INFO: Successfully send service information to the Supervisor.
</code></pre></div>
 
<p>当消息,提示发现设备时,点击,弹出的消息中,点check it out,然后,看到已发现mqtt,点击添加</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417163617741.png" /></p>
<p>然后,点击完成</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417163633687.png" /></p>
<p>然后就会在设置-设备与服务-集成中,显示Mqtt,以后,所有增加的MQTT类设备,都会显示在这个类别中。</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417163705382.png" /></p>
<h5 id="node-red">安装Node-RED插件<a class="headerlink" href="#node-red" title="Permanent link">&para;</a></h5>
<p>Node-Red插件是我们集中各种设备的重要消息处理转换插件,属必装插件.</p>
<p>在加载项中,搜索nod显示如下</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417164340639.png" /></p>
<p>点击,进入详细页面</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417164440484.png" /></p>
<p>点击安装</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417164711564.png" /></p>
<p>如果安装出错,多半是科学上网的问题,</p>
<p>如现如下页面,说明安装成功</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/image-20250417165013539.png" /></p>
<p>开启自动恢复,关闭侧边栏</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/image-20250417165048899.png" /></p>
<p>配置nod-red</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417170501565.png" /></p>
<p>此处的配置信息为</p>
<div class="codehilite"><pre><span></span><code>username:admin
password:**** #此处的密码,请向管理员获取
### 默认情况下关闭ssl
</code></pre></div>
 
<p>然后启动node-red</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417170754947.png" /></p>
<p>点击打开web-页面如下</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250417170638780.png" /></p>
<h5 id="go2rtc">安装go2rtc插件<a class="headerlink" href="#go2rtc" title="Permanent link">&para;</a></h5>
<p>go2rtc插件是为了对视流转发用的专用插件,如果想把监控视频流接入,则可以使用这个插件,安装方法是,加载项中,搜索go2rtc,</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418150624562.png" /></p>
<p>点击安装</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/image-20250418150851886.png" /></p>
<p>安装完成后开启自动恢复,自动更新</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418151926288.png" /></p>
<p>其设置中基本没什么要改的.</p>
<h5 id="vlc">安装VLC可以播放视频等功能,需要的话可以安装<a class="headerlink" href="#vlc" title="Permanent link">&para;</a></h5>
<p>在加载商店中搜索vlc</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418153825278.png" /></p>
<p>点击安装</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/image-20250418153923072.png" /></p>
<p>安装成功如下所示</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418154157793.png" /></p>
<p>配置中基本没要要配置的东西</p>
<h4 id="docker-postgresql">利用 Docker 安装 PostgreSQL<a class="headerlink" href="#docker-postgresql" title="Permanent link">&para;</a></h4>
<p>虽然 Home Assistant OS 本身不允许直接访问系统底层,但它内置了 Docker 支持,因此可以直接运行 PostgreSQL 的 Docker 容器。</p>
<h6 id="_3"><strong>步骤</strong><a class="headerlink" href="#_3" title="Permanent link">&para;</a></h6>
<ol>
<li>
<p><strong>确保您有 SSH 访问权限</strong></p>
</li>
<li>
<p>安装 Home Assistant 的 SSH &amp; Web Terminal Add-on(高级模式)。</p>
</li>
<li>
<p>开启 SSH 访问,具体步骤如下:</p>
<ol>
<li>前往 <strong>Supervisor &gt; Add-on Store</strong>。</li>
<li>搜索并安装 <strong>SSH &amp; Web Terminal</strong>(官方插件)。</li>
<li>配置 SSH 插件,确保 <code>protected</code> 设置为 <code>false</code>,然后启动它。</li>
</ol>
</li>
<li>
<p><strong>运行 PostgreSQL 容器</strong></p>
</li>
<li>
<p>在 SSH 或 Web Terminal 中运行以下命令:</p>
<p><code>docker run -d \
   --name=postgresql \
   -e POSTGRES_USER=dtuser \
   -e POSTGRES_PASSWORD= **pwd** \
   -e POSTGRES_DB=dtha \
   -v /db/pgsqldata:/var/lib/postgresql/data \
   -p 5432:5432 \
   postgres</code></p>
<ul>
<li>替换 <code>**pwd**</code> 为您想要设置的数据库密码,些密码,需要管理员咨询</li>
<li>数据库名称为 <code>dtha</code>,用户名为 <code>dtuser</code>。</li>
<li>数据将存储在 <code>/mnt/data/supervisor/postgresql</code>,确保数据在重启后不会丢失。</li>
</ul>
</li>
</ol>
<p>登录ssh,并查看已安装的docker镜像如下</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418154852933.png" /></p>
<p>先创建pgsql存储卷需要的目录,这个我们统一定为如下目录,并给777权限</p>
<div class="codehilite"><pre><span></span><code>/db/pgsqldata
</code></pre></div>
 
<p>即在根目录下,创建db目录,然后在db目录中创建pgsqldata,并给足权限</p>
<div class="codehilite"><pre><span></span><code>/ # cd homeassistant
homeassistant # ls
automations.yaml          configuration.yaml        home-assistant.log        home-assistant.log.fault  home-assistant_v2.db-shm  scenes.yaml               secrets.yaml
blueprints                deps                      home-assistant.log.1      home-assistant_v2.db      home-assistant_v2.db-wal  scripts.yaml              tts
homeassistant # mkdir db
homeassistant # sudo chmod -R 7777 ./db
homeassistant # cd db
db # ls
db # pwd
/homeassistant/db
db # sudo mkdir pgsqldata
db # sudo chmod -R 7777 ./pgsqldata
db # ls
pgsqldata
db # cd pgsqldata
pgsqldata # ls -l ./
total 0
pgsqldata # cd ..
db # ls -l ./
total 4
drwsrwsrwt    2 root     root          4096 Apr 18 16:30 pgsqldata
</code></pre></div>
 
<p>接下来,拉取镜pgsql的镜像,并指向/mnt/data/pgsqldata,此处要注意不是所有的目录都有写入权限,homeAssitant中大部份目录都没有写入权限,要注意找有写入权限的目录</p>
<div class="codehilite"><pre><span></span><code>data # docker run -d   \
--name=postgresql   \
-e POSTGRES_USER=dtuser   \
-e POSTGRES_PASSWORD=Dtuse1r   \
-e POSTGRES_DB=dtha   \
-v /mnt/data/pgsqldata:/var/lib/postgresql/data   \
-p 5432:5432   \
--restart unless-stopped   postgres
# 执行完成后,返回:
9a4721cccb0d5c63671da5cba4a6b6c13721f48ac664de03312cddaa216a2e56
</code></pre></div>
 
<p>系统会自动拉取镜像,并启动,此过程务必保证秒学上网的畅通</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418160447867.png" /></p>
<p>如下图,所示,</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418160956787.png" /></p>
<p>说明目录没有权限,</p>
<div class="codehilite"><pre><span></span><code>chown -R root:root mnt/data/pgsqldata
chmod -R 7777 /mnt/data/pgsqldata
</code></pre></div>
 
<p>给够目录权限后,再次运行,安装指令</p>
<div class="codehilite"><pre><span></span><code>data # docker run -d   \
--name=postgresql   \
-e POSTGRES_USER=dtuser   \
-e POSTGRES_PASSWORD=Dtuse1r   \
-e POSTGRES_DB=dtha   \
-v /mnt/data/pgsqldata:/var/lib/postgresql/data   \
-p 5432:5432   \
--restart unless-stopped   postgres
# 执行完成后,返回:
docker: Error response from daemon: Conflict. The container name &quot;/postgresql&quot; is already in use by container &quot;f5b838e28f30ff3bde9f90276b8aa4924b4f1ecec2cdbd4e38dfe27e2c988edb&quot;. You have to remove (or rename) that container to be able to reuse that name.
See &#39;docker run --help
</code></pre></div>
 
<p>上述说明pgswl的容器已经存在,需要删除</p>
<div class="codehilite"><pre><span></span><code>docker stop postgresql
docker rm postgresql
</code></pre></div>
 
<p>然后,再次执行,即可成功</p>
<div class="codehilite"><pre><span></span><code>data # docker run -d   \
--name=postgresql   \
-e POSTGRES_USER=dtuser   \
-e POSTGRES_PASSWORD=Dtuse1r   \
-e POSTGRES_DB=dtha   \
-v /mnt/data/pgsqldata:/var/lib/postgresql/data   \
-p 5432:5432   \
--restart unless-stopped   postgres
# 执行完成后,返回:
9a4721cccb0d5c63671da5cba4a6b6c13721f48ac664de03312cddaa216a2e56
</code></pre></div>
 
<p>用ps -a 查询一下,如下图所示,说明docker 启动成功,</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418164459153.png" /></p>
<p>为了验证重新启动后,pgsql容器是否启动,可以重启后,再次查看一下,此容器是否跟随系统启动成功.</p>
<p>接下来,我们可以在局域网中找台机器来做一下数据库连接测试</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418165956219.png" /></p>
<p>如上图,说明pgsql已经安装成功了,并能正常访问.</p>
<h6 id="homeassistantpgsql">更改homeAssistant默认的数据库为pgSql<a class="headerlink" href="#homeassistantpgsql" title="Permanent link">&para;</a></h6>
<p>HomeAssistant默认的数据库为sqlite,我们需要把其换成我们新安装的pgsql,</p>
<p>通过我们安装的插件File editor 打开配置文件 /homeassistant/configruration.yaml</p>
<p>增加recorder中的配置如下</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418174329014.png" /></p>
<p>然后,保存退出,重启,看看ha有滑的给出错误提示,也可以通过,连接工具来查看,ha有没有在数据库中建表,写入数据</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418174634684.png" /></p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418174713239.png" /></p>
<p>如上图,说明数据已功功折写入PGSQL,此时,我们可以把系统默认的数据库删除了</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418175114702.png" /></p>
<p>这个文件是homeAssistant默认的sqlite数据库文件,可以删除了,点右则的三个点,在弹出的菜单中,点delete</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418175225430.png" /></p>
<p>点击yes确认</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418175508507.png" /></p>
<p>然后重启,再次查看,是否重新生成此文件, 如果没有重新生成此文件 ,说明,系统已经在用pgsql了</p>
<h4 id="hacs">安装HACS<a class="headerlink" href="#hacs" title="Permanent link">&para;</a></h4>
<h6 id="hacs_1">hacs简介<a class="headerlink" href="#hacs_1" title="Permanent link">&para;</a></h6>
<p>HACS,全称 Home Assistant Community Store(Home Assistant 社区商店),是一个用于 Home Assistant 的第三方扩展插件管理器。它为用户提供了一个方便的方式来安装和管理社区开发的自定义集成、插件、主题和其他扩展组件。</p>
<p>这个插件集中了许多大屏用的主题与插件,属于必装插件.</p>
<h6 id="hacs_2">安装hacs<a class="headerlink" href="#hacs_2" title="Permanent link">&para;</a></h6>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418181153341.png" /></p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418181342200.png" /></p>
<p>进入ssh登 录后,输入如下指令</p>
<div class="codehilite"><pre><span></span><code>wget -O - https://get.hacs.xyz | bash -
</code></pre></div>
 
<p>回车后,系统会自动下载HACS,并放到指定的目录,且提示重启,我们按要求重启,即可。</p>
<h6 id="hacs_3">启用HACS<a class="headerlink" href="#hacs_3" title="Permanent link">&para;</a></h6>
<p>安装完成后,您需要在 Home Assistant 的界面中启用 HACS:</p>
<ol>
<li>
<p>打开 Home Assistant UI。</p>
</li>
<li>
<p>点击 <strong>设置</strong> &gt; <strong>设备与服务</strong> &gt; <strong>集成</strong>。</p>
</li>
<li>
<p>点击右下角 <strong>添加集成</strong>。</p>
</li>
</ol>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418182141542.png" /></p>
<ol>
<li>搜索并选择 <strong>HACS</strong>,然后按照屏幕上的提示完成设置。
   <img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418182217781.png" /></li>
</ol>
<p>点击后,在弹出的窗口中,全打勾,点提交
<img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418182302438.png" /></p>
<p>引时,弹出新的窗口,验证github授权</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/image-20250418182504439.png" /></p>
<p>点击这个github链接,并记住下方的授权码后面会用到</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418182735517.png" /></p>
<p>在弹出的页面中,输入,记住的授权码,点Continue</p>
<p>提示具体的授权对像为hacs,点击Autuorize hacs</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418182839101.png" /></p>
<p>授权成功</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418182924523.png" /></p>
<p>返回hacs后,提示成功,并显示已发现如下设备,hacs,选择区域,可以自定义个区域,然后点完成</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418183032110.png" /></p>
<p>看到如下界面hacs就安装好了</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418183101328.png" /></p>
<p>点击配置,启用App Daemon apps discovery &amp; tgracking.</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418183240218.png" /></p>
<p>以上配置 完成后,重新启动HA,则可以在左侧栏中找到HACS菜单了</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418183847192.png" /></p>
<h4 id="homeassistantlogo">更改HomeAssistant左上角LOGO标题<a class="headerlink" href="#homeassistantlogo" title="Permanent link">&para;</a></h4>
<p>homeAssistant 左上角默认的标题为 Home Assistant 我们希望改成自已的标识如:岱特智能</p>
<h6 id="hass-faviconreleases">下载第三方插件hass-favicon的Releases到本地目录<a class="headerlink" href="#hass-faviconreleases" title="Permanent link">&para;</a></h6>
<p><a href="[thomasloven/hass-favicon: 🔹 Change the favicon of your Home Assistant instance](https://github.com/thomasloven/hass-favicon)">点击链接</a>,到其github的官方页面</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418184710407.png" /></p>
<p>下载其源码</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418184735514.png" /></p>
<h6 id="_4">解压下载的源码<a class="headerlink" href="#_4" title="Permanent link">&para;</a></h6>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418184843193.png" /></p>
<h6 id="ha">将插件复制到ha上<a class="headerlink" href="#ha" title="Permanent link">&para;</a></h6>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418184913549.png" /></p>
<p>打开源码目录,进入custom_commponents目录,把favicon目录整体复制</p>
<p>然后,进入ha的config-custom_compoents目录粘贴,复制到的favicon</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418185131376.png" /></p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418185659978.png" /></p>
<p>然后创建目录</p>
<div class="codehilite"><pre><span></span><code>\\ha-o[\config\www\favicons
</code></pre></div>
 
<p>并把胜透的logo文件st-logo.,png放到目录中</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418185756212.png" /></p>
<p>然后在配置文件中增加如下内容</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418190110615.png" /></p>
<p>然后,重启HomeAssistant即可</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250418190515179.png" /></p>
<p>重启后,左上脚的LOGO,已变为岱特智能.</p>
<h4 id="_5">安装米家集成插件<a class="headerlink" href="#_5" title="Permanent link">&para;</a></h4>
<p>米家集成是一个由小米官方提供支持的 Home Assistant 的集成组件,它可以让您在 Home Assistant 中使用小米 IoT 智能设备。</p>
<p>这个插件,可以直接把所有小米的各种传感器集成到HomeAssistant中,所以这个是必装插件.</p>
<p>其官方仓库地址为:<a href="https://github.com/XiaoMi/ha_xiaomi_home"> Xiaomi Home Integration for Home Assistant</a></p>
<div class="codehilite"><pre><span></span><code>https://github.com/XiaoMi/ha_xiaomi_home
</code></pre></div>
 
<p>其安装方法有三种,我们为了方便选择第一种,其它两种方法,可以自行尝试.官方描述的方装主式如下:</p>
<div class="codehilite"><pre><span></span><code>cd config
git clone https://github.com/XiaoMi/ha_xiaomi_home.git
cd ha_xiaomi_home
./install.sh /config
</code></pre></div>
 
<p>其也提供<a href="[ha_xiaomi_home/doc/README_zh.md at main · XiaoMi/ha_xiaomi_home](https://github.com/XiaoMi/ha_xiaomi_home/blob/main/doc/README_zh.md)">中文的安装说明</a></p>
<h6 id="_6">安装<a class="headerlink" href="#_6" title="Permanent link">&para;</a></h6>
<p>首先,登录SSH.然后进入config目录</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419091154969.png" /></p>
<p>先拉取代码</p>
<div class="codehilite"><pre><span></span><code>config # git clone https://github.com/XiaoMi/ha_xiaomi_home.git
Cloning into &#39;ha_xiaomi_home&#39;...
remote: Enumerating objects: 1322, done.
remote: Counting objects: 100% (761/761), done.
remote: Compressing objects: 100% (342/342), done.
remote: Total 1322 (delta 628), reused 419 (delta 419), pack-reused 561 (from 2)
Receiving objects: 100% (1322/1322), 847.87 KiB | 1.64 MiB/s, done.
Resolving deltas: 100% (817/817), done.
</code></pre></div>
 
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419091433438.png" /></p>
<p>然后,再切换到ha_xiaomi_home目录</p>
<div class="codehilite"><pre><span></span><code>cd ha_xiaomi_home
</code></pre></div>
 
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419091407697.png" /></p>
<p>然后执行安装指令</p>
<div class="codehilite"><pre><span></span><code>./install.sh /config
 
# Xiaomi Home installation is completed. Please restart Home Assistant.
</code></pre></div>
 
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419091913176.png" /></p>
<p>安装完成,提示需要重启.</p>
<h6 id="_7">配置<a class="headerlink" href="#_7" title="Permanent link">&para;</a></h6>
<p>在重新启动后,在设置-设备与服务-添加集成中,搜索“<code>Xiaomi Home</code>” </p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419092851229.png" /></p>
<p>点击,会提示风险提示</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419092928630.png" /></p>
<p>勾选,我知悉,点击下一步,会进入基础配置页面,如下图</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419093447515.png" /></p>
<p>勾选集成网络配置,同蛙,注意一下,认证跳转地址,此处显款为http://homeassistant.lcaol:8123,这个地址,估计不可能通过,只因为我们是在局域网其它机器操作这一步的,实际上我们的地址,应是地址栏中折实际地址,如上图,我们的认证地址是:http://192.168.3.2:8123, 在下一步跳转转小米后,打开的网址时,不出意外的话估计是打不开的,需要把那个地址的前半段,换成这个实际地址.</p>
<p>点击下一步,</p>
<p>此处为检测网络,网络检测通过时,才能进行下一步</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419094057861.png" /></p>
<p>当弹出如下界面时,说明网络检测通过了,</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419094122194.png" /></p>
<p>点击,"请点此处进行登录",</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419094248419.png" /></p>
<p>此时,跳转到小米折认证网页,此时输入正确米家帐号与密码,点登录</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419094348660.png" /></p>
<p>弹出 友情提示,点击,同意并继续</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419094434242.png" /></p>
<p>小米的安全验证,点下一步,</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419094514847.png" /></p>
<p>点击 发送验证码 </p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419094551241.png" /></p>
<p>输入验证码后,点确定</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419094650763.png" /></p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/image-20250419094809037.png" /></p>
<p>跳转到了认证窗口,但是却是无方访问此页面,说明认证地址,错了,我们需要把它换成我们正确的HA地址:http://192.168.3.2:8123,如下图所示</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/image-20250419095023617.png" /></p>
<p>手工将正确的地址替换地址头部后,回车,打开这个地址,类似如下格式:</p>
<div class="codehilite"><pre><span></span><code>http://192.168.3.2:8123/api/webhook/3062281226000218850?code=C3_B7440E147BCCA71A76831877D510611F&amp;state=d90a727abad348efee834884dae174b80a15de14
</code></pre></div>
 
<p>如果,用上述方式,仍然不能访问,则可用如下方法,更改host文件,强行指定本地DNS,指向homeassistant.local,方法如下:</p>
<p><strong>修改 Windows <code>hosts</code> 文件的方法</strong></p>
<p>使用管理员身份用记事本打开如下文件 :C:\Windows\System32\drivers\etc\hosts
在最后一行增加</p>
<div class="codehilite"><pre><span></span><code>192.168.3.2 homeassistant.local
</code></pre></div>
 
<p>如下图</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419100949549.png" /></p>
<p>然后,再重新试过一次</p>
<p>不出意外的话,就会自动认证通过</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419101109184.png" /></p>
<p>可以根据提示自动选 则房间同步模式,这个要根据具体情况选择,点击下一步,将提示插件集成成功.如下示意图</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419101406365.png" /></p>
<p>看到如下图,就说明集成完成了</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419101429977.png" /></p>
<p>不出意外的话概览中,就已经自动增加了许多设备.</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419101640136.png" /></p>
<h4 id="webrtc-camera">安装WebRTC Camera<a class="headerlink" href="#webrtc-camera" title="Permanent link">&para;</a></h4>
<p>WebRTC camera插件以实现频流播放.如果ha要接入视频监控,则需要安装这个组件,</p>
<p><a href="https://github.com/AlexxIT/WebRTC">仓库地址</a>:</p>
<div class="codehilite"><pre><span></span><code>https://github.com/AlexxIT/WebRTC
</code></pre></div>
 
<p>这个插件也有多种安装方法,hacs安装,直接复制等方法,因为上文,我们已经安装过了HACS插件,所以我们选择使用HACS方式安装。</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419102728322.png" /></p>
<p>点击后,弹出如下页面</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419102904947.png" /></p>
<p>点击DownLoad按钮</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/image-20250419102948033.png" /></p>
<p>点击DownLoad</p>
<p>当然,我们也可以选择不同折版本
<img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419103037398.png" /></p>
<p>当弹出窗口自动消失,点击上方的返回(<strong>注意:不会自动返回,须人工返回</strong>),返回如下图</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419103346586.png" /></p>
<p>看到上方的等待重启,说明组件已经安装上,需要重启,我们执行重启.</p>
<p>重启完成后,会看到,Downloaded中已经显示,了安装成功折WebRTC Camera组件.</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419103804928.png" /></p>
<p>然后,进入设置-设备与服务-添加集成,搜索WebRTC</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419104327438.png" /></p>
<p>点击WebRtc Camera</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/image-20250419104536359.png" /></p>
<p>弹出go2rtc url地址窗口,此插件,我们之前已装过,就在本机,所地址不用改,直接点提交</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419104656703.png" /></p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419104719116.png" /></p>
<p>点完成.WebRTC安装成功.如下图所示</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419104758351.png" /></p>
<p>为了演示如何显示监控视频,我们新增加一个sample的仪表盘.</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419105206240.png" /></p>
<p>点击,添加仪表盘</p>
<p><img alt="image-20250419105243922" src="C:\Users\trphoenix\AppData\Roaming\Typora\typora-user-images\image-20250419105243922.png" /></p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419105311039.png" /></p>
<p>在弹出折对话框中,输入仪表盘标题</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419110150389.png" /></p>
<p>这样我样就增加了一个仪表盘dashboard-sampale,我们可以在这个仪表盘中增加演示用的组件,此处,我们想增加一个演示用的监控摄像头.点击右上角的编辑按钮.</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419110222025.png" /></p>
<p>点击创建一个组件</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419110919529.png" /></p>
<p>然后,新建卡片,选择自定义WebRTC卡片,如果没有这个组件,则需要刷新几次,就能看到这个组件.</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419112102073.png" /></p>
<p>我样在卡片设置中输入url的视频流地址</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250419112451043.png" /></p>
<div class="codehilite"><pre><span></span><code>type: custom:webrtc-camera
url: &quot;rtsp://admin:Camera_data2018@192.168.50.131:554/stream2&quot;
</code></pre></div>
 
<h4 id="motioneye">安装motionEye<a class="headerlink" href="#motioneye" title="Permanent link">&para;</a></h4>
<p><strong>motionEye</strong> 是一个流行的摄像头软件(称为 motion)的前端。本插件同时提供了前端和摄像头软件,让您可以将摄像头添加到 <strong>Hass.io</strong>(Home Assistant)系统中。</p>
<p><strong>motionEye</strong> 是一个开源的闭路电视(CCTV)和网络视频录像机(NVR),它设计优雅且非常易于使用。它可以用作婴儿监视器、建筑工地监控、商店摄像头录像机、花园安防等。</p>
<h6 id="motioneye_1">motionEye 的一些特点:<a class="headerlink" href="#motioneye_1" title="Permanent link">&para;</a></h6>
<ul>
<li>支持大量摄像头,包括 IP 摄像头。</li>
<li>可以通过将多个 <strong>motionEye</strong> 实例连接在一起添加多个摄像头。例如,可以在网络中使用运行 MotionEyeOS 的 Pi Zero 和 Pi 摄像头。</li>
<li>支持将录像上传到 Google Drive 和 Dropbox。</li>
<li>支持运动检测,包括邮件通知和计划任务。</li>
<li>可以连续录像、运动录像或延时录像,并支持保留设置。</li>
<li>支持配置中的“操作按钮”。</li>
</ul>
<h6 id="_8">安装方法<a class="headerlink" href="#_8" title="Permanent link">&para;</a></h6>
<p>在设置-加载项中,搜索"motionEye",</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250420105654026.png" /></p>
<p>点击查看详情页,并安装</p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250420102823888.png" /></p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250420103843598.png" /></p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250420104034424.png" /></p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250420104313277.png" /></p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250420104356114.png" /></p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250420104650504.png" /></p>
<p><img alt="" src="https://dhcdn.leon056.com/bpfStudy/docs/20250420105025406.png" /></p>
<p>motioneye默认的用户名为admin,密码为空.</p>
              
            </div>
          </div><footer>
    <div class="rst-footer-buttons" role="navigation" aria-label="Footer Navigation">
        <a href="../../netconfig/netconfig/" class="btn btn-neutral float-left" title="配置网络"><span class="icon icon-circle-arrow-left"></span> Previous</a>
        <a href="../../QA/%E9%80%8F%E6%9E%90%E4%B8%AD%E5%BF%83HA%E7%8E%AF%E5%A2%83%E6%B8%A9%E5%BA%A6%E5%8F%91%E9%80%81%E5%88%B0%E8%83%9C%E9%80%8F%E7%9A%84%E6%93%8D%E4%BD%9C%E6%8C%87%E5%8D%97/" class="btn btn-neutral float-right" title="透析中心HA环境温度发送到胜透的操作指南">Next <span class="icon icon-circle-arrow-right"></span></a>
    </div>
 
  <hr/>
 
  <div role="contentinfo">
    <!-- Copyright etc -->
  </div>
 
  Built with <a href="https://www.mkdocs.org/">MkDocs</a> using a <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
          
        </div>
      </div>
 
    </section>
 
  </div>
 
  <div class="rst-versions" role="note" aria-label="Versions">
  <span class="rst-current-version" data-toggle="rst-current-version">
    
        <span>
          <a href="http://dh.leon056.com:7499/r/Embedded/HomeAssistantPtoject.git" class="fa fa-code-fork" style="color: #fcfcfc"> Dh</a>
        </span>
    
    
      <span><a href="../../netconfig/netconfig/" style="color: #fcfcfc">&laquo; Previous</a></span>
    
    
      <span><a href="../../QA/%E9%80%8F%E6%9E%90%E4%B8%AD%E5%BF%83HA%E7%8E%AF%E5%A2%83%E6%B8%A9%E5%BA%A6%E5%8F%91%E9%80%81%E5%88%B0%E8%83%9C%E9%80%8F%E7%9A%84%E6%93%8D%E4%BD%9C%E6%8C%87%E5%8D%97/" style="color: #fcfcfc">Next &raquo;</a></span>
    
  </span>
</div>
    <script src="../../../js/jquery-3.6.0.min.js"></script>
    <script>var base_url = "../../..";</script>
    <script src="../../../js/theme_extra.js"></script>
    <script src="../../../js/theme.js"></script>
      <script src="../../../search/main.js"></script>
    <script>
        jQuery(function () {
            SphinxRtdTheme.Navigation.enable(true);
        });
    </script>
 
</body>
</html>