-
Notifications
You must be signed in to change notification settings - Fork 0
License
MyOctopus/myoctopus-data
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Read data from sensors. The application uses Python's asyncio framework and integrates with Tornado to allow other applications to get data with Server-Sent Event messages. Dependencies - Python 3.4 - Tornado - h5py - TAWF: get from https://bitbucket.org/wrobell/tawf - n23: get from https://bitbucket.org/wrobell/n23 - myoctopus-dashboard: get from https://github.com/MyOctopus/myoctopus-data cd myoctopus-data PYTHONPATH=.:../tawf:../n23 python3 bin/mocto-data -v -w ../myoctopus-dashboard/ -c mocto::data --replay 20151010-1245-humidity-light.hdf Try the data stream over HTTP:: $ curl http://localhost:8090/data event: message data: {"name": "light", "counter": 1, "time": 1447091809.00141, "value": 1315962.875} event: message data: {"name": "humidity", "counter": 1, "time": 1447091809.00141, "value": 26.715087890625} event: message data: {"name": "light", "counter": 2, "time": 1447091810.0017693, "value": 1315635.25} event: message data: {"name": "humidity", "counter": 2, "time": 1447091810.0017693, "value": 26.715087890625} Try the data stream using Redis:: $ redis-cli 127.0.0.1:6379> subscribe mocto::data Reading messages... (press Ctrl-C to quit) 1) "subscribe" 2) "mocto::data" 3) (integer) 1 1) "message" 2) "mocto::data" 3) "{\"name\": \"humidity\", \"counter\": 6, \"time\": 1447497288.0016613, \"value\": 26.812744140625}" 1) "message" 2) "mocto::data" 3) "{\"name\": \"light\", \"counter\": 6, \"time\": 1447497288.0016613, \"value\": 1318912.0}" 1) "message" 2) "mocto::data" 3) "{\"name\": \"light\", \"counter\": 7, \"time\": 1447497289.0016828, \"value\": 1316945.875}" 1) "message" 2) "mocto::data" 3) "{\"name\": \"humidity\", \"counter\": 7, \"time\": 1447497289.0016828, \"value\": 26.715087890625}" Try the dashboard http://localhost:8090/dashboard.html
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published