Difference between revisions of "SpaceAPI"

From Hackerspace ACKspace
Jump to: navigation, search
(Added SpaceAPIBot and some links of their wherabo(u)ts)
Line 2: Line 2:
|Members=Vicarious, CoolePascal, Prodigity, Da Syntax, xopr
|Members=Vicarious, CoolePascal, Prodigity, Da Syntax, xopr
|Description=HackerSpace Status API
|Description=HackerSpace Status API

Revision as of 14:24, 21 December 2015

Project: SpaceAPI
State Active
Members Vicarious, CoolePascal, Prodigity, Da Syntax, xopr
GitHub esp8266-SpaceAPI
Description HackerSpace Status API
No project picture! Fill in form Picture or Upload a jpeg here

See hackerspaces.nl SpaceAPI website for details.

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.

the software

TODO: add the PHP code and SQL tables.

Also see ACKbot (IRC) and SpaceAPIBot (telegram)

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 this esp8266-SpaceAPI Github repo, which needs cleanup and features added. The new Mobile Spacestate Indicator is also based on this code.

Its first incarnation can be found on the ESP8266-SpaceState page.


  • 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.tar Note that the used Json parser library will cause heap corruption.


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)

spaceAPI json

Click here to view the source code
    "address":"Kloosterweg 1, 6412 CN Heerlen, The Netherlands",
      "type": "text/calendar",
      "url": "http://www.google.com/calendar/ical/f3j6egtm35u2v027rog3sob7gk%40group.calendar.google.com/public/basic.ics"
      "31457112345, extension 1333"
	"message":"open for public",
  • 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!