Rockchip-Intel TV Box Homeseer and Home Assistant installation

pete_c

Guru
Specifically here used a Pine64 2Gb computer.  Similiar for all of the new Rockchip based boards out there.
Tested on Pine64 2Gb and TVBox (Octocore, 3Gb ram, 1Gb NIC, 32Gb eMMC)
 
Install core OS
 
1 - Install Armbian Ubuntu 18.04 64 bit bit base server image from here:
 
Comments:  This is a one partition installation versus stock dual partition configuration.  No more dealing with a fat16 (like an RPi) boot partition.
 
Read here:
 
hxxps://www.armbian.com/pine64/
Armbian Bionic
Download here:
 
hxxps://dl.armbian.com/pine64/Ubuntu_bionic_next.7z
 
2 - update / upgrade / dist-upgrade build


Install Docker  (note typed a paragraph here and then post got banned).  Will try again.
 
IE: will type it in gedit and do a copy and paste to here.

1 - Install prerequesites:

sudo apt install -y apt-transport-hxxps ca-certificates curl gnupg2 software-properties-common
 
2 - install docker gpg
 
curl -fsSL hxxps://download.docker.com/linux/debian/gpg | sudo apt-key add -
 
3 - install docker repository for arm64

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

4 - update
 
sudo update
 
5 - install docker-ce

sudo apt-get install -y docker-ce
 
6 - banned again from proceeding with post...
 
IE: test docker version and run a script and test script to be running in docker version for arm64.
 
7 - install Home Assistant for Arm64 Ubuntu
 
docker pull homeassistant/aarch64-homeassistant
 
8 - create an homeassistant config directory
 
mkdir -p /opt/home-assistant/config
 
9 - install HA configuration and update if necessary
 
docker run -d --name="home-assistant" -v /opt/home-assistant/config:/config -v /etc/localtime:/etc/localtime:ro --net=host --restart unless-stopped homeassistant/aarch64-homeassistant:latest
 
10 - install users and group - do this for every sudo user on your Ubuntu build

sudo usermod -aG docker ${USER}

11 - that's it
 
Having issues here running Node Red in Docker.  It seems that I cannot get the aarch64 version at all in the docker hub.  When I download and install regular node red version it starts to run then goes to a rebooting mode.
 
I have also installed the Home Assistant aarch64 version of Node Red and it is doing the same thing which contant restarting.
 
This is all relating to running Home Assistant, OmniLinkBridge and Node Red on an Armbian 18.04 64 bit build on the Pine64 2 Gb.
 
Got Home Assistant and OmniLinkBridge working fine in docker.  Only Node Red is the issue.

 

_  _             __   _  _   
|  _ \(_)_ __   ___ / /_ | || |  
| |_) | | '_ \ / _ \ '_ \| || |_
|  __/| | | | |  __/ (_) |__   _|
|_|   |_|_| |_|\___|\___/   |_|  
                                 

Welcome to ARMBIAN 5.75 stable Ubuntu 18.04.2 LTS 4.19.20-sunxi64   
System load:   0.00 0.00 0.00      Up time:       1 day        
Memory usage:  17 % of 2001MB     Zram usage:    3 % of 1000Mb     IP:            192.168.244.149
CPU temp:      37°C               
Usage of /:    27% of 29G        

Last login: Mon Mar 25 09:55:30 2019 from 192.168.244.231

 1 - docker run -d -p 1880:1880 -v /opt/node-red/data:/data --name mynodered --user root --restart unless-stopped hassioaddons/node-red-aarch64  * keeps restarting
 
2 - docker run -d -p 1880:1880 -v /opt/node-red/data:/data --name mynodered --user root --restart unless-stopped nodered/node-red-docker  * keeps restarting
 
 

root@pine64:/opt# docker ps
CONTAINER ID        IMAGE                                        COMMAND                  CREATED             STATUS              PORTS               NAMES
bc6ce498f4c5        omnilink-bridge                              "mono OmniLinkBridge…"   34 hours ago        Up 23 seconds                           omnilink-bridge
6f66e427d130        homeassistant/aarch64-homeassistant:latest   "/bin/entry.sh pytho…"   45 hours ago        Up 33 seconds                           home-assistant


 
 
Any suggestions?
 
Have you tried one of the other docker version?  like :slim or :rpi?     I don't know the advantage or running the hassio versions of stuff, I usually just run the vendor provided docker image.     I am not 100% sold on Nodered.   It's pretty, but it is adding a couple of seconds to my automations triggering.
 
I would also recommend using Git to backup your configs to github or bitbucket (private).   Make sure to protect your secrets.   Here is my .gitignore
Code:
# A * ensures that everything will be ignored.
*

