惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
Know Your Adversary
Know Your Adversary
Google DeepMind News
Google DeepMind News
A
Arctic Wolf
P
Privacy & Cybersecurity Law Blog
云风的 BLOG
云风的 BLOG
Stack Overflow Blog
Stack Overflow Blog
V
Visual Studio Blog
Project Zero
Project Zero
L
LangChain Blog
N
News and Events Feed by Topic
博客园 - Franky
Last Week in AI
Last Week in AI
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
T
The Blog of Author Tim Ferriss
宝玉的分享
宝玉的分享
Scott Helme
Scott Helme
T
The Exploit Database - CXSecurity.com
P
Proofpoint News Feed
Blog — PlanetScale
Blog — PlanetScale
www.infosecurity-magazine.com
www.infosecurity-magazine.com
W
WeLiveSecurity
月光博客
月光博客
博客园_首页
美团技术团队
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
腾讯CDC
Latest news
Latest news
WordPress大学
WordPress大学
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Spread Privacy
Spread Privacy
Attack and Defense Labs
Attack and Defense Labs
量子位
L
LINUX DO - 热门话题
C
CERT Recently Published Vulnerability Notes
Webroot Blog
Webroot Blog
L
Lohrmann on Cybersecurity
aimingoo的专栏
aimingoo的专栏
T
Troy Hunt's Blog
Security Latest
Security Latest
小众软件
小众软件
Cloudbric
Cloudbric
Hacker News: Ask HN
Hacker News: Ask HN
S
Secure Thoughts
雷峰网
雷峰网
T
Threat Research - Cisco Blogs
H
Hacker News: Front Page
IT之家
IT之家
Simon Willison's Weblog
Simon Willison's Weblog

NickChenyx's Blog

Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish Create_Rubbish
Create_Rubbish
nickChen · 2023-09-09 · via NickChenyx's Blog

修改 Home Assistant 的网络配置

Created At :

Count:659 Views 👀 :

  1. HAOS 配置网络

因为 Home Assistant 需要联网下载诸多插件,比如加载项(Add-On)里的 ESPHome、Node-RED 之类的,需要配置网络代理才能够下载。

因为安装 Home Assistant 方式有好几种,配置网络代理的方法也有差异。下列配置方式请对号入座。

HAOS 配置网络

如果是安装的是 HAOS(Home Assistant Operating System),可以通过两种方式配置网络代理。当然前提是你必须有一个路由服务可以进行网络代理,以下称之为代理路由器。

  1. 在 Home Assistant 控制面中配置
    在主页侧边栏的「配置」中,找到「系统」-「网络」选项,进入「网络」配置页面中可以看到「配置网络接口」的配置栏,在此处可以配置 IPV4 为 「静态地址」,配置如下:
  • 自定义一个不冲突的 IP 地址/子网掩码,比如 192.168.0.123/24
  • 配置网关地址为你的代理路由器地址,比如 192.168.0.111
  • 配置 DNS 服务器地址为你的代理路由器地址,比如 192.168.0.111
  1. 在 HAOS 的终端中通过命令配置
  • 输入 network info 查看网卡名称,格式如下:
    ```yaml

    interfaces:
  • interface: enp0xxx # 这里就是网卡名称

    ```
  • 输入 network update {网卡名称} --ipv4-address 192.160.0.123 --ipv4-gateway 192.168.0.111 --ipv4-nameserver 192.168.0.111 等待配置成功即可
  • 实测在 HAOS 10.5 版本,修改 --ipv4-nameserver 不会生效,这个还是去第一步的控制面 UI 页面修改吧 ……
  1. 在 HAOS 的终端中通过 nmcli 命令配置,这个步骤较为复杂,不如直接在第一步配置。而且这里改动后,在前端页面的网络配置页面也不会展示,个人感觉官方可能也不建议这么搞。
  • 在 HA 系统中输入 login,登录进系统
  • 输入 nmcli connection show 查看你的连接列表,选择你想要修改的连接
    • 这里新安装的话,我们通常只能看到一个 Supervisor 之类的连接,记住这个连接名称(Name)
  • 输入 nmcli con edit "{连接名称}" ,这是能进入到 nmcli> 命令中
  • 这时候修改网络地址即可,连续输入以下几个命令:
    nmcli> set ipv4.address 192.168.0.123/24
    nmcli> set ipv4.dns 192.168.0.111
    nmcli> set ipv4.gateway 192.168.0.111
    nmcli> save
    nmcli> quit
  • 完成以上动作后,输入 exit 退出刚才 login 的系统,回到 ha> 命令页面,输入 ho reboot 重启服务
  • 系统重启后,输入 ha newtork info 就可以看到网络配置改好了。

转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。可以在下面评论区评论,也可以邮件至 nickchenyx@gmail.com