Lucifer06 / RemoteGPIO

Remote General Purpose I/O for Venus OS devices (Cerbo GX, ...)
11 stars 3 forks source link

install/uninstall issues #1

Closed kwindrem closed 6 months ago

kwindrem commented 9 months ago

I tried installing your package and failed because there is no file set for the firmware I'm currently running. That's fine, BUT when the install fails, the uninstall section of the script runs and throws errors:

++ Uninstalling RemoteGPIO rm: can't remove '/etc/rcS.d/S90rgpio_pins.sh': No such file or directory rm: can't remove '/dev/gpio/relay_3': No such file or directory rm: can't remove '/dev/gpio/relay_4': No such file or directory rm: can't remove '/dev/gpio/relay_5': No such file or directory rm: can't remove '/dev/gpio/relay_6': No such file or directory

up to date, audited 72 packages in 4s

1 package is looking for funding run npm fund for details

5 vulnerabilities (3 moderate, 2 high)

Some issues need review, and may require choosing a different dependency.

Run npm audit for details.

up to date, audited 72 packages in 3s

1 package is looking for funding run npm fund for details

5 vulnerabilities (3 moderate, 2 high)

Some issues need review, and may require choosing a different dependency.

Run npm audit for details.

up to date, audited 72 packages in 3s

1 package is looking for funding run npm fund for details

5 vulnerabilities (3 moderate, 2 high)

Some issues need review, and may require choosing a different dependency.

Run npm audit for details. rm: can't remove '/data/rgpio': No such file or directory ++ RemoteGPIO uninstalled

You can sidestep the rm errors by using the -f option

The npm commands appear to be doing a lot and taking time. You should test for a proper install prior to running those commands.

Your ReadMe says this will only work on the Large version of Venus OS, but there is no check for this in your setup script. I also ran this on my Raspberry PI test system and if it's only for Cerbo, there should also be a check for that also.

Your ReadMe also says the instal may take several minutes. This could be problematic during reinstall following a firmware update. /data/SetupHelper/reinstallMods runs as a background task which calls your setup script. It calls the other package setup scripts as well. So your script could significantly delay reinstall of other packages, especially with a slow internet connection. Also SetupHelper does not check for network resources before calling setup scripts so this could block completion of your script and/or others called from reinstallMods.

My recommendation would be to move the node red installation out of the main setup script and find a way to run that independently somehow after you are sure the network is functioning.

Let me know if I can help in any way.

Lucifer06 commented 9 months ago

Hi Kevin,

OK thanks for the catch. I will review and update accordingly. Do you know a simple way to test this is running on a Cerbo? I think I have an idea I need to test for speeding-up the Node-Red dependencies install.

Cheers, FreD.


The water is always bluer on the other side of the ocean ;-)

Le 8 déc. 2023 à 18:05, kwindrem @.***> a écrit :

I tried installing your package and failed because there is no file set for the firmware I'm currently running. That's fine, BUT when the install fails, the uninstall section of the script runs and throws errors:

++ Uninstalling RemoteGPIO rm: can't remove '/etc/rcS.d/S90rgpio_pins.sh': No such file or directory rm: can't remove '/dev/gpio/relay_3': No such file or directory rm: can't remove '/dev/gpio/relay_4': No such file or directory rm: can't remove '/dev/gpio/relay_5': No such file or directory rm: can't remove '/dev/gpio/relay_6': No such file or directory

up to date, audited 72 packages in 4s

1 package is looking for funding run npm fund for details

5 vulnerabilities (3 moderate, 2 high)

Some issues need review, and may require choosing a different dependency.

Run npm audit for details.

up to date, audited 72 packages in 3s

1 package is looking for funding run npm fund for details

5 vulnerabilities (3 moderate, 2 high)

Some issues need review, and may require choosing a different dependency.

Run npm audit for details.

up to date, audited 72 packages in 3s

1 package is looking for funding run npm fund for details

5 vulnerabilities (3 moderate, 2 high)

Some issues need review, and may require choosing a different dependency.

Run npm audit for details. rm: can't remove '/data/rgpio': No such file or directory ++ RemoteGPIO uninstalled

You can sidestep the rm errors by using the -f option

The npm commands appear to be doing a lot and taking time. You should test for a proper install prior to running those commands.

Your ReadMe says this will only work on the Large version of Venus OS, but there is no check for this in your setup script. I also ran this on my Raspberry PI test system and if it's only for Cerbo, there should also be a check for that also.

Your ReadMe also says the instal may take several minutes. This could be problematic during reinstall following a firmware update. /data/SetupHelper/reinstallMods runs as a background task which calls your setup script. It calls the other package setup scripts as well. So your script could significantly delay reinstall of other packages, especially with a slow internet connection. Also SetupHelper does not check for network resources before calling setup scripts so this could block completion of your script and/or others called from reinstallMods.

