Hi,
Setting a command-line sensor on HA to just show the Wifi Signal !
- platform: command_line
name: Wifi Signal
command: 'iwconfig wlan0 |grep Signal|cut -d"=" -f3|cut -d" " -f1'
unit_of_measurement: " dBm"
value_template: '{{ value | round(1) }}'
Command line is OS specific.
What have you tried that did not work satisfactorily? We are here to help those who at least try themselves.
I’m using rasbian … so debian
I’m trying to use the command line sensor
I want the wifi strehgh / signal in the HA lovelace frontend.
I’m not skilled enough to just have the value for them to publish in the frontend
Its working
- platform: command_line
name: Wifi Signal
command: 'iwconfig wlan0 |grep Signal|cut -d"=" -f3|cut -d" " -f1'
unit_of_measurement: " dBm"
value_template: '{{ value | round(1) }}'
John_P
(John)
October 23, 2019, 10:04am
5
How to get this to work?
Looks like iwconfig isn’t available anymore in hass.
In buster it’s working
Hi,
I’m using system info:
Distro…: Raspbian GNU/Linux 9 (stretch)
Kernel…: Linux 4.19.66-v7+
and iwconfig works fine …
do note that HASSIO is based on resin OS and not Debian .
John_P
(John)
October 23, 2019, 7:20pm
7
I’m on buster, iwconfig works but it’s not in hass docker
sorry . I’m probably not getting it …
are you refering to docker instalation ? … i’m using rasbian … hassbian … not the docker version (HassIO)
but if it works for you , that’s good , right ?
is there any way to install it on docker ?
John_P
(John)
October 24, 2019, 4:58am
9
That’s the question yes: is there any way to install it on docker ?
1 Like
Are you able to install ?
sudo apt-get install wireless-tools
dont have HASSIO … dont know if it works …
the mention to issues is just referring to Debian (not docker )
debian, wifi
John_P
(John)
October 25, 2019, 4:33am
11
It’s installed but not available in docker, maybe some of the profs can give a hint
grahamw72
(Grahamw72)
June 22, 2020, 12:37pm
12
I know the conversation here is old but have been working on this for a few days and came up with two sensors. Hope this helps.
- platform: command_line
name: Wifi Level
command: "grep 'wlan0' /proc/net/wireless | awk '{print $4}'"
unit_of_measurement: "dBm"
value_template: '{{ value | multiply(1) }}'
- platform: command_line
name: Wifi Quality
command: "grep 'wlan0' /proc/net/wireless | awk '{print $3}'"
unit_of_measurement: "%"
value_template: '{{ value | multiply(100) | float / 70 }}'
scan_interval: 300
2 Likes
well … to late for me … moved away from wireless months ago … I now have the raspberry PI directly connected via Port on router.
it increased the speed to ways I’m now possible to use some addons (eg: adGuard) that was unthinkable with WIFI …
BTW : I’m also on HassIO
Hi! On my NUC with HassIO i recieve error:
grep /proc/net/wireless: No such file or directory
Do you happen to know how to solve this?
grahamw72
(Grahamw72)
June 3, 2021, 11:32am
15
Are you running on a wireless connection? I am running Home Assistant OS with wireless and can see the file…
Yes, I running on a WiFi, i see received/sent statistic for WiFi adapter, but i don’t see this file
opened 03:15PM - 02 Jun 21 UTC
Hardware Environment
Raspberry Pi [1/2/3/4]
ODROID [C2/C4/N2(+)/XU4]
ASUS Tinker [S]
Generic x86-64 (like Intel NUC)
OVA (Open Virtualization Appliance, on Intel...
I looked it up, almost all the commands are not available in HassOS. And in the end there is no result.
yes, the lack of those commands in Hassio is something it cannot be contravened
In Core 6.0 all work again
1 Like