hifiberry / hifiberry-os

Linux distribution optimized for audio playback
MIT License
1.01k stars 128 forks source link

Shut Down not added in Interactions #360

Closed borkog closed 2 years ago

borkog commented 2 years ago

Describe the bug In "Interaction" on "serial message received" I can not add Shutdown or Restart action

HiFiBerryOS version 20211105 on RP3b=

HiFiBerry sound card dac+/Amp2 (1.1)

To Reproduce Steps to reproduce the behavior:

  1. Interact
  2. Add new interaciton
  3. Choose trigger, Serial Message Received, Set message text "shutdown", save trigger
  4. Add Action, Power, Shut Down Raspberry Pi, Save Action

Expected behavior Action should apear unde word "DO"

Screenshots

Browser (if applicable)

Additional context It worked before ... about a year ago Interactions do not work on 20220228 (current at the moment)

borkog commented 2 years ago

Upon a lot of digging I found that this: interact = { actions: { power: function(interactData) { if (interactData.option == "shutdown") { beo.bus.emit("general", {header: "requestShutdown", content: {extension: "interact"}}); } if (interactData.option == "restart") { beo.bus.emit("general", {header: "requestReboot", content: {extension: "interact"}}); } } } } is missing from /opt/beocreate/beo-extensions/product-information/index.js

Can someone please let me now what is going on since "Interactions" are not working at all in the latest version... and shudown is stripped from the previous version ...

Is this all to because of the power controller? What are the plans?

Thanks B.

hifiberry commented 2 years ago

There is a bug in 20220228.

In general, the Interaction code isn't really maintained today. We don't have any long-term plans for this.