Space API


The spaceapi integration allow Hackerspaces to expose information to web apps or any other application with the SpaceAPI.

Configuration

To setup the spaceapi integration in your installation, add the following to your configuration.yaml file:

# Example configuration.yaml entry
spaceapi:
  space: HACKERSPACE_NAME
  logo: URL_FOR_LOGO
  url: URL
  location:
    address: ADDRESS
  contact:
    email: EMAIL_ADDRESS
  issue_report_channels:
    - email
  state:
    entity_id: binary_sensor.front_door

Configuration Variables

spacestringRequired

Name of the Hackerspace.

logostringRequired

URL which is publicly accessible of the logo.

urlstringRequired

URL of the hackerspace’s web site.

locationmap(Optional)

Location of the Hackerspace.

addressstringRequired

The physical address of the Hackerspace.

contactmapRequired

Contact information of the Hackerspace. At least one entry is mandatory.

phonestring(Optional)

The phone number of the Hackerspace.

sipstring(Optional)

The SIP URI for Voice-over-IP of the Hackerspace.

keymasterslist(Optional)

Persons who carry a key and are able to open the space upon request. One of the fields must be specified.

namestring(Optional)

Real Name of the keymaster.

irc_nickstring(Optional)

Contact the person with this nickname directly in irc if available. The irc channel to be used is defined in the contact/irc field.

phonestring(Optional)

Phone number of the keymaster.

emailstring(Optional)

Email address of the keymaster.

twitterstring(Optional)

Twitter username of the keymaster.

ircstring(Optional)

The IRC channel of the Hackerspace

twitterstring(Optional)

The Twitter account of the Hackerspace.

facebookstring(Optional)

The facebook URL of the Hackerspace.

identicastring(Optional)

The Identi.ca or StatusNet account of the Hackerspace.

foursquarestring(Optional)

The Foursquare ID of the Hackerspace.

emailstringRequired

The email address of the Hackerspace.

mlstring(Optional)

The mailing list of the Hackerspace.

jabberstring(Optional)

The public Jabber/XMPP multi-user chatroom of the Hackerspace.

issue_mailstring(Optional)

A separate email address for issue reports.

issue_report_channelslistRequired

The reporting channel for issues. Valid values are email, issue_mail, twitter or ml

statelistRequired

The current state of the Hackerspace.

entity_idstringRequired

The entity_id of a binary sensor that represents the current state.

icon_openstring(Optional)

The URL which is publicly accessible of the icon for the open Hackerspace.

icon_closedstring(Optional)

The URL which is publicly accessible of the icon for the closed Hackerspace.

feedsmap(Optional)

Feeds where users can get updates of your space.

blogmap(Optional)

The blog of your Hackerspace.

typestring(Optional)

Type of the feed, for example rss, atom, ical

urlstringRequired

Feed URL

wikimap(Optional)

The wiki of your Hackerspace.

typestring(Optional)

Type of the feed, for example rss, atom, ical

urlstringRequired

Feed URL

calendarmap(Optional)

The calendar of your Hackerspace.

typestring(Optional)

Type of the feed, for example rss, atom, ical

urlstringRequired

Feed URL

flickermap(Optional)

The Flicker stream of your Hackerspace.

typestring(Optional)

Type of the feed, for example rss, atom, ical

urlstringRequired

Feed URL

cachemap(Optional)

Specifies options about caching of your SpaceAPI endpoint. Use this if you want to avoid hundreds/thousands of application instances crawling your status.

schedulestringRequired

Cache update cycle. Valid values are m.02 | m.05 | m.10 | m.15 | m.30 | h.01 | h.02 | h.04 | h.08 | h.12 | d.01 |

projectslist(Optional)

Your project sites (links to GitHub, wikis or wherever your projects are hosted).

radio_showlist(Optional)

A list of radio shows that your hackerspace might broadcast.

namestringRequired

The name of the radio show.

urlstringRequired

The stream URL of the radio show.

typestringRequired

The stream encoder. Valid values are mp3 or ogg

startstringRequired

Specify the start time by using the ISO 8601 standard.

endstringRequired

Specify the end time by using the ISO 8601 standard.

sensorslist(Optional)

List of sensors to expose.

temperaturestringRequired

List of temperature sensors.

humiditystringRequired

List of humidity sensors.

The list of sensors can be any sensor, not just temperature or humidity.

Sensor specific location

The SpaceAPI specification requires every sensor to provide a location. In order to set a sensor specific location do the following steps:

  1. Go to Configuration -> Customization
  2. Select the sensor entity
  3. Pick “Other” from the attribute override pulldown
  4. Set the attribute name to location and the attribute value to your desired location

If no location is set, the location defined in the HA configuration is used.

Examples

In this section you find some real-life examples of how to use this component.

Eastermundigen

A possible configuration entry for Eastermundigen, a Hackerspace in Switzerland, could look like this.

# Example configuration.yaml entry
spaceapi:
  space: Eastermundigen
  logo: https://eastermundigen.ch/logo.png
  url: https://eastermundigen.ch
  location:
    address: "Steinbruchweg 16, 3072 Ostermundigen, Schweiz"
  contact:
    phone: "+41311111111"
    twitter: "@eastermundigen"
    email: "[email protected]"
  issue_report_channels:
    - email
  state:
    entity_id: binary_sensor.front_door"
    icon_open: https://eastermundigen.ch/open.png
    icon_closed: https://eastermundigen.ch/close.png
  sensors:
    temperature:
      - "sensor.temperature_in"
      - "sensor.temperature_out"
    humidity:
      - "sensor.humidity_in"
      - "sensor.humidity_out"