owner: gmikcon status: active last_reviewed: 2026-09-04 review_interval: 90d confidence: medium
... (existing content) ...
shome@192.168.1.101, port 22, password authentication (password stored in gnexus-creds secret smart-home-server-creds). User shome has sudo rights (password required, use sudo -S).Europe/Kyiv (EEST, UTC+3). Fixed on 2026-09-04 — previously Etc/UTC, which made server local time lag 3 hours behind real Kyiv time. NTP service active, system clock synchronized: yes.Date response header on http://192.168.1.101/ reflects server system time (UTC).The smart-home platform allows triggering ControlScripts actions via HTTP POST. This is the preferred way for external automation or manual control without the web client.
Important: only aliases registered by live code in automation/Scopes/ work. Legacy aliases (master_room_lamp_switcher, hallway2_lamp_switcher, etc.) still have enabled rows in the scripts DB table but are NOT registered by code and return null. See 10-systems/automations/smart-home-overview.md for the verified live action list.
POST /api/v1/scripts/actions/runRequest Body (JSON):
{
"alias": "action_alias_here",
"params": {}
}
Example: Toggle Bedroom Light
curl -X POST http://192.168.1.101/api/v1/scripts/actions/run \
-H "Content-Type: application/json" \
-d '{"alias": "master_toggle", "params": {}}'
Example: Toggle Hallway Light (2nd Floor)
curl -X POST http://192.168.1.101/api/v1/scripts/actions/run \
-H "Content-Type: application/json" \
-d '{"alias": "hall2_toggle", "params": {}}'
Response Format: Returns a JSON object with status: true and the return value from the PHP script.
The Google OAuth flow no longer keeps OAuth state and PKCE verifiers in the PHP session. The callback arrives from Chrome Custom Tab, which does not share the PHPSESSID cookie with the app WebView session, so session-backed stores lost the state between the authorize redirect and the callback.
SHServ/Integrations/GAuth/Store/FileStateStore.php and SHServ/Integrations/GAuth/Store/FilePkceStore.php (implement GNexus\GAuth\Contract\StateStoreInterface / PkceStoreInterface). Records are JSON files keyed by sha256(state) with an expires_at field; expired records are deleted on read.AuthService.php now instantiates FileStateStore / FilePkceStore (previously SessionStateStore / SessionPkceStore). AuthController.php reads the returnTo context via FileStateStore->getContext($state) before handleCallback() forgets the state./home/shome/smart-home-server/server/Cache/gauth/state and .../Cache/gauth/pkce, owner www-data:shome, mode 770 (PHP-FPM runs as www-data).SessionStateStore.php, SessionPkceStore.php) remain in Store/ but are unused.AuthService.php.bak-20260904 and Controllers/AuthController.php.bak-20260904 next to the originals.opcache.validate_timestamps=1); all touched files passed php -l.PHPSESSID. State validation now passes cross-context; with a fake code the failure moves to the token-exchange step (Authorization code is invalid or expired in php:Auth logs), confirming the fix.