1
0
Fork 0
Browse Source

fix device name checks.

The device/host names for the devices running this program should be using 'galleryX' ('X' denotes the device number). I put 'factory' instead of gallery because I'm an idiot. 'factory' are the device names for the Light Meter project.
unstable
Craig Oates 3 years ago
parent
commit
eceb05ff55
  1. 4
      relay.py

4
relay.py

@ -11,9 +11,9 @@ GPIO.setup(relay_pin, GPIO.OUT)
def get_api_url():
# Yes, I know I could do this better. Stop moaning.
if (device_id == "factory1"):
if (device_id == "gallery1"):
return "http://ritherdon.abbether.net/api/readings/add/1"
elif (device_id == "factory2"):
elif (device_id == "gallery2"):
return "http://ritherdon.abbether.net/api/readings/add/2"
# Make sure this is valid.