Install Script in Console

  • Platform information:
    • Hardware: _CPUArchitecture/RAM/storage_RPI4b 8gb
    • OS: _what OS is used and which version_Openhabian
    • Java Runtime Environment: which java platform is used and what version
    • openHAB version: 3

hello - can someone help me install the script for an Argon case via console?
the instructions i have found are

Argon ONE Guide – Wagner’s TechTalk)

did this pretty much

  • Connect your Pi to the internet (WiFi or Ethernet).
  • Open a shell-terminal. (putty openhabian user)
  • Copy & paste the following command and press ENTER (yes, don’t forget the ” | bash” at the end or it won’t work properly):

curl https://download.argon40.com/argon1.sh | bash

  • Type exit and press ENTER.
  • The scripts will become active after installation. Therefore, rebooting isn’t necessary.

I understand i need to install in console though and not in openhabian so I need someone to help “translate” the instructions

i think it is simple but appreciate the time!

For this there is nothing different between openHABian and stock Raspberry Pi OS.

The shell-terminal is the console.

No translation is necessary. Just log in and paste the command into the terminal.

@rlkoshak ty,

I would be a miss if I didnt try this already (but I was surprised)

while it run on openhabian as expected (but didnt work) I asked someone who said it worked via console (Openhab login)
when i run openhab cli console (the login for openhab/console right?)
I got an error saying that curl and bash arent commands.

openhab> curl https://download.argon40.com/argon1.sh | bash
gogo: CommandNotFoundException: Command not found: curl
Command not found: bash

what am I missing?

It’s never going to work in the openHAB console. That is a special environment that is specific to the openHAB application. It doesn’t have commands like curl and bash and the like. It only has commands to adjust and configure openHAB stuff, like changing the logging level or installing/removing an add-on.

You need to configure the operating system. I don’t know who you asked but I suspect either they didn’t understand what you were trying to do or you didn’t understand what they meant by their answer. You will not be able to run curl, bash, nor a shell script from the openHAB console. It’d be like you are trying to install Google Chrome using Microsoft Excel. It doesn’t make sense.

As for why it didn’t work when running from the terminal I can’t say. You’ve not posted the error. But that’s probably an issue to ask for help from the source of the script. It’s completely external to openHAB and really has nothing to do with openHAB. We are not experts here on Argon.

@rlkoshak

ok maybe i have missunderstood the conversation with someone who has managed to get the script to work on an rpi/oh3 and on argon’s case. He mentioned he used console so I assumed it was the openhab console. All the same i thought I would ask the question more generically here.

first of all appreciate your reply and taking the time to explain console better. (although i could probably get excel to launch chrome from the visual basic layer :slight_smile: )

It isnt an error as such I am getting. The scirpt is meant to control the fan speed based on cpu temp. It just installs but doesnt actually work (fan stays at 100%). So i was hopping the answer was - I am installing it in the wrong place.

If i had to guess what the issue is, it could be that the script isnt Debian or something to do with the service that needs to run/be loaded but I dont know how to check that level of things (yet)

thanks for the time in any case!

this is the various logs i managed to get from my limited understanding after - re-installing the sh file in openhabian.

this command shows that the service isnt loaded for some reason.

