Online JavaScript IDE for AstraNOS

The past few days have been filled with some exciting new features for AstraNOS.
I am adding things as I am using AstraNOS and certain features are missing.

Changes to the IDE

The IDE received a direct integration of the online help for QooxDoo as well as the ability to run your JS application windows directly from within the IDE.

Online JavaScript IDE
Online JavaScript IDE

Creating new application, and dialogs has never been that easy for me. This will be very helpful when I continue to work through the next few training videos for QooxDoo and AstraNOS.

New Class Dialog
New Class Dialog

Another add-on to the IDE is the “New Class” menu item which will now bring up the following dialog to select the type of class you want to create.
You can take the IDE for a spin using this link : https://www.AstraNOS.org/MiyamotoMusashi/BattleGround.php?course=1

Changes to the FolderView

New Context Menu Items
New Context Menu Items

Finally I added “Download”, “Copy”, and “Rename” to the context menu items in the Folder View, and “Paste” if you right click on an empty space.

This way you can now use the FolderView to work with files which is faster. Previously you would have to go to the ContentBrowser to achieve the same.

ContentBrowser Context Menu

The ContenView is still the main dialog to work on / with files as it supports working on files sitting in your box or DropBox accounts.

Dropbox Kaput :

Well, the ContenView WAS able to use Dropbox, until September this year. Here is DropBox’s announcement :
“In June 2016, we announced the deprecation timeline for API v1. When API v1 is retired in September 2017, any further API v1 calls will fail with a 400 error with the body:”

and sure enough …

Uncaught exception 'Dropbox\Exception_BadRequest' with message 'HTTP status 400
{"error": "v1_retired"}'

So I went ahead and I chose https://github.com/kunalvarma05/dropbox-php-sdk to replace the older library I was using. I am planning in completing the port within the next two days.

Program a random password generator in QooxDoo

I have created my first video in a series of planned videos on programming in QooxDoo.

Programming in QooxDoo:

QooxDoo is a object oriented JavaScript library which allows you to create any type of widget, like List controls, Tree controls, Windows etc. Inside the browser without the need to worry about browser compatibility.

Aside from being very easy to use, this framework is fully object oriented and is better than any other framework I have seen in the past. Obviously people have their own preferences, and frameworks like jQuery, and Angular are at the top of their game. QooxDoo like other frameworks has strong parts and its weak parts.

This episode goes through some basics first before I dive into the programming part. As mentioned above I create a random password generator which you can use whenever you are asked to either create a new password or re-new your old password.

You can find the video on YouTube.

Password Generator preview
Password Generator preview

The resulting application looks like this

What I have learned from my first video tutorial:

I found that my mic is too sensitive to the higher frequency ranges and going forward I will have to either find a hardware equalizer or do some post production on the audio in software.

Since I am using Linux, my setup is all open source and freely available. As such some of the shortcomings are that Audacity is crashing once in a while, KDenlive was constantly crashing and unusable so I had to switch to OpenShot. I may give Blender’s built in NLE ( Non Linear Video Editor ) a go in a future part.

My keyboard ‘hacking’ is way to loud and will either need to find another keyboard, try to get the right filter settings to suppress it as much as possible ( without too affecting the overall audio quality too much ) or place my mic in a better spot.

Bottom line:

I had a lot of fun putting this tutorial together. I spent probably twice as much time on getting my equipment in place, and preparing AstraNOS for the link to allow people to try for themselves Here …..

The next episode will take most likely less time overall and I will also try my best to cut down the duration of the next episode to be 10 minutes or less.

I learned a ton of things and I am going to continue to learn during my next videos.

RIP TechShop

We do not have a TechShop in our area however anytime a space where makers meet and create, teach, and discover closes it is a setback to education, innovation and curiosity.

“We have grown from one location in Menlo Park to 10 locations across the US and 4 Internationally..”

About TechShop

Founded in October 2006, TechShop started as a membership-based, do-it-yourself (DIY) workshop and fabrication studio. Over a decade later, TechShop, Inc. grew into an international consulting company sharing it’s makerspace expertise with grade schools and fortune 500 companies alike.

TechShop offered consulting, market assessments, licensing options, curriculum, and various other managed services to economic development councils, libraries, non-profits and educational institutions, design firms and other makerspaces. TechShop encourages you to find a way to grow the maker movement in your community. It’s worth the effort.

TechShop-Makerspace