My recommendation would be to move the node red installation out of the main setup script and find a way to run that independently somehow after you are sure the network is functioning.

Let me know if I can help in any way.

— Reply to this email directly, view it on GitHub https://github.com/Lucifer06/RemoteGPIO/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACNVCP5ZAZMJGD35TAQQZVTYINCFXAVCNFSM6AAAAABAM55OOSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGAZTGMBSGM3DOMY. You are receiving this because you are subscribed to this thread.

kwindrem commented 9 months ago

/etc/venus/machine contains text string that indicates the platform. SetupHelper initializes $machine to that value also.

machine GS Device ccgx CCGX einstein Cerbo GX cerbosgx Cerbo SGX bealglebone Venus GX canvu500 CanVu 500 nanopi Multi/Easy Solar GX raspberrypi2 Raspberry Pi 2/3 raspberrypi4 Raspberry Pi 4 ekrano Ekrano GX

— Kevin

On Dec 8, 2023, at 11:17 AM, Lucifer06 @.***> wrote:

Hi Kevin,

OK thanks for the catch. I will review and update accordingly. Do you know a simple way to test this is running on a Cerbo? I think I have an idea I need to test for speeding-up the Node-Red dependencies install.

Cheers, FreD.


The water is always bluer on the other side of the ocean ;-)

Le 8 déc. 2023 à 18:05, kwindrem @.***> a écrit :

I tried installing your package and failed because there is no file set for the firmware I'm currently running. That's fine, BUT when the install fails, the uninstall section of the script runs and throws errors:

++ Uninstalling RemoteGPIO rm: can't remove '/etc/rcS.d/S90rgpio_pins.sh': No such file or directory rm: can't remove '/dev/gpio/relay_3': No such file or directory rm: can't remove '/dev/gpio/relay_4': No such file or directory rm: can't remove '/dev/gpio/relay_5': No such file or directory rm: can't remove '/dev/gpio/relay_6': No such file or directory

up to date, audited 72 packages in 4s

1 package is looking for funding run npm fund for details

5 vulnerabilities (3 moderate, 2 high)

Some issues need review, and may require choosing a different dependency.

Run npm audit for details.

up to date, audited 72 packages in 3s

1 package is looking for funding run npm fund for details

5 vulnerabilities (3 moderate, 2 high)

Some issues need review, and may require choosing a different dependency.

Run npm audit for details.

up to date, audited 72 packages in 3s

1 package is looking for funding run npm fund for details

5 vulnerabilities (3 moderate, 2 high)

Some issues need review, and may require choosing a different dependency.

Run npm audit for details. rm: can't remove '/data/rgpio': No such file or directory ++ RemoteGPIO uninstalled

You can sidestep the rm errors by using the -f option

The npm commands appear to be doing a lot and taking time. You should test for a proper install prior to running those commands.

Your ReadMe says this will only work on the Large version of Venus OS, but there is no check for this in your setup script. I also ran this on my Raspberry PI test system and if it's only for Cerbo, there should also be a check for that also.

Your ReadMe also says the instal may take several minutes. This could be problematic during reinstall following a firmware update. /data/SetupHelper/reinstallMods runs as a background task which calls your setup script. It calls the other package setup scripts as well. So your script could significantly delay reinstall of other packages, especially with a slow internet connection. Also SetupHelper does not check for network resources before calling setup scripts so this could block completion of your script and/or others called from reinstallMods.

My recommendation would be to move the node red installation out of the main setup script and find a way to run that independently somehow after you are sure the network is functioning.

Let me know if I can help in any way.

— Reply to this email directly, view it on GitHub https://github.com/Lucifer06/RemoteGPIO/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACNVCP5ZAZMJGD35TAQQZVTYINCFXAVCNFSM6AAAAABAM55OOSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGAZTGMBSGM3DOMY. You are receiving this because you are subscribed to this thread.

— Reply to this email directly, view it on GitHub https://github.com/Lucifer06/RemoteGPIO/issues/1#issuecomment-1847694220, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN6TTGYXXZNPIZ6QWVZDVJDYINRVRAVCNFSM6AAAAABAM55OOSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBXGY4TIMRSGA. You are receiving this because you authored the thread.

Lucifer06 commented 9 months ago

I have fixed the uninstall errors. I'm also executing the setup only if Venus OS Large is installed. Regarding the requirement to install only in GX, assuming I go with the post install setup from the GUI, it will be possible to use any Venus machine with the TCP Relay version. Most of the type consuming Node-Red install will be executed as a second step, after the user confirm his configuration in the dedicated configuration GUI (Node-Red GUI or in Venus OS GUI if I manage to do it)

Lucifer06 commented 6 months ago

This is now fixed with v3.0.x

kwindrem commented 6 months ago

I forgot to mention I was able to allow SetupHelper to install without the automatic GUI restart.