deblockt / google-home-push

python lib to push message on google case device
MIT License
15 stars 8 forks source link

fix issue with getting local ip #7

Closed thevickypedia closed 2 years ago

thevickypedia commented 3 years ago

removed: local_ip = socket.gethostbyname(socket.gethostname())

inserted:

s = socket(AF_INET, SOCK_DGRAM)
s.connect(("8.8.8.8", 80))
local_ip = s.getsockname()[0]