Add driver for grid projectors
This commit is contained in:
@@ -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)))
|
||||
|
Reference in New Issue
Block a user