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
551 stars 51 forks source link

hoobs 4.1 change memory limit #1780

Closed Stewart06 closed 2 years ago

Stewart06 commented 2 years ago

Bonjour,

Depuis que je suis passé sur HOOBS 4, j'ai tout re-configuré et créer un bridge par plugin pour limiter les erreurs au cas ou je devrais réinitialiser un plugin ou autre.

Par contre j'ai remarqué que la memoire utiliser était de presque 98%.

J'aurais voulu augmenter l'allocation de la memoire mais malheureusement la commande sudo raspi-config ne fonctionne plus.

Comment faire ?

Hello,

Since I switched to HOOBS 4, I have re-configured everything and created a bridge per plugin to limit errors in case I have to reset a plugin or other.

By cons I noticed that the memory used was almost 98%.

I would have liked to increase the memory allocation but unfortunately the sudo raspi-config command no longer works.

How to do ?

mkellsy commented 2 years ago

We run Debian not Raspberry Pi OS. The memory allocation issue is with Raspberry Pi OS because they allocate memory for the GPU. Debian doesn't do this and has access to 100% of the available memory.

Each bridge should be using around 20-30 MB. You can see which bridge is chewing up the memory. Go to the bridges screen and you will see a live memory use value.

Stewart06 commented 2 years ago

Ok merci pour votre réponse, donc je pense que cela doit venir d’un problème lié à HOOBS alors. Car j’utilise un Raspberry Pi 4 avec 2GB se qui me parait bien suffisant.

J’ai actuellement 12 Bridges qui fonctionnes en même temps se qui fait un résultat de 30x12=360MB.

Je ne suis actuellement pas chez moi pour vérifier quel bridge consomme le plus la mémoire.

Y a-t-il une limite du nombre de bridge ?

Ok thanks for your answer, so I think it must be a HOOBS related issue then. Because I use a Raspberry Pi 4 with 2GB which seems quite sufficient to me.

I currently have 12 Bridges running at the same time which gives a result of 30x12=360MB.

I am currently not at home to check which bridge consumes the most memory.

Is there a limit on the number of bridges?

mkellsy commented 2 years ago

12 bridges is a bit excessive. You might benefit from grouping multiple plugins together.

Stewart06 commented 2 years ago

Et bien j’ai créé un bridge par plugin utilisé, je pensais que c’était justement le but de pouvoir séparer chaque plugins et l’isoler dans son bridge pour en cas de problème limiter la casse et devoir recréer toutes les automatisations liées à HomeKit.

Well I created a bridge for each plugin used, I thought that was precisely the purpose of being able to separate each plugin and isolate it in its bridge so that in the event of a problem, limit the damage and have to recreate all the automations linked to HomeKit .

Stewart06 commented 2 years ago

Depuis le passage à HOOBS 4 j’ai deux plugins qui ont un comportement anormal.

1 - Samsung Tizen A chaque fois que je redémarre le Raspberry Pi et que le plugin se connecte à mes téléviseur j’ai à chaque fois la notification de demande d’accès. Je valide à chaque fois l’autorisation. Mais à chaque redémarrage cela me redemande l’autorisation.

2 - Wake On Lan (WOL) Le plugin fonctionne bien, mais je n’ai pas l’état qui s’actualise quand mes ordinateurs sont allumés ou bien éteints.

Je confirme qu’avec HOOBS 3.3.12 tout fonctionnait bien avant.

Since switching to HOOBS 4 I have two plugins that behave abnormally.

1 - Samsung Tizen Every time I restart the Raspberry Pi and the plugin connects to my TVs, I always get the access request notification. I validate each time the authorization. But every time I restart it asks me for permission.

2 - Wake On Lan (WOL) The plugin works well, but I don't have the state that updates when my computers are on or off.

I confirm that with HOOBS 3.3.12 everything worked fine before.

Stewart06 commented 2 years ago

Voici la memoire qu’utilise mes 12 plugins : Materiel Raspberry Pi 4 - 2GB

Delay Switch : 28,5 MB Dummy Switch : 25 MB Dummy Garage : 27 MB Dummy Thermostat : 38 MB Dyson Pure Cool : 38 MB Miot : 33 MB PS4 Waker : 27 MB Ring : 40 MB RpiTemp : 30 MB Samsung Tizen : 30 MB Waker On Lan (WOL) : 27 MB eWeLink : 33 MB

Total : 376,50 MB Le dashboard indique memoire utilisé : 91%

Here is the memory used by my 12 plugins: Hardware Raspberry Pi 4 - 2GB

Delay Switch : 28,5 MB Dummy Switch : 25 MB Dummy Garage : 27 MB Dummy Thermostat : 38 MB Dyson Pure Cool : 38 MB Miot : 33 MB PS4 Waker : 27 MB Ring : 40 MB RpiTemp : 30 MB Samsung Tizen : 30 MB Waker On Lan (WOL) : 27 MB eWeLink : 33 MB

Total: 376.50MB The dashboard indicates memory used: 91%

mkellsy commented 2 years ago

Yes. We made the bridges for this. But we also made the bridges able to handle multiple plugins too. Bridges are like browser tabs. Open too many and you will run out of resources. So, we needed a way for users to squeeze as much out of their systems as possible.

A Pi 3 has a finite amount of memory, and that must be considered when running a large number of bridges. A typical setup runs around 4 - 6 bridges. You are twice the typical. You have 2 options.

  1. Use a more powerful computer.
  2. Configure your current computer to more efficiently use its resources.

I suggest the latter.

