ioBroker / ioBroker.ping

Pings configured IPs for ioBroker
MIT License
21 stars 17 forks source link

"hping3" feature (because Ping does not work with iphones and deepsleep modes) #107

Open Roellen opened 1 year ago

Roellen commented 1 year ago

Is your feature request related to a problem? Please describe. Until today there is no adapter available who can reliable detect the presence of an iphone.

I tried these Adapters over the last month: life360, radar2, TR064, geofency, ping, net tools, unifi....

Describe the solution you'd like I read that "hping3" is the solution here. Then even iphones will wake up on this ping request and the presence detection will work reliable.

Apollon77 commented 1 year ago

Can you provide more infos on "hping3"? Links? What kind of package is it? Available for Linux? Windows? macos?

Makes it battery wise really sense to wake up iphons that often?

But in fact tr-064 and a fritzbox should work - at least it does for my one. Additionally I use geofency to also get infos on that level.

Roellen commented 1 year ago

tr-064 might work, but I don't use a fritzbox as a router. (iam using unifi and I never want to switch back)

Battery on iphone 13 lasts ~2 days so it should work. (at least is seems to work of others, too)

Installation is like this: sudo apt-get install hping3

I just found out that someone made a shellscript for it: https://forum.iobroker.net/topic/56566/probleme-mit-anwesenheitserkennung/13?_=1687096847035&lang=de

But having it in a ping adapter would be easier to maintenence.

mcm1957 commented 1 year ago

I read that "hping3" is the solution here. Then even iphones will wake up on this ping request and the presence detection will work reliable.

hping3 is able to send icmp, tcp, etc. requests and set several options. ping can only send icmp packets.

Please indicate what kind of "ping" hping3 can / should use to reiable wake up iphones. Can you give a serious reference where you read this info?

Roellen commented 1 year ago

I read that "hping3" is the solution here. Then even iphones will wake up on this ping request and the presence detection will work reliable.

hping3 is able to send icmp, tcp, etc. requests and set several options. ping can only send icmp packets.

Please indicate what kind of "ping" hping3 can / should use to reiable wake up iphones. Can you give a serious reference where you read this info?

I read the info about hping3 just in this thread where people successfully used it: https://forum.iobroker.net/topic/56566/probleme-mit-anwesenheitserkennung/13?_=1687096847035&lang=de

I think they used this: hping3 -2 -c 10 -p 5353 -i u1 $i -q >/dev/null 2>&1

GermanBluefox commented 1 year ago

This command hping3 -2 -c 10 -p 5353 -i u1 192.168.1.1 tries to send UDP packet to port 5353 and waits for 1 millisecond for answer. 10 times retry

mcm1957 commented 6 months ago

@Apollon77 Should be labelled enhancement - although to be discussed id we want to implemnt