Difference between revisions of "SpaceAPI"
m (File to Media link (cleans text)) |
(added some info (and structure) of new spaceAPI) |
||
Line 7: | Line 7: | ||
== current version == | == current version == | ||
+ | [[user:Da_Syntax|Da Syntax]] and [[User:Xopr|xopr]] are working on a new implementation of the API. This enables us to add sensors and other parts of the [https://hackerspaces.nl/spaceapi/ official API] as well. | ||
+ | |||
+ | 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] code which is used on [http://hackerspaces.nl/ hackerspaces.nl] | ||
+ | * Update the places where [https://ackspace.nl/status.php ackspace.nl/status.php] is used | ||
+ | |||
+ | === the software === | ||
+ | TODO: add the PHP code and SQL tables. | ||
+ | |||
+ | === the hardware === | ||
+ | Currently, the hardware of the two units controlling the spaceAPI are based on the [[ESP8266-SpaceState]] and [[ESP8266-DS18S20]]. | ||
+ | |||
+ | === the firmware === | ||
+ | The current two running firmwares are based on the [[ESP8266-SpaceState#code|ESP8266-SpaceState]] (also used in the new [[Mobile Spacestate Indicator]], but its successor needs to be put online (after cleaning) | ||
+ | |||
+ | === done === | ||
+ | * created database for space state (log) and sensor values | ||
+ | * 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]] | ||
+ | * <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. | ||
+ | * Github repo for the latest version is: [https://github.com/ACKspace/esp8266-SpaceAPI esp8266-SpaceAPI] but needs cleanup and features added. | ||
+ | |||
+ | === todo === | ||
+ | * implement the temperature backend (PHP/MySQL) | ||
+ | * update the [[ESP8266-DS18S20|Dallas temperature probe]] and [[ESP8266-SpaceState|space state]] firmware | ||
+ | * update this wiki page with the sources | ||
+ | * change the front page iframe into a real [[Widget:SpaceAPI|widget]] | ||
+ | |||
+ | == 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) | ||
Line 59: | Line 88: | ||
* 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 ‘*’ ". | ||
* Added the JSON object to the existing [[Space state]] PHP script. Thanks [[User:Coolepascal|CoolePascal]] for the help with the PHP stuff! | * Added the JSON object to the existing [[Space state]] PHP script. Thanks [[User:Coolepascal|CoolePascal]] for the help with the PHP stuff! | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 15:23, 8 September 2015
Project: SpaceAPI | |
---|---|
Featured: | |
State | Active |
Members | Vicarious, CoolePascal, Prodigity, Da Syntax, xopr |
GitHub | No GitHub project defined. Add your project here. |
Description | HackerSpace Status API |
Picture | |
No project picture! Fill in form Picture or Upload a jpeg here |
See hackerspaces.nl SpaceAPI website for details.
Contents
current version
Da Syntax and xopr are working on a new implementation of the API. This enables us to add sensors and other parts of the official API as well.
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 code which is used on hackerspaces.nl
- Update the places where ackspace.nl/status.php is used
the software
TODO: add the PHP code and SQL tables.
the hardware
Currently, the hardware of the two units controlling the spaceAPI are based on the ESP8266-SpaceState and ESP8266-DS18S20.
the firmware
The current two running firmwares are based on the ESP8266-SpaceState (also used in the new Mobile Spacestate Indicator, but its successor needs to be put online (after cleaning)
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.- Github repo for the latest version is: esp8266-SpaceAPI but needs cleanup and features added.
todo
- implement the temperature backend (PHP/MySQL)
- update the Dallas temperature probe and space state firmware
- update this wiki page with the sources
- change the front page iframe into a real widget
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)
{ "api":"0.13", "space":"ACKspace", "logo":"https://ackspace.nl/ACKspace.150px.png", "url":"https://ackspace.nl/", "location":{ "address":"Kloosterweg 1, 6412 CN Heerlen, The Netherlands", "lat":50.892665, "lon":5.971104 }, "issue_report_channels":[ "email" ], "feeds":{ "calendar":{ "type": "text/calendar", "url": "http://www.google.com/calendar/ical/f3j6egtm35u2v027rog3sob7gk%40group.calendar.google.com/public/basic.ics" } }, "contact":{ "email":"contact@ackspace.nl", "irc":"irc://freenode/#ACKspace", "keymaster":[ "31457112345, extension 1333" ], "ml":"info@lists.ackspace.nl", "phone":"31457112345", "sip":"31457112345@sip1.budgetphone.nl", "twitter":"@ACKspace" },"state":{ "open":true, "message":"open for public", "lastchange":1415742805, "icon":{ "open":"https://ackspace.nl/icon/open.png", "closed":"https://ackspace.nl/icon/closed.png" } } }
- 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!