The memory shown in the bridges screen is of the bridge only. It doesn't account for the memory it takes to run Node, and what the system uses to keep processes alive. It's displayed this way so you can keep tabs on what a plugin is doing. Basically, it's a simple call inside the code "process.memory.heap" it's available to all Node apps and doesn't look outside its own memory heap.

Your 12 bridges will work, but I think if you were to combine some of, you're known "working good" plugins into a single bridge, it would free up resources.

Stewart06 commented 2 years ago

Ok je comprend, du coup si je commande un Raspberry Pi 4 de 8GB le problème sera résolu ?

Ok I understand, so if I order a Raspberry Pi 4 of 8GB the problem will be solved?

Stewart06 commented 2 years ago

Si je change donc de Raspberry, est-ce que je pourrai mettre la carte SD qui contient HOOBS 4 sans rien faire? Sans réglage ou autre ?

So if I change Raspberry, can I put the SD card that contains HOOBS 4 without doing anything? No setting or something?

mkellsy commented 2 years ago

I even think a 4GB model would work too. But I would try configuring differently first. Reconfiguring is free :)

Stewart06 commented 2 years ago

Le problème c'est que la migration de HOOBS 3.3.12 vers HOOBS 4 n'a pas fonctionné et ma planté toute ma configuration. Je suis repartie de zero avec une installation propre de HOOBS 4 sur carte SD.

Du coup devoir reconfigurer mes plugins afin de les réunir ne m'enchante pas trop, je devrais ensuite tout reconfigurer sur HomeKit.

Donc si je change de Raspberry, est-ce que je pourrai mettre la carte SD qui contient HOOBS 4 sans rien faire? Sans réglage ou autre ?

The problem is that the migration from HOOBS 3.3.12 to HOOBS 4 did not work and crashed my entire configuration. I started from zero with a clean install of HOOBS 4 on SD card.

So having to reconfigure my plugins in order to bring them together does not delight me too much, I would then have to reconfigure everything on HomeKit.

So if I change Raspberry, can I put the SD card that contains HOOBS 4 without doing anything? No setting or something?

mkellsy commented 2 years ago

That’s true. You can just swap the SD Card. I would make a backup first. Just in case something does come up.

https://support.hoobs.org/topics/support-files/how-to-create-a-backup

Stewart06 commented 2 years ago

Oui j'ai deja fait quelque sauvegarde deja, au cas ou une erreur se produirait a force de modifier les plugins.

Est-il possible de mettre HOOBS 4 en Français ?

Yes I have already made some backup already, in case an error would occur by dint of modifying the plugins.

Is it possible to put HOOBS 4 in French?

Stewart06 commented 2 years ago

Dernière chose, j'ai réglé le problème partiellement du plugin WOL, par contre je n'arrive pas à régler le problème du plugin Samsung Tizen, a chaque fois que je redémarre le plugin les téléviseurs me demandent l'autorisation de contrôle dans le pop-up. Avez-vous une idée d'où provient le problème?

Last thing, I partially solved the problem of the WOL plugin, on the other hand I can't solve the problem of the Samsung Tizen plugin, every time I restart the plugin the televisions ask me for control authorization in the pop -up. Do you have any idea where the problem comes from?

mkellsy commented 2 years ago

I am not too sure. Sounds like the config needs a token set or something like that. Otherwise, the plugin will generate a new identifier every time it starts. I would start by reviewing the plugin's docs.

Stewart06 commented 2 years ago

Avant de passer à HOOBS 4 je n'avais pas se problème, j'ai créé exactement la même configuration pour mes deux téléviseurs. Donc soit ca vient du plugin qui doit être mis à jour pour être en accord avec la nouvelle version de HOOBS, ou alors cela vient de HOOBS 4. Il n'y a pas de veritable de documentation sur la page du plugin sur les problèmes de generation d'identifiant.

Before switching to HOOBS 4 I had no problem, I created exactly the same configuration for my two televisions. So either it comes from the plugin that needs to be updated to match the new version of HOOBS, or it comes from HOOBS 4. There is no real documentation on the plugin page about id generation issues.

mkellsy commented 2 years ago

I will have to take a look into the plugin.

Stewart06 commented 2 years ago

Si c'est comme le plugin de PS4 Waker, c'est le chemin d'accès au fichier credentials qui était incorrect entre la version de HOOBS 3 et la version HOOBS 4.

If it's like the PS4 Waker plugin, it's the path to the credentials file that was incorrect between the HOOBS 3 version and the HOOBS 4 version.

mkellsy commented 2 years ago

If you use the terminal in the UI and the plugin dev lists the bin files in the package.json, it should work. We include the /var/lib/hoobs/[all bridges/node_modules/.bin in the system's path.

So, in most cases simply command --options should work.

Again, I will have to look at this plugin over the weekend.

Stewart06 commented 2 years ago

Bon au vu de la pénurie actuelle des composant électronique j'ai commencé à réunir plusieurs plugins dans un bridge, comme conseillé.

Par contre j'avais ma caméra Ring sur le dashboard et maintenant que j'ai supprimé le plugin j'ai un carré noir que je n'arrive pas a supprimer. Comment fait on pour supprimé un accessoire en favoris?

Well given the current shortage of electronic components I started to combine several plugins in a bridge, as advised.

On the other hand I had my Ring camera on the dashboard and now that I have deleted the plugin I have a black square that I cannot delete. How do you remove an accessory from favorites?

Stewart06 commented 2 years ago

Avez-vous pu regarder le problème du jeton d’identification qui pose problème avec le plugin Samsung Tizen ?

Have you been able to look at the problem of the identification token which is problematic with the Samsung Tizen plugin?

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.