RIP TechShop

Yesterday TechShop suddenly filed for Chapter 7 bankruptcy protection. TechShop is no more and its remaining assets will be sold off by the appointed Trustee.

Embrace

It hits home insofar as we have purchased one of the original Embrace bracelets for my son who has seizures. This device will send out an alarm when a seizure occurs to the connected phones. It was listed as one of the success stories coming out of the TechShop.

+200,000 infants reached
+13,000 health care workers trained
105 programs in 20 countries
A life-saving incubation blanket for babies. In 2008, a group of Stanford students sought to address high mortality rates among premature and low-birth-weight babies by designing a better incubator for the developing world. The invention, the Embrace infant warmer, was prototyped at TechShop San Francisco and is now saving thousands of lives worldwide.

Here is the link to the TechCrunch story about the demise of TechShop.

As I am still working on my Video Doorbell, I can use NOVA-Labs which is very close by. As of today, some Americans will no longer have the ability to roll down the road to get their inventions into reality.

It would be great if the likes of Amazon, Apple, Google would step up and sponsor these types of locations all around to keep the spark of innovation going.

With this bit of sad new I will go and start my Friday.

Startup ignite November 2017

Today I went to one of our local startup incubator called startup ignite.

Startup Ignite Flyer
Startup Ignite Flyer

The Meetup was originally started by Amu Fowler in ? 2014 ? And over the years I went to a few of these meetings on and off. I find it very interesting to meet new people, and see what ideas or dreams they have.

Meeting Amu at the Ignite Meetup
Meeting Amu at the Ignite Meetup

The Place:

This months Meetup was focused on patent on general and how they retire to a startup. You can find a link to the video below.

NOVA-Labs Logo
NOVA-Labs Logo

It was held at the NOVA-labs facilities in Reston VA, which in itself is another very interesting space to discover. I have a few projects which could use a 3D printed Chassis or use some of their tooling or build a 12ft tall Optimus Prime.  But I leave this to another time.

NOVA-Labs mad science going on
NOVA-Labs mad science

The People:

In the past I have mostly met and talked with people who were in the ideation phase or in the very initial phase of building a prototype or advancing their ideas. This time around I met a few folks who were in beta testing ( rukku.io ).

I had also a very techie talk with Keith Fowler, who is one of the organizers and likes to talk about programming languages probably add much as I do.

The good, the better, and the best:

Overall the Meetup was about twice the size since the last time I went and the content of the speeches and presentations were at a great level. I can only recommend to go and visit one of those meetups if you are ever in the greater northern Virginia area.

Maybe it’s just me, maybe it’s the free pizza or maybe it’s the flair of the startup scene … but whatever it is, you will leave the place with a great satisfaction and who knows you may catch the startup bug.

Startup Ignite crowd
Startup Ignite crowd

Results from Fiverr for a new backdrop

I needed a new backdrop image for my YouTube Channel and while I was trying to come up with a good idea I wanted to see which results from Fiverr I could expect.

Fiverr
Fiverr

So at first I wanted to try the “Request a Gig”. However I did not appreciate that this feature is a curated feature and my request was rejected the next morning for some technical reasons. Obviously I sent in a support request because I wanted to understand what I had done wrong.

In the meantime I went ahead and was looking through the hundreds of designers who offered their services. This took about two hours of my time, which is exactly the reason I sent out the Request a Gig – request in the first place.

eventually I found a designer who had good reviews and was not asking for US $2800,- but a more reasonable $5,- for Basic, $15,- for standard, and $30 for the VIP package. Since I did not need VIP treatment but at the same time I though $5,- was on the cheap side, I went ahead and requested the $15,- standard package.

However I wanted to get at least one or two ideas / samples from him before I placed my order to avoid working with some one who is on a completely different train. So I contacted him, send him my requirements, and was surprised to see about 30 minutes later 4 screenshots with initial design suggestions.

Out of those I found one design which I considered a good starting point. So I asked him if he is willing to make some changes and replace some of the elements in the image with others. Wow, within about 15 minutes he had applied my changes.
I was impressed and wanted to place my order but he insisted that I first had to be happy with the results before I placed my order. I thought he wanted to avoid bad reviews, and as long as you don’t place an order I guess you can send a bad review ?

So anyways, long story short, it took a few hours back and forth, me on my smart phone, and he on his computer to eventually arrive to the image below.

Results from Fiverr

