Ejemplo n.º 1
0
def clear(id):
    """
    Clear curtail given ID in URL 
    Note id will be parsed to extract a group of stations if specified
    or a station, or a port on a station
    """
   
    res = cp.clear_shed(id)
    if (res['responseCode'] == SUCCESS):
        return "Successful: Clear on " + id 
    else:
        logging.error("Error: Clear shed id: " + id + " " + res['responseText'])
        return res['responseText'] 
Ejemplo n.º 2
0
from classes.charge_session import ChargeSession
from classes.full_port import FullPort
import constants
import cp
from util import get_ENV_val

sgID = get_ENV_val("sgID")
stationID = get_ENV_val("stationID")
portID = get_ENV_val("portID")

res0 = cp.get_load(sgID)

spID = FullPort(None, stationID, portID).ID
# Experimental phase, to not affect live users, cap at 6.6
res1 = cp.shed_load(spID, absolute_amount=6.6, time_interval=10)
print("Sleeping .. a  bit for shed_load to take effect")
time.sleep(15)
LOAD2 = cp.get_load(spID)

res2 = cp.clear_shed(spID)
print(res2)
print("Sleeping .. a  bit for clear_shed to take effect")
time.sleep(15)
res3 = cp.get_load(spID)
print("Sleeping .. a  bit for clear_shed for station_group")
time.sleep(10)
res4 = cp.clear_shed(sgID)
print(res4)
res5 = cp.get_load(spID)
print(res5)