Skip to content

Releases: mattg8892/skylapse

0.5.12 — install the sensor library, fix a lying diagnostic

Choose a tag to compare

@mattg8892 mattg8892 released this 24 Aug 00:01

Fixed

  • The RPi.bme280 library actually gets installed now. 0.5.11 fixed the pip line, but the updater loads its own code before checking out the target — so a change to how it installs takes effect on the following update. This is that following update.
  • A pin factory of "NoneType" is no longer reported as if it were a fault. gpiozero resolves its backend on first use, so asking before any pin has been touched legitimately returns nothing. The number that matters comes from the pulse itself, which asks after the pin exists.

If your heater test does nothing

The pulse now tells you which backend drove the pin. LGPIOFactory means real Pi 5 hardware access — the pin genuinely went high, and the problem is electrical rather than software. Most commonly: an LR7843 module's control header has three pins (SIG, VCC, GND) and the VCC is unconnected, so the onboard LED and gate driver have no supply.

0.5.11 — find out why a heater test did nothing

Choose a tag to compare

@mattg8892 mattg8892 released this 23 Aug 23:58

A heater reported a successful test and did not switch on — no LED on the MOSFET, nothing on a thermal camera. The test could say it had driven the pin; it could not say whether anything real was behind it.

Fixed

The dew heater's libraries were never installed. They live in an optional [dewheater] extra, install.sh installs [zwo], and the updater installed plain . — so nothing installed them. Sensor detection is raw smbus2 and works without them, which is why the card said "sensor found" on a camera that could never produce a single reading.

Both now install [zwo,dewheater], with tests asserting the installer and updater agree, and that every declared extra is installed by somebody.

Added

  • The test reports which gpiozero backend drove the pin. gpiozero will happily drive a mock and report success, which from the outside is identical to working hardware. On a Pi 5 the backend must be lgpio.
  • A failed sensor read now says why instead of silently returning no temperature.
  • /api/dewheater/diagnostics — which libraries import, which address answers, which backend is in play, in one place.

None of this proves any wiring is correct. It removes the software from the list of suspects.

0.5.10 — fix the blank settings page

Choose a tag to compare

@mattg8892 mattg8892 released this 23 Aug 23:45

0.5.9 blanked the settings page. Fixed.

The heater duration picker passed <option> children to the shared Select, which takes an options array and calls options.map(...). undefined.map throws during render, React unmounts everything, and the page goes black with the reason only in the browser console.

Fixed

  • The duration picker calls Select correctly. Everything in 0.5.9 works as described.

Guarded

This is the third blank screen of this kind, and the existing guard could not catch it — Select was imported and did exist, so "every component used is defined" was satisfied. The call was wrong, not the identity.

Now: any component exported from ui.jsx that dereferences a prop without guarding it must be passed that prop at every call site. Verified by restoring the 0.5.9 call and watching the test fail.

0.5.9 — a heater test you can actually read

Choose a tag to compare

@mattg8892 mattg8892 released this 23 Aug 23:01

The heater test was five seconds. That was decided before there was a heater to test, and it is not long enough: resistor bodies have real thermal mass, and a correctly wired heater felt like a dead one.

Changed

  • Choose the duration — 15 seconds, 1 minute, or 2 minutes. Default is a minute. The hard cap is now two minutes.
  • The test measures itself. The BME280 is already on the glass, so it is read either side of the pulse and the card reports the temperature rise. "Does it feel warm?" is a poor question when the resistors are inside a dome or behind glass.

A small reading is reported, not judged: where the sensor sits relative to the heat decides whether it can see a rise at all, so the card says so and tells you to feel the resistors before assuming a fault.

Unchanged

The pin is still switched off in a finally block, so a dropped connection or a crash mid-test still ends with the heater off.

0.5.8 — the heater test no longer blanks the page

Choose a tag to compare

@mattg8892 mattg8892 released this 23 Aug 22:48

Clicking "Test the heater for 5 seconds" turned the settings page black. Fixed, along with the underlying bug it exposed.

What happened

The button posts no body, but the endpoint required one, so the camera answered 422. FastAPI returns validation errors as a list of objects rather than a string — and the code put that straight into the page. React threw Objects are not valid as a React child mid-render and unmounted everything, so the screen went black with the reason visible only in the browser console.

Fixed

  • The heater test accepts an empty request, meaning the default 5-second pulse.
  • No screen renders a server error unflattened any more. All nine places that show an error message now reduce any shape the API can return to readable text, naming the offending field where there is one. Every one of them was a single bad request away from the same black screen — this was not specific to the heater button.

