| CARBONIAN-HOME(1) | Carbonian Manual | CARBONIAN-HOME(1) |
carbonian-home - the house's devices from the terminal and the widgets
carbonian-home [-q] widget [--once]
carbonian-home status
carbonian-home devices | list
carbonian-home scene [NAME [--dry-run]]
carbonian-home aircon [NAME | all] [status
| on | off | temp N | mode MODE |
fan SPEED]
carbonian-home tv [NAME | all] [status |
on | off | volume
N|up|down | mute | unmute |
input NAME | sound NAME | key
KEY]
carbonian-home shows and controls the house's devices, each maker through its own API: LG's air conditioners through ThinQ Connect (the REST contract of LG's thinqconnect SDK), Samsung's TVs through SmartThings (Samsung's API). Both are cloud APIs: every reading and every command goes through the maker's cloud. Python's standard library only, so nothing else has to be installed. Each maker has its token alone in a file, mode 600; a maker whose token is not there is not asked anything, and one that fails (an expired token) is said while the others go on.
Sign in at https://connect-pat.lgthinq.com with the ThinQ account, make a Personal Access Token and put it alone in ~/.config/carbonian/thinq-token, mode 600:
install -m600 /dev/null ~/.config/carbonian/thinq-token $EDITOR ~/.config/carbonian/thinq-token
A token file that others can read is refused. Until the file exists nothing is asked of the network. A client id of its own is kept in ~/.local/state/carbonian/thinq-client-id.
carbonian-home login samsung signs in once, and the session renews itself from then on (it lasts while it is used at least once a month). The first time it registers carbonian-home in the Samsung account as an OAuth app (what smartthings apps:create makes), with a token from https://account.smartthings.com/tokens with the Apps, Devices and Locations scopes, put alone in ~/.config/carbonian/smartthings-token, mode 600; the app's client is kept in ~/.config/carbonian/smartthings-app. The browser then opens SmartThings's page to allow it, and goes back to http://localhost:8645/callback here (a browser on another machine cannot: paste the address it ends at in the terminal instead), or to the https address of home.conf(5)'s samsung-callback (SmartThings refuses localhost): its page shows a line, CODE:STATE, to copy and paste in the terminal that asked (the address the browser ends at, or the code alone, do as well; the code alone cannot be checked as this sign-in's, and the command says so). The session is kept in ~/.local/state/carbonian/smartthings-session; the token is not needed after that. Without signing in, the token alone also works, for the 24 hours it lasts.
aircon 62% carbonian-home widget
The commands below act on the unit NAME (its name in the ThinQ app, any case, accents optional, several words allowed: sala de jantar; a unique start of a name; or its id), on every one with all, or without a name on the one home.conf names (or the only one).
~/.config/carbonian/thinq-token
~/.config/carbonian/smartthings-token
~/.config/carbonian/smartthings-app
~/.local/state/carbonian/smartthings-session
/etc/carbonian/home.conf
~/.config/carbonian/home.conf
carbonian-home status carbonian-home aircon suite temp 23 carbonian-home aircon sala de jantar mode cool carbonian-home aircon all off carbonian-home tv living volume 12 carbonian-home tv input hdmi1 carbonian-home scene inverno --dry-run
0 when it was done; 1 with a line on standard error when not (no token, the unit offline, a value it refuses). Ctrl+C, SIGTERM or SIGHUP cancel it at any moment: it says so, puts the terminal back (the progress line wiped, the cursor shown) and leaves with 128 plus the signal (130, 143, 129). A sign-in cancelled keeps nothing of itself: no session is written, and its server is closed (carbonian-home's app, once registered in the account, stays, since SmartThings shows its secret only once). Nothing pasted (Ctrl+D) cancels it too.
home.conf(5), widgets.conf(5)
| October 2026 | Carbonian |