Skip to content

Schema validation => invalid messages #8

Open
@dallmann-consulting

Description

@dallmann-consulting

I think I found two bugs where the sent messages are invalid against the schema. Here are the corrected functions:

		function NotifyChargingLimit(charge_limit = 10, limit_source = "SO") {
			sessionStorage.setItem('LastAction', "NotifyChargingLimit");
			var LSN = JSON.stringify([2, id, "NotifyChargingLimit", {
				"evseId": 1,
				"chargingLimit": {
					"chargingLimitSource": limit_source,
					"isGridCritical": "False",
				},
				"chargingSchedule": [charging_schedule(charge_limit)]
			}]);
			_websocket.send(LSN);
		}

		function charging_schedule(charge_limit){
			return {
				"id": 0,
				"chargingRateUnit": "A",
				"chargingSchedulePeriod": [{
					"startPeriod": 0,
					"limit": charge_limit
				}]
			}
		}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions