hoobs-org / HOOBS

Build your Smart Home with HOOBS. Connect over 2,000 Accessories to your favorite Ecosystem.
https://hoobs.org
GNU General Public License v3.0
553 stars 51 forks source link

Hoobs update to 4.1.x is not offered #1710

Closed svobod3 closed 2 years ago

svobod3 commented 2 years ago

Description My current hoobs version is 4.0.104. I just saw that there is already version 4.1.x available, but my hoobs does not offer this in "Update Available" section.

Version Please include the version of HOOBS you are using. 4.0.104

Did you upgrade Please let us know if you upgraded from a previous version.

Pervious version If you upgraded, please let us know your previous version.

Did you orginally upgrade to HOOBS 3 from HOOBS 2.1.1? Did you perform an upgrade from HOOBS 2.1.1? Some things are different.

What device are you using? Please let us know the device you are running HOOBS on.

If this is a custom install, what's your operating system? Please let us know what operating system and version you are using. Ex. Fedora 30 or macOS Catalina.

List your plugins Please include a list of the plugins you are using. We need to be able to find it on NPM. If the plugin is no published, please include a link to the repository.

Post your config This can be found in the interface, Configuration -> Advanced or you can get it via SSH cat ~/.hoobs/etc/config.json

POST CONFIG HERE

Post your log You can get the log from the interface. This is in the Log section.

POST LOG HERE

Additional context Add any other context about the problem here.

bwp91 commented 2 years ago

Please run this command from the HOOBS terminal (default terminal credentials are hoobs // hoobsadmin)

curl -sk https://dl.hoobs.org/fix | sudo bash -
svobod3 commented 2 years ago

Thanks a lot for fast reply. I executed command you had mentioned. Output find below. At the end I found several errors (The package nodejs needs to be reinstalled, but I can't find an archive for it) Should I do something with it or can I just ignore it? But bigger problem is that after reboot when I do to hoobs page, dashboard is empty, accessories list is empty etc. But I can access terminal.

Remove 3rd party sources Clean package manager (Reading database ... 54529 files and directories currently installed.) Removing hoobs-cli (4.0.44) ... dpkg: warning: while removing hoobs-cli, directory '/usr/lib/hbs' not empty so not removed Removing hoobs-gui (4.0.88) ... Removing hoobsd (4.0.104) ... dpkg: warning: while removing hoobsd, directory '/usr/lib/hoobsd' not empty so not removed Reading package lists... Building dependency tree... Reading state information... Remove manually installed Node binaries Remove manually installed Node files Remove services Remove service wants Remove NGINX Failed to stop nginx.service: Unit nginx.service not loaded. Failed to disable unit: Unit file nginx.service does not exist. Reading package lists... Building dependency tree... Reading state information... E: The package nodejs needs to be reinstalled, but I can't find an archive for it. Reconfigure Wi-Fi Connect [Unit] Description=WiFi Captive Portal After=NetworkManager.service Before=hoobsd.service

[Service] Type=oneshot ExecStart=/usr/local/sbin/wifi-connect-startup

[Install] WantedBy=multi-user.target Reload systemd Fix system source from Berkley deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi

Uncomment line below then 'apt-get update' to enable 'apt-get source'

deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi

Remove SSL CA certificate hack

/etc/profile: system-wide .profile file for the Bourne shell (sh(1))

and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

if [ "id -u" -eq 0 ]; then PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" else PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games" fi export PATH

if [ "${PS1-}" ]; then if [ "${BASH-}" ] && [ "$BASH" != "/bin/sh" ]; then

The file bash.bashrc already sets the default PS1.

# PS1='\h:\w\$ '
if [ -f /etc/bash.bashrc ]; then
  . /etc/bash.bashrc
fi

else if [ "id -u" -eq 0 ]; then PS1='# ' else PS1='$ ' fi fi fi

if [ -d /etc/profile.d ]; then for i in /etc/profile.d/*.sh; do if [ -r $i ]; then . $i fi done unset i fi

export SSL_CERT_FILE

/etc/sudoers

See the sudoers man page for the details on how to write a sudoers file.

Override built-in defaults

Defaults env_reset Defaults mail_badpass Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

root and users in the sudo group can run anything as any user

root ALL=(ALL:ALL) ALL %sudo ALL=(ALL:ALL) NOPASSWD: ALL Upgrade System Get:1 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB] Get:2 http://archive.raspberrypi.org/debian buster InRelease [32.6 kB] Get:3 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages [13.0 MB] Get:4 http://archive.raspberrypi.org/debian buster/main armhf Packages [393 kB] Get:5 http://raspbian.raspberrypi.org/raspbian buster/contrib armhf Packages [58.8 kB] Get:6 http://raspbian.raspberrypi.org/raspbian buster/non-free armhf Packages [104 kB] Get:7 http://raspbian.raspberrypi.org/raspbian buster/rpi armhf Packages [1,360 B] Fetched 13.6 MB in 28s (488 kB/s) Reading package lists... Processing triggers for man-db (2.8.5-2) ... Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease Hit:2 http://archive.raspberrypi.org/debian buster InRelease Reading package lists... Reading package lists... Building dependency tree... Reading state information... E: The package nodejs needs to be reinstalled, but I can't find an archive for it. Reading package lists... Building dependency tree... Reading state information... E: The package nodejs needs to be reinstalled, but I can't find an archive for it. Install HOOBS Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease Hit:2 http://archive.raspberrypi.org/debian buster InRelease Reading package lists... error executing command Reading package lists... Building dependency tree... Reading state information... E: The package nodejs needs to be reinstalled, but I can't find an archive for it. Reading package lists... Building dependency tree... Reading state information... E: The package nodejs needs to be reinstalled, but I can't find an archive for it. Reading package lists... Building dependency tree... Reading state information... E: The package nodejs needs to be reinstalled, but I can't find an archive for it. /root/hoobs-fix.sh: line 105: hbs: command not found Upgrading HelM Reading package lists... Building dependency tree... Reading state information... E: The package nodejs needs to be reinstalled, but I can't find an archive for it. Rebooting

bwp91 commented 2 years ago

Can you try connecting via an ssh terminal (rather than using the terminal in the ui) and running the command again?

svobod3 commented 2 years ago

Sure, but I need some support. I use Mac. How can I access hoobs via mac console?

bwp91 commented 2 years ago

Sure, open the Terminal all (in the Utilities folder), and type this command, changing the IP address for your hoobs box

ssh hoobs@192.168.1.100

It will ask for the password which will be hoobsadmin unless you have changed it already.

It should log in and display the hoobs logo and some connection info. Then you can enter the command again

curl -sk https://dl.hoobs.org/fix | sudo bash -
svobod3 commented 2 years ago

Thanks a lot for your help. I executed command via terminal (output find below), but still when I do to hoobs page, dashboard is empty, accessories list is empty etc. and all accessories in HomeKit are unreachable.

Remove 3rd party sources Clean package manager dpkg: warning: ignoring request to remove hoobsd which isn't installed dpkg: warning: ignoring request to remove hoobs-cli which isn't installed dpkg: warning: ignoring request to remove hoobs-gui which isn't installed Reading package lists... Building dependency tree... Reading state information... Remove manually installed Node binaries Remove manually installed Node files Remove services Remove service wants Remove NGINX Failed to stop nginx.service: Unit nginx.service not loaded. Failed to disable unit: Unit file nginx.service does not exist. Reading package lists... Building dependency tree... Reading state information... E: The package nodejs needs to be reinstalled, but I can't find an archive for it. Reconfigure Wi-Fi Connect [Unit] Description=WiFi Captive Portal After=NetworkManager.service Before=hoobsd.service

[Service] Type=oneshot ExecStart=/usr/local/sbin/wifi-connect-startup

[Install] WantedBy=multi-user.target Reload systemd Upgrade System Hit:1 http://archive.raspberrypi.org/debian buster InRelease Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease Reading package lists... Hit:1 http://archive.raspberrypi.org/debian buster InRelease Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease Reading package lists... Reading package lists... Building dependency tree... Reading state information... E: The package nodejs needs to be reinstalled, but I can't find an archive for it. Reading package lists... Building dependency tree... Reading state information... E: The package nodejs needs to be reinstalled, but I can't find an archive for it. Install HOOBS Hit:1 http://archive.raspberrypi.org/debian buster InRelease Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease Reading package lists... error executing command Reading package lists... Building dependency tree... Reading state information... E: The package nodejs needs to be reinstalled, but I can't find an archive for it. Reading package lists... Building dependency tree... Reading state information... E: The package nodejs needs to be reinstalled, but I can't find an archive for it. Reading package lists... Building dependency tree... Reading state information... E: The package nodejs needs to be reinstalled, but I can't find an archive for it. /root/hoobs-fix.sh: line 105: hbs: command not found Upgrading HelM Reading package lists... Building dependency tree... Reading state information... E: The package nodejs needs to be reinstalled, but I can't find an archive for it. Rebooting Connection to 192.168.1.34 closed by remote host. Connection to 192.168.1.34 closed.

bwp91 commented 2 years ago

Can you run this command:

sudo dpkg --remove --force-all nodejs

Does this give any output/errors?

svobod3 commented 2 years ago

yes, here is the output:

dpkg: nodejs: dependency problems, but removing anyway as you requested: helm depends on nodejs (>= 14.15.0).

dpkg: warning: overriding problem because --force enabled: dpkg: warning: package is in a very bad inconsistent state; you should reinstall it before attempting a removal (Reading database ... 51220 files and directories currently installed.) Removing nodejs (14.17.6-deb-1nodesource1) ... dpkg: warning: while removing nodejs, directory '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator' not empty so not removed dpkg: warning: while removing nodejs, directory '/usr/share/doc/nodejs/guides' not empty so not removed Processing triggers for man-db (2.8.5-2) ...

bwp91 commented 2 years ago

And now if you run this:

sudo apt install nodejs
svobod3 commented 2 years ago

Done with result below

Reading package lists... Done Building dependency tree
Reading state information... Done You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: helm : Depends: nodejs (>= 14.15.0) but 10.24.0~dfsg-1~deb10u1 is to be installed nodejs : Depends: libnode64 (= 10.24.0~dfsg-1~deb10u1) but it is not going to be installed Recommends: nodejs-doc but it is not going to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

bwp91 commented 2 years ago

At this point it might be easier to just re flash the system with a fresh install. It’s guaranteed to work.

Do you have a microSD card adapter that you can use to plug it into your mac?

You will have to unscrew the 4 screws on the bottom of the HOOBS Box and take the board out then remove the microSD card and plug it into your computer, then follow this guide:

Download the App BalenaEtcher - https://www.balena.io/etcher/ Download the HOOBS Image - https://support.hoobs.org/downloads/image?platform=armhf From the download folder - Load the .zip file in the BalenaEtcher. If you are using a Mac - the file is automatically decompressed and moved to the thrash bin. Restore the file to your download folder Click on flash

Once the process is over - insert the card back into the board. Close the box with the screws. Plug the ethernet cable and then power the device.

svobod3 commented 2 years ago

Unfortunately I have no card adapter:( Is there any other way how to do it?

bwp91 commented 2 years ago

This is probably going to be the quickest way to get a fully updated hoobs instance working again.

If you don’t feel comfortable doing this, you can send an email to info@hoobs.org with your order number and a link to this issue, and you’ll get someone from the hoobs support team getting back to you. However I would imagine they would recommend the re-flash.

svobod3 commented 2 years ago

ok, thanks a lot