Projects:Spacestate: verschil tussen versies

Naar navigatie springen Naar zoeken springen
183 bytes toegevoegd ,  29 okt 2022
geen bewerkingssamenvatting
(Nieuwe pagina aangemaakt met 'Hackerspace Nijmegen joins in a worldwide collaboration between hackerspaces to publish their Space State, i.e. whether they are open or not, in [https://spaceapi.io a standardized format]. The URL where we publish the Hackerspace Nijmegen Spacestate is https://hackerspacenijmegen.nl/state/state.json. __TOC__ = Spacestate Switch = This is our Spacestate Switch: TODO: insert image The Spacestate Switch was never documented, so this is an attempt to revers...')
 
Geen bewerkingssamenvatting
Regel 5: Regel 5:
__TOC__
__TOC__


= Spacestate Switch =
=Spacestate Switch=


This is our Spacestate Switch:
This is our Spacestate Switch:
Regel 21: Regel 21:
Then, the D2/D4/D5 control the LEDs in such a way that they switch colors using some nice animation when the state changes.
Then, the D2/D4/D5 control the LEDs in such a way that they switch colors using some nice animation when the state changes.


= Spacestate publishing =
=Spacestate publishing=


The bar computer (barometer) runs a `screen` session running `scripts/serial2irc.py` which is online as an IRC bot, and listens to the serial port. When it receives "OPEN\n" or "CLOSED\n", it prints the relevant message as a NOTICE to the IRC channel. Also, it calls the shell script which publishes to the website.
The bar computer (barometer) runs a `screen` session running `scripts/serial2irc.py` which is online as an IRC bot, and listens to the serial port. When it receives "OPEN\n" or "CLOSED\n", it prints the relevant message as a NOTICE to the IRC channel. Also, it calls the shell script which publishes to the website.


The shell script produces the JSON from its arguments and uploads it to the website. The last JSON uploaded is available at `scripts/state.json`.
The shell script produces the JSON from its arguments and uploads it to the website. The last JSON uploaded is available at `scripts/state.json`.
The Wiki contains a small piece of Javascript which pulls the space state from the URL above, and adds one of two PNGs below the logo: https://hackerspacenijmegen.nl/state/wiki-state.js

Navigatiemenu