danielwippermann / resol-vbus

A JavaScript library for processing RESOL VBus data
MIT License
67 stars 34 forks source link

Syntax error in config.js #91

Closed anticharm01 closed 1 year ago

anticharm01 commented 1 year ago

Hi,

I'm trying to add the JSON live data server to my new home assistant for reading data from my DeltaSol SLT. I added the addon, but I'm struggling with the config.js

It looks like this:

connectionClassName: 'SerialConnection',
connectionOptions: {
    path: '/dev/ttyACM0',
}

The Resol-Vbus log shows this error:

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
--- VERSIONS ---
add-on version: 0.0.6
nodejs version: v20.4.0
npm version: 9.7.2
--- DEVICES ---
ls: cannot access '/dev/ttyUSB*': No such file or directory
/dev/ttyACM0
--- json-live-data-server ---
/bin/resol-vbus/examples/json-live-data-server/config.js:3
    connectionOptions: {
                 ^
SyntaxError: Unexpected token ':'
    at internalCompileFunction (node:internal/vm:73:18)
    at wrapSafe (node:internal/modules/cjs/loader:1153:20)
    at Module._compile (node:internal/modules/cjs/loader:1197:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1287:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)
    at Module.require (node:internal/modules/cjs/loader:1115:19)
    at require (node:internal/modules/helpers:119:18)
    at Object.<anonymous> (/bin/resol-vbus/examples/json-live-data-server/index.js:27:16)
    at Module._compile (node:internal/modules/cjs/loader:1233:14)
Node.js v20.4.0
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

I'm not a programmer, but made resol-vbus-logger.rs running :) Thought Home Assistant is a new approach to automation.

anticharm01 commented 1 year ago

Ah, moaning to early.

The config.js is not complete. All the docs list how to use USB connection, but I need the complete file