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

USB Erkennung #101

Closed
pogo01 opened this issue Mar 20, 2024 · 17 comments
Closed

USB Erkennung #101

pogo01 opened this issue Mar 20, 2024 · 17 comments

Comments

@pogo01
Copy link

pogo01 commented Mar 20, 2024

Moin,
Wie gestern schon gepostet habe ich Probleme.
Danke für Eure tolle Arbeit und die Hilfe.

Fehler 2
fehler
visuell studio
lsusb

Dazu gibt es anscheinend noch Fehler in der config.js

@pogo01 pogo01 changed the title USB erkennen USB Erkennung Mar 20, 2024
@pogo01 pogo01 mentioned this issue Mar 21, 2024
@dm82m
Copy link

dm82m commented Mar 21, 2024

poste mal bitte deine komplette config.js hier. das was deine log ausgabe sagt, passt nicht zu dem ausschnitt deines config files. also fangen wir damit an.

@pogo01
Copy link
Author

pogo01 commented Mar 21, 2024

Ich fürchte wir müssen früher anfangen. Anscheinend wird dort nicht richtig installiert.
da
liegt das auch am USB-Port?

@dm82m
Copy link

dm82m commented Mar 21, 2024

Ich versteh nicht was du tust. Warum installierst du irgendwas manuell? Wenn du das resol-vbus addon nutzt und die km2 Integration dann musst du nichts machen außer config files anpassen. Lies bitte die jeweiligen dokus noch mal genau.

@pogo01
Copy link
Author

pogo01 commented Mar 21, 2024

Danke werde ich machen

@pogo01
Copy link
Author

pogo01 commented Mar 24, 2024

Moin
Ich bin froh, dass sich dass jemand ansieht.

1.Versuch über ESP
esp

  1. Versuch über VBUS/USB Adapter

/*! resol-vbus | Copyright (c) 2013-present, Daniel Wippermann | MIT license */

const path = require('/dev/ttyACM0');

const config = {

/**
 * The level of details for log messages.
 * @type {String}
 */
logLevel: 'debug',

/**
 * The port number for the HTTP server to listen to.
 * @type {Number}
 */
httpPort: 3333,

/**
 * The inteval in milliseconds between two writes of the logging file.
 * @type {Number}
 */
loggingInterval: 10000,

/**
 * The filename of the logging file.
 * @type {String}
 */
loggingFilename: path.resolve(__dirname, 'live-data.json'),

/**
 * Text file logging interval in milliseconds. A value of zero disables this functionality.
 */
textLoggingInterval: 0,

/**
 * Text file logging time to live in milliseconds.
 */
textLoggingTimeToLive: 60000,

/**
 * Text file logging directory.
 */
textLoggingPath: path.resolve(__dirname, 'log'),

/**
 * Text file logging options, passed to the `TextConverter` constructor.
 */
textLoggingOptions: {
    columnSeparator: '\t',
    lineSeparator: '\r\n',
    separateDateAndTime: false,
},

/**
 * Either 'TcpConnection' or 'SerialConnection' to connect to the VBus.
 * @type {String}
 */
connectionClassName: 'TcpConnection',

connectionOptions: {
    /**
     * SerialConnection only:
     * The serial port to which the Vbus/USB device is connected.
     * @type {String}
     */
    path: '/dev/ttyACM0',

    /**
     * TcpConnection only:
     * The host name / IP address of the VBus/LAN or Datalogger device.
     * @type {String}
     */
    host: '192.168.188.66',

    /**
     * TcpConnection only:
     * The password for the VBus/LAN or Datalogger device.
     * @type {String}
     */
    password: 'vbus',
},

/**
 * A map of packet field IDs to their custom name.
 */
packetFieldNameMap: {
    '00_0010_7E11_10_0100_000_2_0': 'Temperature collector',  // instead of "Temperater sensor 1"
},

/**
 * A list of EM (extension module) sub-addresses to simulate.
 */
emSimulatorSubAdresses: [
    // 1,
    // 2,
    // 3,
    // 4,
    // 5,
],

};

Log:

log

usb

@dm82m
Copy link

dm82m commented Mar 24, 2024

connectionClassName: 'TcpConnection' bitte ändern auf connectionClassName: 'SerialConnection'

und warum genau hast du das hier geändert: const path = require('/dev/ttyACM0'); - wo steht dass das du das ändern sollst? Bitte wieder zurück auf const path = require('path');

dann addon Neustart und log posten.

@pogo01
Copy link
Author

