Metadata-Version: 2.4
Name: ovos_phal_plugin_ipgeo
Version: 0.1.9a2
Summary: A PHAL plugin for mycroft
Author-email: JarbasAi <jarbasai@mailfence.com>
License: Apache-2.0
Project-URL: Homepage, https://github.com/OpenVoiceOS/ovos-PHAL-plugin-ipgeo
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Text Processing :: Linguistic
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: ovos-plugin-manager<3.0.0,>=2.1.0
Requires-Dist: ovos-config>=0.0.10
Requires-Dist: ovos-utils<1.0.0,>=0.4.0
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: ovos-bus-client<3.0.0,>=0.0.3; extra == "test"
Dynamic: license-file

# PHAL plugin - IPGeo

This plugin sets the default location for OpenVoiceOS based on the IP address of the device. It queries [ip-api.com](https://ip-api.com) and stores the result in the local configuration.

The plugin does not overwrite a location that a user or a backend already set. It only fills in the location if the value is missing.

The `City`, `regionName`, and `country` fields are localized to the active language when possible. Supported languages are `en`, `de`, `es`, `pt`, `fr`, `ja`, `zh`, and `ru`.

## Install

```bash
pip install ovos-phal-plugin-ipgeo
```

## Usage

OVOS loads this plugin through the PHAL plugin manager. No manual setup is required.

The plugin geolocates the device on these bus messages:

- `mycroft.internet.connected`: sent when the device gets an internet connection.
- `ovos.ipgeo.update`: sent to request a location update. Send `overwrite: true` in the message data to replace an existing location.

## Related projects

- [OpenVoiceOS/PHAL](https://github.com/OpenVoiceOS/PHAL): the plugin host that loads this plugin.
- [OpenVoiceOS/ovos-PHAL-plugin-gpsd](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-gpsd): sets the device location from a GPS receiver.
- [OpenVoiceOS/ovos-PHAL-plugin-connectivity-events](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-connectivity-events): reports network connectivity changes on the bus.

## License

Apache-2.0