# You can whitelist files/folders with !, these will not be ignored.
!.gitignore
!*.yaml
!*.md
!*.html
!*.css
!*.js
!*.svg
!*.py
!*.pbtxt
!*.proto
!devices
!themes
!panels
!www
!www/custom_ui
!www/custom_ui/floorplan
!www/custom_ui/floorplan/lib
!tensorflow
!tensorflow/object_detection
!tensorflow/object_detection/data
!tensorflow/object_detection/protos
!tensorflow/object_detection/utils
!.storage/
!.storage/*

# Ignore folders.
.cloud
.google.token
.tts
.appdaemon

# Ensure these YAML files are ignored, otherwise your secret data/credentials will leak.
ip_bans.yaml
secrets.yaml
known_devices.yaml
.storage/auth*
 
Thank you Wuench!
 
Have you tried one of the other docker version?  like :slim or :rpi?
 
Yes tried the RPi version and the Hassio aarch64 node red version and both keep rebooting.  I have not tried the slim version yet.
 
Personally I did not think there there were differences in the Arm based versus Intel / AMD versions of Python such that I do not know why I am having these issues. 
 
I did historically run Node Red the long math way and it runs fine without using Docker.
 
Note this is only using the RockChip CPU. Currently te Using with the quad core Rockchip at around 1.1Ghz max. Looking to overclock it to 1.5Ghz then move everything over to an Octocore ARM CPU. Todays endeavor here is to supercool the CPU and RAM chips with heatsinks then later maybe add a tiny fan. Upped the PS tapping directly to the Euler bus and using a 2.5 AMP 5VDC PS. I was using same micro USB 5VDC PS but read that the USB bus input only allows for 1.8 AMPs of power.
 
I have no issues with another running server which is an Intel quad core / 2Gb computer running Ubuntu 18.04 and docker.
 
I do have issues getting rid of old devices when I update Home Assistant such that I have been deleting the DBs to start from scratch and now have memorized many of my events / automations stuff.  I am not yet dependant on the automation stuff and the OmniPro 2 continues to do the basics.
 
I have been mostly tinkering with the Alexa apps and very impressed now to be able to utilize the Alexa as a media player and sending commands to one or all of the alexa's and tinkering with Espurna firmware updated WiFi devices. 
 
Just a quickie update here.
 
Got everything running (well except for Node Red) on the Rockchip quad core ARM based computer.  Next endeavor is to migrate over to the Octocore 4Gb ARM based computer.  Did have an issue here with the default HDMI digital audio to analog audio output which I am using virtually for SAPI.  The HA Media Alexa python scripts are working great. 
 
The small RPI sized one will be fitted inside of the Leviton Omni Pro 2 and will be using a 32Gb eMMC instead of an SD card to run the OS.
 
Very impressed with the new Home Assistant Lovelace UI. 
 
Built two more automation servers using Octocore ARM CPU, 3Gb RAM, Gb NIC TV Boxes.
 
Similiar process to all 3 of them...
 
1 - create a base Ubuntu 18.04 booting image on an SD card - only had issues with one of the TV Boxes not recognizing Gb NIC...switched to another base here.
2 - update and upgrading
3 - Install of automation stuff
A - Webmin
B - Mono and monoVBNC
C - STunnel
D - Docker
E - Homeseer
 
TV Box repost here moved...
 
Originally purchased the TicTid X9T Pro as a K box.  Footprint is smaller than an RPi and it runs fast and the price is right at around $50.  This box will fit better inside of my OmniPro 2 media panel than an RPi sized box.
 
There are a few TV boxes today posted on Amazon.  They all come by default with rooted Android.
 
I do not utilize Android here much such that I switched the box over to running Ubuntu 18.04 and a lite desktop.
 
I have now tested Ubuntu server installation on three of the S912 TV boxes all with an Octocore ARM, 3Gb RAM, 1Gb NIC, 32Gb eMMC and USB 3.0, Bluetooth and Wireless in one little box.
 
Basic specs for the TicTid X9T Pro are:
 
- 3Gb of DDR3
- 32 Gb eMMC
- Amlogic S912 with an Octa-Core CPU
- WiFi Dual band
- Bluetooth 4.1
- Gb LAN port
- GPU which does 4K HD fine
 
Included Hardware:
- 5VDC power supply (short cord)
- IR basic remote control
- HDMI 2.0 cable
 
You have the option of installing new OS on microSD card or built in eMMC.  To test purchased a fast 32Gb micro SD card.
 
Installation of Ubuntu 18.04 Armbian OS.
 
1 - write OS image to SD card
2 - copy DTB file "" to root of boot renaming it to dtb.img
 
First time booting of Ubuntu on SD card.  Press the reset button while booting and the device will boot from SD card.  Note you only have to do this once.  Cold boot with SD card will always boot to SD card.  You can remove the SD card and boot from Android if you wish.
 
First time boot reconfigures root password and creates a new sudo user.
 
Noticed an issue with sudo here so did a :
1 - apt purge sudo
2 - apt install sudo
 
Updated and did a distal upgrade.
 
There is a utility called arbian-config which does some basics for you including providing a desktop.  For server you do not need to configure a desktop.
____  ___  _ ____  
/ ___|/ _ \/ |___ \
\___ \ (_) | | __) |
 ___) \__, | |/ __/
|____/  /_/|_|_____|
                    

Welcome to ARMBIAN 5.77 user-built Ubuntu 18.04.2 LTS 5.0.2-aml-s912   
System load:   0.02 0.11 0.09      Up time:       12 min        
Memory usage:  17 % of 2841MB     IP: 192.168.244.190
CPU temp:      49°C               
Usage of /:    9% of 29G        

Last login: Thu Apr  4 05:06:07 2019 from 192.168.244.231
Screen shots of armbian-config utility.  Note the addition software adds of Home Assistant and OpenHab.  Noted the default lite desktop comes up in 4K HD mode.  3840 X 2160. 
 
It would be nice to see more than the 1GB of ram inflicted on  the RPi units. Hopefully with a better and proper WiFi/Ethernet not just running on a converter chip  from the USB ports inside. Converting it to a Raspbian OS may open some more doors also.
 
hmmmmm... I have an old and useless M8 TV box hanging around. Never did get anything reliable or worth watching in English. I wonder what that has inside that one.
 
Yes the RPi 3 should have had more RAM instead of bluetooth / Wireless (worthless to me). 
 
One RPi2 today POE connected in the attic was doing ZWave, 1-Wire hub and NOAA satellite picture downloader.
 
The original RPi / Homeseer Zee got turned in to a lightning detector. 
 
At Zee2 time put the Homeseer 3 build on the Pine 64 2Gb computer (this still is faster than an RPi3).
 
Relating to a TV Media player here started with Microsoft Media Center many years ago.  Then went to running XBMC on Linux many many years ago.
 
Never did run XBMC on Android or Windows.  Last boxes running KODI were Linux Intel or AMD based and they did well.
 
Relating to smallest automation box I can find moving towards these TV Boxes (way smaller than an RPi) and entertaining running on a RockPi4 computer (same size as an RPi).
 
Today finished automation computer build (TV Box) #3. 
 
This one is running:
 
1 - Homeseer Lite using Mono
2 - Mono
3 - Docker
4 - Mosquitto server
5 - Home Assistant in Docker
6 - Node Red - regular
7 - OmniLinkBridge in Docker
8 - LMS - Logitech Media Server (Squeezebox server)
 
May hardware add an RTC with battery clock and a second NIC for firewall use inside of the OmniPro can.
 
Your M8 TV box (2014) specs are:
 
  • SoC – AMLogic S802 quad core Cortex A9r4 processor @ 2GHz with Mali‐450MP6 GPU
  • System Memory – 2GB DDR3
  • Storage – 8GB NAND flash + SD card slot
  • Connectivity – 10/100M Ethernet, dual band Wi‐Fi (2.4GHz/5GHz), Bluetooth
  • Video Output – HDMI 1.4b, AV. HDMI supports 1080p, 4K2K 30fps
  • Audio Output – HDMI, AV, and optical S/PDIF
  • Video Codecs and Containers – MPEG1/2/4, H.264, AVC, VC‐1, RM/RMVB, Xvid, DivX3/4/5/6, RealVideo8/9/10…
  • Audio – MP3, WMA, AAC, WAV, OGG, AC3, DDP, TrueHD, DTS, DTS HD, FLAC, APE…
  • USB – 2x USB 2.0 host ports ,Support U DISK And USB HDD
  • Misc – Power LED (ON:blue; Standby:Red), IR receiver
  • Power Supply – 5V/2A
It will run Linux off of the SD card.  The eMMC is a tad small at 8Gb for Linux use.
 
Download a Linux desktop image and write it to say a 16Gb SD card, boot up with it, configure it and see how fast it runs.
 
@Larry,
 
Try the image located over here called  s8xxx...Archlinux.
 
1 - download image / write image to an SD card using Etcher
2 - connect your M8 box to a monitor and keyboard.
3 - push on the reset pin and plug in the power then release reset pin
 
You should see some text as the SD card starts to boot.  It'll run a script to set up the SD card. 
 
If you do not see any text when booting then image will not work.
 
Thanks loads!
 
This is an M8S but I don't know if the "S" is significant. I was just gonna' say "No SD card slot" but son-of-a-gun there is one, hidden on the side! I never noticed that before.
 
This thing has basically been useless since purchase a few years ago. With it's custom Android firmware and some old half-crippled Kodi version that couldn't remember it's own name :) I never did learn Chinese from it. :)
 
Yes the press reset and reboot button will allow for a USB stick or SD card to boot.  Noticed too that while the number of the models go up they are based on the same kernels...S8XX, S9XX, et al...
 
pete_c said:
Yes the press reset and reboot button will allow for a USB stick or SD card to boot.  Noticed too that while the number of the models go up they are based on the same kernels...S8XX, S9XX, et al...
No Joy.
I can get to the Bios" screen but it seems they lock the iR remote out (no bios support?) and then there is no access to select any  menu options or even reboot from it. I tried a USB keyboard and mouse but no notice of that at that point either. Grrrrrr....
 
From inside the Android OS in a setup menu, there is an option to Update the OS. A USB memory key image can be found, but errors out while loading with some "footer" error??
Placing the image in an SD card cannot be found in their scan for files.
 
So far I am stumped, yet. Etcher gave me some problems, erroring out a few times, but then finally did an image confirmation successfully.
 
Interesting their splash screen shows "8 Core" but I am guessing it is their logo. :( 
 
Yeah it's a PITA relating to powering up and holding the reset switch at the same time.  Release the reset button when you see the logo (8 core) flash once or twice.
 
The Android screen never comes up.  Just a bunch of text will come up loading the basics of Linux.  Let it run until it comes up with a log in prompt.
 
Use a paperclip.  It is not a bios screen you will see. 
 
Try one of these images which are newer and basically the kernel is the same as the older ones so they should work.
 
Have a try with one of these S812 images.  Not sure if they will work.  You cannot mess anything up with these anyhow as the OS is purely on the SD card.
 
I use etcher in Linux.  In Windows it works the same.  If you see errors when writing then you may have a bad SD card.  The faster the better on the SD card.
 
If anything send it to me with a fast SD card and will prep it for you.

BTW if it comes to a prompt you can do everything then remotely with SSH and do not really need a monitor or keyboard for it.
 
The option to update with a USB stick is from the Android OS booting first.  IE: if you boot (with resest) without an SD card it will look for a USB stick.
 
Googling your box guessing it is a 2Gb RAM and 16Gb eMMC device that looks like this:
 
mmecool.jpg
 
This one has the reset button inside of the AV or SPDIF hole.  Take a toothpick and put inside and feel for the button.
 
My current new TVBox is like this.  Don't break the toothpick.  GENTLY push the button, get a feel for it.
 
Then with the imaged SD card power it up while depressing the reset button.  If you do it right it will boot from the SD card.
 
Once you have configured the SD card a cold reboot will always boot the OS from the SD card.  If you remove the SD card and boot the device it will go back to the Android system.
 
Step 1  Unplug the box from power. I always leave the power socket connected to the outlet and remove the power from the rear of the box. You’ll find out why when you need to perform the reset yourself.

Step 2  With the power disconnected place the toothpick inside the AV or SPDIF port on the rear of the box. If you gently press down you’ll feel a small button.

Step 3  With the power still off gently press down on the button until you feel it depress. It’s a noticeable depression when you press it. It feels a bit like a click when pressing down.

Step 4  While holding the button down connect the power up again. Continue to hold the button down

Step 5  Keep holding the button until after the logo appears. The logo will go off the screen. When this happens release the button.
 
Later on you can write a Linux OS to the emmc 16Gb card.
 
You should not be having any issues writing to the SD card with Etcher in Windows or Linux unless you have a bad card.
 
If you want to you can also write a pure K OS on it in Linux (newest 18.1 K).  Note here I have always run K in Linux and never have run it in Android.  That is me though.  The Android shipped with KODI boxes here are giving KODI a bad name.  Even the KODI authors prefer to run KODI in Linux.
 
When running pure KODI there are KODI menu options to update the OS et al...very easy to do with just a remote control.
 
Now you can run Netflix and or Amazon AOD via KODI (with a paid subscription).  I prefer to run these on the Kodi box over the built in to the TV features these days.  In fact disconnected my Roku TV from the internet a few months back.  Been running KODI for years now.  Only change to box was for 4K streaming TV which works great now with new generation of TV boxes.
 
Back
Top