Thanks for the feedback @crispyoz but I just wrote a python script to monitor the button input on interval and then used uci calls through subprocess to turn wifi on and off. This gives me more capability and I suppose it's not that big of a deal to run a Python script on boot, I'm also flashing an LED through the Python script depending on whether wifi is on or not so it all worked out.
Travis Elliott
@Travis Elliott
Best posts made by Travis Elliott
-
RE: Execute shell script on GPIO change
Latest posts made by Travis Elliott
-
RE: Execute shell script on GPIO change
@Lazar-Demin
Thank you for the input. I'll look into a C implementation. That's a bit more up my ally anyway. I don't generally write in Python but I have quite a bit of experience in C and C++.I've got the Ublox module registered following this guide:
https://onion.io/2bt-using-hologram-expansion/
Is there a way to automatically trigger a script when the status of the connection changes? I believe it is possible to monitor network status. Maybe using uci? The network connection seems to be pretty stable but if it goes offline I'd like to indicate that through the RGB LED we have on board. -
RE: Running NodeRed without WiFi Internet connectivity
Nevermind. There is no issue with running node-red without wifi on. I did not have the Cellular module initialized properly. All is working properly now.
-
RE: Execute shell script on GPIO change
Thanks for the feedback @crispyoz but I just wrote a python script to monitor the button input on interval and then used uci calls through subprocess to turn wifi on and off. This gives me more capability and I suppose it's not that big of a deal to run a Python script on boot, I'm also flashing an LED through the Python script depending on whether wifi is on or not so it all worked out.
-
RE: GPIO Node Red
I know the onion-gpio-sysfs library for Python utilizes calls to sysfs to control and monitor GPIO lines. I did a quick google for node red sysfs GPIO and came up with this:
https://flows.nodered.org/node/node-red-contrib-opi-gpio
Might give it a shot, I haven't tried it but I'd say there's a decent shot at it working. -
Running NodeRed without WiFi Internet connectivity
I've got an Omega 2S+ successfully connected to a Ublox module which is providing internet connectivity. I'm also running Node Red. I've noticed it is not possible start the node red service unless radio0 is enabled and station mode is enabled. If I start the node red service and then turn off radio0(WiFi) Node red continues to run and everything is fine. Something during start up is telling Node-Red not to run if wifi is not on and in station mode. Any ideas? I don't see anything in /etc/init.d/nodered.
-
Execute shell script on GPIO change
Hey everyone,
I'm essentially looking to toggle the Omega Onion 2S+'s WiFi on/off using a button connected to GPIO19. Something similar was asked in this post:
http://community.onion.io/topic/2000/turning-off-wifiBack story is the onion is hooked up to a Ublox Sara R410m which will provide internet connectivity most of the time but I just want to press a button so users can turn on and access Soft AP for device configuration changes. We do not however want that Soft AP/WiFi on all the time, hints needing to toggle it on and off from a button.
The suggestion in the post above seems like the correct solution but looking in rc.button I only see failsafe, power, reset, and rfkill. I'm new to openwrt and am still learning the ins and outs. I'm not sure how I could add handling to hotplug for a button connected to GPIO19. Is this possible? If so could anyone provide a nudge in the right direction?
-
RE: Turning off wifi
@Ken-Conrad
Sorry for replying to such an old topic but I'm looking to do this with an Omega2S+. I can see it does indeed have the hotplug.d directory so this should work. I however am not sure what to replace "SES" with in the shell script. I want to toggle WiFi on/off when GPIO 19 goes low. Would I just replace "ses" with "19"? -
RE: Can Omega 2+ run a web browser like firefox?
Hey guys,
I have a valid use case here:
http://community.onion.io/topic/2418/oauth-with-googleAny updates on this? Did any of you get a web browser installed?
-
OAuth with Google
Hey everyone,
Platform:
Onion Omega 2+Project:
So I'm building a Python application on the onion which will read inputs and generate emails accordingly. This is meant to be a product we sell to users. I'd like for the Onion to OAuth with Google in order to grant access to use the users gmail account to send emails. I know I can use SMTP and prompt the user to enable less secure applications in their Google account settings but I really want to do this correctly and OAuth the application running on the Onion with Google.Current status of project:
I have a Python script running on the Onion which implements Google's OAuth library for Python and it is working properly. However the conventional way for an application like this to work is for the Python script to build and OAuth request and then to pop open the web browser to google where the user would enter the username and password for the Google account they would like to authorize the application to work with.Problem:
Onion does not have a web browser so I am not able to pop open a web interface where the user enter's their Google account credentials in order to grant the application access to use their Google account.Has anyone installed a web server on the Onion Omega 2+? I thought about Links, does anyone know if that would work or not?