Skip to content

Commit fb932a9

Browse files
committed
refactor rsa private key to its own file in gcpiot. add aio name and key to placeholder settings.toml for halloween countdown.
1 parent 06fcc8e commit fb932a9

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

PyPortal/PyPortal_GCP_IOT_Planter/code.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import adafruit_minimqtt.adafruit_minimqtt as MQTT
2525
from adafruit_seesaw.seesaw import Seesaw
2626
import digitalio
27+
from rsa_private_key import private_key
2728

2829
# Get WiFi details, ensure these are setup in settings.toml
2930
ssid = getenv("CIRCUITPY_WIFI_SSID")
@@ -148,7 +149,7 @@ def handle_pump(command):
148149
settings = {
149150
"cloud_region": getenv("cloud_region"),
150151
"device_id": getenv("device_id"),
151-
"private_key": getenv("private_key"),
152+
"private_key": private_key,
152153
"project_id": getenv("project_id"),
153154
"registry_id": getenv("registry_id"),
154155
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# SPDX-FileCopyrightText: 2025 Tim Cocks for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT
4+
5+
# Replace the value with your generated RSA Private Key
6+
private_key = (0, 0, 0, 0, 0)

PyPortal/PyPortal_Halloween_Countdown/settings.toml

+2
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@
77

88
CIRCUITPY_WIFI_SSID="your-wifi-ssid"
99
CIRCUITPY_WIFI_PASSWORD="your-wifi-password"
10+
ADAFRUIT_AIO_USERNAME="my_username"
11+
ADAFRUIT_AIO_KEY="my_key"
1012
timezone="America/New_York" # http://worldtimeapi.org/timezones

0 commit comments

Comments
 (0)