Difference between revisions of "SpaceAPI"
(testing) |
(major update on spaceAPI (most of the source is online), lots of the todos are done. Compiled a list of spaceAPI systems, added all github links) |
||
Line 2: | Line 2: | ||
|State=Active | |State=Active | ||
|Members=Vicarious, CoolePascal, Prodigity, Da Syntax, xopr | |Members=Vicarious, CoolePascal, Prodigity, Da Syntax, xopr | ||
− | |GitHub= | + | |GitHub=spaceAPI |
|Description=HackerSpace Status API | |Description=HackerSpace Status API | ||
}} | }} | ||
− | See [https:// | + | == synopsis == |
+ | Expose hackerspace information via a <abbr title="JavaScript Object Notation">JSON</abbr> structure. | ||
+ | See [https://spaceapi.net/ spaceapi.net] for details. | ||
== current version == | == current version == | ||
− | [[user:Da_Syntax|Da Syntax]] and [[User:Xopr|xopr]] | + | The current backend has been made modular for easy maintenance and feature expansion. |
+ | The first implemented expansion is temperature sensors. | ||
+ | |||
+ | Most of the latest implementation has been done by [[user:Da_Syntax|Da Syntax]] and [[User:Xopr|xopr]] (ask them for details). | ||
Currently, both the new and old system are running in parallel, but some things need to be done before deprecating the old system. | Currently, both the new and old system are running in parallel, but some things need to be done before deprecating the old system. | ||
− | * Update the [http://ackspace.nl/spacestate.php status page] | + | * Update the [http://ackspace.nl/spacestate.php status page] 'widget' which is used on [http://hackerspaces.nl/ hackerspaces.nl] |
− | * Update the places where [https://ackspace.nl/status.php ackspace.nl/status.php] is used | + | * Update the places where [https://ackspace.nl/status.php ackspace.nl/status.php] is used, most likely via [https://spaceapi.net/ spaceapi.net] |
− | + | Several systems are tied to the backend: | |
− | |||
− | + | {| class="wikitable" | |
+ | ! inputs | ||
+ | ! category | ||
+ | ! | ||
+ | ! outputs | ||
+ | ! category | ||
+ | |- | ||
+ | | [[Space state]] (switch) | ||
+ | | hardware | ||
+ | | | ||
+ | | [[Telephone_system:Space_state|Space state (telephone system)]] | ||
+ | | software | ||
+ | |- | ||
+ | | [[ESP8266-SpaceState]] | ||
+ | | hardware, firmware | ||
+ | | | ||
+ | | [[Spacestate indicator]] <abbr title="incomplete">/!\</abbr> | ||
+ | | hardware, firmware | ||
+ | |- | ||
+ | | [[Spacestate sensors]] <abbr title="incomplete">/!\</abbr> | ||
+ | | hardware, firmware | ||
+ | | | ||
+ | | [[Mobile Spacestate Indicator]] | ||
+ | | hardware, firmware, software | ||
+ | |- | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | [[IRC ACKspace-statusbot]] | ||
+ | | software | ||
+ | |- | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | [[SpaceAPIBot]] ([https://telegram.org Telegram]) | ||
+ | | software | ||
+ | |- | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | | Pebble watch app <abbr title="status: unknown">/!\</abbr> | ||
+ | | software | ||
+ | |} | ||
− | + | Affiliated github repositories: | |
− | + | * [[GitHub::https://github.com/ACKspace/spaceAPI|spaceAPI]]: backend | |
+ | * [[GitHub::https://github.com/ACKspace/SpaceAPIBot|SpaceAPIBot]]: Telegram bot output | ||
+ | * [[GitHub::https://github.com/ACKspace/esp8266-SpaceAPI|esp8266-SpaceAPI]]: modular implementation on [[ESP8266]] (input/output) | ||
− | + | Deprecated implementations: | |
− | + | * [[ESP8266-DS18S20]]: old sensor implementation (pull mechanism) | |
− | + | === todo === | |
+ | * upload database model | ||
+ | * update the [[ESP8266-DS18S20|Dallas temperature probe]] and [[ESP8266-SpaceState|space state]] firmware ([https://github.com/ACKspace/esp8266-SpaceAPI esp8266-SpaceAPI Github repo]) | ||
=== done === | === done === | ||
Line 31: | Line 81: | ||
* new php code online (currently running parallel with the old version) | * new php code online (currently running parallel with the old version) | ||
* created new [[ESP8266-SpaceState|space state]] hardware interface using the [[ESP8266]] which connects to the same old [[space state|switch]] | * created new [[ESP8266-SpaceState|space state]] hardware interface using the [[ESP8266]] which connects to the same old [[space state|switch]] | ||
− | * <s>First draft after recovery [[Media:esp8266-SpaceAPI-full.tar|esp8266-SpaceAPI-full.tar]]</s> Note that the used | + | * <s>First draft after recovery [[Media:esp8266-SpaceAPI-full.tar|esp8266-SpaceAPI-full.tar]]</s> Note that the used JSON parser library will cause heap corruption. |
− | + | * front page widget is now a real widget | |
− | + | * php backend source online | |
− | |||
− | |||
− | |||
− | * | ||
== old version == | == old version == | ||
− | |||
* Updated JSON object to become SpaceAPI 0.13 compliant (see status.php) | * Updated JSON object to become SpaceAPI 0.13 compliant (see status.php) | ||
**Content type and Cache-Control headers are now sent | **Content type and Cache-Control headers are now sent | ||
Line 46: | Line 91: | ||
**Now uses state object | **Now uses state object | ||
**Space state now has a third state; null. (In case of uncertain state) | **Space state now has a third state; null. (In case of uncertain state) | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
* Uploaded it to [https://ackspace.nl/status.php https://ackspace.nl/status.php] but the URL can be changed if necessary.. | * Uploaded it to [https://ackspace.nl/status.php https://ackspace.nl/status.php] but the URL can be changed if necessary.. | ||
* From the SpaceAPI website: "In order to be able to retrieve the object from within a javascript sandbox, the server of the JSON object should set the ‘Access-Control-Allow-Origin’ header with a value of ‘*’ ". | * From the SpaceAPI website: "In order to be able to retrieve the object from within a javascript sandbox, the server of the JSON object should set the ‘Access-Control-Allow-Origin’ header with a value of ‘*’ ". |
Revision as of 15:12, 28 April 2016
Project: SpaceAPI | |
---|---|
Featured: | |
State | Active |
Members | Vicarious, CoolePascal, Prodigity, Da Syntax, xopr |
GitHub | spaceAPI |
Description | HackerSpace Status API |
Picture | |
No project picture! Fill in form Picture or Upload a jpeg here |
synopsis
Expose hackerspace information via a JSON structure. See spaceapi.net for details.
current version
The current backend has been made modular for easy maintenance and feature expansion. The first implemented expansion is temperature sensors.
Most of the latest implementation has been done by Da Syntax and xopr (ask them for details).
Currently, both the new and old system are running in parallel, but some things need to be done before deprecating the old system.
- Update the status page 'widget' which is used on hackerspaces.nl
- Update the places where ackspace.nl/status.php is used, most likely via spaceapi.net
Several systems are tied to the backend:
inputs | category | outputs | category | |
---|---|---|---|---|
Space state (switch) | hardware | Space state (telephone system) | software | |
ESP8266-SpaceState | hardware, firmware | Spacestate indicator /!\ | hardware, firmware | |
Spacestate sensors /!\ | hardware, firmware | Mobile Spacestate Indicator | hardware, firmware, software | |
IRC ACKspace-statusbot | software | |||
SpaceAPIBot (Telegram) | software | |||
Pebble watch app /!\ | software |
Affiliated github repositories:
- spaceAPI: backend
- SpaceAPIBot: Telegram bot output
- esp8266-SpaceAPI: modular implementation on ESP8266 (input/output)
Deprecated implementations:
- ESP8266-DS18S20: old sensor implementation (pull mechanism)
todo
- upload database model
- update the Dallas temperature probe and space state firmware (esp8266-SpaceAPI Github repo)
done
- created database for space state (log) and sensor values
- new php code online (currently running parallel with the old version)
- created new space state hardware interface using the ESP8266 which connects to the same old switch
First draft after recovery esp8266-SpaceAPI-full.tarNote that the used JSON parser library will cause heap corruption.- front page widget is now a real widget
- php backend source online
old version
- Updated JSON object to become SpaceAPI 0.13 compliant (see status.php)
- Content type and Cache-Control headers are now sent
- Now uses location object
- Now uses state object
- Space state now has a third state; null. (In case of uncertain state)
- Uploaded it to https://ackspace.nl/status.php but the URL can be changed if necessary..
- From the SpaceAPI website: "In order to be able to retrieve the object from within a javascript sandbox, the server of the JSON object should set the ‘Access-Control-Allow-Origin’ header with a value of ‘*’ ".
- Added the JSON object to the existing Space state PHP script. Thanks CoolePascal for the help with the PHP stuff!