Skip to content

SOS Computer Rescue

Signs of Success Ltd

Menu
  • Home
  • SOS Computer Rescue
  • SOS Blog
    • LOMO Lubitel 166B Digital Camera – Page 1
    • Computer Stuff
      • Arduino
      • Onion Omega – Internet of Things
      • Programming
      • Raspberry Pi
      • Windows 10
    • Electric Bikes
      • Yuba Mundo eV4
      • Dual Battery Management System
    • Other Technology
    • MiniCab Miev
      • Squirrel – and our South Island camping road trip
      • Road Trip 2021 – Central Otago
      • Otago 2022 – another roadtrip
    • Sign Making
    • Registry Restore for all occasions
    • Login
  • About us
    • About us
    • SOS Electric Vehicles
    • SOS Company vehicle – Yuba Mundo V4 Electric Bike
    • Glover Family Webpage
  • Get in touch
  • What People Say
Menu

Onion Omega – next steps

Posted on December 6, 2017December 7, 2017 by Dave

I have made some serious changes to the PHP web page which servers up the door controls and web cam images, so I decided to finally get FTP access to the files on the Omega. The arrival of my second Omega made this even more relevant!

Wirelessly access and edit the files on your Omega using the SFTP protocol

1. setup the Omega to accept incoming SFTP connection requests. To start, edit /etc/opkg/distfeeds.conf, and find the line below:

1
## src/gz reboot_packages <a href="http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/packages" target="_blank" rel="noopener noreferrer" data-saferedirecturl="https://www.google.com/url?hl=en&amp;q=http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/packages&amp;source=gmail&amp;ust=1498690346018000&amp;usg=AFQjCNEvjkmmRXIdSU9I3y1KsHxKCo6plA">http://downloads.lede-project.<wbr />org/snapshots/packages/mipsel_<wbr />24kc/packages</a>

Remove the two # signs and the whitespace at the beginning so it looks like this:

1
src/gz reboot_packages <a href="http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/packages" target="_blank" rel="noopener noreferrer" data-saferedirecturl="https://www.google.com/url?hl=en&amp;q=http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/packages&amp;source=gmail&amp;ust=1498690346019000&amp;usg=AFQjCNEvq-WxI3NgTiuHKvJ8WH-k_PSieA">http://downloads.lede-project.<wbr />org/snapshots/packages/mipsel_<wbr />24kc/packages</a>

2. Ensure your Omega is connected to your WiFi network, then connect to the command line and run the following commands:

1
2
opkg update
opkg install openssh-sftp-server

3. Reboot the Onion Omega just to make sure.

4. Start your chosen FTP client (since FireFTP stopped working, I have moved back to FileZilla), and set up the IP address (either Omega-xxxx.local,  192.168.3.1 or your permanent IP address on your network, set up the user name and pssword, and the port 22.

With this set up properly, I am now able to keep backups of my php and python files on my PC, and edit them using Notepad++. The console on the Omega is a bit too flakey to use reliably, and nano on the putty terminal was starting to get tiring!

I also received another Omega2+ and a Mini Dock a couple of days ago, and I am using it to replace a Raspberry Pi I am using to run a second web cam which I use to view the driveway outside my new solid garage doors!

You would thing a simple thing like this, which is just a subset of the previous Omega setup would be relatively easy by now, but it seems that nothing is easy with an Omega. I thought I must have done something pretty serious to my last one during set up, as eventually I had to restore to factory settings using a USB stick with the latest Mega operating system on it. But no, I carefully went through my setup as detailed below, and when I set up the fixed IP address my modifying the network config file, suddenlt I lsot my wifi connection through the internet, and no amount of reverting, copying from other devices etc could get it working again. I tried many times and methods to revert to factory settings, pressing the reset button for 10 seconds, logging on and using command line stuff, connecting serially. I eventually got to the point where I was trying to reset to factory using the USB stick, but this failed repeatedly also, despite working fine on the last Omega.

Eventually something happened (sorry can’t be more specific – I don’t think I did anything, except possibly leaving it alone for a couple of hours) and it went back to factory and allowed me to set it up from scratch. As per the first time through, and the previous Omega, things like the Editor did not work properly, and still doesn’t. The only thing I am getting is an error message about corrupted Time Zone databases when I try to use the date functions in PHP.

Anyway the steps I took are:-

  1. Set up out of the box, connecting to my home network.
  2. Change passwords for root and AP wifi access. Set up timezone.
  3. Logon using Putty to omega-xxxx.local.
  4. Install Nano
  5. Edit the /etc/config/network file to set up a fixed IP address
  6. Install PHP
  7. Install MJPG-Streamer and set up new camera by editing /etc/config/mjpg-streamer
  8. Set up access for SFTP client (see top of this post) and set up Filezilla.
  9. Modify and upload an index.php file that allows me to view the attached web cam, and also the webcam attached to the first omega.
  10. set up JuiceSSH on my phone to allow me to edit files etc from my armchair!
  11. Finally, in order to get the camera out of the way and out of the sun, I mounted it at the top of the window rather than the bottom, which meant it was mounted upside down. Unfortunately MJPG-Streamerdoes not appear to have the option to rotate the image, so I had to modify the pages that stream this webcam to rotate the image.  This page has a good write up and CSS code to do it.

The secondhand Logitech VUCR45 webcam I picked up from our local cash converters for $12 is great, it has exposure control, so it doesn’t burn out the image at midday, and in the evening the street lamp allows some visibility on the road and driveway. Much better than the old DSE camera I was using before.

Both omegas are a little slow when either or both webcams are in use, sometimes they are prettty much in sync, other times they can lag by seconds. More work is needed in this area.

 

1 thought on “Onion Omega – next steps”

  1. Dave says:
    April 4, 2020 at 10:43 am

    Almost since I finished this project, I have been having issues with very low frame rates, the Omega freezing and the WIFI router slowing down and eventually freezing also. It took a while to work out what was wrong, but when I installed the second Omega Onion and Camera in its final location, I swapped out the power supply I was using for a 1amp charger I had spare for a mobile phone. This charger does not have the power output to run the Omega Onion and the webcam, and was slowing right down to allow the thing to run at all. The other camera is plugged into a mains socket with two USB sockets in it, and these are about 2.5 amps. This onion also opens and shots the garage doors, so the relays may need a little bit more power.
    Anyway, I swapped out the 1amp unit for a good quality 2 amp unit I had sitting in my workshop, and it is now faultless, and has been up and running for days. Today I increased the frame rate from 5 fps back to 25 fps, and it seems to work perfectly at the higher rate too.
    Moral of the story, don’t be a cheapskate when it comes to power supplies for tiny computers, including Raspberry PIs, Onion Omegas or whatever you use.
    I have also replaced the older Logitech camera with a newer model, the same as I used on the Garage camera system (Logitech C525). As I can mount this one the right way up, I have got rid of the image inversion hack detailed above.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

©2022 SOS Computer Rescue | Built using WordPress and Responsive Blogily theme by Superb