Open bsf29 opened 1 year ago
Can you please share your config file?
I'm not getting an error on my Pi where I intend to run this. It only fails on my MacBook (both phonepresense.py and phonepresence_st.py). Different errors on each py so I'm thinking something is messed up on my MacBook.
[config] phone_ips = 192.168.2.30, 192.168.2.29 phone_names = Bry, Pam ping_interval = 20 offline_retries = 10
Sat Feb 4 09:32:31 2023 Using 'ARP' to find tracked devices
Sat Feb 4 09:32:31 2023 Pinging
Traceback (most recent call last):
File "/Users/bryan/CloudStation/MyStuff/phonepresence-main/./phonetrack.py", line 270, in
I assume you are setting this up for SmartThings? If so, it looks like you used the wrong config file template. You need to make sure you downloaded the one from the SmartThingsIntegration folder here.
Your config file should look like this:
[config]
phone_ips = 192.168.2.30, 192.168.2.29
phone_names = Bry, Pam
phone_offline_retries = 10, 10
#
ping_interval = 20
#
port = 50001
bridge_address = 192.168.n.nnn:8088
console_output = yes
logfile_output = yes
logfile = phonetrack.log
Note that the phone_offline_retries config line must contain a value for each phone IP configured. This allows you to have a unique retry count for each phone.
Also make sure that you are using the phonetrack_st.py file from that folder.
Yep, I have it working with SmartThings on my Pi. Nice bridge and it just fixed one of my issues since SmartThings broke IFTTT.
No idea what my Mac doesn't like, but I was just testing on it since it is easier to build stuff.
OK, sorry for the false lead! I'm not sure what the Mac issue could be unless it's some problem with one of the libraries. This uses configparser and requests, so make sure that you have them installed via pip. If you doing some non-SmartThings testing on your Mac then just make sure you are using the phonetrack.py and phonetrack.cfg from the repository root directory. I don't have a Mac myself, so can't reproduce the error here.
macOS Monterey python v3.9.4. Receiving FileNotFoundError: [Errno 2] No such file or directory: 'ip'
Sorry, I'm a beginner with Python so I may have overlooked something I needed to install or configure. I did define 2 phones in the .cfg file.