sudo systemctl status argononed.service
● argononed.service - Argon One Fan and Button Service
Loaded: loaded (/lib/systemd/system/argononed.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2021-10-12 22:23:21 EEST; 1min 29s ago
Process: 24750 ExecStart=/usr/bin/python3 /usr/bin/argononed.py (code=exited, status=1/FAILURE)
Main PID: 24750 (code=exited, status=1/FAILURE)

Oct 12 22:23:21 openhabian systemd[1]: argononed.service: Service RestartSec=100ms expired, scheduling restart.
Oct 12 22:23:21 openhabian systemd[1]: argononed.service: Scheduled restart job, restart counter is at 5.
Oct 12 22:23:21 openhabian systemd[1]: Stopped Argon One Fan and Button Service.
Oct 12 22:23:21 openhabian systemd[1]: argononed.service: Start request repeated too quickly.
Oct 12 22:23:21 openhabian systemd[1]: argononed.service: Failed with result ‘exit-code’.
Oct 12 22:23:21 openhabian systemd[1]: Failed to start Argon One Fan and Button Service.

This one is a log related to the service execution.

journalctl -u argononed.service
– Logs begin at Thu 2019-02-14 12:11:59 EET, end at Tue 2021-10-12 22:36:35 EEST. –
Oct 12 22:23:19 openhabian systemd[1]: Started Argon One Fan and Button Service.
Oct 12 22:23:19 openhabian python3[24740]: Traceback (most recent call last):
Oct 12 22:23:19 openhabian python3[24740]: File “/usr/bin/argononed.py”, line 9, in
Oct 12 22:23:19 openhabian python3[24740]: bus = smbus.SMBus(1)
Oct 12 22:23:19 openhabian python3[24740]: FileNotFoundError: [Errno 2] No such file or directory
Oct 12 22:23:19 openhabian systemd[1]: argononed.service: Main process exited, code=exited, status=1/FAILURE
Oct 12 22:23:19 openhabian systemd[1]: argononed.service: Failed with result ‘exit-code’.
Oct 12 22:23:20 openhabian systemd[1]: argononed.service: Service RestartSec=100ms expired, scheduling restart.
Oct 12 22:23:20 openhabian systemd[1]: argononed.service: Scheduled restart job, restart counter is at 1.
Oct 12 22:23:20 openhabian systemd[1]: Stopped Argon One Fan and Button Service.
Oct 12 22:23:20 openhabian systemd[1]: Started Argon One Fan and Button Service.
Oct 12 22:23:20 openhabian python3[24744]: Traceback (most recent call last):
Oct 12 22:23:20 openhabian python3[24744]: File “/usr/bin/argononed.py”, line 9, in
Oct 12 22:23:20 openhabian python3[24744]: bus = smbus.SMBus(1)
Oct 12 22:23:20 openhabian python3[24744]: FileNotFoundError: [Errno 2] No such file or directory
Oct 12 22:23:20 openhabian systemd[1]: argononed.service: Main process exited, code=exited, status=1/FAILURE
Oct 12 22:23:20 openhabian systemd[1]: argononed.service: Failed with result ‘exit-code’.
Oct 12 22:23:20 openhabian systemd[1]: argononed.service: Service RestartSec=100ms expired, scheduling restart.
Oct 12 22:23:20 openhabian systemd[1]: argononed.service: Scheduled restart job, restart counter is at 2.
Oct 12 22:23:20 openhabian systemd[1]: Stopped Argon One Fan and Button Service.
Oct 12 22:23:20 openhabian systemd[1]: Started Argon One Fan and Button Service.
Oct 12 22:23:20 openhabian python3[24745]: Traceback (most recent call last):
Oct 12 22:23:20 openhabian python3[24745]: File “/usr/bin/argononed.py”, line 9, in
Oct 12 22:23:20 openhabian python3[24745]: bus = smbus.SMBus(1)
Oct 12 22:23:20 openhabian python3[24745]: FileNotFoundError: [Errno 2] No such file or directory
Oct 12 22:23:20 openhabian systemd[1]: argononed.service: Main process exited, code=exited, status=1/FAILURE
Oct 12 22:23:20 openhabian systemd[1]: argononed.service: Failed with result ‘exit-code’.
Oct 12 22:23:20 openhabian systemd[1]: argononed.service: Service RestartSec=100ms expired, scheduling restart.
Oct 12 22:23:20 openhabian systemd[1]: argononed.service: Scheduled restart job, restart counter is at 3.
Oct 12 22:23:20 openhabian systemd[1]: Stopped Argon One Fan and Button Service.
Oct 12 22:23:20 openhabian systemd[1]: Started Argon One Fan and Button Service.
Oct 12 22:23:20 openhabian python3[24749]: Traceback (most recent call last):
Oct 12 22:23:20 openhabian python3[24749]: File “/usr/bin/argononed.py”, line 9, in
Oct 12 22:23:20 openhabian python3[24749]: bus = smbus.SMBus(1)
Oct 12 22:23:20 openhabian python3[24749]: FileNotFoundError: [Errno 2] No such file or directory
Oct 12 22:23:20 openhabian systemd[1]: argononed.service: Main process exited, code=exited, status=1/FAILURE
Oct 12 22:23:20 openhabian systemd[1]: argononed.service: Failed with result ‘exit-code’.
Oct 12 22:23:20 openhabian systemd[1]: argononed.service: Service RestartSec=100ms expired, scheduling restart.
Oct 12 22:23:20 openhabian systemd[1]: argononed.service: Scheduled restart job, restart counter is at 4.
Oct 12 22:23:20 openhabian systemd[1]: Stopped Argon One Fan and Button Service.
Oct 12 22:23:20 openhabian systemd[1]: Started Argon One Fan and Button Service.
Oct 12 22:23:20 openhabian python3[24750]: Traceback (most recent call last):
Oct 12 22:23:20 openhabian python3[24750]: File “/usr/bin/argononed.py”, line 9, in
Oct 12 22:23:20 openhabian python3[24750]: bus = smbus.SMBus(1)
Oct 12 22:23:20 openhabian python3[24750]: FileNotFoundError: [Errno 2] No such file or directory
Oct 12 22:23:20 openhabian systemd[1]: argononed.service: Main process exited, code=exited, status=1/FAILURE
Oct 12 22:23:20 openhabian systemd[1]: argononed.service: Failed with result ‘exit-code’.
Oct 12 22:23:21 openhabian systemd[1]: argononed.service: Service RestartSec=100ms expired, scheduling restart.
Oct 12 22:23:21 openhabian systemd[1]: argononed.service: Scheduled restart job, restart counter is at 5.
Oct 12 22:23:21 openhabian systemd[1]: Stopped Argon One Fan and Button Service.
Oct 12 22:23:21 openhabian systemd[1]: argononed.service: Start request repeated too quickly.
Oct 12 22:23:21 openhabian systemd[1]: argononed.service: Failed with result ‘exit-code’.
Oct 12 22:23:21 openhabian systemd[1]: Failed to start Argon One Fan and Button Service.
Oct 12 22:33:08 openhabian systemd[1]: Started Argon One Fan and Button Service.
Oct 12 22:33:08 openhabian python3[25209]: Traceback (most recent call last):
Oct 12 22:33:08 openhabian python3[25209]: File “/usr/bin/argononed.py”, line 9, in
Oct 12 22:33:08 openhabian python3[25209]: bus = smbus.SMBus(1)
Oct 12 22:33:08 openhabian python3[25209]: FileNotFoundError: [Errno 2] No such file or directory
Oct 12 22:33:08 openhabian systemd[1]: argononed.service: Main process exited, code=exited, status=1/FAILURE
Oct 12 22:33:08 openhabian systemd[1]: argononed.service: Failed with result ‘exit-code’.
Oct 12 22:33:08 openhabian systemd[1]: argononed.service: Service RestartSec=100ms expired, scheduling restart.

The error I see in bold isnt clear to me at least but reading around the forum from previous years I think there maybe a connection to i2c and the fact that it isnt loaded - I found a reference to this here.

But i think this is pre OH3

I also found this solution but I think that the rasbi config option isnt relevant ot OH 3

https://forums.raspberrypi.com/viewtopic.php?t=266101

and while i followed the crumbs - I seem to be unable to see the patern/solution here.

Hello, I also have one of my openHAB instances running on a RPi4 with Argon One M2 SSD case (and 3D printed mount). :slightly_smiling_face:

Did you also install python? That’s what the script is using.
You can install it after logging into SSH with the following command:

sudo apt-get install python3

I also use the same script that you use so that the mini-fan on the Argon One does not turn it into a little whining monster. :laughing: The script/service work fine for me when using both Raspberry Pi OS and Ubuntu.

Maybe you need to enable the i2c interface using raspi-config?

See:

1 Like

so, yes Python 3 was already installed (i think by default on oh3?)
i had tried to run rasbi-config yesterday and I got a message saying that is is replaced by openhabian config. so i thought it wouldnt work. But i tried it again today and the service is now active. (yeh!) I think i have fixed it but will play around a little today and revert it isnt fixed - Thanks @wborn

*edit: yes it worked. however you need to remember to install raspbi config first (although it isnt generally recomended in the forum)
sudo apt-get install raspi-config
and then run it/ activate i2c in the intefaces menu
then run the argon script - c
curl https://download.argon40.com/argon1.sh | bash

1 Like

Nice! And hopefully a lot less noise from the mini-fan. :loud_sound: :shushing_face:

1 Like