List of ping binary sensors?

Hi ,

im trying to creat a list on Ping binary sensors, but am afraid im lost why the definition is incorrect, the instructions on https://home-assistant.io/components/binary_sensor.ping/ don’t sy.

Ive made this as an entrance in my sensor_binary.yaml which is called in the configuration.yaml through binary_sensor: !include sensor_binary.yaml and works fine for all other binary sensors in it:

- platform: ping
  host: 
    - ikeatradfri: "ipadress1"
    - iungo: "ipadress2"
    - solaredge: "ipadress3"
    - synology: "ipadres4"
    - timecapsule: "ipadress5"

the setup with hosts: as is needed the device_tracker setup isnt allowed either. Please have a look?

Cheers,
Marius

Your configuration is wrong. As the documentation shows:

binary_sensor:
  - platform: ping
    host: 192.168.0.1

You can specify multiple IP addresses as:

binary_sensor:
  - platform: ping
    name: ikeatradfri
    host: 192.168.0.1
  - platform: ping
    name: iungo
    host: 192.168.0.2

etc

@Tinkerer is definitely right.

I do mine in a bit of a different way. I use a devices trackers file and put them all there.

Check it out, let me know if you have any questions.

right thank you!
i was looking for a way to have the -platform: ping declared only once.
just as i have many under:

- platform: template
  sensors:

anyways, ill follow what you say here.
Cheers,
Marius

that’s what i had at first, but only with the binary sensor ping platform they won’t go. suppose it’s not a device_tracker as such, but really a binary sensor :wink:

btw i have this too in device_tracker, but still get the odd ‘Away’ of these entities, which isnt correct, this why i was gong to try the binary sensor.

- platform: ping
  interval_seconds: 20
  consider_home: 60
  hosts:
    ikeatradfri: 192.168.1.xx
#    synology: 192.168.1.xx
    iungo: 192.168.1.xx
    solaredge: 192.168.1.xx
#    timecapsule: 192.168.1.xx

Cheers,
Marius

Ping can be a bit odd. It’s why I use the NMAP scan as well.

I actually use Ping, NMAP Scan, and ST Arrival Sensors monitored in a Bayesian Sensor to report if they are present or not.

Having had ST for years, I’ve learned to have as many redundencies as possible. Sure it puts a little more strain on the RPi and a little more coding, but it’s totally worth it.

I just saw this.
If I understand what you are doing is each device that I would normally have in a binary_sensor.yaml file that looks like this

  - platform: ping
    host: 192.168.1.1
    name: UniFi Security Gateway

would then be placed in a nmap and the device would be listed like

  - platform: nmap_tracker
    hosts:
      - 192.168.1.1 # UniFi Security Gateway
      - 192.168.1.2 # Unifi Host Controller

and so on.
So I could transfer all my binary pings to here.
I am pinging about 40 devices.
Thanks
carltonb

With nmap_tracker you can just specify a range, or even your entire subnet.