IronMan's Jarvis with python
- Clone this repository or download it from pypi
- Run the following commands in command line/terminal:
cd lib && chmod +x installs.sh- Makes installation file as executable.python3 -m venv venv- Creates a virtual env namedvenvsource venv/bin/activate- Activates the virtual envvenvwhich python- Validate which python is being used. Should be the one within the virtual envvenvbash installs.sh- Installs the required libraries/modules.python3 jarvis.py- BOOM, you're all set, go ahead and interact with Jarvis
Environment variables are loaded from a .env file using the python_dotenv module.
More on Environment variables
- offline_port - Port number to initiate offline communicator on. Defaults to
4483 - offline_phrase - Secure phrase to be used for authentication purpose. Defaults to
jarvis
- icloud_user - iCloud account username.
- icloud_pass - iCloud account password.
- git_user - GitHub Username
- git_pass - GitHub Token
- weather_api - API Key from openweathermap
- news_api - API Key from newsapi
- maps_api - API Key for maps from google
- gmail_user - Gmail account username to send and read emails.
- gmail_pass - Gmail account password to send and read emails.
- offline_user - Alternate gmail account username to send an SMS. (
gmail_usercan be re-used) - offline_pass - Alternate gmail account password to send an SMS. (
gmail_passcan be re-used) - robinhood_user - Robinhood account username.
- robinhood_pass - Robinhood account password.
- robinhood_qr - Robinhood login QR code
- birthday - Birth date in the format DD-MM - Example:
24-April - icloud_recovery - Recovery phone number to activate lost mode on a target device - Example:
+11234567890 - phone_number - To send SMS from Jarvis - Example:
+11234567890 - think_id - API Key from wolfram alpha.
- root_password - System password for your
macto get the system vitals.
Args for PersonalCloud integration
- personal_cloud_host - Directory path which has to shared through the internet.
Args to control TV - Applies only for LGWebOS
- tv_client_key - Client key to control the TV using
pywebostvmodule. - tv_mac - Mac address of the TV which will be retrieved by the
arpcommand but just in case.
Args for ip_scanner - Applies only for Netgear routers
- router_pass - Router's admin password to get the available devices using
pynetgearmodule.Note that this may be done even without the module by simply scanning the whole network. Using the module makes it easier since the devices are already connected to the router.
Args for offline-communicator
Built for a personalized usage.
- ngrok_auth_key - Auth token from ngrok - Only used for
offline_communicator
Executes pre-defined tasks at pre-defined times without any user interaction. Uses an automation.json file as source.
Setup Instructions
The JSON file should be a dictionary within a dictionary that looks like the below.
OPTIONAL: The key, day can be a list of days, or a str of a specific day or simply a str saying weekday or
weekend when the particular automation should be executed.
Not having the key
daywill run the automation daily.
{
"6:00 AM": {
"day": "weekday",
"task": "set my bedroom lights to 50%",
"status": false
},
"6:30 AM": {
"day": ["Monday", "wednesday", "FRIDAY"],
"task": "set my bedroom lights to 100%",
"status": false
},
"8:00 AM": {
"day": "weekend",
"task": "set my bedroom lights to 100%",
"status": false
},
"9:00 PM": {
"task": "set my bedroom lights to 5%",
"status": false
}
}Docstring format: Google
Styling conventions: PEP 8
Clean code with pre-commit hooks: flake8 and
isort
PreCommit will ensure linting, and the doc creation are run on every commit.
Requirement
pip install --no-cache --upgrade sphinx pre-commit recommonmark
Usage
pre-commit run --all-files
Please refer wiki for API usage, access controls, env variables, features' overview and demo videos.
https://pypi.org/project/jarvis-ironman/
https://thevickypedia.github.io/Jarvis/
© Vignesh Sivanandha Rao
Licensed under the MIT License