diff --git a/app/mifit_to_influxdb.py b/app/mifit_to_influxdb.py
--- a/app/mifit_to_influxdb.py
+++ b/app/mifit_to_influxdb.py
#
# pip install influxdb-client
#
from influxdb_client import InfluxDBClient, Point
#
-from influxdb_client.client.write_api import SYNCHRONOUS
#
@@ -340,11 +338,15 @@ if __name__== "__main__":
#
# How many days data should we request from the API?
#
QUERY_DURATION = int(os.getenv("QUERY_DURATION", 2))
#
- parser = argparse.ArgumentParser()
#
- parser.add_argument("--email",required=True,help="email address for login")
#
- parser.add_argument("--password",required=True,help="password for login")
#
- args=parser.parse_args()
#
- auth_info=mifit_auth_email(args.email,args.password)
#
+ # Get the Zepp credentials
#
+ ZEPP_EMAIL = os.getenv("ZEPP_EMAIL", False)
#
+ ZEPP_PASS = os.getenv("ZEPP_PASS", False)
#
+ if not ZEPP_EMAIL or not ZEPP_PASS:
#
+ print("Error: Credentials not provided")
#
+ auth_info=mifit_auth_email(ZEPP_EMAIL, ZEPP_PASS)
#
result_set, serial = get_band_data(auth_info, QUERY_DURATION)
#
write_results(result_set, serial)