Open lorenzodonini opened 1 year ago
Hi i m facing the the invalid TransactionId problem currently on my Alfen box do you think this patch will solve the Alfen ID issue? Is it planed to push it to the master?
Hi i m facing the the invalid TransactionId problem currently on my Alfen box do you think this patch will solve the Alfen ID issue? Is it planed to push it to the master?
No. It does not solve the issue. It is an problem within the Alfen firmware up to the most current version 6.4.0. I have open tickets with Alfen for more than one year now. The problem is that they set MaxInt as invalid value and I assume that this happens if you use SetChargeProfile without a TransactionId (although the spec allows this and it makes sense in many use cases, Alfen then "forgets" current transactionId leading to the problem described. Is this also your case, maybe you can help with contacting Alfen to solve this?
The only thing you might do is to catch it with an invalid message callback, see here https://github.com/lorenzodonini/ocpp-go/issues/188
Info on InvalidMessageHook can be found here: https://github.com/lorenzodonini/ocpp-go/pull/215
Hi, i gues iita the same problem.
2023-09-28T16:31:28.433Z:INFO:db_chargingprofi:23: transactionId 18446744073709551615 (not specified)
2023-09-28T16:31:47.546Z:COM:ocpp_rpc.c:681:-> [2,"2","MeterValues",{"connectorId":1,"transactionId":9223372036854775807,"me 2023-09-28T16:31:47.546Z:COM:ocpp_rpc.c:681:terValue":[{"timestamp":"2022-01-01T19:52:37Z","sampledValue":[{"value":"1310.87 2023-09-28T16:31:47.546Z:COM:ocpp_rpc.c:681:7","context":"Sample.Periodic","measurand":"Energy.Active.Import.Register","loca 2023-09-28T16:31:47.546Z:COM:ocpp_rpc.c:681:tion":"Outlet","unit":"kWh"}]}]}] 2023-09-28T16:31:47.593Z:COM:ocpp_rpc.c:1127:<- [4,"2","FormationViolation","json: cannot unmarshal number 922337203685477600 2023-09-28T16:31:47.593Z:COM:ocpp_rpc.c:1127:0 into Go struct field MeterValuesRequest.transactionId of type int",{}] 2023-09-28T16:31:47.621Z:ERROR:ocpp_json.c:462:WAMP_ERROR on (FormationViolation) Desc: json: cannot unmarshal number 922337203 2023-09-28T16:31:47.621Z:ERROR:ocpp_json.c:462:6854776000 into Go struct field MeterValuesRequest.transactionId of type int 2023-09-28T16:31:47.644Z:ERROR:ocpp_rpc.c:438:reply error REPLY ERROR
is it not possible to fix it somehow on the server side by setting the tanactionId for the profile. I know this still not fix the firmwere from alfen
@olga2323 @all: please excuse OT post. Working on https://github.com/evcc-io/evcc we're faced with varying compatibility issues like the one mentioned above. Would you be interested in creating a collaboration area for cross-project exchange on vendor issues, does and don'ts? Maybe Github or anything else. Please excuse the OT post- thank you!
Forces the
UseNumber
option on the JSON decoder while parsing a message. This prevents intermediate conversion to float64 values, which may cut off values on very high numbers and cause rounding errors.This will likely introduce some performance decrease, since the
json.Decoder
is more memory-intensive. Optimization will be analyzed later on.Solves #188