From 37843eb3b56441112feea8520fd6de58513d023c Mon Sep 17 00:00:00 2001 From: Craig Oates Date: Fri, 8 Jan 2021 19:53:14 +0000 Subject: [PATCH] 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. --- relay.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/relay.py b/relay.py index 35fc5ad..377cc1b 100644 --- a/relay.py +++ b/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"):