Problems after migrating from Supervised to VM HAOS

Hi All,

I had some problems with updates of HA in Supervised version on Debian, so i decided to migrate to VM on Virtualbox on Debian with HAOS.
I made backup and after installing i restored it.

After that i have two problems:

  1. is with LMS - I cannot run it even if i uninstall and install again.
    here is log:
----------------------------------------------------------
 Add-on: Logitech Media Server
 Logitech Media Server, SqueezeBox Server & UPNP Media Server
-----------------------------------------------------------
 Add-on version: 0.0.50
 You are running the latest version of this add-on.
 System: Home Assistant OS 9.3  (amd64 / qemux86-64)
 Home Assistant Core: 2022.11.4
 Home Assistant Supervisor: 2022.11.2
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] 02-timezone.sh: executing... 
Setting the timezone to : Europe/Warsaw
Current default time zone: 'Europe/Warsaw'
Local time is now:      Sat Dec  3 20:33:11 CET 2022.
Universal Time is now:  Sat Dec  3 19:33:11 UTC 2022.
Date: Sat Dec  3 20:33:11 CET 2022
[cont-init.d] 02-timezone.sh: exited 0.
[cont-init.d] 05-ha-options-json.sh: executing... 
[cont-init.d] 05-ha-options-json.sh: exited 0.
[cont-init.d] 07-ha-addon_name.sh: executing... 
[cont-init.d] 07-ha-addon_name.sh: exited 0.
[cont-init.d] 09-ha-config-to-env.sh: executing... 
[20:33:12] INFO: Option MOUNT to MOUNT=null
[20:33:12] INFO: Option TMPFS to TMPFS=null
[20:33:12] INFO: Option OPTIONS to LMS_OPTIONS=null
[20:33:12] INFO: Option LOGFILE to LMS_LOGFILE=null
[20:33:12] INFO: Option LOGDIR to LMS_LOGDIR=null
[20:33:12] INFO: Option NX to LMS_NX=null
[cont-init.d] 09-ha-config-to-env.sh: exited 0.
[cont-init.d] 11-ha-dirs.sh: executing... 
[cont-init.d] 11-ha-dirs.sh: exited 0.
[cont-init.d] 15-ha-mounts.sh: executing... 
[cont-init.d] 15-ha-mounts.sh: exited 0.
[cont-init.d] 17-ha-links.sh: executing... 
[cont-init.d] 17-ha-links.sh: exited 0.
[cont-init.d] 17-packages.sh: executing... 
[cont-init.d] 17-packages.sh: exited 0.
[cont-init.d] 21-pulse.sh: executing... 
[20:33:13] INFO:  Fix pulse perms
[cont-init.d] 21-pulse.sh: exited 0.
[cont-init.d] 90-lms_paths.sh: executing... 
[cont-init.d] 90-lms_paths.sh: exited 0.
[cont-init.d] 95-nxgix.sh: executing... 
[cont-init.d] 95-nxgix.sh: exited 0.
[cont-init.d] 95-scripts.sh: executing... 
[cont-init.d] 95-scripts.sh: exited 0.
[cont-init.d] 99-print-env.sh: executing... 
[cont-init.d] 99-print-env.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
Start Logitech Media Server...
[services.d] done.
[20:33:15] INFO: Waiting for lms before starting NGinx...
[22-12-03 20:33:20.5606] main::init (390) Starting Logitech Media Server (v8.2.0, 1627922070, Tue Aug  3 11:37:35 CEST 2021) perl 5.028001 - x86_64-linux-gnu-thread-multi
[22-12-03 20:33:20.6219] Slim::Utils::PluginManager::init (74) Failed to load plugin downloader: Can't locate Slim/Utils/PluginDownloader.pm:   /config/lms/cache/InstalledPlugins/Slim/Utils/PluginDownloader.pm: Permission denied at /usr/share/perl5/Slim/Utils/PluginManager.pm line 69.
[22-12-03 20:33:20.8175] File::Next::__ANON__ (217) Warning: /usr/share/squeezeboxserver/Plugins: Permission denied at /usr/share/squeezeboxserver/CPAN/File/Next.pm line 217.
[22-12-03 20:33:20.8200] Slim::Utils::Prefs::Namespace::savenow (337) Error: can't save /config/lms/prefs/server.prefs: Permission denied at /usr/share/perl5/Slim/Utils/Prefs/Namespace.pm line 326.
Start Logitech Media Server...
[22-12-03 20:33:25.5229] main::init (390) Starting Logitech Media Server (v8.2.0, 1627922070, Tue Aug  3 11:37:35 CEST 2021) perl 5.028001 - x86_64-linux-gnu-thread-multi
[22-12-03 20:33:25.5331] Slim::Utils::PluginManager::init (74) Failed to load plugin downloader: Can't locate Slim/Utils/PluginDownloader.pm:   /config/lms/cache/InstalledPlugins/Slim/Utils/PluginDownloader.pm: Permission denied at /usr/share/perl5/Slim/Utils/PluginManager.pm line 69.
[22-12-03 20:33:25.5976] File::Next::__ANON__ (217) Warning: /usr/share/squeezeboxserver/Plugins: Permission denied at /usr/share/squeezeboxserver/CPAN/File/Next.pm line 217.
[22-12-03 20:33:25.5985] Slim::Utils::Prefs::Namespace::savenow (337) Error: can't save /config/lms/prefs/server.prefs: Permission denied at /usr/share/perl5/Slim/Utils/Prefs/Namespace.pm line 326.
Start Logitech Media Server...
[22-12-03 20:33:30.8242] main::init (390) Starting Logitech Media Server (v8.2.0, 1627922070, Tue Aug  3 11:37:35 CEST 2021) perl 5.028001 - x86_64-linux-gnu-thread-multi
[22-12-03 20:33:30.8366] Slim::Utils::PluginManager::init (74) Failed to load plugin downloader: Can't locate Slim/Utils/PluginDownloader.pm:   /config/lms/cache/InstalledPlugins/Slim/Utils/PluginDownloader.pm: Permission denied at /usr/share/perl5/Slim/Utils/PluginManager.pm line 69.
[22-12-03 20:33:30.9014] File::Next::__ANON__ (217) Warning: /usr/share/squeezeboxserver/Plugins: Permission denied at /usr/share/squeezeboxserver/CPAN/File/Next.pm line 217.
[22-12-03 20:33:30.9024] Slim::Utils::Prefs::Namespace::savenow (337) Error: can't save /config/lms/prefs/server.prefs: Permission denied at /usr/share/perl5/Slim/Utils/Prefs/Namespace.pm line 326.
Start Logitech Media Server...
[22-12-03 20:33:35.9190] main::init (390) Starting Logitech Media Server (v8.2.0, 1627922070, Tue Aug  3 11:37:35 CEST 2021) perl 5.028001 - x86_64-linux-gnu-thread-multi
[22-12-03 20:33:35.9441] Slim::Utils::PluginManager::init (74) Failed to load plugin downloader: Can't locate Slim/Utils/PluginDownloader.pm:   /config/lms/cache/InstalledPlugins/Slim/Utils/PluginDownloader.pm: Permission denied at /usr/share/perl5/Slim/Utils/PluginManager.pm line 69.
[22-12-03 20:33:36.0581] File::Next::__ANON__ (217) Warning: /usr/share/squeezeboxserver/Plugins: Permission denied at /usr/share/squeezeboxserver/CPAN/File/Next.pm line 217.
[22-12-03 20:33:36.0591] Slim::Utils::Prefs::Namespace::savenow (337) Error: can't save /config/lms/prefs/server.prefs: Permission denied at /usr/share/perl5/Slim/Utils/Prefs/Namespace.pm line 326.
Start Logitech Media Server...
[22-12-03 20:33:41.1106] main::init (390) Starting Logitech Media Server (v8.2.0, 1627922070, Tue Aug  3 11:37:35 CEST 2021) perl 5.028001 - x86_64-linux-gnu-thread-multi
[22-12-03 20:33:41.1207] Slim::Utils::PluginManager::init (74) Failed to load plugin downloader: Can't locate Slim/Utils/PluginDownloader.pm:   /config/lms/cache/InstalledPlugins/Slim/Utils/PluginDownloader.pm: Permission denied at /usr/share/perl5/Slim/Utils/PluginManager.pm line 69.
[22-12-03 20:33:41.1944] File::Next::__ANON__ (217) Warning: /usr/share/squeezeboxserver/Plugins: Permission denied at /usr/share/squeezeboxserver/CPAN/File/Next.pm line 217.
[22-12-03 20:33:41.1955] Slim::Utils::Prefs::Namespace::savenow (337) Error: can't save /config/lms/prefs/server.prefs: Permission denied at /usr/share/perl5/Slim/Utils/Prefs/Namespace.pm line 326.
Start Logitech Media Server...
[22-12-03 20:33:45.7582] main::init (390) Starting Logitech Media Server (v8.2.0, 1627922070, Tue Aug  3 11:37:35 CEST 2021) perl 5.028001 - x86_64-linux-gnu-thread-multi
[22-12-03 20:33:45.7683] Slim::Utils::PluginManager::init (74) Failed to load plugin downloader: Can't locate Slim/Utils/PluginDownloader.pm:   /config/lms/cache/InstalledPlugins/Slim/Utils/PluginDownloader.pm: Permission denied at /usr/share/perl5/Slim/Utils/PluginManager.pm line 69.
[22-12-03 20:33:45.8225] File::Next::__ANON__ (217) Warning: /usr/share/squeezeboxserver/Plugins: Permission denied at /usr/share/squeezeboxserver/CPAN/File/Next.pm line 217.
[22-12-03 20:33:45.8236] Slim::Utils::Prefs::Namespace::savenow (337) Error: can't save /config/lms/prefs/server.prefs: Permission denied at /usr/share/perl5/Slim/Utils/Prefs/Namespace.pm line 326.
Start Logitech Media Server...
./run: line 24:   846 Segmentation fault      (core dumped) stdbuf -oL -eL squeezeboxserver ${LMS_OPTIONS} --user "${LMS_USER}" --group "${LMS_GROUP}" --prefsdir "${LMS_PREFS}" --logdir "${LMS_LOGDIR}" --cachedir "${LMS_CACHE}" < /dev/null
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 50-pause.sh: executing... 
[cont-finish.d] 50-pause.sh: exited 0.
[cont-finish.d] 99-message.sh: executing... 
[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
  1. Is with MQTT arduino. I had a scetch with buttons, and now they gone. A cannot make automatizations becouse ia cannot see them. I see only switches from sketch. My sketch is (i’m not an author of it):
#include <Arduino.h>

#include <Ethernet.h>
#include <ArduinoHA.h>
#include <JC_Button.h>

#define BROKER_ADDR     IPAddress(192,168,0,140)
#define BROKER_USERNAME     "mqtt" // replace with your credentials
#define BROKER_PASSWORD     "1234"

byte mac[] = {0x00, 0x10, 0xFA, 0x6E, 0x38, 0x4B}; // sen unique in ethernet segment

EthernetClient client;
HADevice device(mac, sizeof(mac));
HAMqtt mqtt(client, device);
HATriggers triggers;
HASensor temp("temp");


typedef struct {
  int           switchPin;
  const char *  switchDescription;
  HASwitch      switchObject;
  const char *  switchIcon;
} StructSwitch;

StructSwitch mySwitches[] = {
  {18, "Wiatrolap",         HASwitch("ledA", false), "mdi:lightbulb" },
  {17, "Pralnia",           HASwitch("ledB", false), "mdi:LightbulbVariantOutline" },
  {16, "Dobudówka",         HASwitch("ledC", false), "mdi:mdiLightbulbMultiple" },
  {15, "Kibelek",           HASwitch("ledD", false), "mdi:LightbulbMultiple" },
  {14, "Lazienka1",         HASwitch("ledE", false), "mdi:flash" },
  {13, "Lazienka2",         HASwitch("ledF", false), "mdi:flash" },
  {12, "Taras",             HASwitch("ledG", false), "mdi:flash" },
  {11, "Piec",              HASwitch("ledH", false), "mdi:heater" },

};

typedef struct {
  int           adruinoPin;
  const char *  buttonName;
  Button        buttonObject;
} StructButton;

StructButton myButtons[] = {
    {A0,"gab01",Button(A0)}, 
    {A1,"gab02",Button(A1)}, 
    {A2,"syp01",Button(A2)}, 
    {A3,"syp02",Button(A3)},
    {A4,"syp03",Button(A4)},
    {A5,"syp04",Button(A5)},
    {A6,"syp05",Button(A6)},
    {A7,"syp06",Button(A7)},
    {A8,"syp07",Button(A8)},
    {A9,"syp08",Button(A9)},
    {A10,"kor01",Button(A10)}, 
    {A11,"kor02",Button(A11)}, 
    {A12,"kor03",Button(A12)}, 
    {A13,"kor04",Button(A13)}, 
    {A14,"kib01",Button(A14)}, 
    {A15,"kib02",Button(A15)}, 
    {49,"laz01",Button(49)}, 
    {48,"laz02",Button(48)}, 
    {47,"wia01",Button(47)}, 
    {46,"kch01",Button(46)},
    {45,"kch02",Button(45)},
    {44,"kch03",Button(44)},
    {43,"kch04",Button(43)},
    {42,"kch05",Button(42)},
    {41,"kch06",Button(41)},
    {40,"kch07",Button(40)},
    {39,"kch08",Button(39)},
    {38,"kch09",Button(38)},
    {37,"kch10",Button(37)},
    {36,"sal01",Button(36)}, 
    {35,"sal02",Button(35)}, 
    {34,"sal03",Button(34)}, 
    {33,"sal04",Button(33)}, 
    {32,"kog01",Button(32)}, 
    {31,"kog02",Button(31)}, 
    {30,"lag01",Button(30)}, 
    {29,"lag02",Button(29)}, 
    {28,"ant01",Button(28)}, 
    {27,"ant02",Button(27)}, 
    {26,"ant03",Button(26)}, 
    {25,"mch01",Button(25)}, 
    {24,"mch02",Button(24)}, 
    {23,"sta01",Button(23)}, 
    {22,"sta02",Button(22)}, 
    {21,"sta03",Button(21)}, 
    //{20,"tar01",Button(20)}, 
    {19,"tar02",Button(19)},
};

const int numberOfMyButtons = sizeof(myButtons) / sizeof(StructButton);

// Button state:holding
bool holdingBtn = false;

const int numberOfSwitches = sizeof(mySwitches) / sizeof(StructSwitch);


void onBeforeSwitchStateChanged(bool state, HASwitch* s)
{
    // this callback will be called before publishing new state to HA
    // in some cases there may be delay before onStateChanged is called due to network latency
}

void onSwitchStateChanged(bool state, HASwitch* s)
{
        for (int i = 0; i < numberOfSwitches; i++) {
          if (mySwitches[i].switchDescription == s->getName()) {

            digitalWrite(mySwitches[i].switchPin, (state ? HIGH : LOW ));

          };
        };
}

void triggerButtonChange(Button* s, const char *ButtonName) {

    s->read();


    if (s->pressedFor(1000) && !holdingBtn) {
        Serial.println(ButtonName);
        triggers.trigger("button_long_press", ButtonName);        
        holdingBtn = true;
    } else if (s->wasReleased()) {
        if (holdingBtn) {
            holdingBtn = false;
        } else {
            triggers.trigger("button_short_press", ButtonName);
        }
    }

}

void setup() {
  // you don't need to verify return status
  Ethernet.begin(mac);

  // set device's details (optional)
  device.setName("Arduino_Lights");
  device.setSoftwareVersion("1.0.8");
  device.setModel("ATmega2560");

  // switche
  for (int i = 0; i < numberOfSwitches; i++) {

    pinMode(mySwitches[i].switchPin, OUTPUT);

    mySwitches[i].switchObject.setIcon(mySwitches[i].switchIcon);
    mySwitches[i].switchObject.setName(mySwitches[i].switchDescription);

    mySwitches[i].switchObject.onBeforeStateChanged(onBeforeSwitchStateChanged); //optional
    mySwitches[i].switchObject.onStateChanged(onSwitchStateChanged);
  };

  //buttony
  for (int i = 0; i < numberOfMyButtons; i ++) {
    // setup triggers
    triggers.add("button_short_press", myButtons[i].buttonName);
    triggers.add("button_long_press", myButtons[i].buttonName);

    myButtons[i].buttonObject.begin();

  }



  mqtt.begin(BROKER_ADDR,BROKER_USERNAME,BROKER_PASSWORD);
}

void loop() {
    Ethernet.maintain();
    mqtt.loop();


    for (int i = 0; i < numberOfMyButtons; i++) {
       // trigger mqtt after button press
       triggerButtonChange(&myButtons[i].buttonObject,myButtons[i].buttonName);
    };


}

Could you please help me with this? I think it was mistake to migrate to VM :frowning:

Dawid.

Been a while- did you figure this out? I have the same LMS error you had and worked out that
/usr/share/perl5/Slim
doesn’t exist. I have no idea what to do next.

1 Like