ocpp-js icon indicating copy to clipboard operation
ocpp-js copied to clipboard

TypeError: Cannot read property 'output' of undefined

Open horstoeko opened this issue 7 years ago • 3 comments

Hi!

I'm playing around a little with this library. Here is my test-code:

var OCPP =  require('../index.js');

var options = {
  centralSystem: {
    port: 9220
  },
  chargingPoint: {
    serverURI: 'http://localhost:9221/Ocpp/ChargePointService',
    name: 'Simulator'
  },
  chargingPointServer: {
    port: 9221
  }
}

var ocppJS = new OCPP(options);

// Create Central System
var centralSystem = ocppJS.createCentralSystem();

// Create Charging Point Client
var chargingPoint = ocppJS.createChargingPoint('http://localhost:9221/Ocpp/ChargePointService', "chargingPoint-Simulator");

// Create Charging Point Server
var chargingPointServer = ocppJS.createChargingPointServer(9221);

var boot = setInterval(function() {

	chargingPoint.bootNotification({
		chargePointVendor: 'Shneider Electric',
		chargePointModel: 'NQC-ACDC',
		chargePointSerialNumber: '5894babc-c6a3-4b8d-81a70e48',
		chargeBoxSerialNumber: '5894babc-c6a3-4b8d-81a7',
		firmwareVersion: '2.0.49',
		iccid: '1',
		imsi: '',
		meterType: 'DBT NQC-ACDC',
		meterSerialNumber: 'gir.vat.mx.000e48'
	});

    clearInterval(boot);
}, 2000);

When I execute this code I get the following error:

"TypeError: Cannot read property 'output' of undefined at Server._executeMethod (C:\Temp\3\inst\ode_modules\strong-soap\src\server.js:323:44) at Server._process (C:\Temp\3\inst\node_modules\strong-soap\src\server.js:230:14) at IncomingMessage. (C:\Temp\3\inst\node_modules\strong-soap\src\server.js:101:16) at emitNone (events.js:105:13) at IncomingMessage.emit (events.js:207:7) at endR eadableNT (_stream_readable.js:1056:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at pro cess._tickCallback (internal/process/next_tick.js:180:9)"

Can anyone help? What I'm doing wrong?

horstoeko avatar Oct 30 '17 13:10 horstoeko

same issue=( help plz

salexey1990 avatar Nov 10 '17 10:11 salexey1990

Same problem, any one find the solution?

askaps avatar Dec 04 '17 19:12 askaps

Try one of the previous commits (don't remember which one), it should work. Be careful with this repo, in general it works, but a lot of mistakes.

salexey1990 avatar Feb 26 '18 14:02 salexey1990