About beginning whit the Omega and iot platforms
-
Hi all,
I'm trying to face with the iot world for the first time, I'm a beginner
I'm a web dev and I've a bit of hardware/electronics background so i thought to know enough to start but in reality I've passed a lot of hours reading about docs, posts, projects, codes, libraries, platforms without dioing anything productive...I've a project on mine, is nothing fancy and in short is read values from some sensors and store the data on cloud for further analysis
Less short:- use multiple sensors ( I2C and not )
- at first interface them directly with the onion GPIO but in future use various arduinos that will communicate with the onion (via wifi or bluetooth)
- upoad the data into the cloud (http, websocket,MQTT)?
- choosing the right iot platform for a bit of data elaboration (if necessary), storage on db and a frontend visualization
As told before I'm webdev but and only know php and a bit of js . C or C++ intimidates me so I thought about learning Python to start with...there are some limitations between the two languages on the Omega?
A couple of sensor are barebone with an analoug output, so I guess I can use a ADC or use and arduino but I not sure about the difficulties to implementing the wifi comm
For what I've understood at the moment the Onion Cloud offer just the connection and the api for interacting with it from scratch, I'm searching for an iot platform that offer already some features.
The iot platform panorama is huge and I've managed just to scrape the surface reading comparison articles like that http://www.postscapes.com/internet-of-things-platforms/ but what is the best for the Omega?What about for example the AWS iot?
Looking the documentation seems that accept Python scripts but in general I find the whole platform hard to understand, maybe is too steep for a beginner to starting with...do you have some platform to suggest?thanks and sorry for keep it long!
-
@Decagrog sounds like you are on the same level as me, it is hard to understand. I have a small background in C++, that's about it, but it seems pretty important for programming android. Python is good, my friend is always saying that humans should ditch english and other languages and only read and write python, so he thinks it is amazing. I dont know what projects you have in mind, but I was really planning on doing a smart home sort of thing, and incorporating onion devices into that. Make sure that you check out the esp8266 if you havent already because that is also going to make a big difference because of its sub $2 price point, so I can make very cheap wifi devices. I had never heard of many of the platforms that postscapes mentioned but I am planning on using Eclipse IOT, which is completely free and has a lot of features and support. Let me know what you think!
-
@Matthew-Hartsuch thanks for the reply
I've heard more than once good opinions about python like your friend did, this is good to know, but I'm still wondering if on the Omega there could be some sort of limits (performance? accessing to resources?) respect to c++
My project actually is a classic, an environmental monitoring with various sensors (light, temperature, humidity, gas, ect), at the end I would like an admin web panel where to have a view of all the data and set notifications and alarms.
I've a couple of esp8266 to play with, you're right they are cheap and seems fairly easily to use!Anyway my main wall now is still to define what platform choose, it should be easy to start with, packed with web interfaces or dashboard, compatible with the Omega and with a good active community where to ask question.
I've took a look to the Eclipse IOT, seems rely mosty on java...damn another language to learn
Another free iot platform is http://www.kaaproject.org , again the sdk is based on Java, C, C++ or objective C
I've done a simple comparison on google trends and the most buzzed iot platform is the IBM one, I'm looking into it just now but to me seems kind of...enterprise centered.The problem is how to make the right choice from a dozens of iot platform, jargon terms, different languages, interfaces, libraries, different approaches, ect...I could pass 3-4 hours every night to read about all that stuff and still not be sure witch way choose...
-
@Decagrog This whole area of what is the best language to use can be a veritable mine field particularly if you don't have a wide range of experience in the areas concerned.
I am primarily from a C++ and Java background and in general am more comfortable using these. A few comments that you may find useful:
- Python is an interpreted language while C++ is directly executed so, in general C++ will normally run faster and (depending upon the code) will probably generally use fewer system resources
- A similar comment applies to Java though since it uses intermediate byte code compiled from the source will generally be faster than Python and is more powerful, though the system overhead may be higher than for Python
- C++ works well on the Omega - I have written several quite extensive C++ programs for the Omega. I have also produced and published a suite of C++ libraries and programs for the Omega (with full documentation) - this is all accessible at https://github.com/KitBishop/Omega-GPIO-I2C-Arduino
- Java is runable on the Omega using the available jamvm package - I have produced an early version of code to access Omega GPIO pins from Java that can be found at https://github.com/KitBishop/java-gpio I am in the process of updating this to provide Java access to all the functionality in the C++ at https://github.com/KitBishop/Omega-GPIO-I2C-Arduino
- To build C++ code for the Omega, you will need a cross-compile environment (e.g. a Kubuntu system) as is described in documentation in https://github.com/KitBishop/Omega-GPIO-I2C-Arduino
- To compile Java code for the Omega to run under jamvm you will also need a Java build system as is covered in documentation in https://github.com/KitBishop/java-gpio
- As regards system resources: (a) Unless the code is particularly large and complicated, C++ code will run fine as as; (b) to run Java under jamvm, you will need at least extended disk space as covered below.
The following information relates specifically to the standard Omega - since the upcoming Omega2Plus has more resources, these will potentially be less of an issue.
The 2 resources that you may need to consider providing expansion for are (a) available disk space; (b) usable RAM space. Both of these can be catered for as below by use of a USB memory device. I use a miniature 32GByte USB memory device to provide 30GByte disk space and 1GByte RAM space using these techniques.- Disk Space - this can be increased from the basic 16MByte of the Omega (Omega2 has 16MByte and Omega2Plus has 32MByte) using a standard disk partition on the USB device using the techniques described here: https://wiki.onion.io/Tutorials/Using-USB-Storage-as-Rootfs
- RAM Space - this can be increased from the basic 64MByte of the Omega (Omega2 has 64MByte and Omega2Plus has 128MByte)using a Linux swap partition on the USB device using the techniques described here: https://wiki.onion.io/Tutorials/Extending-RAM-with-a-swap-file
-
@Kit-Bishop the disk and RAM mods seem like they could be really useful
-
@Decagrog Kaa looks pretty good too. I think I am going to stick with Eclipse though because they are a well know coding ide and they have a large backing.
-
@Matthew-Hartsuch They are I run with them all the time and have no issues with disk or RAM space
-
@Kit-Bishop Thanks for the starting walkthrough, very informative!
Regarding my actual need I think that retrieving data from 4-5 sensors should stiil be feasible on Python even if is not very performing , but now that I see how you extended the Omega with all your libraries I'm tempted to try with C++ even if having to setup a machine (probabily a virtual machine) for compiling add more entropy on the plate.In the meantime I lost (again, sigh!) some hours into AWS iot and...it's a mess! I mean it's globally far too complicated for a beginner and there are a pletora of services that take time just to understand what they are...so back to search for a decent iot platform with an easy learning curve
-
Little update: for now I'm trying just to connect a light sensor read the data with i2ctools
The i2c sensor is a BH1750FVI, I'm able to retrieve the address ( 0x23 ) with i2cdetect but if I try to look for some data with i2cdump there are all zeros...I've tried to put the sensor under a light or in the dark, nothing changed.
Any guess?