Note

Nothing about heater safety changed. The pulse is still capped at fifteen seconds and the pin is still switched off in a finally block, so a disconnected page cannot leave it on.

0.5.7 — restart from the settings page

Choose a tag to compare

@mattg8892 mattg8892 released this 23 Aug 21:17

The camera can now restart itself.

Enabling I²C for the dew heater writes a line to the boot config, which only takes effect at boot — and the card said "reboot to finish" while offering no way to do it. The only route left was pulling the power, which is not the same thing: a cold pull skips the filesystem sync, and doing it moments after a boot-config write is a good way to corrupt the card. That happened here.

Added

  • Restart under Set up once — a clean restart, asked for by name, since it stops capture for about a minute.
  • A restart offered inline in the dew heater card, right where enabling I²C asks for one.

The helper has been able to do this since the camera-overlay flow needed it; the reboot is scheduled through systemd on a short timer so the page gets its response before the machine goes down. It simply had no way in from Settings.

Note

If a settings change tells you a restart is needed, use this rather than the power lead.

0.5.6 — updates can install again

Choose a tag to compare

@mattg8892 mattg8892 released this 23 Aug 20:19

0.5.4 and 0.5.5 could not install. Both rolled themselves back, and the rollback erased the evidence. This release fixes the cause.

scripts/skylapse-admin — the single script every privileged operation goes through — was committed with Windows line endings. Its shebang became #!/usr/bin/env bash followed by a carriage return, so Linux looked for an interpreter whose name ends in a carriage return, found none, and exited 127. The updater read that failed restart as a bad build and rolled back, exactly as it should have.

If you are on 0.5.3, update normally. 0.5.4 and 0.5.5 are superseded — everything in them is included here.

Fixed

  • All tracked text files are now LF in the index, enforced by * text=auto eol=lf rather than a list of file extensions. The old rule covered *.sh; the script that broke has no extension.
  • New tests key on a shebang, not a filename, so the next extensionless script is covered without anyone remembering to add it.

Added

  • The update screen now says why an update rolled back. The three health gates — restart failed, restarted but stale, started but never healthy — are three different bugs with three different fixes, and the status now distinguishes them. Exit 127 from the helper names the line ending as the likely cause. This rig has no SSH, so a rollback with no reason was a dead end.

Included from 0.5.4 / 0.5.5

  • Dew heater card in Settings: enable I²C without a terminal, and see glass temperature, dewpoint and the margin between them.
  • A capped heater test pulse (15s maximum, switched off in a finally block) for first power-on.

Skylapse 0.5.5 — test the heater before trusting it

Choose a tag to compare

@mattg8892 mattg8892 released this 23 Aug 19:17

Adds a five-second heater test to the dew heater card, for the moment you first power one on: it drives the heater briefly so you can check the wiring and feel for warmth, without waiting for the weather to reach the dewpoint.

Capped at fifteen seconds however it is called, and the heater is switched off even if the test fails or the page disconnects part-way through. A heater left on unattended is the one genuinely dangerous thing this hardware can do, so the tool for testing it cannot be the thing that causes it.

Skylapse 0.5.4 — dew heater setup without a terminal

Choose a tag to compare

@mattg8892 mattg8892 released this 23 Aug 19:05

Dew heater support, for the optional hardware: a BME280 temperature and humidity sensor, and a heater on a GPIO pin that keeps the glass a couple of degrees above the dewpoint.

The sensor sits on the I²C bus, which Raspberry Pi OS ships switched off — turning it on is a boot-config change, which on a camera with no terminal was a dead end. There is a button for it now.

The card tells the four states apart rather than just failing: the feature is off, the bus is off, the bus is on but nothing is answering, or it is running and showing you the glass temperature, the dewpoint and the margin between them.

Skylapse 0.5.3 — the wait that could never succeed

Choose a tag to compare

@mattg8892 mattg8892 released this 23 Aug 13:45

More frames, on cameras that change their gain through the night.

When the camera changes its exposure or gain, it has to discard a few frames while the sensor catches up. It decided it had caught up by comparing what it asked for against what the sensor reported — but analogue gain is quantised in hardware, so asking for 17 gets you whatever the sensor can actually make, and the check demanded a match to within a third of a percent. It never matched. Every gain change waited the full ninety seconds and then gave up.

On a measured night that was most of the 13% of frames that never got taken. The check now allows the same proportional tolerance for gain that it always did for exposure.