Backdrop created with Fiverr.

I was really happy with the results from Fiverr, and went ahead, placed my order and he sent the Adobe Illustrator file plus some rendered JPGs. However I found out that Inkscape on Linux would load the whole source file as a single Layer which was not what I wanted. So I asked him to send me the file as an SVG, which he promptly did, though yet again I could only see a single Layer.

I went again back and asked him to provide me the layers in separate layers, which he uploaded right away. All in all he provided me
12 layers
which I could then import in The GIMP in separate Layers and render to my liking.

Results from Fiverr

Overall this was a great experience and after I acknowledged the reception of my goods Fiverr offered the opportunity to give him another tip, which I gladly did.

All together, including tips and fees, I spent $27,- on the image and I had a great experience.

I have to say though that Fiverr is taking a bite out of you if you end up going for the $5,- Fiverr is charging you $1,- for a gig, Wich amounts to a whopping 16.66% of the total cost.

I will be going back and get some more artwork done for my SoftwareSamurai blog, or my YouTube Channel

AstraNOS Intro

I have spent the past few days working on my blog, and creating a new YouTube Channel. Please check it out under

https://www.youtube.com/channel/UChKSZPbizKmySaWmkue8viQ/videos

There is fairly little contents yet since I just set everything up over there. However over the next couple of weeks / months I am planning in filling it with a lot of practical tutorials on JavaScript, C++, multi threaded programming and some neat projects.

The first video is all about AstraNOS, which is one of my fun side projects. I have used this as a way to help setting up my gear and getting the first video out. Looking at the result is showing though that it is still rough around the edges but I am planing in working on the production quality.

AstraNOS has a lot of features which I have not mentioned in the video. I would encourage you to sign up for a free account and discover what is all possible with it. Going forward I may use the framework to allow users to easily access all of my programming material, online books and courses from one convenient place online.

AstraNOS intro

The neat thing is that it has built-in communications capabilities which will allow me to interact with my audience directly.

In case you have not yet done so, please feel free to go over to https://www.AstraNOS.org and create your own account. I would also be happy to receive feedback on which tools or features you would like to see there next.

As I mentioned in the video, I am heavily using AstraNOS on a day-to-day basis and here is the screenshot of my current ‘desktop’AstraNOS

 

Ordering a new TV

Going through the process of getting a new TV is always a stressful situation.

Wall Mount:

With our kitchen remodeling we were also in need of placing a TV over our fireplace. So the first search was for a proper wall-mount.
Finding one which fits the bill but does not bust the wallet was no easy feat and I finally ended up getting the AEON-5030, Pull-Down over Fireplace wall mount.


Pull down TV mount for fireplace - Aeon 50300

The Television:

Now this only took me an hour or two. Looking for a good TV on the other hand is a completely different beast. I wanted to get a 60 inch TV as 65 inch was too big to fit, and 50 inch seemed small by today’s standards.

So off I went to look at Walmart, BestBuy, Costco, Target and so on. Here were some of my requirements I was looking for in the new TV

  • 60 inch screen size
  • less than 60 pounds
  • 4k UHD resolution
  • Should be below $1000,-

Interestingly after some hours of wandering in the marketing forest, looking at different models of different brands, I found only one TV which fulfilled all of my requirements.

The LG 60UJ7700.

LG UJ7700

We picked our TV up at a BestBuy nearby for less than my set target of $1000,- and I am very excited about our new living room decor. I recommend you check out the LG 60UJ7700 at a store nearby, or if you like you can follow the link below and get one from Amazon.

AMAZON Affiliate link:

Now let’s talk some tech:

SUMMARY
Size 60 inch IPS display
Resolution 3840 x 2160
Display Type 4K UHD TVs
Display Format 4K UHD 2160p
HDMI Port(s) 4 (HDCP 2.2)
2 USB, 1 RF In (Antenna/Cable), 1 Composite In, 1 Component In, 1 Ethernet, 1 Optical
Operating System webOS 3.5
Active HDR with Dolby Vision™, Wider Color Gamut, Ultra
Natural Voice Recognition Yes

DIMENSIONS / WEIGHT
TV without Stand (WxHxD) 52.9” x 30.6” x 2.5”
TV with Stand (WxHxD) 52.9″ x 33.3″ x 10.7″
TV Shipping Dimensions (WxHxD) 58.7″ x 34.6″ x 6.9″
TV without Stand Weight 45.9 lbs
TV with Stand Weight 46.7 lbs

