@Yves911, that is not the issue
I also changed device-config-schema.coffee
-
[Implemented] iDevices (iphone/ipad) location plugin
-
ok i think i found it : /api/device/phone.home/ should be /api/device/iphone/
@skipper79 could you try again after adjusting the URL into the app?pimatic rocks!
-
Unfortunately, I changed the device in the link, but no result.
http://admin:password@server/api/device/your-phone/updateLocation?updateAddress=1
admin --> user login my pi (not root)
password --> password of my login user
server --> local ipadress of pimatic
your-phone --> ‘id’ of my devices mentioned in the config file of pimaticI will try to replace the original device-config-schema.coffee and change in the config file lon --> long~?!
Or, is a registration necessary as mentiod earlier? -
@skipper79 the username is not the username from your raspberry. You need the username from pimatic. thats normally admin.
-
thanks everyone! It’s working now after changing the login credentials!
-
I have to say that the app SendLocation is not working very well. I was already home for about 2 hours and the app didn’t send my location so i was still 12km’s away.
-
@sweebee yes i saw that also, if the app is running in the background it will send new location rarely…
So solutions are :- write a message to the app author (but the app is very old and seems to be not maintained any longer)
- find another similar app on the app store
- find someone that can create an iphone app for that…
pimatic rocks!
-
Maybe there is another alternative, look here : https://www.npmjs.com/package/iphone-finder
This library is able to retrieve your location using FindMyIphone service
Just update https://github.com/ThomasHenley/node-iphone-finder/blob/master/examples/device-info.js with your credentials and it will display your iphone location.
What i don’t know is :- how many request can you send to the service
- how accurate is it
What i know : i have been able to get GPS location of my phone with it…
pimatic rocks!
-
Proof of concept :
just updated the device-info.js file (adding credentials) + the line below at the end of the fileconsole.log('https://YOUR_PIMATIC_USER:YOUR_PIMATIC_PASSWORD@YOUR_SERVER/api/device/YOUR_DEVICE_ID/updateLocation?updateAddress=1&lat=' + lat + '&lon=' + lon);
+ that rule
{ "id": "updateiphoneloc", "name": "UpdateIphoneLoc", "rule": "if every 1 minute then execute \"node /tmp/node_modules/iphone-finder/examples/device-info.js | tail | grep '^http' | wget --quiet --no-check-certificate -i - -O -\"", "active": true, "logging": true }
and tada : location updated into pimatic every minute (and no need to activate the GPS on your phone : findmyiphone will send the best data he can so can be wifi position or 3G position or GPS position)…
@sweebee , @skipper79 Who want to test?
@sweetpi could https://www.npmjs.com/package/iphone-finder become a pimatic-module that works with @Oitzu pimatic-plugin?pimatic rocks!
-
@Yves911, I did a test and it is working also on my device! Great! Much better; more accurate.
Question: If I want to track two device with a different account, shoud I run two plugin’s? -
This could maybe be directly integrated in the location plugin. Need to look further into it.
-
Its working great if you remove your macbook or imac.
At first it didn’t work because my imac was in it and turned off.
-
After few days of testing i can say that the proof of concept is working fine, i did reduce frequency of updates from every 2 minutes to 10 minutes (enough accurate for my need and less battery aggressive)
Suggestion for the pimatic-location plugin : add a xlink behind the label that points to google map with exact coordinate:
http://maps.google.com/maps?z=15&t=m&q=loc:lat+longpimatic rocks!
-
I have to say that the iphone-finder plugin sound really nice. But what I’m interesting in is, how secure the connection is, because user and password are in clear text in the configuration.
-
@Doener89 said:
I have to say that the iphone-finder plugin sound really nice. But what I’m interesting in is, how secure the connection is, because user and password are in clear text in the configuration.
Your credentials are stored in a file so basically all those can read this file (get access to your installation) can discover your credentials.
The connection between the module itself and apple server goes trough SSL (so NSA can get your credentials)pimatic rocks!
-
good to hear^^
-
my iphone location device sometimes stop upodating the location and then i get this error.
i use it to notice if im home or not in addition to ping the phone and control my shutters and other stuff, but when the location not gets actualize the stuff dont work anymore.anyone has a idea what this could be?
error [pimatic]: A uncaught exception occured: Error: getaddrinfo ENOTFOUND at errnoException (dns.js:37:11) at Object.onanswer [as oncomplete] (dns.js:124:16) From connect at Socket.connect (/root/pimatic-app/node_modules/pimatic/startup.coffee:55:29) at Object.exports.connect (tls.js:1361:12) at Agent.createConnection (https.js:79:14) at Agent.createSocket (http.js:1293:16) at Agent.addRequest (http.js:1269:23) at new ClientRequest (http.js:1416:16) at Object.exports.request (https.js:123:10) at postRequest (/root/pimatic-app/node_modules/pimatic-location/node_modules/iphone-finder/lib/iphone-finder.js:32:28) at getPartitionHost (/root/pimatic-app/node_modules/pimatic-location/node_modules/iphone-finder/lib/iphone-finder.js:18:5) at Object.module.exports.findAllDevices (/root/pimatic-app/node_modules/pimatic-location/node_modules/iphone-finder/lib/iphone-finder.js:11:5) at LocationDevice.findIPhone (/root/pimatic-app/node_modules/pimatic-location/pimatic-location.coffee:104:20) at null.<anonymous> (/root/pimatic-app/node_modules/pimatic-location/pimatic-location.coffee:88:12) at wrapper [as _onTimeout] (timers.js:258:14) at Timer.listOnTimeout [as ontimeout] (timers.js:110:15) This is most probably a bug in pimatic or in a module, please report it!
-
@p4co86 error in Hostname resolve of the “iService”, maybe due to DSL-reconnect or similar?
Does it not recover from this error? -
No. After error the device is not uodating. I will See in the Router log if a reconnect is the issues
-
@p4co8621 i don’t own an iDevice, could you try the latest version from github?
https://github.com/Oitzu/pimatic-location-plugin/tree/masterI build a try arround the offending code to catch the case.