pogo01 commented Mar 24, 2024

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.7
nodejs version: v21.7.1
npm version: 10.5.0
--- 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:63
connectionOptions: {
^^^^^^^^^^^^^^^^^

SyntaxError: Unexpected identifier 'connectionOptions'
at internalCompileFunction (node:internal/vm:128:18)
at wrapSafe (node:internal/modules/cjs/loader:1279:20)
at Module._compile (node:internal/modules/cjs/loader:1331:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1426:10)
at Module.load (node:internal/modules/cjs/loader:1205:32)
at Module._load (node:internal/modules/cjs/loader:1021:12)
at Module.require (node:internal/modules/cjs/loader:1230:19)
at require (node:internal/modules/helpers:179:18)
at Object. (/bin/resol-vbus/examples/json-live-data-server/index.js:28:16)
at Module._compile (node:internal/modules/cjs/loader:1368:14)

Node.js v21.7.1
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

@danielwippermann
Copy link
Owner

Fehlt am Ende der Zeile vor 63 vielleicht ein Komma am Ende?

@dm82m
Copy link

dm82m commented Mar 24, 2024

Okay, nimm bitte das Original config file noch mal und passe exakt die folgende Sache an und ansonsten veränderst du nichts!!!

connectionClassName: 'TcpConnection' bitte ändern auf connectionClassName: 'SerialConnection'

@pogo01
Copy link
Author

pogo01 commented Mar 24, 2024

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.7
nodejs version: v21.7.1
npm version: 10.5.0
--- DEVICES ---
ls: cannot access '/dev/ttyUSB*': No such file or directory
/dev/ttyACM0
--- json-live-data-server ---
debug: Starting server...
debug: Connect to VBus data source...
error: Main function returned with error:
error: TypeError: ConnectionClass is not a constructor
at main (/bin/resol-vbus/examples/json-live-data-server/index.js:663:24)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

@pogo01
Copy link
Author

pogo01 commented Mar 24, 2024

/*! resol-vbus | Copyright (c) 2013-present, Daniel Wippermann | MIT license */

const path = require('path');

const config = {

/**
 * The level of details for log messages.
 * @type {String}
 */
logLevel: 'debug',

/**
 * The port number for the HTTP server to listen to.
 * @type {Number}
 */
httpPort: 3333,

/**
 * The inteval in milliseconds between two writes of the logging file.
 * @type {Number}
 */
loggingInterval: 10000,

/**
 * The filename of the logging file.
 * @type {String}
 */
loggingFilename: path.resolve(__dirname, 'live-data.json'),

/**
 * Text file logging interval in milliseconds. A value of zero disables this functionality.
 */
textLoggingInterval: 0,

/**
 * Text file logging time to live in milliseconds.
 */
textLoggingTimeToLive: 60000,

/**
 * Text file logging directory.
 */
textLoggingPath: path.resolve(__dirname, 'log'),

/**
 * Text file logging options, passed to the `TextConverter` constructor.
 */
textLoggingOptions: {
    columnSeparator: '\t',
    lineSeparator: '\r\n',
    separateDateAndTime: false,
},

/**
 * Either 'TcpConnection' or 'SerialConnection' to connect to the VBus.
 * @type {String}
 */
connectionClassName: 'SerialConnection',

connectionOptions: {
    /**
     * SerialConnection only:
     * The serial port to which the Vbus/USB device is connected.
     * @type {String}
     */
    path: '/dev/ttyACM0',

    /**
     * TcpConnection only:
     * The host name / IP address of the VBus/LAN or Datalogger device.
     * @type {String}
     */
    host: '192.168.188.66',

    /**
     * TcpConnection only:
     * The password for the VBus/LAN or Datalogger device.
     * @type {String}
     */
    password: 'vbus',
},

/**
 * A map of packet field IDs to their custom name.
 */
packetFieldNameMap: {
    '00_0010_7E11_10_0100_000_2_0': 'Temperature collector',  // instead of "Temperater sensor 1"
},

/**
 * A list of EM (extension module) sub-addresses to simulate.
 */
emSimulatorSubAdresses: [
    // 1,
    // 2,
    // 3,
    // 4,
    // 5,
],

};

@danielwippermann
Copy link
Owner

Da fehlt das module.exports = config; am Ende der Datei...

@dm82m
Copy link

dm82m commented Mar 24, 2024

Deswegen sagte ich: original config 1:1 nehmen und nur diese eine einzige Stelle anpassen. So macht mir das hier keinen Spaß @pogo01

@pogo01
Copy link
Author

pogo01 commented Mar 24, 2024

Danke für die Geduld. Sorry

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.7
nodejs version: v21.7.1
npm version: 10.5.0
--- DEVICES ---
ls: cannot access '/dev/ttyUSB*': No such file or directory
/dev/ttyACM0
--- json-live-data-server ---
debug: Starting server...
debug: Connect to VBus data source...
info: Ready to serve from the following URLs:
info: - http://127.0.0.1:3333/api/v1/live-data (internal)
info: - http://172.30.33.4:3333/api/v1/live-data
debug: HeaderSet complete
debug: HeaderSet complete

@dm82m
Copy link

dm82m commented Mar 24, 2024

Damit läuft jetzt das add-on und du kannst dich der Home Assistant Integration widmen. Halte dich da bitte 1:1 an der Doku bzgl. Der config und verändere ansonsten nichts.

@pogo01
Copy link
Author

pogo01 commented Mar 24, 2024

Danke sehr.

@pogo01
Copy link
Author

pogo01 commented Mar 24, 2024

Unbenannt

Nochmals Vielen Dank

Over and Out

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