"Sonoff iHost" (smart home hub/computer) from ITead - Can it be hacked to run Home Assistant OS with Bluetooth, Thread/Matter, and ZHA integrations?

ITead out of the blue just stealth-launched pre-orders for "SONOFF iHost", sold as a “smart home hub” but if disregard its intended use it looks to be a nice 32-bit ARM single-board computer under the hood.

Wondering if this appliance can be used as such and if it first needs to be hacked in order to re-install it with Home Assistant Operating System (HassOS) or other Linux Buildroot based operating-system?

So in essence; the question is if we can reflash Sonoff iHost with our own Linux distribution(s)?

To clarify, I am personally not interested in just installing the “Home Assistant Container” (i.e. Docker container-based installation of Home Assistant Core) inside the original Sonoff iHost image that it ships with, instead I am only interested in using this hardware like it was any other single-board computer and installing the full version of the “Home Assistant Operating System” (meaning it would run that dedicated operating system that optimized run your complete Home Assistant instance, including the “Home Assistant Supervisor” to manage Home Assistant Core and Add-ons, as that is the recommended installation method that a majority of the userbase is using because it is easier to maintain and support).

The best would if it could install Home Assistant Operating System (a.k.a. HAOS, formerly HassOS), while the second best would be to run the latest Debian Linux distribution on it. At least this hardware has the potential to be a less expensive all-in-one alternative to a Raspberry Pi installation, (especially now when Raspberry Pi boards and compute modules are both scarce and too expensive).

I think what should make this all-in-one computer appliance attractive for hacking for HA users is that it, is similar to the Home Assistant Yellow, in the way that it then the ARM-based compute module with local eMMC flash memory and MicroSD card-slot for storage expansion, includes an onboard Silicon Labs EFR32MG21 Zigbee/Thread radio module (which is the radio chip that is used in Home Assistant SkyConnect USB dongle and the radio module inside the Home Assistant Yellow), as well as a Realtek RTL8723 WiFi & Bluetooth/BLE module, + NPU and VPU for NVR for smart video camera analysis.

So my question to the community is if this could be hacked to run a fork of Home Assistant Operating System or some other embedded Linux distribution operating system (e.g. Debian for ARM and Armbian builds, or stripped LibreELEC without Kodi/X.Org) which could be used to run either Home Assistant container, Home Assistant core, with integrations like the ZHA integration for Zigbee (or Zigbee2MQTT addon)?

Again, I am not asking or suggesting to run this as-is with the default operating system firmware that ships from ITead and just install the Home Assistant container on it, but instead, if this could be hacked and repurposed as an alternative to the Home Assistant Yellow by running a fork of Home Assistant OS with Supervisor on it?

The two models, that look to be referred to as “4G version” and “2G version”, have these specifications:

  • Compute Module SoM (“AI Bridge Core Board”) with SoC + RAM and Flash Memory:
  • Storage:
    • 8GB eMMC flash for the OS (Samsung 8GB eMMC 4.51)
    • TF card slot for one MicroSD card (support max. 256GB SD-card) - SDIO0
  • Connectivity
  • YiChip YC1175 MCU - UART3 + PWRON + RST
    • Reset button (hidden in a hole, requiring a reset pin to access)
    • Four Buttons with LEDs input (KEY1/LED1, KEY2/LED2, KEY3/LED3, and KEY4/LED4)
    • RGB LEDs - WS2812B with 10 x S5050 RGB LED lights that can be independently controlled
  • Audio (PMU RK809)
    • Microphone
    • Speaker
  • USB – 1x USB 2.0 Type-A host port (which could ex, be used for a Z-Wave Controller USB stick)
  • RTC (BM8563 Real-Time-Clock via I2C2) powered by a CR2032 coin cell battery in a batery-holder slot
  • Debug header - UART2
  • Power – 5V/2A via USB Type-C port - USB OTG
    • Power-supply is not included, only a USB-A to USB-C cable is included, (so user need to provide own USB-charger that offers at least 2.1Amp of power on one port).
  • Dimensions – 120 x 41 x 135mm (ABS plastic enclosure)

Internally it uses a carrier-board design with a separate compute-module (again also similar to Home Assistant Yellow) and depending on the model you buy comes with one out of two compute modules which have slightly different specifications for CPU and system RAM-memory.strong text

@blakadder Do hacking this appliance for HA sound like it might be something right up your alley or?

More references:

