Skip to content

Instantly share code, notes, and snippets.

View nodel_example_functions.py
# These functions create Actions, Events, and Parameters based the provided
# name and metadata.
def create_local_event(name, metadata=None)
def create_local_action(name, handler, metadata=None)
def create_remote_action(name, metadata=None, suggestedNode=None, suggestedAction=None)
def create_remote_event(name, handler, metadata=None, suggestedNode=None, suggestedEvent=None)
def Parameter(schemaDictOrJSONorTitle = None)
# These functions look for existing Actions, Events, and Parameters based on a
# string name. They return None if the Action/Event/Parameter could not be
@DaleGia
DaleGia / nodel_remote_action_control_example.csv
Created Mar 10, 2019
Node requirements for Remote Action control implementation
View nodel_remote_action_control_example.csv
Node 1 Management Node 2 TV Node 3 DVD
Local Action: TurnOn Local Action: TurnOn Local Action: TurnOn
Remote Action: Node2TV: TurnOn Local Event: TvStatus Local Event: DvdStatus
Remote Action: Node3DVD: TurnOn
Local Event: ManagementStatus
Local Event: TvStatus
Local Event: DvdStatus
Remote Event: Node2TV: TvStatus
Remote Event: Node3DVD: DvdStatus
@DaleGia
DaleGia / nodel_remote_event_control_example.csv
Created Mar 10, 2019
Node requirements for Remote Event control implementation
View nodel_remote_event_control_example.csv
Node 1 Management Node 2 TV Node 3 DVD
Local Action: TurnOn Local Action: TurnOn Local Action: TurnOn
Local Event: Node2TvTurnOn Remote Event: Node1Management: Node2TvTurnOn Remote Event: Node1Management: Node3DvdTurnOn
Local Event: Node3DvdTurnOn Local Event: TvStatus Local Event: DvdStatus
Local Event: ManagementStatus
Local Event: TvStatus
Local Event: DvdStatus
Remote Event: Node2TV: TvStatus
Remote Event: Node3DVD: DvdStatus
@DaleGia
DaleGia / node2Tv_example.py
Created Mar 10, 2019
Node2Tv Device Node example
View node2Tv_example.py
# Only required for placeholder status function
import random
def TurnOn(arg = None):
print("Turning Tv On")
print("Turning Tv On function not yet implemented. Doing nothing...")
UpdateStatus();
def UpdateStatus(arg = None):
print('TV Status: Status requested')
@DaleGia
DaleGia / Node3Dvd_example.py
Created Mar 10, 2019
Node3Dvd Device Node example
View Node3Dvd_example.py
# Only required for placeholder status function
import random
def TurnOn(arg = None):
print("Turning Dvd On")
print("Turning Dvd On function not yet implemented. Doing nothing...")
UpdateStatus();
def UpdateStatus(arg = None):
print('Dvd Status: Status requested')
@DaleGia
DaleGia / Node1Management_example.py
Created Mar 10, 2019
Node1Management Management Node Example
View Node1Management_example.py
def TurnOn(arg = None):
print("Turning Tv and DVD On")
lookup_remote_action("Node2TvTurnOn").call()
lookup_remote_action("Node3DvdTurnOn").call()
def UpdateStatus(message):
print('Management Status: Status requested')
tvMessage = lookup_remote_event("TvStatus").getArg().get('message')
dvdMessage = lookup_remote_event("DvdStatus").getArg().get('message')
aggregateMessage = "TvStatus: " + tvMessage + ' - ' + "DvdStatus: " + dvdMessage
@DaleGia
DaleGia / parameters_example.py
Created Mar 10, 2019
Example of Parameters in Nodel
View parameters_example.py
param_parameterRequiredString = Parameter({'title': 'Parameter Required String Example', 'schema':
{'type':'string', 'required': True}
})
param_parameterNotRequiredString = Parameter({'title': 'Parameter Not Required String Example', 'schema':
{'type':'string', 'required': False}
})
param_parameterInteger = Parameter({'title': 'Parameter Integer Example', 'schema':
{'type':'integer', 'required': False}
})
@DaleGia
DaleGia / management_node_recipe_example.py
Created Mar 10, 2019
Management Node Recipe example
View management_node_recipe_example.py
def TurnOn(arg = None):
print("Turning on Nodes")
for parameters in lookup_parameter('members') or []:
if(parameters != None):
targetNode = parameters.get('targetNode')
remoteActionName = parameters.get('targetActionName')
lookup_remote_action(targetNode + remoteActionName).call()
def UpdateStatus(message):
print('Management Status: Status requested')
aggregateMessage = ''
View cleverman_table.csv
SPACE/EXIBITION NAME CODE DEVICE PLAYBACK DEVICE CONTROL IP ADDRESS
Cleverman The Lab Master 1 CM-001 BrightSign LS442 CAT6 XXX.XXX.XXX.XXX
Cleverman The Lab Slave 2 CM-002 BrightSign LS442 CAT6 XXX.XXX.XXX.XXX
Cleverman The Lab Slave 3 CM-003 BrightSign LS442 CAT6 XXX.XXX.XXX.XXX
Cleverman The Lab Slave 4 CM-004 BrightSign LS442 CAT6 XXX.XXX.XXX.XXX
Cleverman The Lab Slave 5 CM-005 BrightSign LS442 CAT6 XXX.XXX.XXX.XXX
Cleverman The Lab 6 CM-007 BrightSign HD1023 CAT6 XXX.XXX.XXX.XXX
Cleverman The Lab 7 CM-008 BrightSign HD1023 CAT6 XXX.XXX.XXX.XXX
Cleverman Koen/Blue Blast CM-006 BrightSign LS442 CAT6 XXX.XXX.XXX.XXX
Cleverman The Zone 32 CM-009 BrightSign HD1023 CAT6 XXX.XXX.XXX.XXX
View cleverman_control_requirements_list.csv
Control Description Control Group Name Control Name
Audio Mute Audio MUTE
Audio Unmute Audio UNMUTE
Audio Volume Down 5% Audio VOLDOWN
Audio Volume Up 5% Audio VOLUP
Content Pause Content PAUSE
Content Resume Content RESUME
Display Off Display OFF
Display On Display On
Power Off Power POWEROFF
You can’t perform that action at this time.