Review:

The LG 60UJ7700 features WebOS 3.5, the newest version of WebOS. As we know, WebOS is a smart TV platform which has a lot of low-level options but it still offers simple navigation. The user interface and layout is also designed attractively with strip bar at the bottom of the screen contains quick access to most of popular apps. Additionally, its performance is fast and responsive. Once an app is launched, the loading in time is very fast. Additionally, selecting between apps or multitasking also feels very responsive. Meanwhile, talking about apps provided, there are plenty of interesting and useful apps available. There are VoD apps like YouTube, Netflix, Amazon Videos, Hulu, Google Play Movies and more, web browser, LG Contents Store, Social Networking, and many more.

LG Magic Remote
The Magic Remote comes as the controller for the LG 60UJ7700. Like previous versions, there is a built-in microphone for voice navigation. The remote acts as a “point and click” input device which functions like a mouse on your PC. This certainly makes entering text, surfing the internet, and other navigation easier. However to fully enjoy those activities a external, physical keyboard with trackpad would do much better.

The use of an IPS panel causes black level and contrast produced by the LG 60UJ7700 to be weak, however this allows the LG 60UJ7700 to have a very wide viewing angle which is far better than TVs without IPS panels. This means the picture quality will look more consistent when the TV is viewed from the side.

Now as you can see from the picture below, in our case that won’t make a whole lot of a difference to us but it is worthwhile noting.

Construction Site
Construction Site

I will post some more images once we put this one up on our wall.

Wrapping it all up

Building a video doorbell requires little more than curiosity, a good grasp on software and very basic know-how on hardware.
For example, I did not even have to design or solder a single circuit so far, as the Raspberry PI Zero W allows you to use its internal pull-down or pull-up resistors.

For the past two weeks I have been working on building a Video Doorbell. I build all the pieces, connected the electronic side, and installed OS and software packages. Now we are starting to see results.

Video Doorbell Chassis:

I have finally been able to pack all into one chassis and close it in.

  • Empty chassis
    Empty chassis
    Empty chassis
  • Added electronics and screws
    Added electronics and screws
    Added electronics and screws
  • All enclosed
    All enclosed
    All enclosed

There are still a few items remaining …

  1. Add the microphone ( waiting for delivery )
  2. Properly configure WebRTC to connect from outside the home network.
  3. Write the Android / iOS apps to receive the notifications.
  4. Connecting our current wireless doorbell button to the back of the chassis.
  5. Spray paint the chassis
  6. Connecting the power source to the Video Doorbell
  7. Screwing it to the door.

I have prepared our existing doorbell button by adding two wires to overwrite the push button. These two wires will simply connect to the new button on our Video Doorbell. I will not need to worry about a power supply for this part of the system as it is powered by its own little battery. I will leave that battery in place as is.

The mechanical, and electrical challenges are nearly solved and the most important remaining bits are now in software.

Video Doorbell Software:

I created a placeholder for the required software pieces in GitHub.

Below is a screenshot from the RPI-WebRTC-Streamer web page, connecting to the camera. I have found the connection to be quite unreliable and will have to make sure that there is a much more solid connection rate possible before I go ahead and expose the interface to the outside.

Once you connect you can see that the video is upside-down. That is due to wiring constraints, which forced me to mount the camera upside-down into the chassis. However this will be an easy fix in software.

Fun-fun-fun

Today I have weed my door as the previous wires were cut and left dead. Another unexpected surprise came when I realized that there are no remaining power outlets left in the basement.

So tomorrow I will have shut down the power to our basement, wire a power strip to a power hub and screw it into the wall.

Make some noise

Adding a push-button and connecting it up the a GPIO port is as simple as writing a tiny pyhon script to initialize the IO port for input and utilizing a built-in pull-Up button. The Raspberry PI button is then capable to act as a Doorbell button.

After I connected the loudspeaker to the USB soundcard and soldered the USB connection from the Raspberry PI to the sound card I was then able to use alsaconfig to select it and then use:

speaker-test -c2 -twav

to actually hear some audio through the soundcard.

External USB sound card
External USB sound card

Now the next step was to connect GPIO port 17 to GND and use the built in bull-down-resistors to detect a button-press event.

Here is the push_button.py – python script which I use.

#!/usr/bin/python2.7