External interface definition:

https://itead.cc/wp-content/uploads/2023/03/Core-Board-Finger-M.2-M-267pin-External-Interface-Definition.pdf

PS: For reference, ITead/Sonoff have documentation here for their officially supported OS and firmware, and somewhat indirectly interesting is that their own operating system does offer official support for locally running third-party applications as “add-ons” via Docker Containers on the Micro SD-card, as well as external third-party integrations via an open API (eWeLink CUBE REST API local interface via HTTP requests):

1 Like

it’s just a matter of “how to flash armbian” on that thing and your just 1 step away doing a supervised install of home assistant.

maybe someone in armbian community can make a community build for this one. It might take some time though.

1 Like

FYI, looks like they try to answer questions and take in feedback/suggestions through these channels:

Daniel Zhan from ITead/Sonoff replied with this to a question about loading alternative OS images on it:

Yes, it is possible as the iHost is based on Linux development. However, it is not recommended to do that as we are not sure you will succeed or not, and there is a risk that you may encounter issues that my team can not help out with. Once you load your own OS, you are not able to return to iHost official firmware as our firmware is confidential and not open to the public.

PS: Daniel Zhan from ITead/Sonoff is also their project manager on a few of their other Zigbee based products, including ITead’s “Sonoff Zigbee 3.0 USB Dongle Plus V2” (model “ZBDongle-E” Zigbee Coordinator adapter) which is also based on same Silicon Labs EFR32MG21 SoC/MCU. Firmware:

meh, im pretty sure you can just do a full backup of the emmc storage anyway easily just like any other rockchip soc out there. I mean multitool is there to do that, its just probably need to be tweaked (probably related to dtb).

1 Like

It has Docker and apparently it is possible to deploy HA in a container…
Why to hack it?

Home Assistant OS (Hassio, a.k.a. HAOS, formerly HassOS) have several benefits.

  • Easier to use and maintain - Once up and running Home Assistant takes the least amount of effort to maintain, it just works and you can spend time on other things.
    • Home Assistant Operating System is a combination of Home Assistant Core and tools which allows one to run it easily as an appliance. Home Assistant is an all-in one-solution and has a management user interface to configure the operating system that can be used from the Home Assistant frontend.
  • Better use of resources if only going to use it for Home Assistant.
    • Lightweight and very memory-efficient, optimized to host Home Assistant.
  • Security in open-source (don’t trust closed-source proprietary image from China).
  • Running Add-ons made for Home Assistant Operating System.
    • Be aware that Home Assistant addons are only available in regular Home Assistant Operating System installations.
  • Option to use either “Over The Air (OTA) updates” or “Offline updates” (via USB).

Home Assistant Operating System uses Docker as its container engine. By default it deploys the Home Assistant Supervisor as a container. Home Assistant Supervisor in turn uses the Docker container engine to control Home Assistant Core and Add-Ons in separate containers. Home Assistant Operating System is not based on a regular Linux distribution like Ubuntu. It is built using Buildroot and it is optimized to run Home Assistant. It targets single board compute (SBC) devices like the Raspberry Pi or ODROID but also supports x86-64 systems with UEFI.

2 Likes

Hi,

I did home assistant installation without supervisor on ihost.
The iHost already has an mqtt server installed, I need to find out the password, as it would be easy to use his own zigbee to import directly into HA.

Follow video (in portuguese): SONOFF IHOST GUIA COMPLETO - SERVIDOR LOCAL, HUB ZIGBEE, HOMEKIT HOMEBRIDGE, NODE-RED, HOMEASSISTANT - YouTube

1 Like

While that might be of interest to some other users, I am personally only intersted in installing Home Assistent Operating System with Supervisor on bare-metal as an alternative hardware platform to theHome Assistent Yellow, and not at all interested in just running Home Assistant container or core in image that the Sonoff iHost ships with.

FYI, Home Assistant Supervisor is currently only supported in Home Assistant OS or Debian 11 OS:

@BeardedConti (a.k.a. BeardedTinker on YouTube) posted a video in which it looks like he not only got hold of both Sonoff iHost hardware sample but also a development datasheet document that has an introduction of “iHost Linux” seeming to list the software tools, libraries and packages that ITead used to build their own buildroot based rockchip-linux for the Sonoff iHost, using Linaro cross compilation tool chain for uboot and kernel compilation:

https://www.youtube.com/live/bv2J5U1Dw3k?feature=share&t=5942

