Skip to content

Commit

Permalink
fixes #103 / Fixed support for Serial-to-LAN-Gateway connections
Browse files Browse the repository at this point in the history
  • Loading branch information
Grizzelbee committed May 4, 2022
1 parent 500b9ae commit 05d4a76
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 0 additions & 1 deletion io-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@
"connectionPort": 7053,
"vbusPassword": "",
"vbusChannel": 7,
"vbusDataOnly": false,
"vbusViaTag": "",
"vbusInterval": 30
},
Expand Down
10 changes: 7 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -435,11 +435,15 @@ class resol extends utils.Adapter {
if (config.connectionDevice === 'serial') {
testSerialformat(config);
resolve('Config seems to be valid for USB/Serial.');
} else if (config.connectionDevice === 'lan' || config.connectionDevice === 'langw') {
} else if (config.connectionDevice === 'lan') {
testIP_and_FQDN_Format(config);
testPassword(config);
testPort(config);
resolve('Config seems to be valid for LAN or LAN-Gateway.');
resolve('Config seems to be valid for LAN.');
} else if (config.connectionDevice === 'langw') {
testIP_and_FQDN_Format(config);
testPort(config);
resolve('Config seems to be valid for Serial-to-LAN-Gateway.');
} else if (config.connectionDevice === 'dl2' || config.connectionDevice === 'dl3') {
testIP_and_FQDN_Format(config);
testPort(config);
Expand Down Expand Up @@ -509,7 +513,7 @@ class resol extends utils.Adapter {
ctx.connection = new vbus.TcpConnection({
host: this.config.connectionIdentifier,
port: this.config.connectionPort,
rawVBusDataOnly: this.config.vbusDataOnly
rawVBusDataOnly: true
});
this.log.info('TCP Connection via LAN-gw to [' + this.config.connectionIdentifier + ':' + this.config.connectionPort + '] selected');
break;
Expand Down

0 comments on commit 05d4a76

Please sign in to comment.