How does GeoLocation service providers works?
we are working with a company that provides us a binary file monthly and we can query the file by ip address and it returns the Location of it (Country, Region,City, PostalCode,...).
How do they gather this information?
Interesting point is that, they dont have information for some countries. Like mine :)
IP geolocation uses data from internet services providers, such as WHOIS information, traceroutes, hostnames and other data gathered via public sources. It can be incredibly inaccurate because every ISP structures their network differently.
There's also browser-based geolocation, which uses information about nearby wi-fi access points, or in the case of mobile devices, cellular tower IDs and/or GPS. Google Location Services is the primary provider for Chrome and Firefox, but this all depends on the browser.
I'm guessing you are working with a company where you paid for that file and it's up to you to perform any back-end development to make it work. MaxMind GeoIP also provides a web service API for that.
If you're interested in browser-based geolocation, a really good tutorial is at Dive Into HTML5.
Related
I am struggling to find how to let google home do a local network rest call.
I have some ESP8266 laying around with mDNS and rest api in them.
Now with the google home I want it to send a rest call to the device.
I don't want any web hooks / services like IFTTT. I don't want the communication going through these 3rd party services.
It should work like this google home gets input (google service to understand is oke). It retrieves the action (local network, url rest call with body). Google home sends the rest api call to the local device.
No need to have port forwarding / firewall changes.
The Google Home does very very little on-device processing. Sending out local network calls is not one of the things it does. Almost all processing, including IoT controls through the Smart Home API, are done through cloud-based services.
Update
I can't answer "why" it doesn't do this, since I'm not one of the engineers that built it, but I can make a lot of guesses about why.
For starters - it increases the complexity of the software and hardware on the device dramatically. Right now, the device is really little more than a microphone and a speaker, with a little logic to detect the hotword and then stream everything else to the server, and then get a result back and play it. Most of the rest of the code is likely to handle setup and configuration.
If the device has to also be a general purpose IoT hub, then it needs software and hardware for Bluetooth and possibly other signaling systems. It needs to be able to keep track of the state of other devices on the network and manage that in between power cycles of the device (or even handle interruptions in power for the device itself). Some of the implications of that may need to open up the networking on the device to receive messages, not just send them. It has to have more extensive network configuration - to understand what local networking is and not just what the local router is and how to deal with that configuration (and that configuration when it changes). These are all possible, to be sure, but increase the complexity and, in some cases, lower the security of a device.
And that might be reasonable... if there was significant value in doing so. But you've already stipulated in the question that the voice processing could be done in the cloud, so once commands are sent to the cloud and parsed there - why not also do all of the above (device and state tracking, changing, etc) in the cloud? Particularly since most IoT devices maintain cloud servers anyway because people also want to be able to control or monitor their home devices when they aren't on their home LAN. Having a dual set of commands (some for when you're local, and some when you're not) does make sense in some cases - but also dramatically increases the complexity of both the controller and devices, so most just rely on the cloud, again.
So while I understand why some people would like to have a nice little system that can just sent your play local REST server a command now and then, the reality is that to do this for a consumer system isn't that reasonable.
If you really wanted a system that can do this - you can continue in the hobbyist spirit and build something with the Assistant SDK and your favorite IoT platform.
The “local” API for Google Home is a bit limited. Here’s a doc from someone who reverse-engineered the API.
Looks like they expose Bluetooth and Alarms/Timers, and some limited configuration stuff.
https://rithvikvibhu.github.io/GHLocalApi/
Recent days there is a rumour that some Internet Service Providers in my country limiting the speed of traffic for certain services e.g. Skype, Whatsapp, Viber, etc. Also in reality neither of those services work properly, I can barely call someone.
Is it possible to prove it technically doing some tests or it's just a Hoax and maybe internet itself is heavily loaded?
I have a collection of legitimate media files (movies, songs, etc) which I have purchased over the years. I used to use Orb (www.orb.com), which would catalog all of the media files on my server, and provide a Flash-based interface so I could then stream my multimedia files to mobile devices, phones, etc, over the internet and watch them while I'm traveling.
Are there any alternatives (preferably open-source) that I can use in place of Orb. I do not trust the company itself, and do not like the idea of having an account with a list of all my media collections stored online. Being a veteran techie and programmer, I prefer to set up my own firewall rules, server configurations, etc, and not have to rely on any sort of credentials being handled by a third party. The only person who should even know of the existence of this server is myself, not some company making money by harvesting data on my and the files on my computer.
The one thing I really liked was the Flash interface, since, between that interface and the others provided, I could play on any device (ie: Playbook, laptop, mobile phone, etc).
Ampache is open source, with a repo on Gitorious.
Ampache is a web based audio/video streaming application and file manager allowing you to access your music & videos from anywhere, using almost any internet enabled device.
I noticed one application on app store recently named onavo which access internet connection usage from other applications on iPhone like safari, facebook, youtube, etc. Is there any API available for this. How they have implemented it. Curious to know about it.
I've found the answer on Quora. As follow:
http://www.quora.com/How-is-Onavo-able-to-direct-all-the-data-traffic-to-their-proxy-without-using-iOS-private-APIs
Roi Tiger, CTO of Onavo
Hi, I'm the CTO of Onavo, thank you for checking out our service. After installing Onavo you are prompted to install a configuration profile which allows the data to be redirected through Onavo's servers using a proxy server settings.
Configuration profile installation does not require any private API access in the iOS platform.
Another answer:
http://www.quora.com/How-does-Onavo-manage-to-compress-data-traffic
They're not monitoring the apps’ data usage on the phone itself. It looks like Onavo sets up a proxy on the phone (probably via a configuration profile) so that your data traffic goes through their servers, so monitoring which sites that traffic is going through is trivial on their end. From their privacy policy (emphasis mine):
Onavo provides services for reducing data usage of certain mobile phones. To benefit from the Services, your access to the Internet through your mobile phone will be routed through Onavo's servers, which strive to reduce the volume of your downloads, and potentially your uploads as well.
In my app, I am trying to figure out the location of my app user using WiFi (not GPS because my main area is inside the buildings), can any one please tell me how can I get user location using hotspot of WiFi.
Any basic guide or example is good .
Thanks in advance.
egards
Use Core Location. The Core Location framework hides the actual device capability from you (more or less) and (depending on the options you set) give you a best estimate for latitude and longitude. I've used the exact same app on an iPhone and iPod touch and have gotten pretty good results with the touch. It won't be as accurate, but it's good enough for most applications.
Check out the Core Location documentation and the "LocateMe" sample code from the developer site: https://developer.apple.com/library/ios/#samplecode/LocateMe/Introduction/Intro.html
Unless you mean to figure out the location of your user in a specific building with known Wi-Fi spots, you'll have to resort to using a IP address geolocation database. There are services, such as that provided by MaxMind, that have a database which you subscribe to for updates. The database maps IP addresses to locations.
This will only get you approximations, so your best bet is to use GPS primarily but IP address as a backup.