Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server configuration file? #315

Open
AndrewBarfield opened this issue Feb 4, 2022 · 4 comments
Open

Server configuration file? #315

AndrewBarfield opened this issue Feb 4, 2022 · 4 comments

Comments

@AndrewBarfield
Copy link

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!

@sileix
Copy link
Member

sileix commented Feb 8, 2022

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.

@AndrewBarfield
Copy link
Author

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

@sileix
Copy link
Member

sileix commented Feb 8, 2022

Yes, they should be.

@texnofobix
Copy link

texnofobix commented Mar 10, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants