Nabito.org project put on hold

To whomever this might concern,

The Nabito.org project has been put on hold. Low interest, technical difficulties and my time concerns are the main reason, why I’m putting it on hold. I might get back to it some time in the future, but very likely on a different technology stack.

The last documented version is here:
https://www.instructables.com/id/Nabito-Open-Socket-V2-Smart-Meter-for-EV-Charging/

The last WIP version had a different stack: Home Assistant, docker node.js plugin into HA, and Sonoff POW R2 as an IOT device.
This has been a very nice learning experience for me, I got exposed to many new cool IOT technologies and stacks (Arduino, ESP32, Home Assistant, AWS IOT cloud, Node.js, docker and building my own docker images, and many more), but I think now it’s time to sunset this project and move onto different topics. Send me an email if you would like to know anything about the project.

Have a nice day.
–Stefan

Move docker installation to a different /mount_point

Stop docker: systemctl docker stop.
Verify no docker process is running ps faux
Double check docker really isn’t running.

  1. Take a look at the current docker directory: ls /var/lib/docker/
  2. Make a backup – tar -zcC /var/lib docker > /mnt/pd0/var_lib_docker-backup-$(date +%s).tar.gz
  3. Move the /var/lib/docker directory to your new partition: mv /var/lib/docker /mnt/pd0/docker
  4. Make a symlink: ln -s /mnt/pd0/docker /var/lib/docker
  5. Take a peek at the directory structure to make sure it looks like it did before the mv: ls /var/lib/docker/ (note the trailing slash to resolve the symlink)
  6. Start docker back up: systemctl start docker
  7. restart your containers

Sequelize Sqlite3 cheat sheet

##Sequelize notes – ORM for Sqlite3, PostgreSql, MySQL and other

Install node packages:

npm install --save express body-parser sequelize sequelize-cli sqlite3 nodemon

Init dir structure:

node_modules/.bin/sequelize init

Create model and migration:

node_modules/.bin/sequelize model:generate --name Contact --attributes firstName:string,lastName:string,phone:string,email:string

Check the db:

$ sqlite3 database.sqlite3
SQLite version 3.20.1 2017-08-24 16:21:36
Enter ".help" for usage hints.
sqlite> .schema
CREATE TABLE `SequelizeMeta` (`name` VARCHAR(255) NOT NULL UNIQUE PRIMARY KEY);
CREATE TABLE `Contacts` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `firstName` VARCHAR(255), `lastName` VARCHAR(255), `phone` VARCHAR(255), `email` VARCHAR(255), `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL);
CREATE TABLE sqlite_sequence(name,seq);

Seed the db:

node_modules/.bin/sequelize db:seed:all

PostgreSQL cheat sheet

Ubuntu install lastest Postgres:

sudo apt-get install postgresql postgresql-contrib

Create user with password, admin and echo:

createuser -P -s -e <user_name>`

Check connection under localhost:

psql -h localhost -U <user_name> --password --dbname=postgres

then input password

Docker install on Ubuntu

This is based on the official documentation found in:
https://docs.docker.com/install/linux/docker-ce/ubuntu/

Uninstall old versions of Docker

$ sudo apt-get remove docker docker-engine docker.io containerd runc

Setup the repository

$ sudo apt-get update

$ sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common

$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

$ sudo apt-key fingerprint 0EBFCD88

pub   rsa4096 2017-02-22 [SCEA]
      9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88
uid           [ unknown] Docker Release (CE deb) <docker@docker.com>
sub   rsa4096 2017-02-22 [S]

$ sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

$ sudo apt-get update

$ sudo apt-get install docker-ce docker-ce-cli containerd.io

$ sudo docker run hello-world

Post-install steps: sudo

$ sudo groupadd docker
$ sudo usermod -aG docker $USER
$ docker run hello-world
$ sudo systemctl enable docker

EVs are pointless for apartment people. Well, not any more!

Why should anybody be building or developing a cheap open source smart meter for EV charging?

Here are some reasons why I think it’s important:

