Skip to content

Latest commit

 

History

History
28 lines (23 loc) · 1.51 KB

README.md

File metadata and controls

28 lines (23 loc) · 1.51 KB

Smart Charging with Web of Things

Simulation of a photovoltaic system (based on MQTT) and an electric car (based on HTTP) to demonstrate a smart charging scenario based on the W3C Web of Things approach.

Sun-Inverter eCar
Protocol MQTT HTTP
Content-type text-plain application-json
Data model / functions status ("powerOn”, "powerOff”, "error”)
Topic (publish): {..}/status
status ("readyToCharge”, "charging”, "stopCharging”)
Resource (GET): {..}/state
power (0..7500 Watt)
Topic (publish): {..}/power
soc (0..100%)
Resource (GET): {..}/soc
startCharging
Resource (POST): {..}/startCharging
stopCharging
Resource (POST): {..}/stopCharging

Prerequisites

Install dependencies (Eclipse node-wot)

Run Application

  • start PV simulation in terminal I: node pv-system.js <MQTT_Broker_Address:Port> (e.g.,node pv-system.js 127.0.0.1:1883)
  • start eCar simulation in terminal II: node ecar.js
  • start smart charging application in terminal III: node smart-charging.js

Note: The PV and eCar simulations automatically expose their Thing Descriptions. This simple application stops when the eCar is fully charged.