{"id":33167545,"url":"https://github.com/particle-iot/spark-server","last_synced_at":"2025-12-22T21:04:34.078Z","repository":{"id":17833279,"uuid":"20740237","full_name":"particle-iot/spark-server","owner":"particle-iot","description":"UNMAINTAINED - An API compatible open source server for interacting with devices speaking the spark-protocol","archived":true,"fork":false,"pushed_at":"2018-01-03T18:46:45.000Z","size":86,"stargazers_count":442,"open_issues_count":36,"forks_count":135,"subscribers_count":97,"default_branch":"master","last_synced_at":"2025-08-21T03:12:33.889Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.particle.io/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/particle-iot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-11T20:28:57.000Z","updated_at":"2025-03-09T19:34:02.000Z","dependencies_parsed_at":"2022-09-10T21:02:15.124Z","dependency_job_id":null,"html_url":"https://github.com/particle-iot/spark-server","commit_stats":null,"previous_names":["spark/spark-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/particle-iot/spark-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/particle-iot%2Fspark-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/particle-iot%2Fspark-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/particle-iot%2Fspark-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/particle-iot%2Fspark-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/particle-iot","download_url":"https://codeload.github.com/particle-iot/spark-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/particle-iot%2Fspark-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285484486,"owners_count":27179744,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-20T02:00:05.334Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-11-16T00:00:45.513Z","updated_at":"2025-11-20T18:01:02.491Z","avatar_url":"https://github.com/particle-iot.png","language":"JavaScript","funding_links":[],"categories":["Protocol Library"],"sub_categories":["Spark"],"readme":"spark-server\n============\n\nAn API compatible open source server for interacting with devices speaking the [spark-protocol](https://github.com/spark/spark-protocol)\n\n*Photon users:* This application has not been rigorously tested with the Photon. We will be reviewing and testing it shortly, but in the meantime, YMMV. If you do attempt to use the Photon with this library and run into problems, please open an issue.\n\n\u003cpre\u003e\n   __  __            __                 __        __                ____\n  / /_/ /_  ___     / /___  _________ _/ /  _____/ /___  __  ______/ / /\n / __/ __ \\/ _ \\   / / __ \\/ ___/ __ `/ /  / ___/ / __ \\/ / / / __  / /\n/ /_/ / / /  __/  / / /_/ / /__/ /_/ / /  / /__/ / /_/ / /_/ / /_/ /_/\n\\__/_/ /_/\\___/  /_/\\____/\\___/\\__,_/_/   \\___/_/\\____/\\__,_/\\__,_(_)\n\u003c/pre\u003e\n\n\nQuick Install\n==============\n\n```\ngit clone https://github.com/spark/spark-server.git\ncd spark-server\nnpm install\nnode main.js\n```\n\n[Raspberry pi Quick Install](doc/raspberryPi.md)\n\n\nHow do I get started?\n=====================\n\n1.) Run the server with:\n\n```\nnode main.js\n```\n\n2.) Watch for your IP address, you'll see something like:\n\n```\nYour server IP address is: 192.168.1.10\n```\n\n\n3.) Load your server public key and IP address onto your cores with the [Spark-CLI](https://github.com/spark/spark-cli)\n\nFirst, put your Core in DFU mode by holding the MODE and RESET buttons on the Core, then releasing RESET while continuing to hold MODE for 3 seconds until the LED starts blinking yellow.\n\n```\nspark keys server default_key.pub.pem 192.168.1.10\n```\n\nNote!  The CLI will turn your PEM file into a DER file, but you can also do that yourself with the command:\n```\n\t\topenssl rsa -in  default_key.pem -pubin -pubout -outform DER -out default_key.der\n```\n\n4.) Edit your Spark-CLI config file to point at your Spark-server.  Open ~/.spark/spark.config.json in your favorite text editor, and add:\n\n```\n{\n\t\"apiUrl\": \"http://192.168.1.10:8080\"\n}\n```\nFor beginners: note that you have to add in a `,` at the end of the previous line\n\n\n5.) Put your core into listening mode, and run `spark identify` to get your core id.\n\n6.) Create a user and login with the Spark-CLI\n\n```\n\tspark setup\n```\n\n7.) Create and provision access on your local cloud with the keys doctor:\n\n```\n\t spark keys doctor your_core_id\n```\n\n\n7.) See your connected cores!\n\n```\n\tspark list\n```\n\n\nWhat kind of project is this?\n======================================\n\nWe're open sourcing our core Spark-protocol code to help you build awesome stuff with your Spark Core, and with your\nother projects.  We're also open sourcing an example server with the same easy to use Rest API as the Spark Cloud, so\nyour local apps can easily run against both the Spark Cloud, and your local cloud.  We're really excited about this,\nand we have tried to build an open, stable, and powerful platform, and hand it over to you, the community.\n\nThis project is our way of making sure you can change and see into every aspect of your Spark Core, yay!\nWe'll keep improving and adding features, and we hope you'll want to join in too!\n\n\nWhat features are currently present\n====================================\n\nThe spark-server module aims to provide a HTTP rest interface that is API compatible with the main Spark Cloud.  Ideally any\nprograms you write to run against the Spark Cloud should also work on the Local Cloud.  Some features aren't here yet, but may be\ncoming down the road, right now the endpoints exposed are:\n\nList devices\n\n`GET /v1/devices`\n\nCall function\n\n`POST /v1/devices/:coreid/:func`\n\nGet variable\n\n`GET /v1/devices/:coreid/:var`\n\nGet Core attributes\n\n`GET /v1/devices/:coreid`\n\nSet Core attributes (and flash a core)\n\n`PUT /v1/devices/:coreid`\n\nGet all Events\n\n```\n GET /v1/events\n GET /v1/events/:event_name\n```\n\n\n\nGet all my Events\n\n```\n GET /v1/devices/events\n GET /v1/devices/events/:event_name\n```\n\nGet all my Core's Events\n\n```\n GET /v1/devices/:coreid/events\n GET /v1/devices/:coreid/events/:event_name\n```\n\nPublish an event\n\n`POST /v1/devices/events`\n\nWhat features will be added soon?\n====================================\n\n- Release a Core\n\t\tDELETE /v1/devices/:coreid\n\n- Claim a core\n\t\tPOST /v1/devices\n\n- per-user / per-core ownership and access restrictions.  Right now ANY user on your local cloud can access ANY device.\n\n- remote compiling, however flashing a binary will still work\n\n\nWhat API features are missing\n================================\n\n\t- the build IDE is not part of this release, but may be released separately later\n\t- massive enterprise magic super horizontal scaling powers\n\n\nKnown Limitations\n==================\n\nWe worked hard to make our cloud services scalable and awesome, but that also presents a burden for new users.  This release was designed to be easy to use, to understand, and to maintain, and not to discourage anyone who is new to running a server.  This means some of the fancy stuff isn't here yet, but don't despair, we'll keep improving this project, and we hope you'll use it to build awesome things.\n\n\nWhat features are coming\n========================\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparticle-iot%2Fspark-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparticle-iot%2Fspark-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparticle-iot%2Fspark-server/lists"}