Skip to content

Lastest emonSD image updates on every reboot! #38

Closed
@pb66

Description

Latest build and fully updated.

My emonPi updates on every reboot, it seems the "firstbootupdate" script is initializing an update even when it is not required. When I looked into it and tested the separate "or" parts of the if statement in this line

https://github.com/openenergymonitor/emonpi/blob/master/firstbootupdate#L13

I found the log file is non-zero size as expected since it is not the first boot, but the $button value is 0 at rest and 1 when pressed, so the button action actually works as a "update bypass" if held while rebooting not a "forced update".

By editing this line to

if [ ! -s /home/pi/data/emonpiupdate.log ] || [ $button == 1 ]; then

it works as expected.

I can see there was a recent change to this code that inverted the action based on the $button value, was this intended? has the switch been physically changed in production?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions