Skip to content

Instantly share code, notes, and snippets.

@D1plo1d
Created July 30, 2013 02:09
Show Gist options
  • Save D1plo1d/6109626 to your computer and use it in GitHub Desktop.
Save D1plo1d/6109626 to your computer and use it in GitHub Desktop.
Prontserve 0.3 Output (captured using construct_hello_world.py)
> python2.7 construct_hello_world.py
--- request header ---
GET /socket?user=admin&password=admin HTTP/1.1
Upgrade: websocket
Connection: Upgrade
Host: localhost:8888
Origin: http://localhost:8888
Sec-WebSocket-Key: LR+C4adrS+SkvJuOgSkElQ==
Sec-WebSocket-Version: 13
Sec-WebSocket-Protocol:construct.text.0.3
-----------------------
--- response header ---
HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: ic5PUas0qNU8dS74JPl5ZDeFsgo=
Sec-WebSocket-Protocol: construct.text.0.3
-----------------------
[{"data": {"status": "idle", "f0": {"speed": 255, "enabled": false, "type": "fan"}, "b": {"current_temp": 48.0, "target_temp": 0, "type": "temp", "blocking": false, "target_temp_countdown": null}, "jobs": [], "motors": {"enabled": false}, "sensor_poll_rate": 1000, "pause_between_prints": false, "session_uuid": "dc70888b-2987-467c-8c64-5f3c14789878", "sessions_count": 0, "c0": {"speed": 255, "enabled": false, "type": "conveyor"}, "e0": {"current_temp": 34.0, "target_temp": 0, "type": "temp", "blocking": false, "target_temp_countdown": null}}, "type": "initialized"}]
[{"data": 38.0, "type": "change", "target": ["b", "current_temp"]}]
[{"data": 42.0, "type": "change", "target": ["b", "current_temp"]}]
[{"data": 60.0, "type": "change", "target": ["e0", "current_temp"]}]
[{"data": 43.0, "type": "change", "target": ["b", "current_temp"]}]
[{"data": 58.0, "type": "change", "target": ["e0", "current_temp"]}]
[{"data": 60.0, "type": "change", "target": ["b", "current_temp"]}]
[{"data": 55.0, "type": "change", "target": ["e0", "current_temp"]}]
[{"data": 31.0, "type": "change", "target": ["b", "current_temp"]}]
[{"data": 50.0, "type": "change", "target": ["e0", "current_temp"]}]
[{"data": 58.0, "type": "change", "target": ["b", "current_temp"]}]
[{"data": 42.0, "type": "change", "target": ["e0", "current_temp"]}]
[{"data": 32.0, "type": "change", "target": ["b", "current_temp"]}]
[{"data": 50.0, "type": "change", "target": ["e0", "current_temp"]}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment