I put together a quick demo of using the Onion Omega to control a Philips Hue light that I have at my office.
Just thought I would share in case anyone was interested in how to do this.
https://gist.github.com/youngsoul/c38287599b0e2fd743f2
Enjoy
I put together a quick demo of using the Onion Omega to control a Philips Hue light that I have at my office.
Just thought I would share in case anyone was interested in how to do this.
https://gist.github.com/youngsoul/c38287599b0e2fd743f2
Enjoy
I created a video on how I setup the Omega to install and run Bottle, a python web framework.
https://www.youtube.com/watch?v=GJCcIlCJOx4
There is another post in the forums, 'Python web framework' which shows you how to use python3. This particular setup video uses python2.
Here is the summary of steps:
vi /etc/opkg.conf
— delete line ‘option check_signature 1'
opkg update
mkdir -p /home/bottle
cd /home/bottle
wget --no-check-certificate https://github.com/defnull/bottle/raw/master/bottle.py
opkg install python-light
opkg install python-email
opkg install python-codecs
opkg install python-logging
opkg install python-openssl
vi bottle_test.py
paste:
from bottle import route, run
@route('/hello/<username>')
def hello(username):
return "Hello {0}. Welcome to the Omega World!".format(username)
run(host='0.0.0.0', port=8080, debug=True)
to run:
python bottle_test.py
I too have put together a few videos on python programming for the Omega just incase you find them helpful.
https://www.youtube.com/watch?v=CQELgysBgQs
https://www.youtube.com/watch?v=GJCcIlCJOx4
https://www.youtube.com/watch?v=jDDq9D50wGo
I also wrote a simple, simple wrapper for the gpio which was inspired by Omega user 'Dan L'.
@Lorcan-Adrain Thanks very much - that is my video. I am hoping to add more in the next few weeks. Thanks again for the shout out.
In the 2-Bullet Tuesday emails, you mention: "
P.S. -- Our Omega2 Indiegogo campaign will be ending in the near future! Don't miss your chance to get the Omega2 for just $5!"
Will the Omega2 be generally available after the campaign?
It is not clear to me if you are saying you can only get it for $5 during the campaign but will be available later for a higher price, or if you are telling me that after the campaign you wont be able to get one for any price.
I am curious so I know whether to consider the Omega2 platform for further development.
Thanks for any clarification you can provide.
I have seen this as well - not just on that particular package. I can't explain why - which means I cannot guarantee my suggestion will work for you. But here is what I have done.
I am assuming you are running the 0.0.4 version of the firmware.
vi /etc/opkg.conf
remove the last line because there is an issue with checking the signatures.
opkg update
then try to get that package again.
I hope that works for you.
I tried this today. My Omega was running at my house, and I brought it into work to see if I could see the Omega wifi network. It does show up for me, so I'm not sure what is going on there.
As for factory reset - I do not know a hardware way to do this, but if you have a terminal program ( if you are on a Mac I suggest Serial ), and connect via a USB cable, then you can type in the command:
factory-reset -f
Also if you connect via a terminal you can setup wifi that way, and it is very easy.
I put together this video - I hope it helps.
@Boken-Lin I added another video showing the setup via a terminal application instead of the console app. You can find that here:
@Fred-Blais PyCharm does have a free community version, of course you will still need to (s)ftp the files to the Omega outside of PyCharm. As for over-kill, I think this depends upon your application and whether you can or want to write and debug with a modern IDE or just use print statement.
While I have not tried it yet, PyCharm does allow for remote debugging of applications which can very powerful. Imagine running your app on the Omega, but debugging on your Mac/PC. It also lets you setup a Remote Python Interpreter - which again I have not tried. These are likely professional features which does have a license fee. $89/ 1st year, $71 2nd year, $53 after that. And really - if you are a professional making your living writing software these are amazing tools for that price, IMHO.
Disclaimer: I am not affiliated with Jetbrains in anyway. I'm just a super happy customer of their products.
Personally - I like PyCharm to do this. I created a video which shows you how to develop with PyCharm and deploy to the Onion Omega.
https://www.youtube.com/watch?v=CQELgysBgQs
The deployment feature is only available in the professional edition - but I feel that their tools are so reasonably priced for the feature set they provide, as a professional, it is worth the money.
This is my preferred workflow and so far it has worked great. The only thing you have to keep in mind is that you are using a far less powerful version of python so you might have to deploy and test to make sure the packages are available to you on the Omega.
I also believe PyCharm can use a remote environment on the Omega so you can be sure it works on the deployed platform - however - this is something I have not tried yet.