There is a possibility to correlate xLink (pimatic-phone) and iframe?
It would be nice to be able to use a rule to change the url of the iframe automatically when change the coordinates of the XLink.
-
xLink (pimatic-phone) and iframe
-
I agree. It would be great to open/switch to an iframe witch a google map showing the current location of the tracked device. But their are some discussions about the iframe plugin and the mobile frontend is a little bit out of my scope (and skills). Also, as you may have noticed, the xLink value in the frontend is not properly updated and you have to manually refresh the pimatic page before clicking the xLink.
-
A little improvisation to display the phone’s location in iframe (gmaps).
https://www.dropbox.com/sh/t8nr92y07glhvmi/AABclW0bGrgR2-sUk8MwUurba?dl=0 -
@Andi-Tudor not sure if it suits your needs, but alternatively you can send the pimatic-phone GPS variables with pimatic-telegram, where you can push the location from device A to device B, and make this rule-based even (send gps telegram…), It will then show as a small map in the telegram app. Ofcourse this will not help in a scenario where you absolutely need the map in your pimatic frontend.
"Screw the captain. It's the engineer running the ship!"
pimatic-telegram, pimatic-tts, pimatic-woox, pimatic-lg-smart-tv, pimatic-spotify, pimatic-wakeuplight and some not-announced plugins -
@Dan
I use (gps Telegram). It works very good. -
Hi @Andi-Tudor, @Dan the next release of pimatic-phone will provide REST API calls (fetchLocation, fetchPreviousLocvation) to get the location information very easily for usage in other applications. JSON is returned in the format
{“result”:{“tag”:“Home”,“source”:“TAG”,“type”:“API”,
“time”:“2017-02-02 11:45:51”,“utc”:1486032351145,
“gps”:{“latitude”:53.6645935,“longitude”:10.0786541}},
“success”:true}With regard xLink, I’m still struggling with the problem that the position data are updated in the backend but you have to manually refresh the page in the frontend to get the correct link. Maybe, we find someone experienced in the mobile frontend development to help …
-
@Andi-Tudor , @Dan, what do you think of this:
Uses the pimatic-iframe plugin and DummySwitches to enable/disable iFrame and iCloud updates without going to the configuration. To use a google map within an iframe you need an API Key for Google Maps Embed API
-
Hi Bernd, looks pretty awesome! Would it be possible to present an address instead of GPS coordinates in the map?
"Screw the captain. It's the engineer running the ship!"
pimatic-telegram, pimatic-tts, pimatic-woox, pimatic-lg-smart-tv, pimatic-spotify, pimatic-wakeuplight and some not-announced plugins -
I think, everything what can be done with the Google Maps Embed API should be possible without much effort. It would be great, if you can have a look on the documentation and tell me whats most interesting for you …
-
The old pimatic-location plugin showed the address instead of the coordinates. I’m not a developer, but maybe you could check to see how it was done there? If I recall correctly that also needed the Google Maps API.
-
@Paul-Vries There are several different Google Maps APIs available but for pimatic-iframe you have to use Google Maps Embed API from which I use the view mode by default. It shows a map centered centered around the specified longitude/latitude. There is also a place mode available which would look like you (and others) expect at first glance. It would be simple to use this view for the known locations from the pimatic-phone plugin configuration but it’s more interesting for unknown locations. Based on the latitude/longitude provided by the phone with more or less accuracy you have to “reverse geo code” the place and use this location for the place view in the iframe. I have this feature on the road map for pimatic-phone, but you have to use a different API and most probably an additional API key what makes the changes somewhat more extensive. Maybe I can have a look on it at the weekend.
-
@Andi-Tudor , @Dan , @Paul-Vries: The pimatic-phone update may be of interest for you.
-
I have installed the update, but when I try to configure a new device I can’t find the class anymore. This used to be PhoneDevice but that isn’t listed anymore when I create a device via the GUI. Has something changed here, or should I modify the config file directly?
-
@Paul-Vries That’s strange. The recent release run’s on my Raspi and Linux workstation without any problems, even on my Windows 10 notebook. Also the Travis-ci tests passed without errors. Pls. restart pimatic and send me the daemon log.
-
I’m running an up to date Raspbian Jesse on the RPi. This shows up in the logfile after updating to the latest release:
00:16:32.660 [pimatic] info: Loading plugin: "pimatic-phone" (0.9.3) 00:16:32.669 [pimatic] debug: debug is true in plugin config, showing debug output for pimatic-phone. 00:16:33.128 [pimatic] error: Cannot find module './actions.coffee' 00:16:34.913 [pimatic] debug: Error: Cannot find module './actions.coffee' 00:16:34.913 [pimatic] debug:> at Function.Module._resolveFilename (module.js:325:15) 00:16:34.913 [pimatic] debug:> at Function.Module._load (module.js:276:25) 00:16:34.913 [pimatic] debug:> at Module.require (module.js:353:17) 00:16:34.913 [pimatic] debug:> at require (internal/module.js:12:17) 00:16:34.913 [pimatic] debug:> at /home/pi/pimatic-app/node_modules/pimatic-phone/phone.coffee:10:13 00:16:34.913 [pimatic] debug:> at PluginManager.loadPlugin (/home/pi/pimatic-app/node_modules/pimatic/lib/plugins.coffee:83:16) 00:16:34.913 [pimatic] debug:> at /home/pi/pimatic-app/node_modules/pimatic/lib/plugins.coffee:477:25 00:16:34.913 [pimatic] debug:> at tryCatcher (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/util.js:16:23) 00:16:34.913 [pimatic] debug:> at Promise._settlePromiseFromHandler (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/promise.js:510:31) 00:16:34.913 [pimatic] debug:> at Promise._settlePromise (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/promise.js:567:18) 00:16:34.913 [pimatic] debug:> at Promise._settlePromiseCtx (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/promise.js:604:10) 00:16:34.913 [pimatic] debug:> at Async._drainQueue (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/async.js:138:12) 00:16:34.913 [pimatic] debug:> at Async._drainQueues (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/async.js:143:10) 00:16:34.913 [pimatic] debug:> at Immediate.Async.drainQueues [as _onImmediate] (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/async.js:17:14) 00:16:34.913 [pimatic] debug:> at processImmediate [as _immediateCallback] (timers.js:383:17)
-
@Paul-Vries Thanks for the bug report! Missing reference to actions.coffe is fixed in v0.9.4
-
With the latest update (0.9.4) works well. Thanks for the update
-
When the Tasker api call is run over the mobile network I get the error Cannot read property ‘latitude’ of undefined, this doesn’t happen over wifi:
09:08:19.282 [pimatic-phone] debug: Device s7: updatePhone: serial=359948031318 ssid=%SSID cellid=GSM:21118.26666242 locn=51.18172,5.9016699,19 loc=51.181638988918145,5.901832110071299,24.0 09:08:19.300 [pimatic-phone] debug: Device s7: updatePhone: continue with unknown ssid 09:08:19.312 [pimatic-phone] debug: Device s7: updatePhone: using GPS from %LOC [51.181638988918145,5.901832110071299,24.0] 09:08:19.323 [pimatic-phone] debug: Device s7: updateGPS: latitude=51.181638988918145 longitude=5.901832110071299 accuracy=24 type=GPS 09:08:19.344 [pimatic-phone] error: Cannot read property 'latitude' of undefined 09:08:19.361 [pimatic-phone] debug: Device s7: updateGPS: 51.181638988918145,5.901832110071299 -> unknown 09:08:19.373 [pimatic-phone] debug: Device s7: Update requested by [updateGPS] 09:08:19.385 [pimatic-phone] debug: Device s7: [No location information available!] 09:08:19.397 [pimatic-phone] debug: Device s7: Current position: lat=51.181638988918145 long=5.901832110071299 09:08:19.412 [pimatic-phone] debug: Device s7: Distance to last known postition: 0m 09:08:19.428 [pimatic-phone] debug: Device s7: Distance to Home: unknown! 09:08:19.439 [pimatic-phone] debug: Device s7: Location not changed.
-
@Paul-Vries Looks like a configuration error: Check the plugin settings and make sure, there is a Location with the tag “Home” and the GPS record (including radius >= 250) is filled for this location entry. If in doubt, please send me the plugin configuration.
-
@Paul-Vries Update 0.9.5 should fix the undefined error, but I think you have a problem with the configuration.