Ping sensors do not work in Docker container

Did you get it to work with compose file ?

Yes, Iā€™ve had zero issues now I use Compose.

Finally solved it, in my case it was entry in knows_devices ( from ping device_tracker ) has ā€œtrack: falseā€ by default. After changing it in known_devices.yml file it worked.

1 Like

I canā€™t get this to work at all.

Iā€™m running HA Container in Docker for Mac. I tried both solutions (above) chmod u+s /bin/ping and setting track: true in known_devices.yaml - Iā€™m using binary_sensor not device_tracker though.

Can you advise?

Hi jchh,

MacOS is notoriously difficult to use networking on. Host networking donā€™t work as expected.
Getting around Dockerā€™s host network limitation on Mac | by Laila Abudahi | Medium.

Unfortunately thereā€™s no solution for this - You may want to look into using a Virtualbox VM (a lot more resource intensive) or a RPi if ping sensing is really needed.

Hope this helps.

wow - thanks for such a quick response! :smiley:

Actually, I do use a RPi for my own HA instance (HA Core on DietPi OS) and use mumā€™s iMac for hers as itā€™s always on for other reasons. Iā€™d happily get her a RPi if only there were any to buy! Docker Desktop for Mac actually works quite well in principle but you cannot run network_mode: host nor have USB passthrough which is limiting. I only want to use ping to diagnose some issues with her Hive integration.

I found these out the hard way too!

I wonder if you could find a Mac app or a shell script that can do something similar, like logging to a CSV?

great idea! Iā€™ll have a look around