Giter VIP home page Giter VIP logo

spyrk's People

Contributors

axelvoitier avatar renfrjh avatar spapin avatar suda avatar tripzero avatar zxymark221 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spyrk's Issues

Add timeout for requests in case server does not respond

When using Particle Photon/Core for data logging, namely reading I/O pins based on certain interval, sometimes my program just hangs there: no new data reading and also no exception. The reason is because right now in spark_cloud, no timeout is specified for RESTful request.

Pypi has not be published in a while

@AxelVoitier please let me know if this is the correct way to surface this: The spyrk version available from pypi is years old now.

Any plans to release a new version? The current one breaks because the fix from the pull request #6 is missing

Add support for event streams subscription

The particle Api defines stream events that allows the core/photon to push event to subscribers.

Spyrk should be updated to handle the following REST API endpoints:

  • GET /v1/events
  • GET /v1/events/{EVENT_PREFIX}
  • GET /v1/devices/events
  • GET /v1/devices/events/{EVENT_PREFIX}
  • GET /v1/devices/{DEVICE_ID}/events
  • GET /v1/devices/{DEVICE_ID}/events/{EVENT_PREFIX}

Note: {DEVICE_ID} can also be {DEVICE_NAME}

The returned events of these endpoints looks like this:

bash$ curl -H "Authorization: Bearer <put your token>" https://api.spark.io/v1/events
:ok

event: Reading
data: {"data":"9904;0;0","ttl":"60","published_at":"2015-06-03T21:18:42.980Z","coreid":"54ff6d066678574935340167"}

event: settings
data: {"data":"{\"t\":\"1\",\"v\":\"20\",\"t2\":\"1\",\"v2\":\"20\",\"u\":\"F\",\"p\":\"5\"}","ttl":"60","published_at":"2015-06-03T21:18:42.984Z","coreid":"51ff6a065067545732320187"}

event: emergence-event
data: {"data":"0","ttl":"60","published_at":"2015-06-03T21:18:43.189Z","coreid":"53ff70066667574849402167"}

event: tempeature
data: {"data":"C","ttl":"60","published_at":"2015-06-03T21:18:43.191Z","coreid":"53ff6c065075535135071587"}

event: sensors
data: {"data":"b:-3;rb:75;d:0;rd:73;mo:0;m:2032;h:1927;c:2100;l:0","ttl":"60","published_at":"2015-06-03T21:18:43.208Z","coreid":"53ff6a066667574853222067"}

event: tmpInfo
data: {"data":"Temperature: 78.57 Fahrenheit","ttl":"60","published_at":"2015-06-03T21:18:43.271Z","coreid":"53ff6e066667574836061267"}

event: pfarmer/in_temp
data: {"data":"17.77","ttl":"60","published_at":"2015-06-03T21:18:43.311Z","coreid":"53ff6c065067544849371287"}

event: TempF
data: {"data":"78.57","ttl":"60","published_at":"2015-06-03T21:18:43.351Z","coreid":"53ff6a066667574827542567"}

event: status
data: {"data":"{\"pump\":0,\"salt\":0}","ttl":"60","published_at":"2015-06-03T21:18:43.353Z","coreid":"55ff6a064989495333252587"}

event: Pressure
data: {"data":"29.82","ttl":"60","published_at":"2015-06-03T21:18:43.354Z","coreid":"53ff6a066667574827542567"}

event: DEBUG:GET REQUEST URL
data: {"data":"/stest.php?name=humedad&value=42.400002&coreid=55ff6e0666785055","ttl":"60","published_at":"2015-06-03T21:18:43.677Z","coreid":"55ff6e066678505539251367"}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.