Add driver for grid projectors

This commit is contained in:
Tanner Collin 2021-03-07 17:24:46 -07:00
parent c3d83be3c4
commit 2c0c838bdb

View File

@ -19,6 +19,12 @@ def lights_on():
def lights_off():
np_02B_api(settings.LIGHT_IP, settings.LIGHT_USER, settings.LIGHT_PASS, False)
def grid_on():
np_02B_api(settings.GRID_IP, settings.GRID_USER, settings.GRID_PASS, True)
def grid_off():
np_02B_api(settings.GRID_IP, settings.GRID_USER, settings.GRID_PASS, False)
if __name__ == '__main__':
try:
@ -32,3 +38,15 @@ if __name__ == '__main__':
lights_off()
except BaseException as e:
logging.error('Problem with lights: {} - {}'.format(e.__class__.__name__, str(e)))
try:
print('Turning grid on...')
grid_on()
print('Waiting three seconds...')
time.sleep(3)
print('Turning grid off...')
grid_off()
except BaseException as e:
logging.error('Problem with grid: {} - {}'.format(e.__class__.__name__, str(e)))