That document looks to also cointain some links to components manufacturer hardware specifications:

BeardedTinker addition said there that he has been made aware that this device is ITead’s founder’s personal pet project and that this is currently a highly prioritized product for ITead/Sonoff as a company.

In that video stream BeardedTinker also mention that ITead/Sonoff/eWeLink CEO and founder (freezingxie) have posted on Twitter that it will be possible for users to enable install your own custom Linux distribution on this hardware, using it as a single-board computer, as well as hinted that it might be possible to enable some kind of “development mode” to perhaps maybe even gain root access to the device, though if he actually meant that or simply meant adding features via iHost’s Open API (eWeLink CUBE REST API) and adding add-ons via Docker was not clear.

https://twitter.com/freezingxie

ITead/Sonoff’s CEO and founder (guest name “Freeizng”) is also replying to discussions/questions here:

https://itead.cc/product/sonoff-ihost-smart-home-hub/#tab-wpc_comment_tab

Didn’t find the link to that specific development document anywhere so did my best to reproduce it here:

iHost Linux

Introduction

Version

  • buildroot Version: 2022.02.6
    • There will be a maintenance cycle of one year in February every year, and a stable version every three months (YYYY.02 YYYY.05, YYYY.08 YYYY.011)
  • kernel Version: 4.19.111
  • uboot Version: 2017.09

Firmware Composition:

  • Partition: bootloader (about 4MB), kernel (about 32MB), rootfs (It accounts for about 7.2GB of the total size except for the bootloader and the kernel).
  • Image Format: ext4 (500MB+)

Firmware feature list

Software

  • Docker
    • The size of the Docker image ranges from tens of megabytes to hundreds of megabytes, taking up more disk space.
      • iHost built-in 8GB eMMC can download and run a small number of images. Users can modify Docker configuration file to set the USB mass storage or TF card as the Docker local image storage location.
  • Dropbear
    • SSH
      *SCP
  • Common Procedures
    • Perl & CPAHN
    • Python / PIP
    • Node & NPM
    • PHP
    • OpenJDK
    • Nginx
    • Mosquitto
    • SQLite3
    • Redis
    • Vim
    • Uemacs
  • Basic commands 300+

Rocklchip SDK Document

Firmware Upgrade tool

Firmware Upgrade Guide

Rockchip Code

2 Likes

Docker standard installed, can I edit conf from ssh? There is a possibility to install docker full?

I am still keeping an eye on this, because editing configuration.yaml would be enough for my needs.

My IHost arrived yesterday and i really have to say that the Hardware would be perfect for running HA on it. Although i am def. not skilled enough to port it my own, I’d appreciate the effort of more skilled Devs to do so. Since there is no way for me to get a HA Yellow (at least not that PI Module), i really hope for this piece. Running Home Assistant on this Hardware, plus having ZigBee literally onboard would be amazing. I hope you all have a great Tuesday, wherever you are.

Hey all
I found a hidden option in the ewelink app.
If you enter the app and select Ihost Device Settings, press 7 times on Device ID, a menu will appear with the choice Select MaskRom mode?
Maybe it could be something for those of you who can program?!

It seems someone has reprogram/reflash this hardware with his own linux:

1 Like

That’s a great start! It seems we are heading the right direction. Once all hardware in this Linux variant is supported it should be done in a breeze do port HAOS on it. Awesome developement!!! Well done guys!

Heres a second one: RV1109RV1126-Linux-iHost-Hardware-Distribution - eWeLink CUBE - eWeLink Forum

1 Like

No one interested in porting HAOS on ihost? :frowning:

1 Like

the ihost in the current shape I had gotten last week was not that great or a real mess. You do not have access to the command line therefore no chance to move your installation files to a save place cause with the first update from HA announced where I pressed OK and lost all data.

Therefore I would love to run HAOS with all its glory on the ihost instead of running that on an older Pi3 like I do right now. But I have no clue how too port it. Sorry.

as soon as someone ported a some sort of debian based disto on it, you can probably do a supervised install, which is the closest thing to HAOS.

you can only run HA on ihost via docker, and if you did update it, i highly suspect that you did not expose the /config directory on the container like somewhere on ihost SD card or a USB connected storage device.

if you wanna know about it just google ‘docker expose volumes’

a proper HA docker install with /config exposed to the sd card. updating the container should not result of you ha config and data loss.

1 Like