├── .gitattributes ├── .github └── workflows │ ├── update-docker-image.yml │ ├── validate-formatting.yml │ └── validate-schema.yml ├── 12.json ├── 13.json ├── 14.json ├── 15.json ├── 16-draft.json ├── CHANGELOG.md ├── CONTRIBUTING.md ├── Dockerfile ├── MIGRATION.md └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | CHANGELOG.md merge=union 2 | -------------------------------------------------------------------------------- /.github/workflows/update-docker-image.yml: -------------------------------------------------------------------------------- 1 | name: Publish Docker 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | schedule: 8 | - cron: '0 2 * * 0' 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v4 14 | - name: Login to GitHub Container Registry 15 | uses: docker/login-action@v3 16 | with: 17 | registry: ghcr.io 18 | username: ${{ github.actor }} 19 | password: ${{ secrets.GITHUB_TOKEN }} 20 | - name: Build schema image 21 | run: | 22 | docker build \ 23 | --no-cache \ 24 | --tag ghcr.io/spaceapi/schema \ 25 | --label "org.opencontainers.image.source=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" \ 26 | . 27 | - name: Publish schema image 28 | run: | 29 | docker push ghcr.io/spaceapi/schema:latest 30 | -------------------------------------------------------------------------------- /.github/workflows/validate-formatting.yml: -------------------------------------------------------------------------------- 1 | name: Validate formatting 2 | 3 | on: 4 | pull_request: 5 | push: 6 | branches: 7 | - master 8 | 9 | jobs: 10 | validate-json-schema: 11 | name: v${{ matrix.schema }} schema 12 | runs-on: ubuntu-latest 13 | strategy: 14 | matrix: 15 | schema: [12, 13, 14, 15, 16-draft] 16 | steps: 17 | - uses: actions/checkout@v4 18 | - name: Reformat JSON with jq 19 | run: jq . -M --indent 2 < ${{ matrix.schema }}.json > ${{ matrix.schema }}-formatted.json 20 | - name: Check for differences 21 | run: diff ${{ matrix.schema }}.json ${{ matrix.schema }}-formatted.json && echo "No differences found!" 22 | -------------------------------------------------------------------------------- /.github/workflows/validate-schema.yml: -------------------------------------------------------------------------------- 1 | name: Validate schema 2 | 3 | on: 4 | pull_request: 5 | push: 6 | branches: 7 | - master 8 | 9 | jobs: 10 | validate-json-schema: 11 | name: v${{ matrix.schema }} schema 12 | runs-on: ubuntu-latest 13 | strategy: 14 | matrix: 15 | schema: [12, 13, 14, 15, 16-draft] 16 | steps: 17 | - uses: actions/checkout@v4 18 | - name: Install validator 19 | run: npm install ajv-cli@3.1.0 20 | - name: Download JSON meta-schema 21 | run: wget -O meta-schema https://json-schema.org/draft-07/schema 22 | - name: Validate schema file against meta-schema 23 | run: npx ajv validate -s meta-schema -d "${{ matrix.schema }}.json" --add-used-schema false --errors=text 24 | -------------------------------------------------------------------------------- /12.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "https://schema.spaceapi.io/12.json", 3 | "$schema": "http://json-schema.org/draft-07/schema#", 4 | "description": "SpaceAPI 0.12", 5 | "type": "object", 6 | "properties": { 7 | "api": { 8 | "description": "The version of SpaceAPI your endpoint uses", 9 | "type": "string", 10 | "enum": [ 11 | "0.12" 12 | ] 13 | }, 14 | "space": { 15 | "description": "The name of your space", 16 | "type": "string" 17 | }, 18 | "logo": { 19 | "description": "The space logo", 20 | "type": "string" 21 | }, 22 | "url": { 23 | "description": "The main website", 24 | "type": "string" 25 | }, 26 | "address": { 27 | "description": "The postal address of your space (street, block, housenumber, zip code, city, whatever you usually need in your country, and the country itself)", 28 | "type": "string" 29 | }, 30 | "lat": { 31 | "description": "Latitude of your space location, in degree with decimal places. Use positive values for locations north of the equator, negative values for locations south of equator.", 32 | "type": "number" 33 | }, 34 | "lon": { 35 | "description": "Longitude of your space location, in degree with decimal places. Use positive values for locations west of Greenwich, and negative values for locations east of Greenwich.", 36 | "type": "number" 37 | }, 38 | "cam": { 39 | "description": "URL(s) of webcams in your space", 40 | "type": "array", 41 | "items": { 42 | "type": "string" 43 | }, 44 | "minItems": 1 45 | }, 46 | "stream": { 47 | "description": "A mapping of stream types to stream URLs. Example: {'mp4':'http//example.org/stream.mpg', 'mjpeg':'http://example.org/stream.mjpeg'}", 48 | "type": "object" 49 | }, 50 | "open": { 51 | "description": "A boolean which indicates if the space is currently open", 52 | "type": "boolean" 53 | }, 54 | "status": { 55 | "description": "An additional free-form string, could be something like 'open for public', 'members only' or whatever you want it to be", 56 | "type": "string" 57 | }, 58 | "lastchange": { 59 | "description": "The Unix timestamp when the space status changed most recently", 60 | "type": "number" 61 | }, 62 | "events": { 63 | "description": "Events which happened recently in your space and which could be interesting to the public, like 'User X has entered/triggered/did something at timestamp Z'", 64 | "type": "array", 65 | "items": { 66 | "required": [ 67 | "name", 68 | "type", 69 | "t" 70 | ], 71 | "type": "object", 72 | "properties": { 73 | "name": { 74 | "description": "Name or other identity of the subject (e.g. J. Random Hacker, fridge, 3D printer, …)", 75 | "type": "string" 76 | }, 77 | "type": { 78 | "description": "Action (e.g. check-in, check-out, finish-print, …). Define your own actions and use them consistently, canonical actions are not (yet) specified", 79 | "type": "string" 80 | }, 81 | "t": { 82 | "description": "Unix timestamp when the event occurred", 83 | "type": "number" 84 | }, 85 | "extra": { 86 | "description": "A custom text field to give more information about the event", 87 | "type": "string" 88 | } 89 | } 90 | } 91 | }, 92 | "contact": { 93 | "description": "Contact information about your space", 94 | "type": "object", 95 | "properties": { 96 | "phone": { 97 | "description": "Phone number, including country code with a leading plus sign. Example: +1 800 555 4567", 98 | "type": "string" 99 | }, 100 | "sip": { 101 | "description": "URI for Voice-over-IP via SIP. Example: sip:yourspace@sip.example.org", 102 | "type": "string" 103 | }, 104 | "keymaster": { 105 | "description": "Phone numbers of people who carry a key and are able to open the space upon request. Example: ['+1 800 555 4567','+1 800 555 4544']", 106 | "type": "array", 107 | "items": { 108 | "type": "string" 109 | } 110 | }, 111 | "irc": { 112 | "description": "URL of the IRC channel, in the form irc://example.org/#channelname", 113 | "type": "string" 114 | }, 115 | "twitter": { 116 | "description": "Twitter handle, with leading @", 117 | "type": "string" 118 | }, 119 | "email": { 120 | "description": "E-mail address for contacting your space", 121 | "type": "string" 122 | }, 123 | "ml": { 124 | "description": "The e-mail address of your mailing list. If you use Google Groups then the e-mail looks like your-group@googlegroups.com.", 125 | "type": "string" 126 | }, 127 | "jabber": { 128 | "description": "A public Jabber/XMPP multi-user chatroom in the form chatroom@conference.example.net", 129 | "type": "string" 130 | } 131 | } 132 | }, 133 | "icon": { 134 | "description": "Icons that show the status graphically", 135 | "type": "object", 136 | "properties": { 137 | "open": { 138 | "description": "The URL to your customized space logo showing an open space", 139 | "type": "string" 140 | }, 141 | "closed": { 142 | "description": "The URL to your customized space logo showing a closed space", 143 | "type": "string" 144 | } 145 | }, 146 | "required": [ 147 | "open", 148 | "closed" 149 | ] 150 | }, 151 | "sensors": { 152 | "description": "Data of various sensors in your space (e.g. temperature, humidity, amount of Club-Mate left, …). The only canonical property is the temp property, additional sensor types may be defined by you. In this case, you are requested to share your definition for inclusion in this specification.", 153 | "type": "array", 154 | "items": { 155 | "type": "object", 156 | "properties": { 157 | "temp": { 158 | "description": "A mapping of measuring locations to temperature values. The values should match the basic regular expression ^[+-]?[0-9]+(\\.[0-9]+)?[FCK]$. Example: {'kitchen':'48F', 'storage':'-273.1K'}", 159 | "type": "object" 160 | } 161 | } 162 | } 163 | }, 164 | "feeds": { 165 | "description": "Feeds where users can get updates of your space", 166 | "type": "array", 167 | "items": { 168 | "type": "object", 169 | "properties": { 170 | "name": { 171 | "description": "A mnemonic identifier, like wiki, blog, etc.", 172 | "type": "string" 173 | }, 174 | "type": { 175 | "description": "Type of the feed, for example rss, atom, ical", 176 | "type": "string" 177 | }, 178 | "url": { 179 | "description": "Feed URL", 180 | "type": "string" 181 | } 182 | }, 183 | "required": [ 184 | "name", 185 | "url" 186 | ] 187 | } 188 | } 189 | }, 190 | "required": [ 191 | "api", 192 | "space", 193 | "logo", 194 | "url", 195 | "open", 196 | "icon" 197 | ] 198 | } 199 | -------------------------------------------------------------------------------- /13.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "https://schema.spaceapi.io/13.json", 3 | "$schema": "http://json-schema.org/draft-07/schema#", 4 | "description": "SpaceAPI 0.13", 5 | "type": "object", 6 | "properties": { 7 | "api": { 8 | "description": "The version of SpaceAPI your endpoint uses", 9 | "type": "string", 10 | "enum": [ 11 | "0.13" 12 | ] 13 | }, 14 | "space": { 15 | "description": "The name of your space", 16 | "type": "string" 17 | }, 18 | "logo": { 19 | "description": "URL to your space logo", 20 | "type": "string" 21 | }, 22 | "url": { 23 | "description": "URL to your space website", 24 | "type": "string" 25 | }, 26 | "location": { 27 | "description": "Position data such as a postal address or geographic coordinates", 28 | "type": "object", 29 | "properties": { 30 | "address": { 31 | "description": "The postal address of your space (street, block, housenumber, zip code, city, whatever you usually need in your country, and the country itself).
Examples: ", 32 | "type": "string" 33 | }, 34 | "lat": { 35 | "description": "Latitude of your space location, in degree with decimal places. Use positive values for locations north of the equator, negative values for locations south of equator.", 36 | "type": "number" 37 | }, 38 | "lon": { 39 | "description": "Longitude of your space location, in degree with decimal places. Use positive values for locations east of Greenwich, and negative values for locations west of Greenwich.", 40 | "type": "number" 41 | } 42 | }, 43 | "required": [ 44 | "lat", 45 | "lon" 46 | ] 47 | }, 48 | "spacefed": { 49 | "description": "A flag indicating if the hackerspace uses SpaceFED, a federated login scheme so that visiting hackers can use the space WiFi with their home space credentials.", 50 | "type": "object", 51 | "properties": { 52 | "spacenet": { 53 | "description": "See the wiki.", 54 | "type": "boolean" 55 | }, 56 | "spacesaml": { 57 | "description": "See the wiki.", 58 | "type": "boolean" 59 | }, 60 | "spacephone": { 61 | "description": "See the wiki.", 62 | "type": "boolean" 63 | } 64 | }, 65 | "required": [ 66 | "spacenet", 67 | "spacesaml", 68 | "spacephone" 69 | ] 70 | }, 71 | "cam": { 72 | "description": "URL(s) of webcams in your space", 73 | "type": "array", 74 | "items": { 75 | "type": "string" 76 | }, 77 | "minItems": 1 78 | }, 79 | "stream": { 80 | "description": "A mapping of stream types to stream URLs. If you use other stream types make a pull request or prefix yours with ext_.", 81 | "type": "object", 82 | "properties": { 83 | "m4": { 84 | "description": "Your mpg stream URL. Example: {\"mp4\": \"http://example.org/stream.mpg\"}", 85 | "type": "string" 86 | }, 87 | "mjpeg": { 88 | "description": "Your mjpeg stream URL. Example: {\"mjpeg\": \"http://example.org/stream.mjpeg\"}", 89 | "type": "string" 90 | }, 91 | "ustream": { 92 | "description": "Your ustream stream URL. Example: {\"ustream\": \"http://www.ustream.tv/channel/hackspsps\"}", 93 | "type": "string" 94 | } 95 | } 96 | }, 97 | "state": { 98 | "description": "A collection of status-related data: actual open/closed status, icons, last change timestamp etc.", 99 | "type": "object", 100 | "properties": { 101 | "open": { 102 | "description": "A flag which indicates if the space is currently open or closed. The state 'undefined' can be achieved by assigning this field the value 'null' (without the quotes). In most (all?) programming languages this is evaluated to false so that no app should break", 103 | "type": [ 104 | "boolean", 105 | "null" 106 | ] 107 | }, 108 | "lastchange": { 109 | "description": "The Unix timestamp when the space status changed most recently", 110 | "type": "number" 111 | }, 112 | "trigger_person": { 113 | "description": "The person who lastly changed the state e.g. opened or closed the space.", 114 | "type": "string" 115 | }, 116 | "message": { 117 | "description": "An additional free-form string, could be something like 'open for public', 'members only' or whatever you want it to be", 118 | "type": "string" 119 | }, 120 | "icon": { 121 | "description": "Icons that show the status graphically", 122 | "type": "object", 123 | "properties": { 124 | "open": { 125 | "description": "The URL to your customized space logo showing an open space", 126 | "type": "string" 127 | }, 128 | "closed": { 129 | "description": "The URL to your customized space logo showing a closed space", 130 | "type": "string" 131 | } 132 | }, 133 | "required": [ 134 | "open", 135 | "closed" 136 | ] 137 | } 138 | }, 139 | "required": [ 140 | "open" 141 | ] 142 | }, 143 | "events": { 144 | "description": "Events which happened recently in your space and which could be interesting to the public, like 'User X has entered/triggered/did something at timestamp Z'", 145 | "type": "array", 146 | "items": { 147 | "required": [ 148 | "name", 149 | "type", 150 | "timestamp" 151 | ], 152 | "type": "object", 153 | "properties": { 154 | "name": { 155 | "description": "Name or other identity of the subject (e.g. J. Random Hacker, fridge, 3D printer, …)", 156 | "type": "string" 157 | }, 158 | "type": { 159 | "description": "Action (e.g. check-in, check-out, finish-print, …). Define your own actions and use them consistently, canonical actions are not (yet) specified", 160 | "type": "string" 161 | }, 162 | "timestamp": { 163 | "description": "Unix timestamp when the event occurred", 164 | "type": "number" 165 | }, 166 | "extra": { 167 | "description": "A custom text field to give more information about the event", 168 | "type": "string" 169 | } 170 | } 171 | } 172 | }, 173 | "contact": { 174 | "description": "Contact information about your space. You must define at least one which is in the list of allowed values of the issue_report_channels field.", 175 | "type": "object", 176 | "properties": { 177 | "phone": { 178 | "description": "Phone number, including country code with a leading plus sign. Example: +1 800 555 4567", 179 | "type": "string" 180 | }, 181 | "sip": { 182 | "description": "URI for Voice-over-IP via SIP. Example: sip:yourspace@sip.example.org", 183 | "type": "string" 184 | }, 185 | "keymasters": { 186 | "description": "Persons who carry a key and are able to open the space upon request. One of the fields irc_nick, phone, email or twitter must be specified.", 187 | "type": "array", 188 | "minItems": 1, 189 | "items": { 190 | "type": "object", 191 | "properties": { 192 | "name": { 193 | "description": "Real name", 194 | "type": "string" 195 | }, 196 | "irc_nick": { 197 | "description": "Contact the person with this nickname directly in irc if available. The irc channel to be used is defined in the contact/irc field.", 198 | "type": "string" 199 | }, 200 | "phone": { 201 | "description": "Example: ['+1 800 555 4567','+1 800 555 4544']", 202 | "type": "string" 203 | }, 204 | "email": { 205 | "description": "Email address which can be base64 encoded.", 206 | "type": "string" 207 | }, 208 | "twitter": { 209 | "description": "Twitter username with leading @.", 210 | "type": "string" 211 | } 212 | } 213 | } 214 | }, 215 | "irc": { 216 | "description": "URL of the IRC channel, in the form irc://example.org/#channelname", 217 | "type": "string" 218 | }, 219 | "twitter": { 220 | "description": "Twitter handle, with leading @", 221 | "type": "string" 222 | }, 223 | "facebook": { 224 | "description": "Facebook account URL.", 225 | "type": "string" 226 | }, 227 | "google": { 228 | "description": "Google services.", 229 | "type": "object", 230 | "properties": { 231 | "plus": { 232 | "description": "Google plus URL.", 233 | "type": "string" 234 | } 235 | } 236 | }, 237 | "identica": { 238 | "description": "Identi.ca or StatusNet account, in the form yourspace@example.org", 239 | "type": "string" 240 | }, 241 | "foursquare": { 242 | "description": "Foursquare ID, in the form 4d8a9114d85f3704eab301dc.", 243 | "type": "string" 244 | }, 245 | "email": { 246 | "description": "E-mail address for contacting your space. If this is a mailing list consider to use the contact/ml field.", 247 | "type": "string" 248 | }, 249 | "ml": { 250 | "description": "The e-mail address of your mailing list. If you use Google Groups then the e-mail looks like your-group@googlegroups.com.", 251 | "type": "string" 252 | }, 253 | "jabber": { 254 | "description": "A public Jabber/XMPP multi-user chatroom in the form chatroom@conference.example.net", 255 | "type": "string" 256 | }, 257 | "issue_mail": { 258 | "description": "A separate email address for issue reports (see the issue_report_channels field). This value can be Base64-encoded.", 259 | "type": "string" 260 | } 261 | } 262 | }, 263 | "issue_report_channels": { 264 | "description": "This array defines all communication channels where you want to get automated issue reports about your SpaceAPI endpoint from the revalidator. This field is meant for internal usage only and it should never be consumed by any app. At least one channel must be defined. Please consider that when using ml the mailing list moderator has to moderate incoming emails or add the sender email to the subscribers. If you don't break your SpaceAPI implementation you won't get any notifications ;-)", 265 | "type": "array", 266 | "items": { 267 | "type": "string", 268 | "enum": [ 269 | "email", 270 | "issue_mail", 271 | "twitter", 272 | "ml" 273 | ] 274 | }, 275 | "minItems": 1 276 | }, 277 | "sensors": { 278 | "description": "Data of various sensors in your space (e.g. temperature, humidity, amount of Club-Mate left, …). The only canonical property is the temp property, additional sensor types may be defined by you. In this case, you are requested to share your definition for inclusion in this specification.", 279 | "type": "object", 280 | "properties": { 281 | "temperature": { 282 | "description": "Temperature sensor. To convert from one unit of temperature to another consider Wikipedia.", 283 | "type": "array", 284 | "items": { 285 | "type": "object", 286 | "properties": { 287 | "value": { 288 | "description": "The sensor value", 289 | "type": "number" 290 | }, 291 | "unit": { 292 | "description": "The unit of the sensor value.", 293 | "type": "string", 294 | "enum": [ 295 | "°C", 296 | "°F", 297 | "K", 298 | "°De", 299 | "°N", 300 | "°R", 301 | "°Ré", 302 | "°Rø" 303 | ] 304 | }, 305 | "location": { 306 | "description": "The location of your sensor such as Outside, Inside, Ceiling, Roof or Room 1.", 307 | "type": "string" 308 | }, 309 | "name": { 310 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 311 | "type": "string" 312 | }, 313 | "description": { 314 | "description": "An extra field that you can use to attach some additional information to this sensor instance.", 315 | "type": "string" 316 | } 317 | }, 318 | "required": [ 319 | "value", 320 | "unit", 321 | "location" 322 | ] 323 | } 324 | }, 325 | "door_locked": { 326 | "description": "Sensor type to indicate if a certain door is locked.", 327 | "type": "array", 328 | "items": { 329 | "type": "object", 330 | "properties": { 331 | "value": { 332 | "description": "The sensor value", 333 | "type": "boolean" 334 | }, 335 | "location": { 336 | "description": "The location of your sensor such as front door, chill room or lab.", 337 | "type": "string" 338 | }, 339 | "name": { 340 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 341 | "type": "string" 342 | }, 343 | "description": { 344 | "description": "An extra field that you can use to attach some additional information to this sensor instance.", 345 | "type": "string" 346 | } 347 | }, 348 | "required": [ 349 | "value", 350 | "location" 351 | ] 352 | } 353 | }, 354 | "barometer": { 355 | "description": "Barometer sensor", 356 | "type": "array", 357 | "items": { 358 | "type": "object", 359 | "properties": { 360 | "value": { 361 | "description": "The sensor value", 362 | "type": "number" 363 | }, 364 | "unit": { 365 | "description": "The unit of the sensor value. You should always define the unit though if the sensor is a flag of a boolean type then you can of course omit it.", 366 | "type": "string", 367 | "enum": [ 368 | "hPA" 369 | ] 370 | }, 371 | "location": { 372 | "description": "The location of your sensor such as Outside, Inside, Ceiling, Roof or Room 1.", 373 | "type": "string" 374 | }, 375 | "name": { 376 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 377 | "type": "string" 378 | }, 379 | "description": { 380 | "description": "An extra field that you can use to attach some additional information to this sensor instance.", 381 | "type": "string" 382 | } 383 | }, 384 | "required": [ 385 | "value", 386 | "unit", 387 | "location" 388 | ] 389 | } 390 | }, 391 | "radiation": { 392 | "description": "Compound radiation sensor. Check this resource.", 393 | "type": "object", 394 | "properties": { 395 | "alpha": { 396 | "description": "An alpha sensor", 397 | "type": "array", 398 | "items": { 399 | "type": "object", 400 | "properties": { 401 | "value": { 402 | "description": "Observed counts per minute (ocpm) or actual radiation value. If the value are the observed counts then the dead_time and conversion_factor fields must be defined as well. CPM formula:
cpm = ocpm ( 1 + 1 / (1 - ocpm x dead_time) )
Conversion formula:
µSv/h = cpm x conversion_factor
", 403 | "type": "number" 404 | }, 405 | "unit": { 406 | "description": "Choose the appropriate unit for your radiation sensor instance.", 407 | "type": "string", 408 | "enum": [ 409 | "cpm", 410 | "r/h", 411 | "µSv/h", 412 | "mSv/a", 413 | "µSv/a" 414 | ] 415 | }, 416 | "dead_time": { 417 | "description": "The dead time in µs. See the description of the value field to see how to use the dead time.", 418 | "type": "number" 419 | }, 420 | "conversion_factor": { 421 | "description": "The conversion from the cpm unit to another unit hardly depends on your tube type. See the description of the value field to see how to use the conversion factor. Note: only trust your manufacturer if it comes to the actual factor value. The internet seems full of wrong copy & pastes, don't even trust your neighbour hackerspace. If in doubt ask the tube manufacturer.", 422 | "type": "number" 423 | }, 424 | "location": { 425 | "description": "The location of your sensor such as Outside, Inside, Ceiling, Roof or Room 1.", 426 | "type": "string" 427 | }, 428 | "name": { 429 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 430 | "type": "string" 431 | }, 432 | "description": { 433 | "description": "An extra field that you can use to attach some additional information to this sensor instance.", 434 | "type": "string" 435 | } 436 | }, 437 | "required": [ 438 | "value", 439 | "unit" 440 | ] 441 | } 442 | }, 443 | "beta": { 444 | "description": "A beta sensor", 445 | "type": "array", 446 | "items": { 447 | "type": "object", 448 | "properties": { 449 | "value": { 450 | "description": "Observed counts per minute (ocpm) or actual radiation value. If the value are the observed counts then the dead_time and conversion_factor fields must be defined as well. CPM formula:
cpm = ocpm ( 1 + 1 / (1 - ocpm x dead_time) )
Conversion formula:
µSv/h = cpm x conversion_factor
", 451 | "type": "number" 452 | }, 453 | "unit": { 454 | "description": "Choose the appropriate unit for your radiation sensor instance.", 455 | "type": "string", 456 | "enum": [ 457 | "cpm", 458 | "r/h", 459 | "µSv/h", 460 | "mSv/a", 461 | "µSv/a" 462 | ] 463 | }, 464 | "dead_time": { 465 | "description": "The dead time in µs. See the description of the value field to see how to use the dead time.", 466 | "type": "number" 467 | }, 468 | "conversion_factor": { 469 | "description": "The conversion from the cpm unit to another unit hardly depends on your tube type. See the description of the value field to see how to use the conversion factor. Note: only trust your manufacturer if it comes to the actual factor value. The internet seems full of wrong copy & pastes, don't even trust your neighbour hackerspace. If in doubt ask the tube manufacturer.", 470 | "type": "number" 471 | }, 472 | "location": { 473 | "description": "The location of your sensor such as Outside, Inside, Ceiling, Roof or Room 1.", 474 | "type": "string" 475 | }, 476 | "name": { 477 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 478 | "type": "string" 479 | }, 480 | "description": { 481 | "description": "An extra field that you can use to attach some additional information to this sensor instance.", 482 | "type": "string" 483 | } 484 | }, 485 | "required": [ 486 | "value", 487 | "unit" 488 | ] 489 | } 490 | }, 491 | "gamma": { 492 | "description": "A gamma sensor", 493 | "type": "array", 494 | "items": { 495 | "type": "object", 496 | "properties": { 497 | "value": { 498 | "description": "Observed counts per minute (ocpm) or actual radiation value. If the value are the observed counts then the dead_time and conversion_factor fields must be defined as well. CPM formula:
cpm = ocpm ( 1 + 1 / (1 - ocpm x dead_time) )
Conversion formula:
µSv/h = cpm x conversion_factor
", 499 | "type": "number" 500 | }, 501 | "unit": { 502 | "description": "Choose the appropriate unit for your radiation sensor instance.", 503 | "type": "string", 504 | "enum": [ 505 | "cpm", 506 | "r/h", 507 | "µSv/h", 508 | "mSv/a", 509 | "µSv/a" 510 | ] 511 | }, 512 | "dead_time": { 513 | "description": "The dead time in µs. See the description of the value field to see how to use the dead time.", 514 | "type": "number" 515 | }, 516 | "conversion_factor": { 517 | "description": "The conversion from the cpm unit to another unit hardly depends on your tube type. See the description of the value field to see how to use the conversion factor. Note: only trust your manufacturer if it comes to the actual factor value. The internet seems full of wrong copy & pastes, don't even trust your neighbour hackerspace. If in doubt ask the tube manufacturer.", 518 | "type": "number" 519 | }, 520 | "location": { 521 | "description": "The location of your sensor such as Outside, Inside, Ceiling, Roof or Room 1.", 522 | "type": "string" 523 | }, 524 | "name": { 525 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 526 | "type": "string" 527 | }, 528 | "description": { 529 | "description": "An extra field that you can use to attach some additional information to this sensor instance.", 530 | "type": "string" 531 | } 532 | }, 533 | "required": [ 534 | "value", 535 | "unit" 536 | ] 537 | } 538 | }, 539 | "beta_gamma": { 540 | "description": "A sensor which cannot filter beta and gamma radiation separately.", 541 | "type": "array", 542 | "items": { 543 | "type": "object", 544 | "properties": { 545 | "value": { 546 | "description": "Observed counts per minute (ocpm) or actual radiation value. If the value are the observed counts then the dead_time and conversion_factor fields must be defined as well. CPM formula:
cpm = ocpm ( 1 + 1 / (1 - ocpm x dead_time) )
Conversion formula:
µSv/h = cpm x conversion_factor
", 547 | "type": "number" 548 | }, 549 | "unit": { 550 | "description": "Choose the appropriate unit for your radiation sensor instance.", 551 | "type": "string", 552 | "enum": [ 553 | "cpm", 554 | "r/h", 555 | "µSv/h", 556 | "mSv/a", 557 | "µSv/a" 558 | ] 559 | }, 560 | "dead_time": { 561 | "description": "The dead time in µs. See the description of the value field to see how to use the dead time.", 562 | "type": "number" 563 | }, 564 | "conversion_factor": { 565 | "description": "The conversion from the cpm unit to another unit hardly depends on your tube type. See the description of the value field to see how to use the conversion factor. Note: only trust your manufacturer if it comes to the actual factor value. The internet seems full of wrong copy & pastes, don't even trust your neighbour hackerspace. If in doubt ask the tube manufacturer.", 566 | "type": "number" 567 | }, 568 | "location": { 569 | "description": "The location of your sensor such as Outside, Inside, Ceiling, Roof or Room 1.", 570 | "type": "string" 571 | }, 572 | "name": { 573 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 574 | "type": "string" 575 | }, 576 | "description": { 577 | "description": "An extra field that you can use to attach some additional information to this sensor instance.", 578 | "type": "string" 579 | } 580 | }, 581 | "required": [ 582 | "value", 583 | "unit" 584 | ] 585 | } 586 | } 587 | } 588 | }, 589 | "humidity": { 590 | "description": "Humidity sensor", 591 | "type": "array", 592 | "items": { 593 | "type": "object", 594 | "properties": { 595 | "value": { 596 | "description": "The sensor value", 597 | "type": "number" 598 | }, 599 | "unit": { 600 | "description": "The unit of the sensor value. You should always define the unit though if the sensor is a flag of a boolean type then you can of course omit it.", 601 | "type": "string", 602 | "enum": [ 603 | "%" 604 | ] 605 | }, 606 | "location": { 607 | "description": "The location of your sensor such as Outside, Inside, Ceiling, Roof or Room 1.", 608 | "type": "string" 609 | }, 610 | "name": { 611 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 612 | "type": "string" 613 | }, 614 | "description": { 615 | "description": "An extra field that you can use to attach some additional information to this sensor instance.", 616 | "type": "string" 617 | } 618 | }, 619 | "required": [ 620 | "value", 621 | "unit", 622 | "location" 623 | ] 624 | } 625 | }, 626 | "beverage_supply": { 627 | "description": "How much Mate and beer is in your fridge?", 628 | "type": "array", 629 | "items": { 630 | "type": "object", 631 | "properties": { 632 | "value": { 633 | "description": "The sensor value", 634 | "type": "number" 635 | }, 636 | "unit": { 637 | "description": "The unit, either btl for bottles or crt for crates.", 638 | "type": "string", 639 | "enum": [ 640 | "btl", 641 | "crt" 642 | ] 643 | }, 644 | "location": { 645 | "description": "The location of your sensor such as Room 1 or Room 2 or Room 3, Roof or Room 1.", 646 | "type": "string" 647 | }, 648 | "name": { 649 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 650 | "type": "string" 651 | }, 652 | "description": { 653 | "description": "An extra field that you can use to attach some additional information to this sensor instance.", 654 | "type": "string" 655 | } 656 | }, 657 | "required": [ 658 | "value", 659 | "unit" 660 | ] 661 | } 662 | }, 663 | "power_consumption": { 664 | "description": "The power consumption of a specific device or of your whole space.", 665 | "type": "array", 666 | "items": { 667 | "type": "object", 668 | "properties": { 669 | "value": { 670 | "description": "The sensor value", 671 | "type": "number" 672 | }, 673 | "unit": { 674 | "description": "The unit of the sensor value. You should always define the unit though if the sensor is a flag of a boolean type then you can of course omit it.", 675 | "type": "string", 676 | "enum": [ 677 | "mW", 678 | "W", 679 | "VA" 680 | ] 681 | }, 682 | "location": { 683 | "description": "The location of your sensor such as Outside, Inside, Ceiling, Roof or Room 1.", 684 | "type": "string" 685 | }, 686 | "name": { 687 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 688 | "type": "string" 689 | }, 690 | "description": { 691 | "description": "An extra field that you can use to attach some additional information to this sensor instance.", 692 | "type": "string" 693 | } 694 | }, 695 | "required": [ 696 | "value", 697 | "unit", 698 | "location" 699 | ] 700 | } 701 | }, 702 | "wind": { 703 | "description": "Your wind sensor.", 704 | "type": "array", 705 | "items": { 706 | "type": "object", 707 | "properties": { 708 | "properties": { 709 | "description": "", 710 | "type": "object", 711 | "properties": { 712 | "speed": { 713 | "description": "", 714 | "type": "object", 715 | "properties": { 716 | "value": { 717 | "description": "The sensor value", 718 | "type": "number" 719 | }, 720 | "unit": { 721 | "description": "The unit of the sensor value. You should always define the unit though if the sensor is a flag of a boolean type then you can of course omit it.", 722 | "type": "string", 723 | "enum": [ 724 | "m/s", 725 | "km/h", 726 | "kn" 727 | ] 728 | } 729 | }, 730 | "required": [ 731 | "value", 732 | "unit" 733 | ] 734 | }, 735 | "gust": { 736 | "description": "", 737 | "type": "object", 738 | "properties": { 739 | "value": { 740 | "description": "The sensor value", 741 | "type": "number" 742 | }, 743 | "unit": { 744 | "description": "The unit of the sensor value. You should always define the unit though if the sensor is a flag of a boolean type then you can of course omit it.", 745 | "type": "string", 746 | "enum": [ 747 | "m/s", 748 | "km/h", 749 | "kn" 750 | ] 751 | } 752 | }, 753 | "required": [ 754 | "value", 755 | "unit" 756 | ] 757 | }, 758 | "direction": { 759 | "description": "The wind direction in degrees.", 760 | "type": "object", 761 | "properties": { 762 | "value": { 763 | "description": "The sensor value", 764 | "type": "number" 765 | }, 766 | "unit": { 767 | "description": "The unit of the sensor value. You should always define the unit though if the sensor is a flag of a boolean type then you can of course omit it.", 768 | "type": "string", 769 | "enum": [ 770 | "°" 771 | ] 772 | } 773 | }, 774 | "required": [ 775 | "value", 776 | "unit" 777 | ] 778 | }, 779 | "elevation": { 780 | "description": "Height above mean sea level.", 781 | "type": "object", 782 | "properties": { 783 | "value": { 784 | "description": "The sensor value", 785 | "type": "number" 786 | }, 787 | "unit": { 788 | "description": "The unit of the sensor value. You should always define the unit though if the sensor is a flag of a boolean type then you can of course omit it.", 789 | "type": "string", 790 | "enum": [ 791 | "m" 792 | ] 793 | } 794 | }, 795 | "required": [ 796 | "value", 797 | "unit" 798 | ] 799 | } 800 | }, 801 | "required": [ 802 | "speed", 803 | "gust", 804 | "direction", 805 | "elevation" 806 | ] 807 | }, 808 | "location": { 809 | "description": "The location of your sensor such as Outside, Inside, Ceiling, Roof or Room 1.", 810 | "type": "string" 811 | }, 812 | "name": { 813 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 814 | "type": "string" 815 | }, 816 | "description": { 817 | "description": "An extra field that you can use to attach some additional information to this sensor instance.", 818 | "type": "string" 819 | } 820 | }, 821 | "required": [ 822 | "properties", 823 | "location" 824 | ] 825 | } 826 | }, 827 | "network_connections": { 828 | "description": "This sensor type is to specify the currently active ethernet or wireless network devices. You can create different instances for each network type.", 829 | "type": "array", 830 | "items": { 831 | "type": "object", 832 | "properties": { 833 | "type": { 834 | "description": "This field is optional but you can use it to the network type such as wifi or cable. You can even expose the number of spacenet-authenticated connections.", 835 | "type": "string", 836 | "enum": [ 837 | "wifi", 838 | "cable", 839 | "spacenet" 840 | ] 841 | }, 842 | "value": { 843 | "description": "The amount of network connections.", 844 | "type": "number" 845 | }, 846 | "machines": { 847 | "description": "The machines that are currently connected with the network.", 848 | "type": "array", 849 | "items": { 850 | "type": "object", 851 | "properties": { 852 | "name": { 853 | "description": "The machine name.", 854 | "type": "string" 855 | }, 856 | "mac": { 857 | "description": "The machine's MAC address of the format D3:3A:DB:EE:FF:00.", 858 | "type": "string" 859 | } 860 | }, 861 | "required": [ 862 | "mac" 863 | ] 864 | } 865 | }, 866 | "location": { 867 | "description": "The location of your sensor such as Outside, Inside, Ceiling, Roof or Room 1.", 868 | "type": "string" 869 | }, 870 | "name": { 871 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 872 | "type": "string" 873 | }, 874 | "description": { 875 | "description": "An extra field that you can use to attach some additional information to this sensor instance.", 876 | "type": "string" 877 | } 878 | }, 879 | "required": [ 880 | "value" 881 | ] 882 | } 883 | }, 884 | "account_balance": { 885 | "description": "How rich is your hackerspace?", 886 | "type": "array", 887 | "items": { 888 | "type": "object", 889 | "properties": { 890 | "value": { 891 | "description": "How much?", 892 | "type": "number" 893 | }, 894 | "unit": { 895 | "description": "What's the currency? Please use the ones provided, in the next version you can use currency definitions according to ISO 4217", 896 | "type": "string", 897 | "enum": [ 898 | "BTC", 899 | "EUR", 900 | "USD", 901 | "GBP" 902 | ] 903 | }, 904 | "location": { 905 | "description": "If you have more than one account you can use this field to specify where it is.", 906 | "type": "string" 907 | }, 908 | "name": { 909 | "description": "Give your sensor instance a name.", 910 | "type": "string" 911 | }, 912 | "description": { 913 | "description": "An extra field that you can use to attach some additional information to this sensor instance.", 914 | "type": "string" 915 | } 916 | }, 917 | "required": [ 918 | "value", 919 | "unit" 920 | ] 921 | } 922 | }, 923 | "total_member_count": { 924 | "description": "Specify the number of space members.", 925 | "type": "array", 926 | "items": { 927 | "type": "object", 928 | "properties": { 929 | "value": { 930 | "description": "The amount of your space members.", 931 | "type": "number" 932 | }, 933 | "location": { 934 | "description": "Specify the location if your hackerspace has different departments (for whatever reason). This field is for one department. Every department should have its own sensor instance.", 935 | "type": "string" 936 | }, 937 | "name": { 938 | "description": "You can use this field to specify if this sensor instance counts active or inactive members.", 939 | "type": "string" 940 | }, 941 | "description": { 942 | "description": "An extra field that you can use to attach some additional information to this sensor instance.", 943 | "type": "string" 944 | } 945 | }, 946 | "required": [ 947 | "value" 948 | ] 949 | } 950 | }, 951 | "people_now_present": { 952 | "description": "Specify the number of people that are currently in your space. Optionally you can define a list of names.", 953 | "type": "array", 954 | "items": { 955 | "type": "object", 956 | "properties": { 957 | "value": { 958 | "description": "The amount of present people.", 959 | "type": "number" 960 | }, 961 | "location": { 962 | "description": "If you use multiple sensor instances for different rooms, use this field to indicate the location.", 963 | "type": "string" 964 | }, 965 | "name": { 966 | "description": "Give this sensor a name if necessary at all. Use the location field for the rooms. This field is not intended to be used for names of hackerspace members. Use the field 'names' instead.", 967 | "type": "string" 968 | }, 969 | "names": { 970 | "description": "List of hackerspace members that are currently occupying the space.", 971 | "type": "array", 972 | "items": { 973 | "type": "string" 974 | }, 975 | "minItems": 1 976 | }, 977 | "description": { 978 | "description": "An extra field that you can use to attach some additional information to this sensor instance.", 979 | "type": "string" 980 | } 981 | }, 982 | "required": [ 983 | "value" 984 | ] 985 | } 986 | } 987 | } 988 | }, 989 | "feeds": { 990 | "description": "Feeds where users can get updates of your space", 991 | "type": "object", 992 | "properties": { 993 | "blog": { 994 | "description": "", 995 | "type": "object", 996 | "properties": { 997 | "type": { 998 | "description": "Type of the feed, for example rss, atom, ical", 999 | "type": "string" 1000 | }, 1001 | "url": { 1002 | "description": "Feed URL", 1003 | "type": "string" 1004 | } 1005 | }, 1006 | "required": [ 1007 | "url" 1008 | ] 1009 | }, 1010 | "wiki": { 1011 | "description": "", 1012 | "type": "object", 1013 | "properties": { 1014 | "type": { 1015 | "description": "Type of the feed, for example rss, atom, ical", 1016 | "type": "string" 1017 | }, 1018 | "url": { 1019 | "description": "Feed URL", 1020 | "type": "string" 1021 | } 1022 | }, 1023 | "required": [ 1024 | "url" 1025 | ] 1026 | }, 1027 | "calendar": { 1028 | "description": "", 1029 | "type": "object", 1030 | "properties": { 1031 | "type": { 1032 | "description": "Type of the feed, for example rss, atom, ical", 1033 | "type": "string" 1034 | }, 1035 | "url": { 1036 | "description": "Feed URL", 1037 | "type": "string" 1038 | } 1039 | }, 1040 | "required": [ 1041 | "url" 1042 | ] 1043 | }, 1044 | "flickr": { 1045 | "description": "", 1046 | "type": "object", 1047 | "properties": { 1048 | "type": { 1049 | "description": "Type of the feed, for example rss, atom, ical", 1050 | "type": "string" 1051 | }, 1052 | "url": { 1053 | "description": "Feed URL", 1054 | "type": "string" 1055 | } 1056 | }, 1057 | "required": [ 1058 | "url" 1059 | ] 1060 | } 1061 | } 1062 | }, 1063 | "cache": { 1064 | "description": "Specifies options about caching of your SpaceAPI endpoint. Use this if you want to avoid hundreds/thousands of application instances crawling your status.", 1065 | "type": "object", 1066 | "properties": { 1067 | "schedule": { 1068 | "description": "Cache update cycle. This field must match the basic regular expression ^[mhd]\\.[0-9]{2}$, where the first field specifies a unit of time (m for 1 minute, h for 1 hour, d for 1 day), and the second field specifies how many of this unit should be skipped between updates. For example, m.10 means one updates every 10 minutes, h.03 means one update every 3 hours, and d.01 means one update every day.", 1069 | "type": "string", 1070 | "enum": [ 1071 | "m.02", 1072 | "m.05", 1073 | "m.10", 1074 | "m.15", 1075 | "m.30", 1076 | "h.01", 1077 | "h.02", 1078 | "h.04", 1079 | "h.08", 1080 | "h.12", 1081 | "d.01" 1082 | ] 1083 | } 1084 | }, 1085 | "required": [ 1086 | "schedule" 1087 | ] 1088 | }, 1089 | "projects": { 1090 | "description": "Your project sites (links to GitHub, wikis or wherever your projects are hosted)", 1091 | "type": "array", 1092 | "items": { 1093 | "type": "string" 1094 | } 1095 | }, 1096 | "radio_show": { 1097 | "description": "A list of radio shows that your hackerspace might broadcast.", 1098 | "type": "array", 1099 | "items": { 1100 | "type": "object", 1101 | "properties": { 1102 | "name": { 1103 | "description": "The name of the radio show.", 1104 | "type": "string" 1105 | }, 1106 | "url": { 1107 | "description": "The stream URL which must end in a filename or a semicolon such as
  • http://signal.hackerspaces.org:8090/signal.mp3
  • http://85.214.64.213:8060/;
", 1108 | "type": "string" 1109 | }, 1110 | "type": { 1111 | "description": "The stream encoder.", 1112 | "type": "string", 1113 | "enum": [ 1114 | "mp3", 1115 | "ogg" 1116 | ] 1117 | }, 1118 | "start": { 1119 | "description": "Specify the start time by using the ISO 8601 standard. This encodes the time as follows:

  • Combined date and time in UTC: 2013-06-10T10:00Z
  • Combined date and time in localtime with the timezone offset: 2013-06-10T12:00+02:00
  • Combined date and time in localtime with the timezone offset: 2013-06-10T07:00-03:00
The examples refer all to the same time.", 1120 | "type": "string" 1121 | }, 1122 | "end": { 1123 | "description": "Specify the end time by using the ISO 8601 standard. This encodes the time as follows:

  • Combined date and time in UTC: 2013-06-10T10:00Z
  • Combined date and time in localtime with the timezone offset: 2013-06-10T12:00+02:00
  • Combined date and time in localtime with the timezone offset: 2013-06-10T07:00-03:00
The examples refer all to the same time.", 1124 | "type": "string" 1125 | } 1126 | }, 1127 | "required": [ 1128 | "name", 1129 | "url", 1130 | "type", 1131 | "start", 1132 | "end" 1133 | ] 1134 | } 1135 | } 1136 | }, 1137 | "required": [ 1138 | "api", 1139 | "space", 1140 | "logo", 1141 | "url", 1142 | "location", 1143 | "state", 1144 | "contact", 1145 | "issue_report_channels" 1146 | ] 1147 | } 1148 | -------------------------------------------------------------------------------- /14.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "https://schema.spaceapi.io/14.json", 3 | "$schema": "http://json-schema.org/draft-07/schema#", 4 | "description": "SpaceAPI v14", 5 | "type": "object", 6 | "properties": { 7 | "api_compatibility": { 8 | "description": "The versions your SpaceAPI endpoint supports", 9 | "type": "array", 10 | "items": { 11 | "type": "string" 12 | }, 13 | "contains": { 14 | "const": "14" 15 | } 16 | }, 17 | "space": { 18 | "description": "The name of your space", 19 | "type": "string" 20 | }, 21 | "logo": { 22 | "description": "URL to your space logo", 23 | "type": "string" 24 | }, 25 | "url": { 26 | "description": "URL to your space website", 27 | "type": "string" 28 | }, 29 | "location": { 30 | "description": "Position data such as a postal address or geographic coordinates", 31 | "type": "object", 32 | "properties": { 33 | "address": { 34 | "description": "The postal address of your space (street, block, housenumber, zip code, city, whatever you usually need in your country, and the country itself).
Examples:
  • Netzladen e.V., Breite Straße 74, 53111 Bonn, Germany
", 35 | "type": "string" 36 | }, 37 | "lat": { 38 | "description": "Latitude of your space location, in degree with decimal places. Use positive values for locations north of the equator, negative values for locations south of equator.", 39 | "type": "number" 40 | }, 41 | "lon": { 42 | "description": "Longitude of your space location, in degree with decimal places. Use positive values for locations east of Greenwich, and negative values for locations west of Greenwich.", 43 | "type": "number" 44 | }, 45 | "timezone": { 46 | "description": "The timezone the space is located in. It should be formatted according to the TZ database location names.", 47 | "type": "string", 48 | "examples": [ 49 | "Europe/Kyiv", 50 | "Antarctica/Palmer" 51 | ] 52 | } 53 | }, 54 | "required": [ 55 | "lat", 56 | "lon" 57 | ] 58 | }, 59 | "spacefed": { 60 | "description": "A flag indicating if the hackerspace uses SpaceFED, a federated login scheme so that visiting hackers can use the space WiFi with their home space credentials.", 61 | "type": "object", 62 | "properties": { 63 | "spacenet": { 64 | "description": "See the wiki.", 65 | "type": "boolean" 66 | }, 67 | "spacesaml": { 68 | "description": "See the wiki.", 69 | "type": "boolean" 70 | } 71 | }, 72 | "required": [ 73 | "spacenet", 74 | "spacesaml" 75 | ] 76 | }, 77 | "cam": { 78 | "description": "URL(s) of webcams in your space", 79 | "type": "array", 80 | "items": { 81 | "type": "string" 82 | }, 83 | "minItems": 1 84 | }, 85 | "state": { 86 | "description": "A collection of status-related data: actual open/closed status, icons, last change timestamp etc.", 87 | "type": "object", 88 | "properties": { 89 | "open": { 90 | "description": "A flag which indicates whether the space is currently open or closed. The state 'undefined' can be achieved by omitting this field. A missing 'open' property carries the semantics of a temporary unavailability of the state, whereas the absence of the 'state' property itself means the state is generally not implemented for this space. This field is also allowed to explicitly have the value null for backwards compatibility with older schema versions, but this is deprecated and will be removed in a future version.", 91 | "type": [ 92 | "boolean", 93 | "null" 94 | ] 95 | }, 96 | "lastchange": { 97 | "description": "The Unix timestamp when the space status changed most recently", 98 | "type": "number" 99 | }, 100 | "trigger_person": { 101 | "description": "The person who lastly changed the state e.g. opened or closed the space", 102 | "type": "string" 103 | }, 104 | "message": { 105 | "description": "An additional free-form string, could be something like 'open for public', 'members only' or whatever you want it to be", 106 | "type": "string" 107 | }, 108 | "icon": { 109 | "description": "Icons that show the status graphically", 110 | "type": "object", 111 | "properties": { 112 | "open": { 113 | "description": "The URL to your customized space logo showing an open space", 114 | "type": "string" 115 | }, 116 | "closed": { 117 | "description": "The URL to your customized space logo showing a closed space", 118 | "type": "string" 119 | } 120 | }, 121 | "required": [ 122 | "open", 123 | "closed" 124 | ] 125 | } 126 | } 127 | }, 128 | "events": { 129 | "description": "Events which happened recently in your space and which could be interesting to the public, like 'User X has entered/triggered/did something at timestamp Z'", 130 | "type": "array", 131 | "items": { 132 | "required": [ 133 | "name", 134 | "type", 135 | "timestamp" 136 | ], 137 | "type": "object", 138 | "properties": { 139 | "name": { 140 | "description": "Name or other identity of the subject (e.g. J. Random Hacker, fridge, 3D printer, …)", 141 | "type": "string" 142 | }, 143 | "type": { 144 | "description": "Action (e.g. check-in, check-out, finish-print, …). Define your own actions and use them consistently, canonical actions are not (yet) specified", 145 | "type": "string" 146 | }, 147 | "timestamp": { 148 | "description": "Unix timestamp when the event occurred", 149 | "type": "number" 150 | }, 151 | "extra": { 152 | "description": "A custom text field to give more information about the event", 153 | "type": "string" 154 | } 155 | } 156 | } 157 | }, 158 | "contact": { 159 | "description": "Contact information about your space", 160 | "type": "object", 161 | "properties": { 162 | "phone": { 163 | "description": "Phone number, including country code with a leading plus sign", 164 | "type": "string", 165 | "examples": [ 166 | "+1 800 555 4567", 167 | "+41 79 123 45 67" 168 | ] 169 | }, 170 | "sip": { 171 | "description": "URI for Voice-over-IP via SIP", 172 | "type": "string", 173 | "examples": [ 174 | "sip:yourspace@sip.example.org" 175 | ] 176 | }, 177 | "keymasters": { 178 | "description": "Persons who carry a key and are able to open the space upon request. One of the fields irc_nick, phone, email or twitter must be specified.", 179 | "type": "array", 180 | "minItems": 1, 181 | "items": { 182 | "type": "object", 183 | "properties": { 184 | "name": { 185 | "description": "Real name", 186 | "type": "string" 187 | }, 188 | "irc_nick": { 189 | "description": "Contact the person with this nickname directly in irc if available. The irc channel to be used is defined in the contact/irc field.", 190 | "type": "string" 191 | }, 192 | "phone": { 193 | "description": "Phone number, including country code with a leading plus sign", 194 | "type": "string", 195 | "examples": [ 196 | "+1 800 555 4567", 197 | "+41 79 123 45 67" 198 | ] 199 | }, 200 | "email": { 201 | "description": "Email address which can be base64 encoded", 202 | "type": "string" 203 | }, 204 | "twitter": { 205 | "description": "Twitter username with leading @", 206 | "type": "string", 207 | "examples": [ 208 | "@space_api" 209 | ] 210 | }, 211 | "xmpp": { 212 | "description": "XMPP (Jabber) ID", 213 | "type": "string" 214 | }, 215 | "mastodon": { 216 | "description": "Mastodon username", 217 | "type": "string", 218 | "examples": [ 219 | "@ordnung@chaos.social" 220 | ] 221 | }, 222 | "matrix": { 223 | "description": "Matrix username (including domain)", 224 | "type": "string", 225 | "examples": [ 226 | "@user:example.org" 227 | ] 228 | } 229 | } 230 | } 231 | }, 232 | "irc": { 233 | "description": "URL of the IRC channel", 234 | "type": "string", 235 | "examples": [ 236 | "irc://example.org/#channelname" 237 | ] 238 | }, 239 | "twitter": { 240 | "description": "Twitter username with leading @", 241 | "type": "string", 242 | "examples": [ 243 | "@space_api" 244 | ] 245 | }, 246 | "mastodon": { 247 | "description": "Mastodon username", 248 | "type": "string", 249 | "examples": [ 250 | "@ordnung@chaos.social" 251 | ] 252 | }, 253 | "facebook": { 254 | "description": "Facebook account URL", 255 | "type": "string" 256 | }, 257 | "identica": { 258 | "description": "Identi.ca or StatusNet account, in the form yourspace@example.org", 259 | "type": "string" 260 | }, 261 | "foursquare": { 262 | "description": "Foursquare ID, in the form 4d8a9114d85f3704eab301dc", 263 | "type": "string" 264 | }, 265 | "email": { 266 | "description": "E-mail address for contacting your space. If this is a mailing list consider to use the contact/ml field.", 267 | "type": "string" 268 | }, 269 | "ml": { 270 | "description": "The e-mail address of your mailing list. If you use Google Groups then the e-mail looks like your-group@googlegroups.com.", 271 | "type": "string" 272 | }, 273 | "xmpp": { 274 | "description": "A public Jabber/XMPP multi-user chatroom in the form chatroom@conference.example.net", 275 | "type": "string" 276 | }, 277 | "issue_mail": { 278 | "description": "A separate email address for issue reports. This value can be Base64-encoded.", 279 | "type": "string" 280 | }, 281 | "gopher": { 282 | "description": "A URL to find information about the Space in the Gopherspace", 283 | "type": "string", 284 | "examples": [ 285 | "gopher://gopher.binary-kitchen.de" 286 | ] 287 | }, 288 | "matrix": { 289 | "description": "Matrix channel/community for the Hackerspace", 290 | "type": "string", 291 | "examples": [ 292 | "#spaceroom:example.org", 293 | "+spacecommunity:example.org" 294 | ] 295 | }, 296 | "mumble": { 297 | "description": "URL to a Mumble server/channel, as specified in https://wiki.mumble.info/wiki/Mumble_URL", 298 | "type": "string", 299 | "examples": [ 300 | "mumble://mumble.example.org/spaceroom?version=1.2.0" 301 | ] 302 | } 303 | } 304 | }, 305 | "sensors": { 306 | "description": "Data of various sensors in your space (e.g. temperature, humidity, amount of Club-Mate left, …). The only canonical property is the temp property, additional sensor types may be defined by you. In this case, you are requested to share your definition for inclusion in this specification.", 307 | "type": "object", 308 | "properties": { 309 | "temperature": { 310 | "description": "Temperature sensor. To convert from one unit of temperature to another consider Wikipedia.", 311 | "type": "array", 312 | "items": { 313 | "type": "object", 314 | "properties": { 315 | "value": { 316 | "description": "The sensor value", 317 | "type": "number" 318 | }, 319 | "unit": { 320 | "description": "The unit of the sensor value", 321 | "type": "string", 322 | "enum": [ 323 | "°C", 324 | "°F", 325 | "K", 326 | "°De", 327 | "°N", 328 | "°R", 329 | "°Ré", 330 | "°Rø" 331 | ] 332 | }, 333 | "location": { 334 | "description": "The location of your sensor", 335 | "type": "string", 336 | "examples": [ 337 | "Outside", 338 | "Inside", 339 | "Ceiling", 340 | "Room 1" 341 | ] 342 | }, 343 | "name": { 344 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 345 | "type": "string" 346 | }, 347 | "description": { 348 | "description": "An extra field that you can use to attach some additional information to this sensor instance", 349 | "type": "string" 350 | } 351 | }, 352 | "required": [ 353 | "value", 354 | "unit", 355 | "location" 356 | ] 357 | } 358 | }, 359 | "door_locked": { 360 | "description": "Sensor type to indicate if a certain door is locked", 361 | "type": "array", 362 | "items": { 363 | "type": "object", 364 | "properties": { 365 | "value": { 366 | "description": "The sensor value", 367 | "type": "boolean" 368 | }, 369 | "location": { 370 | "description": "The location of your sensor", 371 | "type": "string", 372 | "examples": [ 373 | "Front door", 374 | "Chill room", 375 | "Lab" 376 | ] 377 | }, 378 | "name": { 379 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 380 | "type": "string" 381 | }, 382 | "description": { 383 | "description": "An extra field that you can use to attach some additional information to this sensor instance", 384 | "type": "string" 385 | } 386 | }, 387 | "required": [ 388 | "value", 389 | "location" 390 | ] 391 | } 392 | }, 393 | "barometer": { 394 | "description": "Barometer sensor", 395 | "type": "array", 396 | "items": { 397 | "type": "object", 398 | "properties": { 399 | "value": { 400 | "description": "The sensor value", 401 | "type": "number" 402 | }, 403 | "unit": { 404 | "description": "The unit of pressure used by your sensor
Note: The hPA unit is deprecated and should not be used anymore. Use the correct hPa unit instead.", 405 | "type": "string", 406 | "enum": [ 407 | "hPa", 408 | "hPA" 409 | ] 410 | }, 411 | "location": { 412 | "description": "The location of your sensor", 413 | "type": "string", 414 | "examples": [ 415 | "Outside", 416 | "Inside", 417 | "Lab" 418 | ] 419 | }, 420 | "name": { 421 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 422 | "type": "string" 423 | }, 424 | "description": { 425 | "description": "An extra field that you can use to attach some additional information to this sensor instance", 426 | "type": "string" 427 | } 428 | }, 429 | "required": [ 430 | "value", 431 | "unit", 432 | "location" 433 | ] 434 | } 435 | }, 436 | "radiation": { 437 | "description": "Compound radiation sensor. Check this resource.", 438 | "type": "object", 439 | "properties": { 440 | "alpha": { 441 | "description": "An alpha sensor", 442 | "type": "array", 443 | "items": { 444 | "type": "object", 445 | "properties": { 446 | "value": { 447 | "description": "Observed counts per minute (ocpm) or actual radiation value. If the value are the observed counts then the dead_time and conversion_factor fields must be defined as well. CPM formula:
cpm = ocpm ( 1 + 1 / (1 - ocpm x dead_time) )
Conversion formula:
µSv/h = cpm x conversion_factor
", 448 | "type": "number" 449 | }, 450 | "unit": { 451 | "description": "Choose the appropriate unit for your radiation sensor instance", 452 | "type": "string", 453 | "enum": [ 454 | "cpm", 455 | "r/h", 456 | "µSv/h", 457 | "mSv/a", 458 | "µSv/a" 459 | ] 460 | }, 461 | "dead_time": { 462 | "description": "The dead time in µs. See the description of the value field to see how to use the dead time.", 463 | "type": "number" 464 | }, 465 | "conversion_factor": { 466 | "description": "The conversion from the cpm unit to another unit hardly depends on your tube type. See the description of the value field to see how to use the conversion factor. Note: only trust your manufacturer if it comes to the actual factor value. The internet seems full of wrong copy & pastes, don't even trust your neighbour hackerspace. If in doubt ask the tube manufacturer.", 467 | "type": "number" 468 | }, 469 | "location": { 470 | "description": "The location of your sensor", 471 | "type": "string", 472 | "examples": [ 473 | "Outside", 474 | "Roof", 475 | "Lab" 476 | ] 477 | }, 478 | "name": { 479 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 480 | "type": "string" 481 | }, 482 | "description": { 483 | "description": "An extra field that you can use to attach some additional information to this sensor instance", 484 | "type": "string" 485 | } 486 | }, 487 | "required": [ 488 | "value", 489 | "unit" 490 | ] 491 | } 492 | }, 493 | "beta": { 494 | "description": "A beta sensor", 495 | "type": "array", 496 | "items": { 497 | "type": "object", 498 | "properties": { 499 | "value": { 500 | "description": "Observed counts per minute (ocpm) or actual radiation value. If the value are the observed counts then the dead_time and conversion_factor fields must be defined as well. CPM formula:
cpm = ocpm ( 1 + 1 / (1 - ocpm x dead_time) )
Conversion formula:
µSv/h = cpm x conversion_factor
", 501 | "type": "number" 502 | }, 503 | "unit": { 504 | "description": "Choose the appropriate unit for your radiation sensor instance", 505 | "type": "string", 506 | "enum": [ 507 | "cpm", 508 | "r/h", 509 | "µSv/h", 510 | "mSv/a", 511 | "µSv/a" 512 | ] 513 | }, 514 | "dead_time": { 515 | "description": "The dead time in µs. See the description of the value field to see how to use the dead time.", 516 | "type": "number" 517 | }, 518 | "conversion_factor": { 519 | "description": "The conversion from the cpm unit to another unit hardly depends on your tube type. See the description of the value field to see how to use the conversion factor. Note: only trust your manufacturer if it comes to the actual factor value. The internet seems full of wrong copy & pastes, don't even trust your neighbour hackerspace. If in doubt ask the tube manufacturer.", 520 | "type": "number" 521 | }, 522 | "location": { 523 | "description": "The location of your sensor", 524 | "type": "string", 525 | "examples": [ 526 | "Outside", 527 | "Roof", 528 | "Lab" 529 | ] 530 | }, 531 | "name": { 532 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 533 | "type": "string" 534 | }, 535 | "description": { 536 | "description": "An extra field that you can use to attach some additional information to this sensor instance", 537 | "type": "string" 538 | } 539 | }, 540 | "required": [ 541 | "value", 542 | "unit" 543 | ] 544 | } 545 | }, 546 | "gamma": { 547 | "description": "A gamma sensor", 548 | "type": "array", 549 | "items": { 550 | "type": "object", 551 | "properties": { 552 | "value": { 553 | "description": "Observed counts per minute (ocpm) or actual radiation value. If the value are the observed counts then the dead_time and conversion_factor fields must be defined as well. CPM formula:
cpm = ocpm ( 1 + 1 / (1 - ocpm x dead_time) )
Conversion formula:
µSv/h = cpm x conversion_factor
", 554 | "type": "number" 555 | }, 556 | "unit": { 557 | "description": "Choose the appropriate unit for your radiation sensor instance", 558 | "type": "string", 559 | "enum": [ 560 | "cpm", 561 | "r/h", 562 | "µSv/h", 563 | "mSv/a", 564 | "µSv/a" 565 | ] 566 | }, 567 | "dead_time": { 568 | "description": "The dead time in µs. See the description of the value field to see how to use the dead time.", 569 | "type": "number" 570 | }, 571 | "conversion_factor": { 572 | "description": "The conversion from the cpm unit to another unit hardly depends on your tube type. See the description of the value field to see how to use the conversion factor. Note: only trust your manufacturer if it comes to the actual factor value. The internet seems full of wrong copy & pastes, don't even trust your neighbour hackerspace. If in doubt ask the tube manufacturer.", 573 | "type": "number" 574 | }, 575 | "location": { 576 | "description": "The location of your sensor", 577 | "type": "string", 578 | "examples": [ 579 | "Outside", 580 | "Roof", 581 | "Lab" 582 | ] 583 | }, 584 | "name": { 585 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 586 | "type": "string" 587 | }, 588 | "description": { 589 | "description": "An extra field that you can use to attach some additional information to this sensor instance", 590 | "type": "string" 591 | } 592 | }, 593 | "required": [ 594 | "value", 595 | "unit" 596 | ] 597 | } 598 | }, 599 | "beta_gamma": { 600 | "description": "A sensor which cannot filter beta and gamma radiation separately.", 601 | "type": "array", 602 | "items": { 603 | "type": "object", 604 | "properties": { 605 | "value": { 606 | "description": "Observed counts per minute (ocpm) or actual radiation value. If the value are the observed counts then the dead_time and conversion_factor fields must be defined as well. CPM formula:
cpm = ocpm ( 1 + 1 / (1 - ocpm x dead_time) )
Conversion formula:
µSv/h = cpm x conversion_factor
", 607 | "type": "number" 608 | }, 609 | "unit": { 610 | "description": "Choose the appropriate unit for your radiation sensor instance", 611 | "type": "string", 612 | "enum": [ 613 | "cpm", 614 | "r/h", 615 | "µSv/h", 616 | "mSv/a", 617 | "µSv/a" 618 | ] 619 | }, 620 | "dead_time": { 621 | "description": "The dead time in µs. See the description of the value field to see how to use the dead time.", 622 | "type": "number" 623 | }, 624 | "conversion_factor": { 625 | "description": "The conversion from the cpm unit to another unit hardly depends on your tube type. See the description of the value field to see how to use the conversion factor. Note: only trust your manufacturer if it comes to the actual factor value. The internet seems full of wrong copy & pastes, don't even trust your neighbour hackerspace. If in doubt ask the tube manufacturer.", 626 | "type": "number" 627 | }, 628 | "location": { 629 | "description": "The location of your sensor", 630 | "type": "string", 631 | "examples": [ 632 | "Outside", 633 | "Roof", 634 | "Lab" 635 | ] 636 | }, 637 | "name": { 638 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 639 | "type": "string" 640 | }, 641 | "description": { 642 | "description": "An extra field that you can use to attach some additional information to this sensor instance", 643 | "type": "string" 644 | } 645 | }, 646 | "required": [ 647 | "value", 648 | "unit" 649 | ] 650 | } 651 | } 652 | } 653 | }, 654 | "humidity": { 655 | "description": "Humidity sensor", 656 | "type": "array", 657 | "items": { 658 | "type": "object", 659 | "properties": { 660 | "value": { 661 | "description": "The sensor value", 662 | "type": "number" 663 | }, 664 | "unit": { 665 | "description": "The unit of the sensor value. You should always define the unit though if the sensor is a flag of a boolean type then you can of course omit it.", 666 | "type": "string", 667 | "enum": [ 668 | "%" 669 | ] 670 | }, 671 | "location": { 672 | "description": "The location of your sensor", 673 | "type": "string", 674 | "examples": [ 675 | "Outside", 676 | "Roof", 677 | "Lab" 678 | ] 679 | }, 680 | "name": { 681 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 682 | "type": "string" 683 | }, 684 | "description": { 685 | "description": "An extra field that you can use to attach some additional information to this sensor instance", 686 | "type": "string" 687 | } 688 | }, 689 | "required": [ 690 | "value", 691 | "unit", 692 | "location" 693 | ] 694 | } 695 | }, 696 | "beverage_supply": { 697 | "description": "How much Mate and beer is in your fridge?", 698 | "type": "array", 699 | "items": { 700 | "type": "object", 701 | "properties": { 702 | "value": { 703 | "description": "The sensor value", 704 | "type": "number" 705 | }, 706 | "unit": { 707 | "description": "The unit, either btl for bottles or crt for crates", 708 | "type": "string", 709 | "enum": [ 710 | "btl", 711 | "crt" 712 | ] 713 | }, 714 | "location": { 715 | "description": "The location of your sensor", 716 | "type": "string", 717 | "examples": [ 718 | "Entrance", 719 | "Room 1", 720 | "Fridge 3", 721 | "Lab" 722 | ] 723 | }, 724 | "name": { 725 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 726 | "type": "string" 727 | }, 728 | "description": { 729 | "description": "An extra field that you can use to attach some additional information to this sensor instance", 730 | "type": "string" 731 | } 732 | }, 733 | "required": [ 734 | "value", 735 | "unit" 736 | ] 737 | } 738 | }, 739 | "power_consumption": { 740 | "description": "The power consumption of a specific device or of your whole space", 741 | "type": "array", 742 | "items": { 743 | "type": "object", 744 | "properties": { 745 | "value": { 746 | "description": "The sensor value", 747 | "type": "number" 748 | }, 749 | "unit": { 750 | "description": "The unit of the sensor value. You should always define the unit though if the sensor is a flag of a boolean type then you can of course omit it.", 751 | "type": "string", 752 | "enum": [ 753 | "mW", 754 | "W", 755 | "VA" 756 | ] 757 | }, 758 | "location": { 759 | "description": "The location of your sensor", 760 | "type": "string", 761 | "examples": [ 762 | "Room 1", 763 | "Lab" 764 | ] 765 | }, 766 | "name": { 767 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 768 | "type": "string" 769 | }, 770 | "description": { 771 | "description": "An extra field that you can use to attach some additional information to this sensor instance", 772 | "type": "string" 773 | } 774 | }, 775 | "required": [ 776 | "value", 777 | "unit", 778 | "location" 779 | ] 780 | } 781 | }, 782 | "wind": { 783 | "description": "Your wind sensor", 784 | "type": "array", 785 | "items": { 786 | "type": "object", 787 | "properties": { 788 | "properties": { 789 | "description": "", 790 | "type": "object", 791 | "properties": { 792 | "speed": { 793 | "description": "", 794 | "type": "object", 795 | "properties": { 796 | "value": { 797 | "description": "The sensor value", 798 | "type": "number" 799 | }, 800 | "unit": { 801 | "description": "The unit of the sensor value. You should always define the unit though if the sensor is a flag of a boolean type then you can of course omit it.", 802 | "type": "string", 803 | "enum": [ 804 | "m/s", 805 | "km/h", 806 | "kn" 807 | ] 808 | } 809 | }, 810 | "required": [ 811 | "value", 812 | "unit" 813 | ] 814 | }, 815 | "gust": { 816 | "description": "", 817 | "type": "object", 818 | "properties": { 819 | "value": { 820 | "description": "The sensor value", 821 | "type": "number" 822 | }, 823 | "unit": { 824 | "description": "The unit of the sensor value. You should always define the unit though if the sensor is a flag of a boolean type then you can of course omit it.", 825 | "type": "string", 826 | "enum": [ 827 | "m/s", 828 | "km/h", 829 | "kn" 830 | ] 831 | } 832 | }, 833 | "required": [ 834 | "value", 835 | "unit" 836 | ] 837 | }, 838 | "direction": { 839 | "description": "The wind direction in degrees", 840 | "type": "object", 841 | "properties": { 842 | "value": { 843 | "description": "The sensor value", 844 | "type": "number" 845 | }, 846 | "unit": { 847 | "description": "The unit of the sensor value. You should always define the unit though if the sensor is a flag of a boolean type then you can of course omit it.", 848 | "type": "string", 849 | "enum": [ 850 | "°" 851 | ] 852 | } 853 | }, 854 | "required": [ 855 | "value", 856 | "unit" 857 | ] 858 | }, 859 | "elevation": { 860 | "description": "Height above mean sea level", 861 | "type": "object", 862 | "properties": { 863 | "value": { 864 | "description": "The sensor value", 865 | "type": "number" 866 | }, 867 | "unit": { 868 | "description": "The unit of the sensor value. You should always define the unit though if the sensor is a flag of a boolean type then you can of course omit it.", 869 | "type": "string", 870 | "enum": [ 871 | "m" 872 | ] 873 | } 874 | }, 875 | "required": [ 876 | "value", 877 | "unit" 878 | ] 879 | } 880 | }, 881 | "required": [ 882 | "speed", 883 | "gust", 884 | "direction", 885 | "elevation" 886 | ] 887 | }, 888 | "location": { 889 | "description": "The location of your sensor", 890 | "type": "string", 891 | "examples": [ 892 | "Roof", 893 | "Entrance" 894 | ] 895 | }, 896 | "name": { 897 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 898 | "type": "string" 899 | }, 900 | "description": { 901 | "description": "An extra field that you can use to attach some additional information to this sensor instance", 902 | "type": "string" 903 | } 904 | }, 905 | "required": [ 906 | "properties", 907 | "location" 908 | ] 909 | } 910 | }, 911 | "network_connections": { 912 | "description": "This sensor type is to specify the currently active ethernet or wireless network devices. You can create different instances for each network type.", 913 | "type": "array", 914 | "items": { 915 | "type": "object", 916 | "properties": { 917 | "type": { 918 | "description": "This field is optional but you can use it to the network type such as wifi or cable. You can even expose the number of spacenet-authenticated connections.", 919 | "type": "string", 920 | "enum": [ 921 | "wifi", 922 | "cable", 923 | "spacenet" 924 | ] 925 | }, 926 | "value": { 927 | "description": "The amount of network connections.", 928 | "type": "number" 929 | }, 930 | "machines": { 931 | "description": "The machines that are currently connected with the network.", 932 | "type": "array", 933 | "items": { 934 | "type": "object", 935 | "properties": { 936 | "name": { 937 | "description": "The machine name.", 938 | "type": "string" 939 | }, 940 | "mac": { 941 | "description": "The machine's MAC address of the format D3:3A:DB:EE:FF:00.", 942 | "type": "string" 943 | } 944 | }, 945 | "required": [ 946 | "mac" 947 | ] 948 | } 949 | }, 950 | "location": { 951 | "description": "The location of your sensor", 952 | "type": "string", 953 | "examples": [ 954 | "Lab", 955 | "Room 1" 956 | ] 957 | }, 958 | "name": { 959 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 960 | "type": "string" 961 | }, 962 | "description": { 963 | "description": "An extra field that you can use to attach some additional information to this sensor instance", 964 | "type": "string" 965 | } 966 | }, 967 | "required": [ 968 | "value" 969 | ] 970 | } 971 | }, 972 | "account_balance": { 973 | "description": "How rich is your hackerspace?", 974 | "type": "array", 975 | "items": { 976 | "type": "object", 977 | "properties": { 978 | "value": { 979 | "description": "How much?", 980 | "type": "number" 981 | }, 982 | "unit": { 983 | "description": "What's the currency? It should be formatted according to ISO 4217 short-code format.", 984 | "type": "string" 985 | }, 986 | "location": { 987 | "description": "If you have more than one account you can use this field to specify where it is.", 988 | "type": "string" 989 | }, 990 | "name": { 991 | "description": "Give your sensor instance a name.", 992 | "type": "string" 993 | }, 994 | "description": { 995 | "description": "An extra field that you can use to attach some additional information to this sensor instance", 996 | "type": "string" 997 | } 998 | }, 999 | "required": [ 1000 | "value", 1001 | "unit" 1002 | ] 1003 | } 1004 | }, 1005 | "total_member_count": { 1006 | "description": "Specify the number of space members.", 1007 | "type": "array", 1008 | "items": { 1009 | "type": "object", 1010 | "properties": { 1011 | "value": { 1012 | "description": "The amount of your space members.", 1013 | "type": "number" 1014 | }, 1015 | "location": { 1016 | "description": "Specify the location if your hackerspace has different departments (for whatever reason). This field is for one department. Every department should have its own sensor instance.", 1017 | "type": "string" 1018 | }, 1019 | "name": { 1020 | "description": "You can use this field to specify if this sensor instance counts active or inactive members.", 1021 | "type": "string" 1022 | }, 1023 | "description": { 1024 | "description": "An extra field that you can use to attach some additional information to this sensor instance", 1025 | "type": "string" 1026 | } 1027 | }, 1028 | "required": [ 1029 | "value" 1030 | ] 1031 | } 1032 | }, 1033 | "people_now_present": { 1034 | "description": "Specify the number of people that are currently in your space. Optionally you can define a list of names.", 1035 | "type": "array", 1036 | "items": { 1037 | "type": "object", 1038 | "properties": { 1039 | "value": { 1040 | "description": "The amount of present people.", 1041 | "type": "number" 1042 | }, 1043 | "location": { 1044 | "description": "If you use multiple sensor instances for different rooms, use this field to indicate the location.", 1045 | "type": "string" 1046 | }, 1047 | "name": { 1048 | "description": "Give this sensor a name if necessary at all. Use the location field for the rooms. This field is not intended to be used for names of hackerspace members. Use the field 'names' instead.", 1049 | "type": "string" 1050 | }, 1051 | "names": { 1052 | "description": "List of hackerspace members that are currently occupying the space.", 1053 | "type": "array", 1054 | "items": { 1055 | "type": "string" 1056 | }, 1057 | "minItems": 1 1058 | }, 1059 | "description": { 1060 | "description": "An extra field that you can use to attach some additional information to this sensor instance", 1061 | "type": "string" 1062 | } 1063 | }, 1064 | "required": [ 1065 | "value" 1066 | ] 1067 | } 1068 | }, 1069 | "network_traffic": { 1070 | "description": "The current network traffic, in bits/second or packets/second (or both)", 1071 | "type": "array", 1072 | "items": { 1073 | "type": "object", 1074 | "properties": { 1075 | "properties": { 1076 | "type": "object", 1077 | "properties": { 1078 | "bits_per_second": { 1079 | "description": "", 1080 | "type": "object", 1081 | "properties": { 1082 | "value": { 1083 | "description": "The measurement value, in bits/second", 1084 | "type": "number", 1085 | "minimum": 0 1086 | }, 1087 | "maximum": { 1088 | "description": "The maximum available throughput in bits/second, e.g. as sold by your ISP", 1089 | "type": "number", 1090 | "minimum": 0 1091 | } 1092 | }, 1093 | "required": [ 1094 | "value" 1095 | ] 1096 | }, 1097 | "packets_per_second": { 1098 | "description": "", 1099 | "type": "object", 1100 | "properties": { 1101 | "value": { 1102 | "description": "The measurement value, in packets/second", 1103 | "type": "number", 1104 | "minimum": 0 1105 | } 1106 | }, 1107 | "required": [ 1108 | "value" 1109 | ] 1110 | } 1111 | } 1112 | }, 1113 | "name": { 1114 | "description": "Name of the measurement, e.g. to distinguish between upstream and downstream traffic", 1115 | "type": "string" 1116 | }, 1117 | "location": { 1118 | "description": "Location the measurement relates to, e.g. WiFi or Uplink", 1119 | "type": "string" 1120 | }, 1121 | "description": { 1122 | "description": "An extra field that you can use to attach some additional information to this sensor instance", 1123 | "type": "string" 1124 | } 1125 | }, 1126 | "required": [ 1127 | "properties" 1128 | ] 1129 | }, 1130 | "minItems": 1 1131 | } 1132 | } 1133 | }, 1134 | "feeds": { 1135 | "description": "Feeds where users can get updates of your space", 1136 | "type": "object", 1137 | "properties": { 1138 | "blog": { 1139 | "description": "", 1140 | "type": "object", 1141 | "properties": { 1142 | "type": { 1143 | "description": "Type of the feed", 1144 | "type": "string", 1145 | "examples": [ 1146 | "rss", 1147 | "atom", 1148 | "ical" 1149 | ] 1150 | }, 1151 | "url": { 1152 | "description": "Feed URL", 1153 | "type": "string" 1154 | } 1155 | }, 1156 | "required": [ 1157 | "url" 1158 | ] 1159 | }, 1160 | "wiki": { 1161 | "description": "", 1162 | "type": "object", 1163 | "properties": { 1164 | "type": { 1165 | "description": "Type of the feed", 1166 | "type": "string", 1167 | "examples": [ 1168 | "rss", 1169 | "atom", 1170 | "ical" 1171 | ] 1172 | }, 1173 | "url": { 1174 | "description": "Feed URL", 1175 | "type": "string" 1176 | } 1177 | }, 1178 | "required": [ 1179 | "url" 1180 | ] 1181 | }, 1182 | "calendar": { 1183 | "description": "", 1184 | "type": "object", 1185 | "properties": { 1186 | "type": { 1187 | "description": "Type of the feed", 1188 | "type": "string", 1189 | "examples": [ 1190 | "rss", 1191 | "atom", 1192 | "ical" 1193 | ] 1194 | }, 1195 | "url": { 1196 | "description": "Feed URL", 1197 | "type": "string" 1198 | } 1199 | }, 1200 | "required": [ 1201 | "url" 1202 | ] 1203 | }, 1204 | "flickr": { 1205 | "description": "", 1206 | "type": "object", 1207 | "properties": { 1208 | "type": { 1209 | "description": "Type of the feed", 1210 | "type": "string", 1211 | "examples": [ 1212 | "rss", 1213 | "atom", 1214 | "ical" 1215 | ] 1216 | }, 1217 | "url": { 1218 | "description": "Feed URL", 1219 | "type": "string" 1220 | } 1221 | }, 1222 | "required": [ 1223 | "url" 1224 | ] 1225 | } 1226 | } 1227 | }, 1228 | "projects": { 1229 | "description": "Your project sites (links to GitHub, wikis or wherever your projects are hosted)", 1230 | "type": "array", 1231 | "items": { 1232 | "type": "string" 1233 | } 1234 | }, 1235 | "links": { 1236 | "description": "Arbitrary links that you'd like to share", 1237 | "type": "array", 1238 | "items": { 1239 | "type": "object", 1240 | "properties": { 1241 | "name": { 1242 | "description": "The link name", 1243 | "type": "string" 1244 | }, 1245 | "description": { 1246 | "description": "An extra field for a more detailed description of the link", 1247 | "type": "string" 1248 | }, 1249 | "url": { 1250 | "description": "The URL", 1251 | "type": "string" 1252 | } 1253 | }, 1254 | "required": [ 1255 | "name", 1256 | "url" 1257 | ] 1258 | } 1259 | }, 1260 | "membership_plans": { 1261 | "description": "A list of the different membership plans your hackerspace might have. Set the value according to your billing process. For example, if your membership fee is 10€ per month, but you bill it yearly (aka. the member pays the fee once per year), set the amount to 120 an the billing_interval to yearly.", 1262 | "type": "array", 1263 | "items": { 1264 | "type": "object", 1265 | "properties": { 1266 | "name": { 1267 | "description": "The name of the membership plan", 1268 | "type": "string", 1269 | "examples": [ 1270 | "Student Membership", 1271 | "Normal Membership" 1272 | ] 1273 | }, 1274 | "value": { 1275 | "description": "How much does this plan cost?", 1276 | "type": "number" 1277 | }, 1278 | "currency": { 1279 | "description": "What's the currency? It should be formatted according to ISO 4217 short-code format.", 1280 | "type": "string", 1281 | "examples": [ 1282 | "EUR", 1283 | "USD", 1284 | "CHF" 1285 | ] 1286 | }, 1287 | "billing_interval": { 1288 | "description": "How often is the membership billed? If you select other, please specify in the description what your billing interval is.", 1289 | "type": "string", 1290 | "enum": [ 1291 | "yearly", 1292 | "monthly", 1293 | "weekly", 1294 | "daily", 1295 | "hourly", 1296 | "other" 1297 | ] 1298 | }, 1299 | "description": { 1300 | "description": "A free form string", 1301 | "type": "string" 1302 | } 1303 | }, 1304 | "required": [ 1305 | "name", 1306 | "value", 1307 | "currency", 1308 | "billing_interval" 1309 | ] 1310 | } 1311 | } 1312 | }, 1313 | "required": [ 1314 | "api_compatibility", 1315 | "space", 1316 | "logo", 1317 | "url", 1318 | "location", 1319 | "contact" 1320 | ] 1321 | } 1322 | -------------------------------------------------------------------------------- /16-draft.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "https://schema.spaceapi.io/16-draft.json", 3 | "$schema": "http://json-schema.org/draft-07/schema#", 4 | "description": "SpaceAPI v16 (Draft)", 5 | "type": "object", 6 | "properties": { 7 | "api_compatibility": { 8 | "description": "The versions your SpaceAPI endpoint supports", 9 | "type": "array", 10 | "items": { 11 | "type": "string" 12 | }, 13 | "contains": { 14 | "const": "16-draft" 15 | } 16 | }, 17 | "space": { 18 | "description": "The name of your space", 19 | "type": "string" 20 | }, 21 | "logo": { 22 | "description": "URL to your space logo", 23 | "type": "string" 24 | }, 25 | "url": { 26 | "description": "URL to your space website", 27 | "type": "string" 28 | }, 29 | "location": { 30 | "description": "Position data such as a postal address or geographic coordinates. May be omitted for spaces without a fixed physical location.", 31 | "type": "object", 32 | "properties": { 33 | "address": { 34 | "description": "The postal address of your space (street, block, housenumber, zip code, city, whatever you usually need in your country, and the country itself).
Examples:
  • Netzladen e.V., Breite Straße 74, 53111 Bonn, Germany
", 35 | "type": "string" 36 | }, 37 | "lat": { 38 | "description": "Latitude of your space location, in degree with decimal places. Use positive values for locations north of the equator, negative values for locations south of equator.", 39 | "type": "number" 40 | }, 41 | "lon": { 42 | "description": "Longitude of your space location, in degree with decimal places. Use positive values for locations east of Greenwich, and negative values for locations west of Greenwich.", 43 | "type": "number" 44 | }, 45 | "timezone": { 46 | "description": "The timezone the space is located in. It should be formatted according to the TZ database location names.", 47 | "type": "string", 48 | "examples": [ 49 | "Europe/Kyiv", 50 | "Antarctica/Palmer" 51 | ] 52 | }, 53 | "country_code": { 54 | "description": "Country code in ISO 3166 alpha-2 format", 55 | "type": "string", 56 | "examples": [ 57 | "CH", 58 | "DE", 59 | "UA" 60 | ] 61 | }, 62 | "hint": { 63 | "description": "Information that can be used to describe how to access your space, if it is not trivial to find when standing at the address", 64 | "type": "string", 65 | "examples": [ 66 | "Ring the doorbell marked with HACKSPACE", 67 | "Knock three times, say Shibboleet and follow the white rabbit" 68 | ] 69 | }, 70 | "areas": { 71 | "description": "A list of areas in your space. Must include at least 1 area if defined.", 72 | "type": "array", 73 | "items": { 74 | "type": "object", 75 | "properties": { 76 | "name": { 77 | "type": "string", 78 | "description": "The name of this area", 79 | "examples": [ 80 | "Hackerspace", 81 | "Kitchen", 82 | "Workshop" 83 | ] 84 | }, 85 | "description": { 86 | "type": "string", 87 | "description": "A description of this area", 88 | "examples": [ 89 | "Our hackerspace area", 90 | "Woodworking machines and power tools" 91 | ] 92 | }, 93 | "square_meters": { 94 | "type": "number", 95 | "description": "The size of this area in square meters", 96 | "examples": [ 97 | 23.23, 98 | 42 99 | ] 100 | } 101 | }, 102 | "required": [ 103 | "square_meters" 104 | ] 105 | }, 106 | "minItems": 1 107 | } 108 | }, 109 | "minProperties": 1, 110 | "dependentRequired": { 111 | "lat": [ 112 | "lon" 113 | ], 114 | "lon": [ 115 | "lat" 116 | ] 117 | } 118 | }, 119 | "spacefed": { 120 | "description": "A flag indicating if the hackerspace uses SpaceFED, a federated login scheme so that visiting hackers can use the space WiFi with their home space credentials.", 121 | "type": "object", 122 | "properties": { 123 | "spacenet": { 124 | "description": "See the wiki.", 125 | "type": "boolean" 126 | }, 127 | "spacesaml": { 128 | "description": "See the wiki.", 129 | "type": "boolean" 130 | } 131 | }, 132 | "required": [ 133 | "spacenet", 134 | "spacesaml" 135 | ] 136 | }, 137 | "cam": { 138 | "description": "URL(s) of webcams in your space", 139 | "type": "array", 140 | "items": { 141 | "type": "string" 142 | }, 143 | "minItems": 1 144 | }, 145 | "state": { 146 | "description": "A collection of status-related data: actual open/closed status, icons, last change timestamp etc.", 147 | "type": "object", 148 | "properties": { 149 | "open": { 150 | "description": "A flag which indicates whether the space is currently open or closed. The state 'undefined' can be achieved by omitting this field. A missing 'open' property carries the semantics of a temporary unavailability of the state, whereas the absence of the 'state' property itself means the state is generally not implemented for this space.", 151 | "type": "boolean" 152 | }, 153 | "lastchange": { 154 | "description": "The Unix timestamp (in seconds) when the space status changed most recently", 155 | "type": "number" 156 | }, 157 | "trigger_person": { 158 | "description": "The person who lastly changed the state e.g. opened or closed the space.", 159 | "type": "string" 160 | }, 161 | "message": { 162 | "description": "An additional free-form string, could be something like 'open for public', 'members only' or whatever you want it to be", 163 | "type": "string" 164 | }, 165 | "icon": { 166 | "description": "Icons that show the status graphically", 167 | "type": "object", 168 | "properties": { 169 | "open": { 170 | "description": "The URL to your customized space logo showing an open space", 171 | "type": "string" 172 | }, 173 | "closed": { 174 | "description": "The URL to your customized space logo showing a closed space", 175 | "type": "string" 176 | } 177 | }, 178 | "required": [ 179 | "open", 180 | "closed" 181 | ] 182 | } 183 | } 184 | }, 185 | "events": { 186 | "description": "Events which happened recently in your space and which could be interesting to the public, like 'User X has entered/triggered/did something at timestamp Z'", 187 | "type": "array", 188 | "items": { 189 | "required": [ 190 | "name", 191 | "type", 192 | "timestamp" 193 | ], 194 | "type": "object", 195 | "properties": { 196 | "name": { 197 | "description": "Name or other identity of the subject (e.g. J. Random Hacker, fridge, 3D printer, …)", 198 | "type": "string" 199 | }, 200 | "type": { 201 | "description": "Action (e.g. check-in, check-out, finish-print, …). Define your own actions and use them consistently, canonical actions are not (yet) specified", 202 | "type": "string" 203 | }, 204 | "timestamp": { 205 | "description": "The Unix timestamp (in seconds) when the event occurred.", 206 | "type": "number" 207 | }, 208 | "extra": { 209 | "description": "A custom text field to give more information about the event", 210 | "type": "string" 211 | } 212 | } 213 | } 214 | }, 215 | "contact": { 216 | "description": "Contact information about your space", 217 | "type": "object", 218 | "properties": { 219 | "phone": { 220 | "description": "Phone number, including country code with a leading plus sign", 221 | "type": "string", 222 | "examples": [ 223 | "+1 800 555 4567", 224 | "+41 79 123 45 67" 225 | ] 226 | }, 227 | "sip": { 228 | "description": "URI for Voice-over-IP via SIP", 229 | "type": "string", 230 | "examples": [ 231 | "sip:yourspace@sip.example.org" 232 | ] 233 | }, 234 | "keymasters": { 235 | "description": "Persons who carry a key and are able to open the space upon request. One of the fields irc_nick, phone, email or twitter must be specified.", 236 | "type": "array", 237 | "minItems": 1, 238 | "items": { 239 | "type": "object", 240 | "properties": { 241 | "name": { 242 | "description": "Real name", 243 | "type": "string" 244 | }, 245 | "irc_nick": { 246 | "description": "Contact the person with this nickname directly in irc if available. The irc channel to be used is defined in the contact/irc field.", 247 | "type": "string" 248 | }, 249 | "phone": { 250 | "description": "Phone number, including country code with a leading plus sign", 251 | "type": "string", 252 | "examples": [ 253 | "+1 800 555 4567", 254 | "+41 79 123 45 67" 255 | ] 256 | }, 257 | "email": { 258 | "description": "Email address which can be base64 encoded.", 259 | "type": "string" 260 | }, 261 | "twitter": { 262 | "description": "Twitter username with leading @", 263 | "type": "string", 264 | "examples": [ 265 | "@space_api" 266 | ] 267 | }, 268 | "xmpp": { 269 | "description": "XMPP (Jabber) ID", 270 | "type": "string" 271 | }, 272 | "mastodon": { 273 | "description": "Mastodon username", 274 | "type": "string", 275 | "examples": [ 276 | "@ordnung@chaos.social" 277 | ] 278 | }, 279 | "matrix": { 280 | "description": "Matrix username (including domain)", 281 | "type": "string", 282 | "examples": [ 283 | "@user:example.org" 284 | ] 285 | } 286 | } 287 | } 288 | }, 289 | "irc": { 290 | "description": "URL of the IRC channel", 291 | "type": "string", 292 | "examples": [ 293 | "irc://example.org/#channelname" 294 | ] 295 | }, 296 | "twitter": { 297 | "description": "Twitter username with leading @", 298 | "type": "string", 299 | "examples": [ 300 | "@space_api" 301 | ] 302 | }, 303 | "mastodon": { 304 | "description": "Mastodon username", 305 | "type": "string", 306 | "examples": [ 307 | "@ordnung@chaos.social" 308 | ] 309 | }, 310 | "facebook": { 311 | "description": "Facebook account URL.", 312 | "type": "string" 313 | }, 314 | "identica": { 315 | "description": "Identi.ca or StatusNet account, in the form yourspace@example.org", 316 | "type": "string" 317 | }, 318 | "foursquare": { 319 | "description": "Foursquare ID, in the form 4d8a9114d85f3704eab301dc.", 320 | "type": "string" 321 | }, 322 | "email": { 323 | "description": "E-mail address for contacting your space. If this is a mailing list consider to use the contact/ml field.", 324 | "type": "string" 325 | }, 326 | "ml": { 327 | "description": "The e-mail address of your mailing list. If you use Google Groups then the e-mail looks like your-group@googlegroups.com.", 328 | "type": "string" 329 | }, 330 | "xmpp": { 331 | "description": "A public Jabber/XMPP multi-user chatroom in the form chatroom@conference.example.net", 332 | "type": "string" 333 | }, 334 | "issue_mail": { 335 | "description": "A separate email address for issue reports. This value can be Base64-encoded.", 336 | "type": "string" 337 | }, 338 | "gopher": { 339 | "description": "A URL to find information about the Space in the Gopherspace", 340 | "type": "string", 341 | "examples": [ 342 | "gopher://gopher.binary-kitchen.de" 343 | ] 344 | }, 345 | "matrix": { 346 | "description": "Matrix channel/community for the Hackerspace", 347 | "type": "string", 348 | "examples": [ 349 | "#spaceroom:example.org", 350 | "+spacecommunity:example.org" 351 | ] 352 | }, 353 | "mumble": { 354 | "description": "URL to a Mumble server/channel, as specified in https://wiki.mumble.info/wiki/Mumble_URL", 355 | "type": "string", 356 | "examples": [ 357 | "mumble://mumble.example.org/spaceroom?version=1.2.0" 358 | ] 359 | }, 360 | "telegram": { 361 | "description": "URL to Telegram channel", 362 | "type": "string", 363 | "examples": [ 364 | "https://t.me/example-channel" 365 | ] 366 | } 367 | } 368 | }, 369 | "sensors": { 370 | "description": "Data of various sensors in your space (e.g. temperature, humidity, amount of Club-Mate left, …). The only canonical property is the temp property, additional sensor types may be defined by you. In this case, you are requested to share your definition for inclusion in this specification.", 371 | "type": "object", 372 | "properties": { 373 | "temperature": { 374 | "description": "Temperature sensor. To convert from one unit of temperature to another consider Wikipedia.", 375 | "type": "array", 376 | "items": { 377 | "type": "object", 378 | "properties": { 379 | "value": { 380 | "description": "The sensor value", 381 | "type": "number" 382 | }, 383 | "unit": { 384 | "description": "The unit of the sensor value.", 385 | "type": "string", 386 | "enum": [ 387 | "°C", 388 | "°F", 389 | "K", 390 | "°De", 391 | "°N", 392 | "°R", 393 | "°Ré", 394 | "°Rø" 395 | ] 396 | }, 397 | "location": { 398 | "description": "The location of your sensor", 399 | "type": "string", 400 | "examples": [ 401 | "Outside", 402 | "Inside", 403 | "Ceiling", 404 | "Room 1" 405 | ] 406 | }, 407 | "name": { 408 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 409 | "type": "string" 410 | }, 411 | "description": { 412 | "description": "An extra field that you can use to attach some additional information to this sensor instance", 413 | "type": "string" 414 | }, 415 | "lastchange": { 416 | "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", 417 | "type": "number" 418 | } 419 | }, 420 | "required": [ 421 | "value", 422 | "unit", 423 | "location" 424 | ] 425 | } 426 | }, 427 | "door_locked": { 428 | "description": "Sensor type to indicate if a certain door is locked.", 429 | "type": "array", 430 | "items": { 431 | "type": "object", 432 | "properties": { 433 | "value": { 434 | "description": "The sensor value", 435 | "type": "boolean" 436 | }, 437 | "location": { 438 | "description": "The location of your sensor", 439 | "type": "string", 440 | "examples": [ 441 | "Front door", 442 | "Chill room", 443 | "Lab" 444 | ] 445 | }, 446 | "name": { 447 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 448 | "type": "string" 449 | }, 450 | "description": { 451 | "description": "An extra field that you can use to attach some additional information to this sensor instance", 452 | "type": "string" 453 | }, 454 | "lastchange": { 455 | "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", 456 | "type": "number" 457 | } 458 | }, 459 | "required": [ 460 | "value", 461 | "location" 462 | ] 463 | } 464 | }, 465 | "barometer": { 466 | "description": "Barometer sensor", 467 | "type": "array", 468 | "items": { 469 | "type": "object", 470 | "properties": { 471 | "value": { 472 | "description": "The sensor value", 473 | "type": "number" 474 | }, 475 | "unit": { 476 | "description": "The unit of pressure used by your sensor", 477 | "type": "string", 478 | "enum": [ 479 | "hPa" 480 | ] 481 | }, 482 | "location": { 483 | "description": "The location of your sensor", 484 | "type": "string", 485 | "examples": [ 486 | "Outside", 487 | "Inside", 488 | "Lab" 489 | ] 490 | }, 491 | "name": { 492 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 493 | "type": "string" 494 | }, 495 | "description": { 496 | "description": "An extra field that you can use to attach some additional information to this sensor instance", 497 | "type": "string" 498 | }, 499 | "lastchange": { 500 | "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", 501 | "type": "number" 502 | } 503 | }, 504 | "required": [ 505 | "value", 506 | "unit", 507 | "location" 508 | ] 509 | } 510 | }, 511 | "radiation": { 512 | "description": "Compound radiation sensor. Check this resource.", 513 | "type": "object", 514 | "properties": { 515 | "alpha": { 516 | "description": "An alpha sensor", 517 | "type": "array", 518 | "items": { 519 | "type": "object", 520 | "properties": { 521 | "value": { 522 | "description": "Observed counts per minute (ocpm) or actual radiation value. If the value are the observed counts then the dead_time and conversion_factor fields must be defined as well. CPM formula:
cpm = ocpm ( 1 + 1 / (1 - ocpm x dead_time) )
Conversion formula:
µSv/h = cpm x conversion_factor
", 523 | "type": "number" 524 | }, 525 | "unit": { 526 | "description": "Choose the appropriate unit for your radiation sensor instance", 527 | "type": "string", 528 | "enum": [ 529 | "cpm", 530 | "r/h", 531 | "µSv/h", 532 | "mSv/a", 533 | "µSv/a" 534 | ] 535 | }, 536 | "dead_time": { 537 | "description": "The dead time in µs. See the description of the value field to see how to use the dead time.", 538 | "type": "number" 539 | }, 540 | "conversion_factor": { 541 | "description": "The conversion from the cpm unit to another unit hardly depends on your tube type. See the description of the value field to see how to use the conversion factor. Note: only trust your manufacturer if it comes to the actual factor value. The internet seems full of wrong copy & pastes, don't even trust your neighbour hackerspace. If in doubt ask the tube manufacturer.", 542 | "type": "number" 543 | }, 544 | "location": { 545 | "description": "The location of your sensor", 546 | "type": "string", 547 | "examples": [ 548 | "Outside", 549 | "Roof", 550 | "Lab" 551 | ] 552 | }, 553 | "name": { 554 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 555 | "type": "string" 556 | }, 557 | "description": { 558 | "description": "An extra field that you can use to attach some additional information to this sensor instance", 559 | "type": "string" 560 | }, 561 | "lastchange": { 562 | "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", 563 | "type": "number" 564 | } 565 | }, 566 | "required": [ 567 | "value", 568 | "unit" 569 | ] 570 | } 571 | }, 572 | "beta": { 573 | "description": "A beta sensor", 574 | "type": "array", 575 | "items": { 576 | "type": "object", 577 | "properties": { 578 | "value": { 579 | "description": "Observed counts per minute (ocpm) or actual radiation value. If the value are the observed counts then the dead_time and conversion_factor fields must be defined as well. CPM formula:
cpm = ocpm ( 1 + 1 / (1 - ocpm x dead_time) )
Conversion formula:
µSv/h = cpm x conversion_factor
", 580 | "type": "number" 581 | }, 582 | "unit": { 583 | "description": "Choose the appropriate unit for your radiation sensor instance", 584 | "type": "string", 585 | "enum": [ 586 | "cpm", 587 | "r/h", 588 | "µSv/h", 589 | "mSv/a", 590 | "µSv/a" 591 | ] 592 | }, 593 | "dead_time": { 594 | "description": "The dead time in µs. See the description of the value field to see how to use the dead time.", 595 | "type": "number" 596 | }, 597 | "conversion_factor": { 598 | "description": "The conversion from the cpm unit to another unit hardly depends on your tube type. See the description of the value field to see how to use the conversion factor. Note: only trust your manufacturer if it comes to the actual factor value. The internet seems full of wrong copy & pastes, don't even trust your neighbour hackerspace. If in doubt ask the tube manufacturer.", 599 | "type": "number" 600 | }, 601 | "location": { 602 | "description": "The location of your sensor", 603 | "type": "string", 604 | "examples": [ 605 | "Outside", 606 | "Roof", 607 | "Lab" 608 | ] 609 | }, 610 | "name": { 611 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 612 | "type": "string" 613 | }, 614 | "description": { 615 | "description": "An extra field that you can use to attach some additional information to this sensor instance", 616 | "type": "string" 617 | }, 618 | "lastchange": { 619 | "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", 620 | "type": "number" 621 | } 622 | }, 623 | "required": [ 624 | "value", 625 | "unit" 626 | ] 627 | } 628 | }, 629 | "gamma": { 630 | "description": "A gamma sensor", 631 | "type": "array", 632 | "items": { 633 | "type": "object", 634 | "properties": { 635 | "value": { 636 | "description": "Observed counts per minute (ocpm) or actual radiation value. If the value are the observed counts then the dead_time and conversion_factor fields must be defined as well. CPM formula:
cpm = ocpm ( 1 + 1 / (1 - ocpm x dead_time) )
Conversion formula:
µSv/h = cpm x conversion_factor
", 637 | "type": "number" 638 | }, 639 | "unit": { 640 | "description": "Choose the appropriate unit for your radiation sensor instance", 641 | "type": "string", 642 | "enum": [ 643 | "cpm", 644 | "r/h", 645 | "µSv/h", 646 | "mSv/a", 647 | "µSv/a" 648 | ] 649 | }, 650 | "dead_time": { 651 | "description": "The dead time in µs. See the description of the value field to see how to use the dead time.", 652 | "type": "number" 653 | }, 654 | "conversion_factor": { 655 | "description": "The conversion from the cpm unit to another unit hardly depends on your tube type. See the description of the value field to see how to use the conversion factor. Note: only trust your manufacturer if it comes to the actual factor value. The internet seems full of wrong copy & pastes, don't even trust your neighbour hackerspace. If in doubt ask the tube manufacturer.", 656 | "type": "number" 657 | }, 658 | "location": { 659 | "description": "The location of your sensor", 660 | "type": "string", 661 | "examples": [ 662 | "Outside", 663 | "Roof", 664 | "Lab" 665 | ] 666 | }, 667 | "name": { 668 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 669 | "type": "string" 670 | }, 671 | "description": { 672 | "description": "An extra field that you can use to attach some additional information to this sensor instance", 673 | "type": "string" 674 | }, 675 | "lastchange": { 676 | "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", 677 | "type": "number" 678 | } 679 | }, 680 | "required": [ 681 | "value", 682 | "unit" 683 | ] 684 | } 685 | }, 686 | "beta_gamma": { 687 | "description": "A sensor which cannot filter beta and gamma radiation separately.", 688 | "type": "array", 689 | "items": { 690 | "type": "object", 691 | "properties": { 692 | "value": { 693 | "description": "Observed counts per minute (ocpm) or actual radiation value. If the value are the observed counts then the dead_time and conversion_factor fields must be defined as well. CPM formula:
cpm = ocpm ( 1 + 1 / (1 - ocpm x dead_time) )
Conversion formula:
µSv/h = cpm x conversion_factor
", 694 | "type": "number" 695 | }, 696 | "unit": { 697 | "description": "Choose the appropriate unit for your radiation sensor instance", 698 | "type": "string", 699 | "enum": [ 700 | "cpm", 701 | "r/h", 702 | "µSv/h", 703 | "mSv/a", 704 | "µSv/a" 705 | ] 706 | }, 707 | "dead_time": { 708 | "description": "The dead time in µs. See the description of the value field to see how to use the dead time.", 709 | "type": "number" 710 | }, 711 | "conversion_factor": { 712 | "description": "The conversion from the cpm unit to another unit hardly depends on your tube type. See the description of the value field to see how to use the conversion factor. Note: only trust your manufacturer if it comes to the actual factor value. The internet seems full of wrong copy & pastes, don't even trust your neighbour hackerspace. If in doubt ask the tube manufacturer.", 713 | "type": "number" 714 | }, 715 | "location": { 716 | "description": "The location of your sensor", 717 | "type": "string", 718 | "examples": [ 719 | "Outside", 720 | "Roof", 721 | "Lab" 722 | ] 723 | }, 724 | "name": { 725 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 726 | "type": "string" 727 | }, 728 | "description": { 729 | "description": "An extra field that you can use to attach some additional information to this sensor instance", 730 | "type": "string" 731 | }, 732 | "lastchange": { 733 | "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", 734 | "type": "number" 735 | } 736 | }, 737 | "required": [ 738 | "value", 739 | "unit" 740 | ] 741 | } 742 | } 743 | } 744 | }, 745 | "humidity": { 746 | "description": "Humidity sensor", 747 | "type": "array", 748 | "items": { 749 | "type": "object", 750 | "properties": { 751 | "value": { 752 | "description": "The sensor value", 753 | "type": "number" 754 | }, 755 | "unit": { 756 | "description": "The humidity unit", 757 | "type": "string", 758 | "enum": [ 759 | "%" 760 | ] 761 | }, 762 | "location": { 763 | "description": "The location of your sensor", 764 | "type": "string", 765 | "examples": [ 766 | "Outside", 767 | "Roof", 768 | "Lab" 769 | ] 770 | }, 771 | "name": { 772 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 773 | "type": "string" 774 | }, 775 | "description": { 776 | "description": "An extra field that you can use to attach some additional information to this sensor instance", 777 | "type": "string" 778 | }, 779 | "lastchange": { 780 | "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", 781 | "type": "number" 782 | } 783 | }, 784 | "required": [ 785 | "value", 786 | "unit", 787 | "location" 788 | ] 789 | } 790 | }, 791 | "beverage_supply": { 792 | "description": "How much Mate and beer is in your fridge?", 793 | "type": "array", 794 | "items": { 795 | "type": "object", 796 | "properties": { 797 | "value": { 798 | "description": "The sensor value", 799 | "type": "number" 800 | }, 801 | "unit": { 802 | "description": "The unit, either btl for bottles or crt for crates", 803 | "type": "string", 804 | "enum": [ 805 | "btl", 806 | "crt" 807 | ] 808 | }, 809 | "location": { 810 | "description": "The location of your sensor", 811 | "type": "string", 812 | "examples": [ 813 | "Entrance", 814 | "Room 1", 815 | "Fridge 3", 816 | "Lab" 817 | ] 818 | }, 819 | "name": { 820 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 821 | "type": "string" 822 | }, 823 | "description": { 824 | "description": "An extra field that you can use to attach some additional information to this sensor instance", 825 | "type": "string" 826 | }, 827 | "lastchange": { 828 | "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", 829 | "type": "number" 830 | } 831 | }, 832 | "required": [ 833 | "value", 834 | "unit" 835 | ] 836 | } 837 | }, 838 | "power_consumption": { 839 | "description": "The power consumption of a specific device or of your whole space", 840 | "type": "array", 841 | "items": { 842 | "type": "object", 843 | "properties": { 844 | "value": { 845 | "description": "The sensor value", 846 | "type": "number" 847 | }, 848 | "unit": { 849 | "description": "The power unit", 850 | "type": "string", 851 | "enum": [ 852 | "W", 853 | "VA" 854 | ] 855 | }, 856 | "location": { 857 | "description": "The location of your sensor", 858 | "type": "string", 859 | "examples": [ 860 | "Room 1", 861 | "Lab" 862 | ] 863 | }, 864 | "name": { 865 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 866 | "type": "string" 867 | }, 868 | "description": { 869 | "description": "An extra field that you can use to attach some additional information to this sensor instance", 870 | "type": "string" 871 | }, 872 | "lastchange": { 873 | "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", 874 | "type": "number" 875 | } 876 | }, 877 | "required": [ 878 | "value", 879 | "unit", 880 | "location" 881 | ] 882 | } 883 | }, 884 | "power_generation": { 885 | "description": "The power generation of a specific device or of your whole space", 886 | "type": "array", 887 | "items": { 888 | "type": "object", 889 | "properties": { 890 | "value": { 891 | "description": "The sensor value", 892 | "type": "number" 893 | }, 894 | "unit": { 895 | "description": "The unit of the sensor value.", 896 | "type": "string", 897 | "enum": [ 898 | "W", 899 | "VA" 900 | ] 901 | }, 902 | "location": { 903 | "description": "The location of your sensor", 904 | "type": "string", 905 | "examples": [ 906 | "Room 1", 907 | "Lab" 908 | ] 909 | }, 910 | "name": { 911 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 912 | "type": "string" 913 | }, 914 | "description": { 915 | "description": "An extra field that you can use to attach some additional information to this sensor instance", 916 | "type": "string" 917 | }, 918 | "lastchange": { 919 | "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", 920 | "type": "number" 921 | } 922 | }, 923 | "required": [ 924 | "value", 925 | "unit", 926 | "location" 927 | ] 928 | } 929 | }, 930 | "wind": { 931 | "description": "Your wind sensor", 932 | "type": "array", 933 | "items": { 934 | "type": "object", 935 | "properties": { 936 | "properties": { 937 | "description": "", 938 | "type": "object", 939 | "properties": { 940 | "speed": { 941 | "description": "", 942 | "type": "object", 943 | "properties": { 944 | "value": { 945 | "description": "The sensor value", 946 | "type": "number" 947 | }, 948 | "unit": { 949 | "description": "The wind speed unit", 950 | "type": "string", 951 | "enum": [ 952 | "m/s", 953 | "km/h", 954 | "kn" 955 | ] 956 | } 957 | }, 958 | "required": [ 959 | "value", 960 | "unit" 961 | ] 962 | }, 963 | "gust": { 964 | "description": "", 965 | "type": "object", 966 | "properties": { 967 | "value": { 968 | "description": "The sensor value", 969 | "type": "number" 970 | }, 971 | "unit": { 972 | "description": "The gust speed unit", 973 | "type": "string", 974 | "enum": [ 975 | "m/s", 976 | "km/h", 977 | "kn" 978 | ] 979 | } 980 | }, 981 | "required": [ 982 | "value", 983 | "unit" 984 | ] 985 | }, 986 | "direction": { 987 | "description": "The wind direction in degrees", 988 | "type": "object", 989 | "properties": { 990 | "value": { 991 | "description": "The sensor value", 992 | "type": "number" 993 | }, 994 | "unit": { 995 | "description": "The direction unit", 996 | "type": "string", 997 | "enum": [ 998 | "°" 999 | ] 1000 | } 1001 | }, 1002 | "required": [ 1003 | "value", 1004 | "unit" 1005 | ] 1006 | }, 1007 | "elevation": { 1008 | "description": "Height above mean sea level", 1009 | "type": "object", 1010 | "properties": { 1011 | "value": { 1012 | "description": "The sensor value", 1013 | "type": "number" 1014 | }, 1015 | "unit": { 1016 | "description": "The elevation unit", 1017 | "type": "string", 1018 | "enum": [ 1019 | "m" 1020 | ] 1021 | } 1022 | }, 1023 | "required": [ 1024 | "value", 1025 | "unit" 1026 | ] 1027 | } 1028 | }, 1029 | "required": [ 1030 | "speed", 1031 | "gust", 1032 | "direction", 1033 | "elevation" 1034 | ] 1035 | }, 1036 | "location": { 1037 | "description": "The location of your sensor", 1038 | "type": "string", 1039 | "examples": [ 1040 | "Roof", 1041 | "Entrance" 1042 | ] 1043 | }, 1044 | "name": { 1045 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 1046 | "type": "string" 1047 | }, 1048 | "description": { 1049 | "description": "An extra field that you can use to attach some additional information to this sensor instance", 1050 | "type": "string" 1051 | }, 1052 | "lastchange": { 1053 | "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", 1054 | "type": "number" 1055 | } 1056 | }, 1057 | "required": [ 1058 | "properties", 1059 | "location" 1060 | ] 1061 | } 1062 | }, 1063 | "network_connections": { 1064 | "description": "This sensor type is to specify the currently active ethernet or wireless network devices. You can create different instances for each network type.", 1065 | "type": "array", 1066 | "items": { 1067 | "type": "object", 1068 | "properties": { 1069 | "type": { 1070 | "description": "This field is optional but you can use it to the network type such as wifi or cable. You can even expose the number of spacenet-authenticated connections.", 1071 | "type": "string", 1072 | "enum": [ 1073 | "wifi", 1074 | "cable", 1075 | "spacenet" 1076 | ] 1077 | }, 1078 | "value": { 1079 | "description": "The amount of network connections.", 1080 | "type": "number" 1081 | }, 1082 | "machines": { 1083 | "description": "The machines that are currently connected with the network.", 1084 | "type": "array", 1085 | "items": { 1086 | "type": "object", 1087 | "properties": { 1088 | "name": { 1089 | "description": "The machine name.", 1090 | "type": "string" 1091 | }, 1092 | "mac": { 1093 | "description": "The machine's MAC address of the format D3:3A:DB:EE:FF:00.", 1094 | "type": "string" 1095 | } 1096 | }, 1097 | "required": [ 1098 | "mac" 1099 | ] 1100 | } 1101 | }, 1102 | "location": { 1103 | "description": "The location of your sensor", 1104 | "type": "string", 1105 | "examples": [ 1106 | "Lab", 1107 | "Room 1" 1108 | ] 1109 | }, 1110 | "name": { 1111 | "description": "This field is an additional field to give your sensor a name. This can be useful if you have multiple sensors in the same location.", 1112 | "type": "string" 1113 | }, 1114 | "description": { 1115 | "description": "An extra field that you can use to attach some additional information to this sensor instance", 1116 | "type": "string" 1117 | }, 1118 | "lastchange": { 1119 | "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", 1120 | "type": "number" 1121 | } 1122 | }, 1123 | "required": [ 1124 | "value" 1125 | ] 1126 | } 1127 | }, 1128 | "account_balance": { 1129 | "description": "How rich is your hackerspace?", 1130 | "type": "array", 1131 | "items": { 1132 | "type": "object", 1133 | "properties": { 1134 | "value": { 1135 | "description": "How much?", 1136 | "type": "number" 1137 | }, 1138 | "unit": { 1139 | "description": "What's the currency? It should be formatted according to ISO 4217 short-code format.", 1140 | "type": "string" 1141 | }, 1142 | "location": { 1143 | "description": "If you have more than one account you can use this field to specify where it is.", 1144 | "type": "string" 1145 | }, 1146 | "name": { 1147 | "description": "Give your sensor instance a name.", 1148 | "type": "string" 1149 | }, 1150 | "description": { 1151 | "description": "An extra field that you can use to attach some additional information to this sensor instance", 1152 | "type": "string" 1153 | }, 1154 | "lastchange": { 1155 | "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", 1156 | "type": "number" 1157 | } 1158 | }, 1159 | "required": [ 1160 | "value", 1161 | "unit" 1162 | ] 1163 | } 1164 | }, 1165 | "total_member_count": { 1166 | "description": "Specify the number of space members.", 1167 | "type": "array", 1168 | "items": { 1169 | "type": "object", 1170 | "properties": { 1171 | "value": { 1172 | "description": "The amount of your space members.", 1173 | "type": "number" 1174 | }, 1175 | "location": { 1176 | "description": "Specify the location if your hackerspace has different departments (for whatever reason). This field is for one department. Every department should have its own sensor instance.", 1177 | "type": "string" 1178 | }, 1179 | "name": { 1180 | "description": "You can use this field to specify if this sensor instance counts active or inactive members.", 1181 | "type": "string" 1182 | }, 1183 | "description": { 1184 | "description": "An extra field that you can use to attach some additional information to this sensor instance", 1185 | "type": "string" 1186 | }, 1187 | "lastchange": { 1188 | "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", 1189 | "type": "number" 1190 | } 1191 | }, 1192 | "required": [ 1193 | "value" 1194 | ] 1195 | } 1196 | }, 1197 | "people_now_present": { 1198 | "description": "Specify the number of people that are currently in your space. Optionally you can define a list of names.", 1199 | "type": "array", 1200 | "items": { 1201 | "type": "object", 1202 | "properties": { 1203 | "value": { 1204 | "description": "The amount of present people.", 1205 | "type": "number" 1206 | }, 1207 | "location": { 1208 | "description": "If you use multiple sensor instances for different rooms, use this field to indicate the location.", 1209 | "type": "string" 1210 | }, 1211 | "name": { 1212 | "description": "Give this sensor a name if necessary at all. Use the location field for the rooms. This field is not intended to be used for names of hackerspace members. Use the field 'names' instead.", 1213 | "type": "string" 1214 | }, 1215 | "names": { 1216 | "description": "List of hackerspace members that are currently occupying the space.", 1217 | "type": "array", 1218 | "items": { 1219 | "type": "string" 1220 | }, 1221 | "minItems": 1 1222 | }, 1223 | "description": { 1224 | "description": "An extra field that you can use to attach some additional information to this sensor instance", 1225 | "type": "string" 1226 | }, 1227 | "lastchange": { 1228 | "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", 1229 | "type": "number" 1230 | } 1231 | }, 1232 | "required": [ 1233 | "value" 1234 | ] 1235 | } 1236 | }, 1237 | "network_traffic": { 1238 | "description": "The current network traffic, in bits/second or packets/second (or both)", 1239 | "type": "array", 1240 | "items": { 1241 | "type": "object", 1242 | "properties": { 1243 | "properties": { 1244 | "type": "object", 1245 | "properties": { 1246 | "bits_per_second": { 1247 | "description": "", 1248 | "type": "object", 1249 | "properties": { 1250 | "value": { 1251 | "description": "The measurement value, in bits/second", 1252 | "type": "number", 1253 | "minimum": 0 1254 | }, 1255 | "maximum": { 1256 | "description": "The maximum available throughput in bits/second, e.g. as sold by your ISP", 1257 | "type": "number", 1258 | "minimum": 0 1259 | } 1260 | }, 1261 | "required": [ 1262 | "value" 1263 | ] 1264 | }, 1265 | "packets_per_second": { 1266 | "description": "", 1267 | "type": "object", 1268 | "properties": { 1269 | "value": { 1270 | "description": "The measurement value, in packets/second", 1271 | "type": "number", 1272 | "minimum": 0 1273 | } 1274 | }, 1275 | "required": [ 1276 | "value" 1277 | ] 1278 | } 1279 | } 1280 | }, 1281 | "name": { 1282 | "description": "Name of the measurement, e.g. to distinguish between upstream and downstream traffic", 1283 | "type": "string" 1284 | }, 1285 | "location": { 1286 | "description": "Location the measurement relates to, e.g. WiFi or Uplink", 1287 | "type": "string" 1288 | }, 1289 | "description": { 1290 | "description": "An extra field that you can use to attach some additional information to this sensor instance", 1291 | "type": "string" 1292 | }, 1293 | "lastchange": { 1294 | "description": "The Unix timestamp (in seconds) when the sensor value changed most recently", 1295 | "type": "number" 1296 | } 1297 | }, 1298 | "required": [ 1299 | "properties" 1300 | ] 1301 | }, 1302 | "minItems": 1 1303 | } 1304 | } 1305 | }, 1306 | "feeds": { 1307 | "description": "Feeds where users can get updates of your space", 1308 | "type": "object", 1309 | "properties": { 1310 | "blog": { 1311 | "description": "", 1312 | "type": "object", 1313 | "properties": { 1314 | "type": { 1315 | "description": "Type of the feed", 1316 | "type": "string", 1317 | "examples": [ 1318 | "rss", 1319 | "atom", 1320 | "ical" 1321 | ] 1322 | }, 1323 | "url": { 1324 | "description": "Feed URL", 1325 | "type": "string" 1326 | } 1327 | }, 1328 | "required": [ 1329 | "url" 1330 | ] 1331 | }, 1332 | "wiki": { 1333 | "description": "", 1334 | "type": "object", 1335 | "properties": { 1336 | "type": { 1337 | "description": "Type of the feed", 1338 | "type": "string", 1339 | "examples": [ 1340 | "rss", 1341 | "atom", 1342 | "ical" 1343 | ] 1344 | }, 1345 | "url": { 1346 | "description": "Feed URL", 1347 | "type": "string" 1348 | } 1349 | }, 1350 | "required": [ 1351 | "url" 1352 | ] 1353 | }, 1354 | "calendar": { 1355 | "description": "", 1356 | "type": "object", 1357 | "properties": { 1358 | "type": { 1359 | "description": "Type of the feed", 1360 | "type": "string", 1361 | "examples": [ 1362 | "rss", 1363 | "atom", 1364 | "ical" 1365 | ] 1366 | }, 1367 | "url": { 1368 | "description": "Feed URL", 1369 | "type": "string" 1370 | } 1371 | }, 1372 | "required": [ 1373 | "url" 1374 | ] 1375 | }, 1376 | "flickr": { 1377 | "description": "", 1378 | "type": "object", 1379 | "properties": { 1380 | "type": { 1381 | "description": "Type of the feed", 1382 | "type": "string", 1383 | "examples": [ 1384 | "rss", 1385 | "atom", 1386 | "ical" 1387 | ] 1388 | }, 1389 | "url": { 1390 | "description": "Feed URL", 1391 | "type": "string" 1392 | } 1393 | }, 1394 | "required": [ 1395 | "url" 1396 | ] 1397 | } 1398 | } 1399 | }, 1400 | "projects": { 1401 | "description": "Your project sites (links to GitHub, wikis or wherever your projects are hosted)", 1402 | "type": "array", 1403 | "items": { 1404 | "type": "string" 1405 | } 1406 | }, 1407 | "links": { 1408 | "description": "Arbitrary links that you'd like to share", 1409 | "type": "array", 1410 | "items": { 1411 | "type": "object", 1412 | "properties": { 1413 | "name": { 1414 | "description": "The link name.", 1415 | "type": "string" 1416 | }, 1417 | "description": { 1418 | "description": "An extra field for a more detailed description of the link", 1419 | "type": "string" 1420 | }, 1421 | "url": { 1422 | "description": "The URL.", 1423 | "type": "string" 1424 | } 1425 | }, 1426 | "required": [ 1427 | "name", 1428 | "url" 1429 | ] 1430 | } 1431 | }, 1432 | "membership_plans": { 1433 | "description": "A list of the different membership plans your hackerspace might have. Set the value according to your billing process. For example, if your membership fee is 10€ per month, but you bill it yearly (aka. the member pays the fee once per year), set the amount to 120 an the billing_interval to yearly.", 1434 | "type": "array", 1435 | "items": { 1436 | "type": "object", 1437 | "properties": { 1438 | "name": { 1439 | "description": "The name of the membership plan", 1440 | "type": "string", 1441 | "examples": [ 1442 | "Student Membership", 1443 | "Normal Membership" 1444 | ] 1445 | }, 1446 | "value": { 1447 | "description": "How much does this plan cost?", 1448 | "type": "number" 1449 | }, 1450 | "currency": { 1451 | "description": "What's the currency? It should be formatted according to ISO 4217 short-code format.", 1452 | "type": "string", 1453 | "examples": [ 1454 | "EUR", 1455 | "USD", 1456 | "CHF" 1457 | ] 1458 | }, 1459 | "billing_interval": { 1460 | "description": "How often is the membership billed? If you select other, please specify in the description what your billing interval is.", 1461 | "type": "string", 1462 | "enum": [ 1463 | "yearly", 1464 | "quarterly", 1465 | "monthly", 1466 | "weekly", 1467 | "daily", 1468 | "hourly", 1469 | "other" 1470 | ] 1471 | }, 1472 | "description": { 1473 | "description": "A free form string.", 1474 | "type": "string" 1475 | } 1476 | }, 1477 | "required": [ 1478 | "name", 1479 | "value", 1480 | "currency", 1481 | "billing_interval" 1482 | ] 1483 | } 1484 | }, 1485 | "linked_spaces": { 1486 | "description": "A list of spaces you know and feel connected too.", 1487 | "type": "array", 1488 | "items": { 1489 | "type": "object", 1490 | "properties": { 1491 | "endpoint": { 1492 | "description": "The SpaceAPI endpoint of the space", 1493 | "type": "string" 1494 | }, 1495 | "website": { 1496 | "description": "The website of the space", 1497 | "type": "string" 1498 | } 1499 | }, 1500 | "anyOf": [ 1501 | { 1502 | "required": [ 1503 | "endpoint" 1504 | ] 1505 | }, 1506 | { 1507 | "required": [ 1508 | "website" 1509 | ] 1510 | } 1511 | ] 1512 | } 1513 | } 1514 | }, 1515 | "required": [ 1516 | "api_compatibility", 1517 | "space", 1518 | "logo", 1519 | "url", 1520 | "contact" 1521 | ] 1522 | } 1523 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | This document records changes between API versions. 4 | 5 | Changes should start with one of the following tags: 6 | 7 | - `[added]` for new, backward compatible features 8 | - `[changed]` for changes to the existing API 9 | - `[removed]` for keys that have been removed from the schema 10 | 11 | ## v16 (unreleased) 12 | 13 | `contact`: 14 | 15 | - [added] The `telegram` contact option was added ([#120]) 16 | 17 | ## v15 18 | 19 | Root level: 20 | 21 | - [added] The `linked_spaces` field was added ([#75], [#92]) 22 | 23 | `events`: 24 | 25 | - [changed] Clarify that `timestamp` unit is in seconds ([#98]) 26 | 27 | `location`: 28 | 29 | - [added] The `country_code` field was added ([#108]) 30 | - [added] The `areas` field was added ([#107]) 31 | - [added] The `hint` field was added ([#102]) 32 | - [changed] Make entire `location` field optional to enable the inclusion of groups without physical location ([#106]) 33 | - [changed] If the `location` field is present, it requires at least 1 property ([#115]) 34 | - [changed] Make the `lat`/`lon` fields optional, but if one of them is provided, then the other one must be provided too ([#115]) 35 | 36 | `sensors`: 37 | 38 | - [added] The `power_generation` sensor was added ([#105]) 39 | - [added] The `carbondioxide` sensor was added ([#116]) 40 | - [added] The `lastchange` field was added to all sensors ([#97]) 41 | - [removed] The deprecated unit `hPA` in `barometer.unit` was removed, use `hPa` instead ([#109]) 42 | - [removed] The redundant unit `mW` in `power_consumption.unit` was removed, use `W` instead ([#109]) 43 | 44 | `state`: 45 | 46 | - [changed] Clarify that `lastchange` unit is in seconds ([#98]) 47 | 48 | `membership_plans`: 49 | 50 | - [added] The `quarterly` enum value was added to `billing_interval` 51 | 52 | ## v14 53 | 54 | Root level: 55 | 56 | - [added] The `api_compatibility` field was added 57 | - [added] The `links` section was added ([#67]) 58 | - [added] The `membership_plans` key was added to represent membership plans a space might have ([#15], [#27]) 59 | - [removed] The `api` key was removed (replaced with `api_compatibility`, see [#56] for details) 60 | - [removed] The `cache` key was removed ([#46]) 61 | - [removed] The `stream` key was removed ([#70]) 62 | - [removed] The `issue_report_channels` key was removed ([#47]) 63 | - [removed] The `radio_show` key was removed ([#48]) 64 | 65 | `contact`: 66 | 67 | - [changed] The `jabber` key was renamed to `xmpp`[#8] 68 | - [added] The `keymasters` array items can also contain a `xmpp` field ([#8]) 69 | - [added] The `mumble` contact option was added ([#77]) 70 | - [added] The `matrix` contact option was added ([#44]) 71 | - [added] The `mastodon` key was added to `contact` and `contact.keymasters` ([#26]) 72 | - [added] The `gopher` contact option was added ([#24], [#31]) 73 | - [removed] The `google` key was removed ([#37]) 74 | 75 | `location`: 76 | 77 | - [added] The `timezone` key was added ([#13]) 78 | - [changed] The description of `location.lon` was fixed ([#28]) 79 | 80 | `sensors`: 81 | 82 | - [added] The `network_traffic` sensor was added ([#60]) 83 | - [changed] The unit in `account_balance` can now be any ISO 4217 string ([#12]) 84 | - [changed] The unit `hPA` in `barometer.unit` was deprecated, use `hPa` instead to match the SI unit ([#7], [#72]) 85 | 86 | `spacefed`: 87 | 88 | - [removed] The `spacephone` key was removed ([#80]) 89 | 90 | `state`: 91 | 92 | - [changed] The keys `state` and `state.open` are not required anymore and `state.open` is no longer nullable 93 | 94 | 95 | [#7]: https://github.com/SpaceApi/schema/pull/7 96 | [#8]: https://github.com/SpaceApi/schema/pull/8 97 | [#12]: https://github.com/SpaceApi/schema/pull/12 98 | [#13]: https://github.com/SpaceApi/schema/pull/13 99 | [#15]: https://github.com/SpaceApi/schema/pull/15 100 | [#24]: https://github.com/SpaceApi/schema/pull/24 101 | [#26]: https://github.com/SpaceApi/schema/pull/26 102 | [#27]: https://github.com/SpaceApi/schema/pull/27 103 | [#28]: https://github.com/SpaceApi/schema/pull/28 104 | [#31]: https://github.com/SpaceApi/schema/pull/31 105 | [#37]: https://github.com/SpaceApi/schema/pull/37 106 | [#44]: https://github.com/SpaceApi/schema/pull/44 107 | [#46]: https://github.com/SpaceApi/schema/pull/46 108 | [#47]: https://github.com/SpaceApi/schema/pull/47 109 | [#48]: https://github.com/SpaceApi/schema/pull/48 110 | [#56]: https://github.com/SpaceApi/schema/pull/56 111 | [#60]: https://github.com/SpaceApi/schema/pull/60 112 | [#67]: https://github.com/SpaceApi/schema/pull/67 113 | [#70]: https://github.com/SpaceApi/schema/pull/70 114 | [#72]: https://github.com/SpaceApi/schema/pull/72 115 | [#75]: https://github.com/SpaceApi/schema/pull/75 116 | [#77]: https://github.com/SpaceApi/schema/pull/77 117 | [#80]: https://github.com/SpaceApi/schema/pull/80 118 | [#109]: https://github.com/SpaceApi/schema/pull/109 119 | [#92]: https://github.com/SpaceApi/schema/pull/92 120 | [#97]: https://github.com/SpaceApi/schema/pull/97 121 | [#98]: https://github.com/SpaceApi/schema/pull/98 122 | [#102]: https://github.com/SpaceApi/schema/pull/102 123 | [#105]: https://github.com/SpaceApi/schema/pull/105 124 | [#106]: https://github.com/SpaceApi/schema/pull/106 125 | [#108]: https://github.com/SpaceApi/schema/pull/108 126 | [#107]: https://github.com/SpaceApi/schema/pull/107 127 | [#115]: https://github.com/SpaceApi/schema/pull/115 128 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | If you want to propose a change to the schema, please open a pull request 4 | with the desired changes or simply create an issue. 5 | 6 | All your changes should also be listed in the `CHANGELOG.md` file. 7 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx:1.18-alpine 2 | 3 | ADD ./*.json /usr/share/nginx/html/ 4 | -------------------------------------------------------------------------------- /MIGRATION.md: -------------------------------------------------------------------------------- 1 | # Migration guide 2 | 3 | ## Migration from 14 to 15 4 | 5 | Most SpaceAPI implementation that implement v14 should already be compatible 6 | with v15 and can just announce compatibility for it as well: 7 | 8 | ```json 9 | { 10 | ... 11 | "api_compatibility": [ "14", "15" ], 12 | ... 13 | } 14 | ``` 15 | 16 | The exception are spaces that use things that were deprecated in v14 like the 17 | `hPA` instead of `hPa` unit for the barometer sensor. See 18 | https://github.com/SpaceApi/schema/blob/master/CHANGELOG.md#v15 for details. 19 | 20 | ## Migration from 0.13 to 14 21 | 22 | If you're migrating from 0.13 it's fairly easy to do, under the right circumstances you can also serve a file that is compatible with both versions at the same time. 23 | 24 | ### 0.13 and 14 in the same file 25 | If you never set the `state.open` field to `null` (which is not valid anymore in v14), just add the `api_compatibility` key, and you're good to go! 26 | 27 | ```json 28 | { 29 | ... 30 | "api_compatibility": [ "14" ], 31 | ... 32 | } 33 | ``` 34 | This is of course just the most basic thing, check out the full [changelog](./CHANGELOG.md) for new, renamed or removed fields! 35 | 36 | Note that fields that were renamed or removed in v14 can still be present in your endpoint (without any function), since we ignore all unknown fields. 37 | 38 | For more information on the new API versioning scheme, check out [pull request #56](https://github.com/SpaceApi/schema/pull/56). 39 | 40 | 41 | ### Compatibility issues 42 | 43 | #### state.open 44 | 45 | The `open` field can't have a `null` value anymore, but on the other hand the `state` and the `state.open` keys are not required anymore. 46 | 47 | If previously your endpoint contained this: 48 | 49 | ```json 50 | { 51 | ... 52 | "state": { 53 | "open": null 54 | }, 55 | ... 56 | } 57 | ``` 58 | 59 | ...you can simply remove the `state.open` key or the entire `state` key to be compatible with v14. 60 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SpaceAPI Schema Files 2 | 3 | ![Validate schema](https://github.com/SpaceApi/schema/workflows/Validate%20schema/badge.svg?event=push) 4 | ![Validate formatting](https://github.com/SpaceApi/schema/workflows/Validate%20formatting/badge.svg?event=push) 5 | 6 | These are [JSON Schema](https://json-schema.org/) files for the SpaceAPI. 7 | 8 | ## Releasing a new version 9 | 10 | * Make sure the `CHANGELOG.md` is up to date 11 | * Update `MIGRATION.md` with upgrade instructions 12 | * Rename the current `xx-draft.json` to `xx.json` and create `xx+1-draft.json` 13 | * Replace the `"$id"` field accordingly 14 | * Replace the `"description"` field accordingly 15 | * Replace the `"properties"."api_compatibility"."contains"."const"` accordingly 16 | * Update the `.github/workflows` accordingly 17 | * Update the website 18 | * Regenerate the schema docs 19 | * Update the example 20 | * Update the validator 21 | * Update the schema in https://github.com/spaceapi-community/go-spaceapi-validator and release a new version 22 | * Update the go-spaceapi-validator version in https://github.com/SpaceApi/validator/ 23 | --------------------------------------------------------------------------------