1
0
Fork 0
 
 
Go to file
Dustin 205989aefd sensor: Use pipe to interrupt loop
The `time.sleep` function cannot be stopped prematurely.  This means
that when the program receives a signal indicating it should stop, it
will not be able to do so until the running `sleep` completes.  This
means it could take up to 10 seconds for the process to stop.

A better way to handle the shutdown signal is to use a pipe.  When the
signal is received, the write end of the pipe is closed.  The event loop
will detect this immediately, as `select.select` returns as soon as any
event occurs on any of the polled file descriptors, or the timeout
expires.
2021-05-01 15:27:33 -05:00
.vscode Add backlight daemon 2021-04-30 08:24:14 -05:00
src/thermostat sensor: Use pipe to interrupt loop 2021-05-01 15:27:33 -05:00
.editorconfig Initial commit 2021-04-29 09:36:49 -05:00
.gitignore Initial commit 2021-04-29 09:36:49 -05:00
README.md Initial commit 2021-04-29 09:36:49 -05:00
backlight.service Add backlight daemon 2021-04-30 08:24:14 -05:00
poetry.lock Add backlight daemon 2021-04-30 08:24:14 -05:00
pyproject.toml sensor: Use pipe to interrupt loop 2021-05-01 15:27:33 -05:00
sensor.service Initial commit 2021-04-29 09:36:49 -05:00
xinit@.service Initial commit 2021-04-29 09:36:49 -05:00
xinitrc.sh Initial commit 2021-04-29 09:36:49 -05:00

README.md

Thermostat Display

Screen Setup

As instructed at https://www.acmesystems.it/CM3-PANEL-7-BASIC_microsd

  1. Device Tree Overlay (config.txt)
  2. Enable SSH: thouch /run/media/boot/ssh
  3. Configure wpa_supplicant

Build/Install

  1. Build wheel: poetry build
  2. Copy wheel to Raspberry Pi
  3. Install: python3 -m pip install --user ~/thermostat-*.whl
  4. Copy sensor.service to ~/.config/systemd/user
  5. Start sensor: systemctl --user enable --now sensor

Automatic Login/Autostart

  1. Install packages:

    • firefox-esr
    • matchbox-window-manager
    • x11-xserver-utils
    • xdotool
    • xinit
  2. Copy xinit@.service to /etc/systemd/system

  3. Copy xinit.sh to ~/.xinitrc

  4. Start GUI:

    systemctl enable xinit@pi.service
    systemctl set-default graphical.target
    systemctl isolate graphical.target
    
  5. Install Auto Fullscreen add-on fore Firefox