Espec North America Examples of Web Controller rest api usage for SEL

Created by Myles Metzler
Some basic examples using Espec North America's web controller RESTful API

requires the requests library:
import requests, json, time

def pprint(data):
    print(json.dumps(data, sort_keys=True, indent=4))

uri = ''
headers = {'Content-type': 'application/json'}

# 1) Turn on the environmental chamber.
print('\n\nRun constant mode:')
pprint( + '/operations/constant').json())

# 2) Turn on humidity control.
data = [
    {'controller':1, 'N':2, 'enable':True}  #Humidity
pprint( + '/loops', data=json.dumps(data), headers=headers).json())

# 3/4) Set the temperature/humidity set point
data = [
    {'controller':1, 'N':1, 'enable':True, 'setValue':45}, #Temperature
    {'controller':1, 'N':2, 'enable':True, 'setValue':55}  #Humidity
pprint( + '/loops', data=json.dumps(data), headers=headers).json())

# 5/6) Read the temperature/humidity
print('Get control loop status')
pprint(requests.get(uri + '/loops').json())

# 7) Turn off the chamber.
print('\n\nStop operation for 10 seconds:')
pprint( + '/operations/standby').json())

Comments (3)

  1. Linda Melson!hfkaj`&encoded=1&redirect=;redirect=[seite]= http://скачивалка.рф/dw/?url=$c&u= http://примгеодезия.рф/?goto= http://мотомагазин.net/forum/away.php?s=|el-3|es-2|cy-1|pt-0&ind1=9897&lang=1&p=pt-43|cy-51|es-44|el-58|ie-60&url=[392]:: Okey Oyna Padlet metin2 pvp serverler Padlet blogamca padlet blogamca padlet blogamca padlet blogamca padlet blogamca padlet metin2 blogamcaa blogamcaa blogamcaa blogamcaa blogamcaa blogamcaa blogamcaa blogamcaa

  2. Linda Melson

    PROFİL BACKLİNK LİST BACKLİNK LİST 2 BACKLİNK LİST 3 zafer2 blog okey zafer2;URL=^E4X&URL=¤t=,TFvar,00319d4f-d81c-4818-81b1-a8413dc614e6,TFvar,GYDH-Y363-YCFJ-DFGH-5R6H,TFvar, http://www.мфц{0}&sno={1}&link=;redirect=

  3. Linda Melson***2&url=[93]+[right_bottom_bottom_1_180]+%D0%BF%D0%B8%D0%B2%D0%BE+%D1%81%D0%BE%D1%87%D0%B8+2017&goto=