-
In this page, I can set the DNS server:
However, I often face an issue: when my HA instance goes down, the internet connection of the whole home goes down as well. Like for example, when I'm restarting HA. But another situation is when I have a power outage, which is frequent where I live. The UPS which holds my HA instance can hold it up for like 15 minutes, but the UPS which holds my Huawei router can hold it up for like 45 minutes. In other words, in a power outage I only get internet connection for the firsts 15 minutes. I can of course manually go in the Huawei web UI and change it to something like If there was a way to programmatically set the DNS server of the primary router, I could create an automation in Home Assistant to automatically set the router DNS to |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Yes, I think it is possible to make a service that will change the connection data As far as I understand, for this I will need to get the current connection parameters {
"action": "update",
"data": <previously received by the GET request and modified data>,
"csrf": {
"csrf_param": .....,
"csrf_token": .....
}
} |
Beta Was this translation helpful? Give feedback.
Yes, I think it is possible to make a service that will change the connection data
As far as I understand, for this I will need to get the current connection parameters
GET api/ntwk/wan?type=active
, then change theIPv4DnsServers
field, and send back the requestPOST api/ntwk/wan?type=active
with the body of the following type: