1
0
Fork 0
Browse Source

add call to get device Id.

Adds a line of code which gets and stores the device's Id. Which is then used to determine which URL to use for the RESTAPI.
unstable
Craig Oates 3 years ago
parent
commit
37843eb3b5
  1. 2
      relay.py

2
relay.py

@ -9,6 +9,8 @@ relay_pin = 11
GPIO.setmode(GPIO.BOARD)
GPIO.setup(relay_pin, GPIO.OUT)
device_id = platform.node() # For servers logs.
def get_api_url():
# Yes, I know I could do this better. Stop moaning.
if (device_id == "gallery1"):