This is for the Home Assistant Operating System and is the login shell.
home-assistant / plugin-cli Goto Github PK
View Code? Open in Web Editor NEWCLI implementation for Home Assistant
License: GNU General Public License v3.0
CLI implementation for Home Assistant
License: GNU General Public License v3.0
The Home Assistant CLI built-in help shows a list titled "Available Commands". While Login is a recognized command, it is not listed. When in the context of the "system console" (example, the VirtualBox window), where the user "lands" in the running CLI, this leads the user to believe that there is no such option supported by the CLI. It also prevents users from understanding that they have system control options (namely, a shell) that they can employ to solve problem like paginating HA CLI command output (example github issue; example forum thread). Considering that Home Assistant is aimed at DIY tech enthusiasts, this feature should be easy to discover, not hidden.
CLI Version: 2023.06.0
Add-on:
Add-on version:
Home Assistant Core: 2023.10.5
Home Assistant Supervisor: 2023.10.1
A list of CLI "Available Commands" (all, not just some), and/or an indication that some commands are hidden and how to view them.
On a fresh Debian OS, in step 4 of supervised-installer:
when I execute the command
wget https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb
dpkg -i homeassistant-supervised.deb
I do get the following:
Can't install ghcr.io/home-assistant/amd64-hassio-cli:2022.11.0
Maybe it should, Instead, try to install ghcr.io/home-assistant/amd64-hassio-cli:2023.01.0 ??
I run Home Assistant OS (up to date) on a virtual machine in VMware. I noticed a little bit ago, within the past month, that when I tried to type a command into the console on the machine, I would get the first 5 characters I typed duplicated. For example, if I typed the word "network" and pressed enter, it would show I entered "netwonetwork". Interestingly, the exit command still works, though, though I think that's just a sign of robust programming.
I thought this issue was isolated to some problem I was having with my own VM. But then I tried installing a fresh up-to-date version on a Raspberry Pi 400, and noticed it had the exact same issue.
...How?
(FYI, I am noting the hardware I'm CURRENTLY using in this bug report, but keep in mind that this applies to at least Home Assistant OS on a Raspberry Pi 400, as well).
generic-x86-64 (Generic UEFI capable x86-64 systems)
11.1
Yes
The logs here won't help with actions occurring on the console at the baremetal level.
The logs here won't help with actions occurring on the console at the baremetal level.
version | core-2023.11.2 |
---|---|
installation_type | Home Assistant OS |
dev | false |
hassio | true |
docker | true |
user | root |
virtualenv | false |
python_version | 3.11.6 |
os_name | Linux |
os_version | 6.1.59 |
arch | x86_64 |
timezone | America/Denver |
config_dir | /config |
logged_in | false |
---|---|
can_reach_cert_server | ok |
can_reach_cloud_auth | ok |
can_reach_cloud | ok |
host_os | Home Assistant OS 11.1 |
---|---|
update_channel | stable |
supervisor_version | supervisor-2023.11.3 |
agent_version | 1.6.0 |
docker_version | 24.0.6 |
disk_total | 30.8 GB |
disk_used | 13.8 GB |
healthy | true |
supported | true |
board | ova |
supervisor_api | ok |
version_api | ok |
installed_addons | Uptime Kuma (0.9.1), Vaultwarden (Bitwarden) (0.20.1), Terminal & SSH (9.8.1), Duck DNS (1.15.0), Studio Code Server (5.14.2), RPC Shutdown (2.4), Network UPS Tools (0.12.2), Spotify Connect (0.12.6), Whisper (1.0.0), Piper (1.4.0), Traccar (0.22.0), MariaDB (2.6.1) |
dashboards | 3 |
---|---|
resources | 0 |
views | 12 |
mode | storage |
oldest_recorder_run | November 10, 2023 at 15:40 |
---|---|
current_recorder_run | November 19, 2023 at 01:13 |
estimated_db_size | 100.10 MiB |
database_engine | sqlite |
database_version | 3.41.2 |
This occurs at LEAST on both a virtual machine and on a Raspberry Pi 400.
I want to restore a password protected snapshot via the Hassio command line, with a password that contains spaces.
I have tried to run the command with single and double quotes around the password, and without any quotes. In all cases I'm getting the following error:
FATA[0000] Error while executing rootCmd: accepts 1 arg(s), received 3
My command" ha snapshot restore c1a07617 --password 'my secret password'
It works fine using the UI.
2021.04.3
Home Assistant OS
Home Assistant Operating System
5.13
2021.5.3
ha snapshot restore c1a07617 --password 'my secret password'
FATA[0000] Error while executing rootCmd: accepts 1 arg(s), received 3
No response
Hardware Environment
Home Assistant OS release:
Updated from version - unknown - fresh out of box before upgrade and didn't note version before upgrading...
Additional information (if accessible):
System Health
version: core-2021.7.4
installation_type: Home Assistant OS
dev: false
hassio: true
docker: true
virtualenv: false
python_version: 3.9.5
os_name: Linux
os_version: 5.9.16
arch: aarch64
timezone: America/Los_Angeles
logged_in: false
can_reach_cert_server: ok
can_reach_cloud_auth: ok
can_reach_cloud: ok
host_os: Home Assistant OS 6.1
update_channel: stable
supervisor_version: supervisor-2021.06.8
docker_version: 20.10.6
disk_total: 113.9 GB
disk_used: 3.3 GB
healthy: true
supported: true
board: odroid-n2
supervisor_api: ok
version_api: ok
installed_addons:
dashboards: 1
resources: 0
mode: auto-gen
Supervisor logs:
blank
Journal logs:
NA
Kernel logs:
NA
Description of problem:
Is the problem reproducible? YES
Has this been working before (is this a regression?) Unknown - new to home assistant
Has there been attempt to rule out hardware issues? (different SD card etc.) Definitely not a HW issue
I'm new to HA and am exploring various system commands... working from ha CLI with screen and keyboard attached directly to N2+.
Noted advisory from CLI software when entering ha before commands on HA CLI --> "Note: Leading 'ha' is not necessary as this HA CLI."
Problem: When you enter the command 'hardware' alone you get the following error message:
'Error: unknown command "rdware" for "ha"
Did you mean this?
hardware'
HA CLI is assuming any entered command string that starts with "ha" needs the advisory message mentioned above and strips the 'ha' from the command before proceeding which causing the problem above. The CLI should check for the presence of "ha " (with space after ha) instead of assuming that if the first two characters are "ha" the user is proceeding command with ha. If the CLI is written in python there's a 'cmdString'.startswith('ha') check that is responsible for the advisory message and removal that needs to be modified. All ha commands I've seen so far have a space after the ha which is why the looking for the "ha " will work.
The hardware command will work correctly if you enter it as 'ha hardware' - you'll just get yelled at given the leading 'ha' .
After a recent upgrade ha
command line tool crashes with the following error,
Welcome to Home Assistant OS.
Use `ha` to access the Home Assistant CLI.
# ha
OCI runtime exec failed: exec failed: unable to start container process: exec /usr/bin/ha: exec format error: unknown
I dived into hassio_cli
image and found that /usr/bin/ha
is actually a text file containing Not Found
# docker exec -it hassio_cli /bin/sh
/ # ha
/usr/bin/ha: line 1: Not: not found
/ # cat /usr/bin/ha
Not Found/ #
So it is quite possible that something derailed during image creation.
REPOSITORY TAG IMAGE ID CREATED SIZE
ghcr.io/home-assistant/raspberrypi4-homeassistant 2023.10.0 bf0377bf16ea 25 hours ago 1.64GB
ghcr.io/home-assistant/armv7-hassio-supervisor 2023.10.0 87dbd9ca3522 2 days ago 343MB
ghcr.io/home-assistant/armv7-hassio-supervisor latest 87dbd9ca3522 2 days ago 343MB
homeassistant/armv7-hassio-supervisor 2023.10.0 87dbd9ca3522 2 days ago 343MB
homeassistant/armv7-hassio-supervisor latest 87dbd9ca3522 2 days ago 343MB
zigbee2mqtt/zigbee2mqtt-armv7 1.33.1-1 1ec333688e03 2 days ago 167MB
ghcr.io/home-assistant/armv7-hassio-cli 2023.09.0 102856190904 3 days ago 87.4MB
ghcr.io/hassio-addons/sqlite-web/armv7 3.9.3 cff45d2c5b91 3 weeks ago 75.1MB
ghcr.io/hassio-addons/grafana/armv7 9.0.3 643722dab46a 2 months ago 522MB
ghcr.io/home-assistant/armv7-hassio-dns 2023.06.2 4ece8572a8e6 3 months ago 103MB
ghcr.io/home-assistant/armv7-hassio-multicast 2023.06.2 77dcb507fc37 3 months ago 89.5MB
ghcr.io/home-assistant/armv7-hassio-observer 2023.06.0 68a99a8a7950 3 months ago 7.55MB
ghcr.io/home-assistant/armv7-hassio-audio 2023.06.0 47302b442c78 3 months ago 121MB
hassioaddons/grafana-armv7 5.3.6 52e0ed659393 2 years ago 292MB
dwelch2101/zigbee2mqtt-armhf 1.14.4 5f1088bc6ad0 3 years ago 418MB
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.