import time
import RPi.GPIO as GPIO
import subprocess

GPIO.setmode(GPIO.BCM)
GPIO.setup(17, GPIO.IN, pull_up_down=GPIO.PUD_UP)

def my_callback(channel):
    subprocess.call ( "/root/bin/ding_dong.sh" )

# add falling edge detection on a channel, ignoring further edges for 400ms for switch bounce handling
GPIO.add_event_detect(17, GPIO.FALLING, callback=my_callback, bouncetime=400)

while True:
    # Loop once a day
    time.sleep(24*60*60)

GPIO.cleanup()

This script is straightforward and is simply waiting for a button press on GPIO pin 17 ( to GND ). The final loop is a forever loop with a one-day delay which will help keep the responsiveness of the Raspberry PI button at a good level. If during this time a button press was detected, then the ding_don.sh – script, which in turn plays a sound on the speaker.

I plugged it into /root/bin/push_button.py and made sure it is executable

sudo mkdir /root/bin
sudo vi /root/bin/push_button.py
sudo chmod +x /root/bin/push_button.py

Below is the pin-out of the Raspberry PI Zero W.

GPIO Ports
Raspberry PI Zero W
GPIO ports

In this case I connected GPIO17 ( orange wire ) and GND ( blue wire ) ( PIN 11, and PIN 14 ) to the doorbell button.

Video Doorbell
Video Doorbell wired up

Instead of packing all the functionality into one python script I decided to have python call a simple bash – script to do the actual work. Here is the ding_dong.sh script, which is called by the python script and also resides in /root/bin/

#!/bin/bash

mpg=`pidof mpg123`
if [ "x${mpg}" == "x" ];
then
  mpg123 /root/SoundHelix-Song-14.mp3 &
else
  killall -9 mpg123
fi
echo "Ding Dong"

sudo vi /root/bin/ding_dong.sh
sudo chmod +x /root/bin/ding_dong.sh

As the last step I wanted to have this script run all the time and to make sure it is started at startup of the PI :

[Unit]
Description=Push Button Service

[Service]
ExecStart=/root/bin/push_button.py
StandardOutput=null

[Install]
WantedBy=multi-user.target
Alias=ipush_button.service
sudo vi /lib/systemd/system/push_button.service
sudo systemctl enable push_button

The Raspberry PI button is now all set to act as the Doorbell button for my Video-Doorbell project.

Words

Certain words in leadership indicate certain treats in a person, here are some to look for.

So I was watching a couple of youtube videos from James Randi and I was starting to wonder about Believe Systems and language.

If there is one word I despise, it has to be the word “deserve“. Anytime you hear this word you should immediately raise an alarm bell. The other person is either trying to sell you an over priced item or is about to lie to you.

“You deserve a bigger kitchen”, “You deserve this vacation”, “You deserve that fast car” … “You deserve it”.
Well, really ? Interestingly why does my employer not think so ? Or if you believe I deserve it why don’t you go an talk with my boss ?

That leads me right into the next word I don’t particular like : “believe“. Now this is an interesting one.

When Einstein’s thought experiments overturned centuries of accepted physics, he changed the believe system of scientists single handedly ( or mindedly ). So from this analogy I conclude that a believe is a mental representation of reality based on insufficient information to support knowledge.

If you know something I can go and ask for proof, but if you believe something to be true I am stopped right there before the entrance of reason.

So here is the call to every one to stand up and know what you’re saying more often.

In general I believe that mankind would not be able to survive without a believe system. As an example: “There is movement in the bushes. I believe there is danger close, so I better run”. This believe may have saved some unwitting predecessors of yours and thus made it possible for you to read these lines today.

So the believe to know something based on insufficient information in itself is a useful tool. Whats wrong then ?

We live in a highly opinionated world and there are opinions flying around in every sentence spoken. This is directly reflected in our language and in our believe system and it is, after all what makes us individuals, and in greater terms human.

The trouble is that some believe without asking the tough questions they ought to.

Once a certain believe has been planted in our minds it is hard to regain objectivity and look at things the way they actually are. So look at it as a magic trick … or how I would see it as mind control, and look out for these two words deserve, and believe.

An opinion then is created and expressed directly from our believe system(s) and thus only as valid as our mental capability to reflect reality.

Ps. At least when expressing an opinion the other side will usually let you know : “in my opinion …” and what follows then is usually less than accurate otherwise the sentence would contain the word know.