Beispiel #1
0
def create():
    """Create virtual representations of all our local stuff"""
    global l_boiler

    l_boiler = Node.create(L_BOILER_NODE)
    b = l_boiler.createPoint(L_ON)  # FEED
    b.advertise()  # FEED
    return l_boiler
Beispiel #2
0
def create():
	"""Create virtual representations of all our local stuff"""
	global l_boiler
	
	l_boiler = Node.create(L_BOILER_NODE)
	b = l_boiler.createPoint(L_ON) # FEED
	b.advertise() # FEED
	return l_boiler
Beispiel #3
0
def restore():
	"""Restore connectivity on start or restart, route to callbacks"""
	global l_boiler, r_outside_temp, l_on, loopback_on
	
	l_boiler       = Node.restore(L_BOILER_NODE)
	l_on           = l_boiler.routePoint(Point.LOCAL, L_ON)
	r_outside_temp = l_boiler.routePoint(Point.REMOTE, R_OUTSIDE_TEMP, nodeName=R_GARDEN_NODE, receive=temp_update) #update
	loopback_on    = l_boiler.routePoint(Point.REMOTE, L_ON, nodeName=L_BOILER_NODE, receive=loopback_on) #update
	return l_boiler
Beispiel #4
0
def create():
    """Create virtual representations of all our local stuff"""
    global l_garden

    l_garden = Node.create(L_GARDEN_NODE)
    t = l_garden.createPoint(L_OUTSIDE_TEMP)  # FEED
    t.advertise()  # FEED

    d = l_garden.createPoint(L_CAT_DETECTOR)  # FEED
    d.advertise()  # FEED
    return l_garden
Beispiel #5
0
def restore():
	"""Restore connectivity on start or restart, route to callbacks"""
	global l_garden, l_outside_temp, l_cat_detector, r_catflap
	
	l_garden = Node.restore(L_GARDEN_NODE)

	l_outside_temp = l_garden.routePoint(Point.LOCAL, L_OUTSIDE_TEMP)
	l_cat_detector = l_garden.routePoint(Point.LOCAL, L_CAT_DETECTOR)
	r_catflap      = l_garden.routePoint(Point.REMOTE, R_CATFLAP, nodeName=R_HOUSE_NODE)

	return l_garden
Beispiel #6
0
def create():
	"""Create virtual representations of all our local stuff"""
	global l_garden
	
	l_garden = Node.create(L_GARDEN_NODE)
	t = l_garden.createPoint(L_OUTSIDE_TEMP) # FEED
	t.advertise() # FEED
	
	d = l_garden.createPoint(L_CAT_DETECTOR) # FEED
	d.advertise() # FEED
	return l_garden
Beispiel #7
0
def restore():
    """Restore connectivity on start or restart, route to callbacks"""
    global l_garden, l_outside_temp, l_cat_detector, r_catflap

    l_garden = Node.restore(L_GARDEN_NODE)

    l_outside_temp = l_garden.routePoint(Point.LOCAL, L_OUTSIDE_TEMP)
    l_cat_detector = l_garden.routePoint(Point.LOCAL, L_CAT_DETECTOR)
    r_catflap = l_garden.routePoint(Point.REMOTE,
                                    R_CATFLAP,
                                    nodeName=R_HOUSE_NODE)

    return l_garden
Beispiel #8
0
def restore():
    """Restore connectivity on start or restart, route to callbacks"""
    global l_boiler, r_outside_temp, l_on, loopback_on

    l_boiler = Node.restore(L_BOILER_NODE)
    l_on = l_boiler.routePoint(Point.LOCAL, L_ON)
    r_outside_temp = l_boiler.routePoint(Point.REMOTE,
                                         R_OUTSIDE_TEMP,
                                         nodeName=R_GARDEN_NODE,
                                         receive=temp_update)  #update
    loopback_on = l_boiler.routePoint(Point.REMOTE,
                                      L_ON,
                                      nodeName=L_BOILER_NODE,
                                      receive=loopback_on)  #update
    return l_boiler