Project Bluenet

  • 13 Replies
  • 3715 Views
*

Ultron

  • Trusty Member
  • *******
  • Starship Trooper
  • *
  • 471
  • There are no strings on me.
Project Bluenet
« on: September 15, 2018, 03:39:29 am »
It has been a very long while since I have been among your discussions and my last project update, however, I have not been stalling. I come back before you with new projects and I would very much like to begin my presentation!

Project Bluenet

IoT Server software, Web Interface and Network implementation

[ This is in fact a part of a larger project designated as Project Riker, which also includes the AI and ML capable, autonomous hardware control software as well as the underlying server hardware and clustering scheme. The aspects of Project Riker that are not demonstrated in this article are still in the planning and building phase. ]


The Web Interface

This project has so far focused on developing a graphical Web interface accessible from any browser (including mobile) which allows the end user to interact with the underlying hardware platform in a very simple and intuitive manner.
The web interface on it's own doesn't show much, visually, and it is built on top of a very simple HTML structure, however a great deal of work is done in the background by the Javascript scripts which update the page smoothly and quickly to notify the user of any updates to the hardware or it's peripherals.


The original version (including several sub-versions following it) used PHP scripts on the server side and used AJAX calls to inform the client ('front-end', web page) of any changes. This approach, although successful in it's original implementation, did not yield much flexibility and imposed severe restraints on the project.

As a result, in v.0.0.6-alpha PHP scripts were dropped and the project migrated to using Node.JS server software. Node.JS is basically Javascript which can be executed as a regular program, much like python scripts on *nix. This enabled the use of Sockets.IO WebSockets API, which is essentially a secure web protocol that allows developers to use asynchronous, two-way communication between each client (instance of the web page) and the server. What this means for the project is that every physical change (physical button press) is reported immediately to every client, just like any request to the server made from one client is synchronously reported (as a status/state) to every other connected node/client. This was fully implemented in v0.0.8.//photo

As of the time of writing, the web interface is nearly completed and currently represent useful, working software. Current plans to further improve this interface before moving on to the next project is to revise code security, deploy as a HTTP/2 web page (faster, more secure than HTTP/1.1) and simplify the configuration required to change existing or add additional controls to the page.

The current software version is v0.2.0-beta and it is meant to be tested in a controlled, home environment.



The Server Software


The server currently represents a Raspberry Pi 3 B (2016) running a headless edition of Raspbian Lite. The server software it self is currently Nginx, praised for it's speed and stability, although before v0.0.8 the server ran Apache software.
The Nginx service is configured as a reverse-proxy server from one network port to the one occupied by the Node server script itself. Essentially this functions much like a redirect except that it provides stability, load balancing and additional security as opposed to allowing clients to connect directly to the port used by the Node server script file.

To further clarify this configuration, the server script built for this projects, among other things, also initiates a service that listens on a chosen port and serves HTML files to the clients that connect to it, meaning we can run this web application without having neither Nginx or Apache installed.

The Node.js version used in this project is v8.11.3 alongside it's package manager NPM through which several additional packages have been installed include 'connect', 'static-serve', 'onoff' and 'socket-io'.



The Network Hardware



The network is currently under a revision and planned upgrade, as the website is intended to be deployed to the WWW (outside of my LAN as it currently is safely residing in) and this will impose a plethora of security risks for every piece of information sent to and from my network.The current hardware forms a gigabit-capable LAN network with optical connection to the ISP however the Raspberry Pi 3 (prior to the new, upgraded version in 2018) only has support for the 100Base-T protocol or in other words, is limited to only 100Mbit/s.

The planned upgrade to the network hardware includes the purchase of a MikroTik business class router running RouterOS with a Level 4 license. At the moment, the most likely candidate is the MikroTik HexS Ethernet router, packing an 880MHz processor and an SFP cage. This is likely to serve as a secondary router in my network configuration and would provide a sub-net to which only the development computer, server and NAS (Network Attached Storage) would be connected (safe behind a firewall). The subnet is also likely to be complemented by an additional gigabit switch to which the computer cluster will be connected.



Computer cluster? The Raspberry Pi 3 is a very capable computer with a minimal footprint and very small form factor however, provides far less computational power than what is likely to satisfy this project. The original intent was to replace the Raspberry Pi with a cluster of four Odroid XU4 SBCs (Single Board Computers) which are essentially more powerful Raspberries with more I/O capability, processing power and cores.


Before the purchase was made, Hardkernel (the company behind Odroid) announced a new, even more powerful SBC named Odroid N2 which is currently in the final stages of development. This computer will likely include a processors with 8 of the latest ARM Cortex A-73 cores in a big.LITTLE architecture (like what is found in today'
s high-end smartphones) and likely feature 4GB of DDR4 RAM memory. It was decided that it would be worth the wait, despite the company already being late relative to it's estimated August release date.
Currently, all this hardware infrastructure is several months away from being purchased, properly configured and tested and therefore it is unlikely that any versions are to be released before the Summer of 2019, however this leaves plenty of room for conceptual tests of the ML concepts, database data collection for ML, finishing the Web Interface and configuring a safe network.Feel free to ask for or discuss any details regarding any aspect of the project.


