Jump to content

Kronk

From /dev/hack

PULL THE LEVER KRONK

poc: alyx

summary

kronk is a matrix orbital EGLK19264A-7T-USB-WB-PL series industrial Human Machine Interface connected to a raspberry pi

the code that runs kronk is at https://git.devhack.net/alyx/kronk and the library needed to communicate with the EGLK19264A-7T-USB-WB-PL is at https://github.com/alyxw/morbital

every two minutes it will poll sensors from the spaceapi endpoint, but seeing as the entire point of this is to control what's on spaceapi, we should probably just change this to poll sensors directly to not have a cyclical dependency

how to use

press the up, down, left or right arrows to scroll space statuses and the center button to set the space status

the corner buttons don't do anything right now, and are reserved for future use

there's 3 addressable LEDs that can be off/green/red/amber on the left side, the top one is the space status (open, closed, invisible) and the bottom one is the air quality if we ever get an air quality sensor working. the middle one is not currently defined for anything.

api

you can GET /status and it will return the current space status. it will show open/closed status and the last change time.

there's also /remote/STATUS which can be used with a POST request to change it remotely if everyone leaves and forgets to close it out. valid STATUS values are OPEN, CLOSED, and INVISIBLE


to do

  • deep sleep mode
    • if the space is closed and there's no interaction the LCD and all of the LEDs should shut off after a few minutes
  • can we please get an air quality sensor
  • save panel state between reboots, so it won't just close the space if the machine or script restarts
  • extra secret endpoint that shows the real status (invisible instead of just closed, if applicable)
  • authentication for remote status update???
    • how? api key?
  • load custom /dev/hack bitmaps
  • cool screensaver?