Newbie questions about Onion Omega2+
-
I just bought an Onion Omega2+ with the mini dock, and have succeeded in getting it set up and connected to my Wifi network. I've also installed PHP, Git and Aplay (for playing audio files) -- and even succeeded in connecting the Onion to my USB audio interface and to play some WAV files with it. I'm stalled, however, as now I can't figure out what to do next .. since I don't have any IO pins on the Mini Dock.
So .. assuming that I never buy any other type of dock that has IO pins on it .. what types of possibilities remain?
What I'd like to figure out how to do next is to somehow communicate with the Onion from outside of my local network .. though I'd prefer to not have to reconfigure my router or set up any kind of port forwarding.
I was thinking of trying to set up some kind of PHP script on the Onion that would .. perhaps .. check an email inbox every minute or so to see if any "commands" have been assigned to it. For example .. when it checks the email inbox and sees that there's an unread message that has the subject line of "Say Hello" .. my PHP script would play a specific audio file that would play through my USB audio interface, .. and then mark the message as read.
Does anyone here have any experience with doing something like this using PHP? If so, .. do you have any tips on how I might go about it? And would you happen to have any code examples you could share with me?
Thanks!
- Yvan
-
@Yvan-Gagnon i'd look for female header with long pins so that i could mount those in the mini dock and then mount the omega2 on the long pin female header. what that does is expose all pins of the omega2 to allow you to solder connections to to be able to use those pins.
-
Thanks for your reply Douglas. I have to confess, though, .. I've averse to having to do any kind of soldering. I'm more of a web developer, and would prefer to restrict my initial experiments with the Onion to using just PHP, if possible. Any thoughts/suggestions?
- Yvan
-
I just figured out how to check a gmail inbox using PHP's imap_open() method. Although I was able to get it working using a script that's up on my shared hosting site .. I'm getting the following error message whne trying it with the Onion Omega2+:
Fatal error: Uncaught Error: Call to undefined function imap_open() in /www/php/imap.php:3 Stack trace: #0 {main} thrown in /www/php/imap.php on line 3
How to do go about enabling IMAP support in PHP 7 on the Omega2+ ?
- Yvan
-
@Yvan-Gagnon well, use micro-clips,grabbers, hooks to just clip onto the pins. you seem to be lamenting not having access to io pins in your first post so i suggested ways to get access.
-
I apologize for the misunderstanding. I wasn't really lamenting -- I was just explaining my current limitations and trying to figure out how to just leverage my current PHP configuration (which appears to also be pretty limited, I'm discovering) .. so I can somehow communicate with the Onion from outside of my local network. As it stands right now, it looks like I might need to have certain PHP extensions installed (such as the imap extension for php7) .. but that they might not exist for the particular Linux distro that's installed on the Omega. So far I've tried all of the following ... but none of them have worked.
opkg install php-imap
opkg install php7-imap
opkg install php7.0-imapAm I missing anything here? Or am I correct in assuming that these packages simply don't exist for the Omega's Linux distro?
Thanks,
- Yvan