Skip to content
This repository has been archived by the owner on Nov 18, 2024. It is now read-only.

feat/selene_callout_proxy #29

Merged
merged 13 commits into from
Sep 9, 2022
Merged

feat/selene_callout_proxy #29

merged 13 commits into from
Sep 9, 2022

Conversation

JarbasAl
Copy link
Member

@JarbasAl JarbasAl commented Sep 7, 2022

closes #20

Selene Proxy

You can integrate local backend with selene, the backend will show up as a device you can manage in mycroft.home

wait... what? isn't the point of local backend to disable selene?

  • Open Dataset, You do not want to use selene, but you want to opt_in to the open dataset (share recordings with mycroft)
  • Privacy, you want to use selene, but you do not want to give away your personal data (email, location, ip address...)
  • Control, you want to use only a subset of selene features
  • Convenience, pair once, manage all your devices
  • Functionality, extra features such as isolated skill settings and forced 2 way sync
  • Esoteric Setups, isolated mycroft services that can not share a identity file, such as ovos-qubes

Pairing

To pair the local backend with selene you have 2 options

1 - pair a mycroft-core instance, then copy the identity file

2 - enable proxy_pairing, whenever a device pairs with local backend the code it speaks is also valid for selene, use that code to pair local backend with selene

Selene Config

In your backend config add the following section

    "selene": {
        "enabled": False,  # needs to be explicitly enabled by user
        "url": "https://api.mycroft.ai",  # change if you are self hosting selene
        "version": "v1",
        # pairing settings
        # NOTE: the file should be used exclusively by backend, do not share with a mycroft-core instance
        "identity_file": BACKEND_IDENTITY,  # path to identity2.json file
        # send the pairing from selene to any device that attempts to pair with local backend
        # this will provide voice/gui prompts to the user and avoid the need to copy a identity file
        # only happens if backend is not paired with selene (hopefully exactly once)
        # if False you need to pair an existing mycroft-core as usual and move the file for backend usage
        "proxy_pairing": False,
        
        # micro service settings
        # NOTE: STT is handled at plugin level, configure ovos-stt-plugin-selene
        "proxy_weather": True,  # use selene for weather api calls
        "proxy_wolfram": True,  # use selene for wolfram alpha api calls
        "proxy_geolocation": True,  # use selene for geolocation api calls
        "proxy_email": True,  # use selene for sending email (only for email registered in selene)
        
        # device settings - if you want to spoof data in selene set these to False
        "download_location": True,  # set default location from selene
        "download_prefs": True,  # set default device preferences from selene
        "download_settings": True,  # download shared skill settings from selene
        "upload_settings": True,  # upload shared skill settings to selene
        "force2way": False,  # this forcefully re-enables 2way settings sync with selene
        # this functionality was removed from core, we hijack the settingsmeta endpoint to upload settings
        # upload will happen when mycroft-core boots and overwrite any values in selene (no checks for settings changed)
        # the assumption is that selene changes are downloaded instantaneously
        # if a device is offline when selene changes those changes will be discarded on next device boot
        
        # opt-in settings - what data to share with selene
        # NOTE: these also depend on opt_in being set in selene
        "opt_in": False,  # share data from all devices with selene (as if from a single device)
        "opt_in_blacklist": [],  # list of uuids that should ignore opt_in flag (never share data)
        "upload_metrics": True,  # upload device metrics to selene
        "upload_wakewords": True,  # upload wake word samples to selene
        "upload_utterances": True  # upload utterance samples to selene
    }

@JarbasAl JarbasAl added the enhancement New feature or request label Sep 7, 2022
@JarbasAl JarbasAl requested a review from NeonDaniel September 7, 2022 18:15
@codecov
Copy link

codecov bot commented Sep 7, 2022

Codecov Report

❗ No coverage uploaded for pull request base (dev@7529ace). Click here to learn what that means.
The diff coverage is n/a.

@@          Coverage Diff          @@
##             dev     #29   +/-   ##
=====================================
  Coverage       ?   0.00%           
=====================================
  Files          ?      21           
  Lines          ?    1258           
  Branches       ?       0           
=====================================
  Hits           ?       0           
  Misses         ?    1258           
  Partials       ?       0           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

proxy_pairing + settings_sync
cleanup

bump selene_api

move selene helpers to selene util module

move selene helpers to selene util module
@JarbasAl JarbasAl force-pushed the feat/selene_callout_proxy branch from 56937ae to f2a6000 Compare September 7, 2022 22:44
@JarbasAl JarbasAl marked this pull request as ready for review September 8, 2022 10:41
@JarbasAl JarbasAl merged commit 9716ea8 into dev Sep 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

selene proxy
1 participant