1. EVs will rule

Electric vehicles (EVs) should gradually replace all gasoline/diesel vehicles, at least let’s hope that is going to be the case.

Tim Urban made a very nice blog post (not really a blog post, it’s more like a short book) about Tesla and all the intricacies of EVs. If you have a couple of hours, read it: https://waitbutwhy.com/2015/06/how-tesla-will-change-your-life.html

Tesla has already sparked a movement towards electro-mobility and as Tesla Model 3 enters production (right now, July 2017), let’s hope things will move even faster. If other car companies start to produce reasonable priced EVs for the masses, that actually aren’t ugly and don’t suck, I think we’ll see a huge rise in EVs around the world.

2. EV would be nice, but I live in an apartment

EVs need an source of electricity to get charged. Currently most of the EVs that people are buying are being charged at home (mostly at night), in their garage or in their front yard, plugged into a electric socket that they own. That’s all very nice, but what about the vast numbers of people that don’t own a house with a garage or a front yard?? Where do these people charge their EVs safely, securely and with relevant billing and metering?

As a matter of fact huge number of people live in apartment buildings (I don’t have the statistics yet, but I’ll find out and update).

This would be very nice if everyone lived like this with a Tesla parked in your luxurious mansion with a solar roof (yes, Elon Musk already figured out how to do solar roofs.. check this Youtube video)

But ordinary people in cities tend to live like this:

        

The harsh reality is that many people live in fact in apartment buildings with shared parking spaces. The pictures are from a simple google search and include apartment buildings in US (Boston, Chicago, San Francisco), Western Europe (London, Paris, Berlin) and Easter Europe (Prague, Bratislava). But I think I don’t need to pull out a picture of every city in the world to illustrate that this is a universal phenomenon.

3. Modern apartment building story

People keep telling me: “Electric cars are just for geeks, dorks, IT dudes, technocrats or rich people. How the hell am I supposed to charge my EV if I don’t have a private garage or yard? I live in an apartment building.”

Well I got frustrated with this argument mainly because they are right. Currently there is no way how to solve this problem. Nabito – the open socket seeks to tackle this problem.

One friend of mine moved to a new apartment building (construction finished in 2015) in Brno, Czech Republic (Hi Fra! 😉 ). They have a private underground parking for residents of that apartment building. As it happened someone was charging their EV (probably a Nissan Leaf or a similar vehicle) in this underground parking lot and after a few weeks/months, the manager of the building realized some serious power is being drawn from the publicly shared electricity outlets that are in the underground. The kilowatt-hours (kWhs) drawn amounted to some serious cash and the manager’s decision was to that ALL residents had to share the bill!! And he prohibited all EV charging on the premises and bolted the sockets.. :-/

I’m sure this story, although as illustrative as one can get, is not a unique occurrence. If we want to make EVs universally plausible, we need to build the infrastructure for them.

4. The thing about EV charging

If you think about the way the majority of us use their vehicles, they tend to be stationary for extended periods of time when we are either sleeping or working. That means the main charging times for any EV should be during night or next to your workplace. The list of places where your car sits idle:

  • parked in your garage
  • your front yard/driveway
  • private residential parking area
  • private workplace dedicated parking area
  • public parking area near your workplace
  • public parking “in the street”
  • hotel parking

These places have various security concerns, in the beginning this Nabito covers only private residential parking and hotel parking.

Nabito – the open socket as the solution

The aim of “Nabito – the open socket” project is to create an inexpensive (yet, safe and secure) way, how to create a smart meter with user authorization from any electricity outlet.
If we manage to create a cheap solution that is easy to install and manage and that actually creates incentives for people to install on their own, then we could speed up the electro-mobility revolution by a huge factor.

The “Nabito – the open socket” project does not cover fast charging. To build a fast charging station requires heavy-duty equipment and substantial power supply with high voltages and amperage.

https://www.instructables.com/id/Nabito-the-Open-Socket-Cheap-Smart-Meter-for-EV-Ch/