stanford-oval/genie-server

Server configuration file?

Opened this issue · 4 comments

I'm trying to setup the server without Home Assistant. The reported time is incorrect by several hours and my location is reported as Unknown.

Is there a config file for home address, zip code, time zone, service credentials, etc? Maybe environment variables in the docker-compose file?

I've looked but can seem to find anything.

Thank you!

The timezone can be set by the TZ environment variable, e.g., TZ="America/Los_Angeles".
The home address can be set by issuing a command "set home location" to your genie assistant.
The service credentials will be set automatically when each skill is configured.

Thank you! Where are these settings persisted across container shutdowns or restarts?

Yes, they should be.

Setting TZ seems to break the docker image.

My docker-compose.yml

version: '3.3'
services:
    stanfordoval:
        container_name: genie
        environment:
            - PORT=3020
            - TZ="America/New_York"
        #ports:
          #- '3020:3020'
        network_mode: host
        volumes:
            - '/home/texnofobix/docker/genie/data:/var/lib/genie-server'
        image: docker.io/stanfordoval/almond-server
$ docker-compose up
[+] Running 1/1
 ⠿ Container genie  Recreated                                                                                                                                                                37.4s
Attaching to genie
genie  |
genie  | > genie-server@3.0.1 start /opt/genie-server
genie  | > node dist/main.js
genie  |
genie  | /opt/genie-server/node_modules/@js-temporal/polyfill/dist/index.js:6264
genie  |       throw new RangeError("Invalid time zone: ".concat(stringIdent));
genie  |       ^
genie  |
genie  | RangeError: Invalid time zone: undefined
genie  |     at Object.ParseTemporalTimeZoneString (/opt/genie-server/node_modules/@js-temporal/polyfill/dist/index.js:6264:13)
genie  |     at Object.TemporalTimeZoneFromString (/opt/genie-server/node_modules/@js-temporal/polyfill/dist/index.js:6036:36)
genie  |     at Object.SystemTimeZone (/opt/genie-server/node_modules/@js-temporal/polyfill/dist/index.js:10529:36)
genie  |     at Temporal.Now.timeZone (/opt/genie-server/node_modules/@js-temporal/polyfill/dist/index.js:13463:13)
genie  |     at new ServerPlatform (/opt/genie-server/dist/service/platform/index.js:178:50)
genie  |     at Object.<anonymous> (/opt/genie-server/dist/service/platform/index.js:339:19)
genie  |     at Module._compile (internal/modules/cjs/loader.js:999:30)
genie  |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
genie  |     at Module.load (internal/modules/cjs/loader.js:863:32)
genie  |     at Function.Module._load (internal/modules/cjs/loader.js:708:14)
genie  | npm ERR! code ELIFECYCLE
genie  | npm ERR! errno 1
genie  | npm ERR! genie-server@3.0.1 start: `node dist/main.js`
genie  | npm ERR! Exit status 1
genie  | npm ERR!
genie  | npm ERR! Failed at the genie-server@3.0.1 start script.
genie  | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
genie  |
genie  | npm ERR! A complete log of this run can be found in:
genie  | npm ERR!     /home/genie-server/.npm/_logs/2022-03-10T13_44_53_446Z-debug.log
genie exited with code 1
$ docker-compose images
Container           Repository                   Tag                 Image Id            Size
genie               stanfordoval/almond-server   latest              a8f11d19ea03        818MB