Speedtest.net
The Speedtest.net integration uses the Speedtest.net
配置
要将 Speedtest.net integration 添加到您的 Home Assistant 实例中,请使用此 My 按钮:
手动配置步骤
如果上述 My 按钮不起作用,您也可以手动执行以下步骤:
-
浏览到您的 Home Assistant 实例。
-
转到
设置 > 设备与服务。 -
在右下角,选择
Add Integration 按钮。 -
从列表中选择 Speedtest.net。
-
按照屏幕上的说明完成设置。
Most Speedtest.net servers require TCP port 8080 outbound to function. Without this port open you may experience significant delays or no results at all. See note on their help page
By default, a speed test will be run every hour. You can disable polling using system options and use the update_entity
action to automate the speed test frequency.
如果您想要定义一个特定的间隔来轮询您的设备以获取数据,可以禁用默认的轮询间隔并创建自己的轮询自动化。
要添加自动化:
- 转到 设置 > 设备与服务,并选择您的集成。
- 在集成条目上,选择
。 - 然后,选择 系统选项 并切换按钮以禁用轮询。
- 然后,选择 系统选项 并切换按钮以禁用轮询。
- 要定义您的自定义轮询间隔,创建一个自动化。
- 转到 设置 > 自动化与场景 并创建一个新的自动化。
- 定义您喜欢的任何触发器和条件。
- 选择 添加动作,然后选择 其他动作。
- 选择 执行动作,然后从列表中选择
homeassistant.update_entity
动作。
- 保存您的新自动化以轮询数据。
Integration sensors
The following sensors are added by the integration:
sensors:
- Ping sensor: Reaction time in ms of your connection (how fast you get a response after you’ve sent out a request).
- Download sensor: The download speed (Mbit/s).
- Upload sensor: The upload speed (Mbit/s).
This integration uses speedtest-cli
Examples
In this section you will find some real-life examples of how to use this integration.
Using as a trigger in an automation
# Example configuration.yaml entry
automation:
- alias: "Internet Speed Glow Connect Great"
triggers:
- trigger: template
value_template: "{{ states('sensor.speedtest_download')|float >= 10 }}"
actions:
- action: shell_command.green
- alias: "Internet Speed Glow Connect Poor"
triggers:
- trigger: template
value_template: "{{ states('sensor.speedtest_download')|float < 10 }}"
actions:
- action: shell_command.red
Notes
- When running on Raspberry Pi the maximum speed is limited by the LAN adapter. The Raspberry Pi 3+ models come with a Gigabit LAN adapter which supports a maximum throughput
of 300 Mbit/s. - Running this integration can have negative effects on the system’s performance as it requires a fair amount of memory.
- If run frequently, this integration has the ability to use a considerable amount of data. Frequent updates should be avoided on bandwidth-capped connections.
- While the speedtest is running your network capacity is fully utilized. This may have a negative effect on other devices using the network such as gaming consoles or streaming boxes.