Thanks for the response Douglas! I didn't state the current status correctly in my original post. I was able to access the terminal app in console when I first started getting the "connection refused" error but since I reset the devices I cannot access the console now. My network doesn't show up in the list during setup so I can't get passed that screen. I tried to connect one Omega to another and was able to get to the "Software" step but because the other doesn't have internet access the device just got hung up trying to load this step.
I was using both devices up until I tried installing NodeJS on the one that didn't have a SD card, the device ran out of memory and everything seemed messed up from that point. I tried putting an SD card and it seemed like my SSH connection was refused after that. I transferred the SD card to the other Omega and then it was connection refused there as well. I have removed the SD card from both at this point and tried a factory reset but still connection refused.
I found this topic where other people were having the same issue: https://github.com/OnionIoT/Onion-Console/issues/64 There is something mentioned about cookies but I think that is only related to accessing the console via omega-XXXX.local...I access via IP so I don't care about this and don't see how a browser cookie could stop SSH in other programs.
The installer has installed everything correctly. It is so specifically conceived that when entering on 192.168.3.1, Onion OS was opened because Onion console is not installed in new Omega2 during installation. To fix this, you may need to edit the file /www/index.html
A bit of context: OpenWrt (on which OnionOS is built) is a network router OS, and as such it needs to have a web-UI which can access and modify system configuration and status. This OpenWrt Web-UI is called LuCI
ubus (u=µ, micro bus) is one part of the infrastructure for that, as it allows to query and command various system parts. uci (the unified configuration interface) is another part, it allows to manage more static configuration in a standardized way, and is accessible via ubus.
So in order for LuCI to use ubus to do stuff, including using uci, there needs to be a http-to-ubus bridge, which comes in the form of a uhttpd plugin called uhttpd-mod-ubus. There's documentation about this here.
As I'm a user of stock OpenWrt on Omega2, I'm not absolutely sure about the exact state of OnionOS, but judging from the .config on github uhttpd-mod-ubus is installed by default and should be working.
So I guess you need to start at creating a ACL and read on to understand how how to login and get a session id via http.
I may be the only one who wants this, but if anyone else would like to use/modify this script, feel free. I added the ability to 'cancel' the SafePower mode by just running the script again.
Its possible this turns out to be a bad idea, but it cannot be worse than just pulling the power. I have not tried it, but I imagine running in SafePower mode would also not present much problems as ultimately there just is not a lot of flash writing going on (at least in my case).
@Vukan-Vuk Yes, @CAP-33 is correct - you can not turn off the POWER LED of Power Dock without some hardware action / modification.
The expled tool - originally - is able to control the RGB LED of an Expansion Dock via GPIO15, 16, 17.
See also Expansion Dock > Using the Dock > Controlling the RGB LED
Power Dock 2 has a virtual PB (PushButton) that we can push with the power-dock2 utility via GPIO16 (or unintentionally because GPIO16 is floating by default ;-).
See also Checking the Battery Level
Up to now I thought that PB is effective only if a battery is connected to the board.
It seems you have found a creative way when you are keep pushing it with an expled command - theoretically 200 times per second ;-).
You should try to stop the PWM signal on GPIO16 with fast-gpio set-input 16 - this was the default state of GPIO16.
Generate a software-based Pulse Width Modulated (PWM) signal on a selected pin. Specify the desired duty cycle and frequency of the PWM signal.
fast-gpio pwm <gpio> <freq in Hz> <duty cycle percentage>
This will launch a background process that will generate the PWM signal.
To stop the PWM signal, set the GPIO’s value:
fast-gpio <gpio> 0
fast-gpio set <gpio> 0 - set the output LOW (if there's an active LOW LED then it will be ON) or
fast-gpio set <gpio> 1 - set the output HIGH (if there's an active LOW LED then it will be OFF).