Beispiel #1
0
def ccs_init():

    if not find_tristar():
        return

    # Reset the amp hours
    reset_amphours()
    
    # Register the SNMP handler
    @registerDynamicOID(CRCNET_TRISTAR45_MIB)
    def wrapper(o, g): 
        try:
            return solarsnmp(o,g)
        except:
            log_error("Unexpected error handling solarsnmp!", sys.exc_info())
            return None

    # Add a menu entry
    registerMenuItem(MENU_TOP, MENU_GROUP_GENERAL, \
                    "/status/solar", "Solar Controller Status")
Beispiel #2
0
def ccs_init():
    
    registerMenuItem(MENU_TOP, MENU_GROUP_GENERAL, \
            "/admin", "CPE Administration")