hi all,
i'm trying to get a complete configuration via evok ws/json.
but im kinda confused. doc says:
- 1Wire Device model
- Analog Input state model
- Analog Output state model
- Input state model
- Relay state model
- Register state model
- Neuron state model
- UART state model
- ULED state model
- Watchdog state model
- WiFi state model (if enabled)
but all i get is inputs and relays:
import websocket
import json
import logging
logging.basicConfig()
url = "ws://drhouse:3080/ws"
def on_message(ws, message):
obj = json.loads(message)
for single_obj in obj:
dev = single_obj['dev']
circuit = single_obj['circuit']
value = single_obj['value']
print "Device: " + str(dev) + " / Circuit: " + str(circuit) + " / Value: " + str(value)
# print json.dumps(obj, indent=2, sort_keys=True)
def on_error(ws, error):
print error
def on_close(ws):
print "Connection closed"
def on_open(ws):
ws.send(json.dumps({"cmd":"all"}))
#receiving messages
ws = websocket.WebSocketApp(url, on_open = on_open, on_message = on_message, on_error = on_error, on_close = on_close)
ws.run_forever()
tja@drHouse:~ $ python testGetAll.py > testGetAll.out
^Ctja@drHouse:~ cat testGetAll.out ut
Device: input / Circuit: UART_1_2_05 / Value: 0
Device: input / Circuit: UART_1_2_18 / Value: 0
Device: input / Circuit: UART_1_2_16 / Value: 0
Device: input / Circuit: 1_01 / Value: 0
Device: input / Circuit: 1_02 / Value: 0
Device: input / Circuit: 1_03 / Value: 0
Device: input / Circuit: 1_04 / Value: 0
Device: input / Circuit: UART_1_2_13 / Value: 0
Device: input / Circuit: UART_1_2_10 / Value: 0
Device: input / Circuit: UART_1_2_11 / Value: 0
Device: input / Circuit: UART_1_2_06 / Value: 0
Device: input / Circuit: UART_1_2_12 / Value: 0
Device: input / Circuit: UART_1_2_15 / Value: 0
Device: input / Circuit: UART_2_3_07 / Value: 0
Device: input / Circuit: UART_2_3_06 / Value: 0
Device: input / Circuit: UART_2_3_05 / Value: 0
Device: input / Circuit: UART_2_3_04 / Value: 0
Device: input / Circuit: UART_2_3_03 / Value: 0
Device: input / Circuit: UART_2_3_02 / Value: 0
Device: input / Circuit: UART_2_3_01 / Value: 0
Device: input / Circuit: UART_2_3_09 / Value: 0
Device: input / Circuit: UART_2_3_08 / Value: 0
Device: input / Circuit: UART_1_2_01 / Value: 0
Device: input / Circuit: UART_1_2_17 / Value: 0
Device: input / Circuit: UART_1_2_03 / Value: 0
Device: input / Circuit: UART_1_2_09 / Value: 0
Device: input / Circuit: UART_1_2_08 / Value: 0
Device: input / Circuit: UART_1_2_02 / Value: 0
Device: input / Circuit: 2_12 / Value: 0
Device: input / Circuit: 2_13 / Value: 0
Device: input / Circuit: 2_10 / Value: 0
Device: input / Circuit: 2_11 / Value: 0
Device: input / Circuit: 2_16 / Value: 0
Device: input / Circuit: UART_1_2_04 / Value: 0
Device: input / Circuit: 2_14 / Value: 0
Device: input / Circuit: 2_15 / Value: 0
Device: input / Circuit: UART_3_4_08 / Value: 0
Device: input / Circuit: UART_1_2_07 / Value: 0
Device: input / Circuit: UART_1_2_14 / Value: 0
Device: input / Circuit: UART_3_4_01 / Value: 0
Device: input / Circuit: UART_3_4_03 / Value: 0
Device: input / Circuit: UART_3_4_02 / Value: 0
Device: input / Circuit: UART_3_4_05 / Value: 0
Device: input / Circuit: UART_3_4_04 / Value: 0
Device: input / Circuit: UART_3_4_07 / Value: 0
Device: input / Circuit: UART_3_4_06 / Value: 0
Device: input / Circuit: UART_2_3_14 / Value: 0
Device: input / Circuit: UART_2_3_15 / Value: 0
Device: input / Circuit: UART_2_3_16 / Value: 0
Device: input / Circuit: UART_2_3_17 / Value: 0
Device: input / Circuit: UART_2_3_10 / Value: 0
Device: input / Circuit: UART_2_3_11 / Value: 0
Device: input / Circuit: UART_2_3_12 / Value: 0
Device: input / Circuit: UART_2_3_13 / Value: 0
Device: input / Circuit: UART_2_3_18 / Value: 0
Device: input / Circuit: 2_05 / Value: 0
Device: input / Circuit: 2_04 / Value: 0
Device: input / Circuit: 2_07 / Value: 0
Device: input / Circuit: 2_06 / Value: 0
Device: input / Circuit: 2_01 / Value: 0
Device: input / Circuit: 2_03 / Value: 0
Device: input / Circuit: 2_02 / Value: 0
Device: input / Circuit: 2_09 / Value: 0
Device: input / Circuit: 2_08 / Value: 0
Device: relay / Circuit: 1_01 / Value: 0
Device: relay / Circuit: 1_02 / Value: 0
Device: relay / Circuit: 1_03 / Value: 0
Device: relay / Circuit: 1_04 / Value: 0
Device: relay / Circuit: UART_3_4_14 / Value: 0
Device: relay / Circuit: UART_3_4_12 / Value: 0
Device: relay / Circuit: UART_3_4_13 / Value: 0
Device: relay / Circuit: UART_3_4_10 / Value: 0
Device: relay / Circuit: UART_3_4_11 / Value: 0
Device: relay / Circuit: 2_12 / Value: 0
Device: relay / Circuit: 2_13 / Value: 0
Device: relay / Circuit: 2_10 / Value: 0
Device: relay / Circuit: 2_11 / Value: 0
Device: relay / Circuit: 2_14 / Value: 0
Device: relay / Circuit: UART_3_4_09 / Value: 0
Device: relay / Circuit: UART_3_4_08 / Value: 0
Device: relay / Circuit: UART_3_4_01 / Value: 0
Device: relay / Circuit: UART_3_4_03 / Value: 0
Device: relay / Circuit: UART_3_4_02 / Value: 0
Device: relay / Circuit: UART_3_4_05 / Value: 0
Device: relay / Circuit: UART_3_4_04 / Value: 0
Device: relay / Circuit: UART_3_4_07 / Value: 0
Device: relay / Circuit: UART_3_4_06 / Value: 0
Device: relay / Circuit: 2_05 / Value: 0
Device: relay / Circuit: 2_04 / Value: 0
Device: relay / Circuit: 2_07 / Value: 0
Device: relay / Circuit: 2_06 / Value: 0
Device: relay / Circuit: 2_01 / Value: 0
Device: relay / Circuit: 2_03 / Value: 0
Device: relay / Circuit: 2_02 / Value: 0
Device: relay / Circuit: 2_09 / Value: 0
Device: relay / Circuit: 2_08 / Value: 0
Device: ai / Circuit: 1_01 / Value: 0.0619234416178
Device: ao / Circuit: 1_01 / Value: 0.0023
Device: wd / Circuit: 1_01 / Value: 0
Device: wd / Circuit: 1_01 / Value: 0
Connection closed