Skip to content

[Bug] city hub re-powers ON after button-keep to power-off on github hash 191b715d and older #2176

@BertLindeman

Description

@BertLindeman

Sorry for the long post, but I want to be complete. . .

Describe the bug
cityhub at `ci-build-3813-v3.6.1-152-g191b715d' after power-off (with the hub button) the hub restarts

Have NOT noticed this on movehub, Technichub, primehub nor Robot Inventor hub at the same firmware.

Tested a number of firmwares for the cityhub.
Not all of them from the master branch.
The oldest I tried was cityhub-firmware-build-3776-git91d7221e
Same result.

To be sure it is no hardware thing I flashed the current beta.
No problem at that firmware - ci-release-86-v3.6.1 on 2025-03-11

To reproduce 1
Steps to reproduce the behavior:

  1. Put the hub on
  2. connect to a pc
  3. disconnect (using the pc button)
  4. press and keep the hub button until the hub flashes fast and goes off
  5. See the error: after less than a second hub restarts

To reproduce 2
Steps to reproduce the behavior:

  1. Put the hub on
  2. connect to a pc
  3. run this:
from pybricks.hubs import ThisHub
hub = ThisHub()
hub.system.shutdown()
  1. hub goes off
  2. hub restarts.

Scenario difference between hash 0663e76d and hash da108b30
This scenario does not restart on github hash 0663e76d.
But does restart at github hash da108b30:

  1. pull the batteries from the hub and reinsert
  2. press the hub button
  3. hub starts
  4. press and keep the hub button until the hub flashes and goes off
    And no restart on github hash 0663e76d
    But a restart on github hash da108b30

Another no restart scenario:

  1. connect to the hub
  2. enter the REPL
  3. issue the command hub.system.shutdown()
  4. hub goes off and stays off

Expected behavior
Hub should stay off

Screenshots
There is a saying that a picture is worth a 1000 words. Screenshots really help to identify and solve problems.

Metadata

Metadata

Assignees

No one assigned

    Labels

    hub: cityhubIssues related to the LEGO Powered Up Smart hub (Hub No. 4)software: pybricks-micropythonIssues with Pybricks MicroPython firmware (or EV3 runtime)

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions