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

Schema validation => invalid messages #8

Open
dallmann-consulting opened this issue Jan 7, 2021 · 0 comments
Open

Schema validation => invalid messages #8

dallmann-consulting opened this issue Jan 7, 2021 · 0 comments

Comments

@dallmann-consulting
Copy link

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
				}]
			}
		}
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

1 participant