Due to time constraints I may have forgotten to mention key functionalities and ideas so I will try to fill in for the gaps as the discussion goes.
Software and Hardware developer, and everything in between.

*

Ultron

  • Trusty Member
  • *******
  • Starship Trooper
  • *
  • 471
  • There are no strings on me.
Re: Project Bluenet
« Reply #1 on: September 15, 2018, 04:00:01 am »
I avoided inserting pictures into the original post as it seemed more clean and readable without them. However, we all need some visual stimulation:


The Raspberry Pi server on top of the network switch; On the right we can notice the breadboard with LEDs connected to the Pi.



The actual web interface in it's connected state (design has been modified)



The web interface (client-side) in it's disconnected state (no connection to server)


When I find the time I will attempt to make a synchronous video capture from the screen and the actual hardware each control affects. Sadly from the pictures I can not present you the efficiency of the page and how the status reporting works (essentially the animated status bars you can see in color on the second image).
Software and Hardware developer, and everything in between.

*

ranch vermin

  • Not much time left.
  • Terminator
  • *********
  • 947
  • Its nearly time!
Re: Project Bluenet
« Reply #2 on: September 15, 2018, 08:10:36 am »
Is this a robot people get to communicate with on the internet?
Why the hardware - why dont you just do it full software and not worry about the circuits?

Forgive if I didnt understand,  it seems to be your supplying a web service but im not sure what the deal is  :-[.

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • *******************
  • Prometheus
  • *
  • 4659
  • First it wiggles, then it is rewarded.
    • Main Project Thread
Re: Project Bluenet
« Reply #3 on: September 15, 2018, 08:54:18 am »
I'm probably looking for true AI in it and ignored it but I didn't quite get it either, what IS this lol? I didn't bother to read much of it.
Emergent          https://openai.com/blog/

*

ranch vermin

  • Not much time left.
  • Terminator
  • *********
  • 947
  • Its nearly time!
Re: Project Bluenet
« Reply #4 on: September 15, 2018, 10:40:32 am »
I'm probably looking for true AI in it and ignored it but I didn't quite get it either, what IS this lol? I didn't bother to read much of it.

Selfish!  I read it all carefully, just didnt quite understand.

*

Ultron

  • Trusty Member
  • *******
  • Starship Trooper
  • *
  • 471
  • There are no strings on me.
Re: Project Bluenet
« Reply #5 on: September 15, 2018, 01:10:44 pm »
This confusion was anticipated. I apologize however I really lack the time to devote to a quality post.

Anyhow, this is a unique and mixed project and therefore it is easy to miss the point. This post puts focus on the web interface or rather, the website that is to be used on something like Home Automation Control panels / tablets. The page also enables controlling IoT connected devices via mobile phone.


All of that is just an experiment and the important element is the mentioned Web Server, hosted on the Raspberry Pi, which is prepared to accept various command from different devices inside the network (mobile phones, web browsers, and what I forgot to mention - audio / voice files from a special smartwatch I am building). This means that it also has the ability to accept voice commands and relay them to another thread running an application similar to my previous JARVIS project.
To attempt to simplify it even further - the web interface is just a mask and simple control panel, whereas the server is like a hub that receives all the information sent to the network and re-directs them to the AI-capable program, which further analyses the data and takes adequate action.

As I said, it is confusing and seems unnatural for a developer to build a website, server hardware and network hardware whilst combining it all into some...AI..thing.

Regarding the question of why building the hardware - highly-capable AI will likely one day require a unique kind of processor architecture and a different kind of computers, so it would be nice to take the oportunity to learn the process of building a cluster and computing platform while in the mean time avoiding the several-tens-of-thousands of dollars price tag on a real 32-core Xeon Server computer or a dedicated nVidia DGX machine learning platform. Also, I enjoy doing it.
Software and Hardware developer, and everything in between.

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6860
  • Mostly Harmless
Re: Project Bluenet
« Reply #6 on: September 15, 2018, 03:58:30 pm »
Very interesting. I just started playing with Node.js as I am linking an Alexa device to my chat scripting language and the server it currently runs on. I've just started trying out Amazon Web Services.

I was looking at Rasberry Pi to make some other home automation project. So I am trying to invent something that would justify getting one.

I think you are right to choose a web interface as it's the easiest way to cross develop for different platforms and control devices.

Like you say, you do it because you enjoy it  :)

*

Ultron

  • Trusty Member
  • *******
  • Starship Trooper
  • *
  • 471
  • There are no strings on me.
Re: Project Bluenet
« Reply #7 on: September 15, 2018, 04:48:22 pm »
If you need any help with Node.JS and setting up your Linux server, feel free to ping me Fred. The resources and tutorials found are somewhat unclear and lack accurate information.

Although the Pi has a large community and wide range of tutorials, I would suggest purchasing the Odroid XU4 as it provides more 'bang for your buck', as well as improved security due to the support of the latest Linux kernel (the previous one had some serious security holes).
Software and Hardware developer, and everything in between.

*

8pla.net

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1307
  • TV News. Pub. UAL (PhD). Robitron Mod. LPC Judge.
    • 8pla.net
Re: Project Bluenet
« Reply #8 on: September 16, 2018, 02:18:27 am »
"Why the hardware - why don't you just do it full software and not worry about the circuits?", Ranch asked a good question, which I happen to know appeals to computer scientists.  While, building the circuits, wiring up micro controllers, and single board computers, is fun to begin with...  The benefit is that the embedded hardware is what the software was originally designed on.  So it has everything it needs to run throughout the ages.
My Very Enormous Monster Just Stopped Using Nine

*

8pla.net

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1307
  • TV News. Pub. UAL (PhD). Robitron Mod. LPC Judge.
    • 8pla.net
Re: Project Bluenet
« Reply #9 on: September 16, 2018, 12:27:35 pm »
I don't see a NIC, just a port, power (and pins), I think.  So, the IP address is wireless?
My Very Enormous Monster Just Stopped Using Nine

*

Ultron

  • Trusty Member
  • *******
  • Starship Trooper
  • *
  • 471
  • There are no strings on me.
Re: Project Bluenet
« Reply #10 on: September 16, 2018, 03:42:57 pm »
Hey 8planet.


I didn't understand your question:
So, the IP address is wireless?


If you were meaning to ask whether the assigned IP address shown in the screenshots is the one assigned to the onboard wireless adapter then no, it is a static IP address assigned to the ethernet adapter. As I mentioned before, my Pi server is connected to my router using the 100BASE-T standard or in other words, 100Mbit "Fast" Ethernet.

Here is a diagram similar to yours explaining the various elements on the Raspberry Pi 3 circuit board:
In the original photos showing my configuration ,the Pi is rotated 180deg
clockwise, compared to this one.
Software and Hardware developer, and everything in between.

*

8pla.net

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1307
  • TV News. Pub. UAL (PhD). Robitron Mod. LPC Judge.
    • 8pla.net
Re: Project Bluenet
« Reply #11 on: September 23, 2018, 02:07:20 pm »
Oh, I see now.  Thanks.

Let's chat about the Odroid XU4, a bit.



My Very Enormous Monster Just Stopped Using Nine

*

8pla.net

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1307
  • TV News. Pub. UAL (PhD). Robitron Mod. LPC Judge.
    • 8pla.net
Re: Project Bluenet
« Reply #12 on: September 23, 2018, 08:54:06 pm »
Missing an audio codec is a huge disadvantage for using the Odroid XU4 for A.I.

Just saying, Ultron.  ( Not criticizing.)

My Very Enormous Monster Just Stopped Using Nine

*

8pla.net

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1307
  • TV News. Pub. UAL (PhD). Robitron Mod. LPC Judge.
    • 8pla.net
Re: Project Bluenet
« Reply #13 on: October 03, 2018, 01:46:25 pm »
Of course, there likely have been, or will be upgrades to the the XU4 specs.
So, keep in mind that these comments are strictly for discussion purposes.

Just saying, one of the biggest advantages of running A.I. on Linux is there
are several close to commercial quality text to speech engines for FREE.   

It seems a shame if a single board computer that runs Linux may not have
the codec to take advantage of voice synthesis for A.I.
My Very Enormous Monster Just Stopped Using Nine

 


Requirements for functional equivalence to conscious processing?
by DaltonG (General AI Discussion)
November 19, 2024, 11:56:05 am
Will LLMs ever learn what is ... is?
by HS (Future of AI)
November 10, 2024, 06:28:10 pm
Who's the AI?
by frankinstien (Future of AI)
November 04, 2024, 05:45:05 am
Project Acuitas
by WriterOfMinds (General Project Discussion)
October 27, 2024, 09:17:10 pm
Ai improving AI
by infurl (AI Programming)
October 19, 2024, 03:43:29 am
Atronach's Eye
by WriterOfMinds (Home Made Robots)
October 13, 2024, 09:52:42 pm
Running local AI models
by spydaz (AI Programming)
October 07, 2024, 09:00:53 am
Hi IM BAA---AAACK!!
by MagnusWootton (Home Made Robots)
September 16, 2024, 09:49:10 pm
LLaMA2 Meta's chatbot released
by spydaz (AI News )
August 24, 2024, 02:58:36 pm
ollama and llama3
by spydaz (AI News )
August 24, 2024, 02:55:13 pm
AI controlled F-16, for real!
by frankinstien (AI News )
June 15, 2024, 05:40:28 am
Open AI GPT-4o - audio, vision, text combined reasoning
by MikeB (AI News )
May 14, 2024, 05:46:48 am
OpenAI Speech-to-Speech Reasoning Demo
by MikeB (AI News )
March 31, 2024, 01:00:53 pm
Say good-bye to GPUs...
by MikeB (AI News )
March 23, 2024, 09:23:52 am
Google Bard report
by ivan.moony (AI News )
February 14, 2024, 04:42:23 pm
Elon Musk's xAI Grok Chatbot
by MikeB (AI News )
December 11, 2023, 06:26:33 am

Users Online

395 Guests, 0 Users

Most Online Today: 597. Most Online Ever: 2369 (November 21, 2020, 04:08:13 pm)

Articles