Compare commits
1 Commits
124330db9a
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 2dbba91efa |
@@ -26,7 +26,11 @@ class JsonHandler implements HttpHandler
|
|||||||
this.agent = agent;
|
this.agent = agent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GET-Request bearbeiten
|
||||||
|
* @param httpExchange
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void handle(HttpExchange httpExchange) throws IOException
|
public void handle(HttpExchange httpExchange) throws IOException
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ public class KebaAgent
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* alle wichtigen modbus-Daten beschaffen
|
* alle wichtigen modbus-Daten beschaffen
|
||||||
* @param params
|
* @param params URI-Parameter des GET-Requests (werden aktuell ignoriert)
|
||||||
* @return JSON-Daten
|
* @return JSON-Daten
|
||||||
*/
|
*/
|
||||||
String getDataAsJson(Map<String, String> params)
|
String getDataAsJson(Map<String, String> params)
|
||||||
@@ -126,6 +126,7 @@ public class KebaAgent
|
|||||||
JSONObject joRoot = new JSONObject();
|
JSONObject joRoot = new JSONObject();
|
||||||
JSONArray jaStations = new JSONArray();
|
JSONArray jaStations = new JSONArray();
|
||||||
|
|
||||||
|
System.out.printf("Req at %s\n", LocalDateTime.now().withNano(0));
|
||||||
// über alle Wallboxen ...
|
// über alle Wallboxen ...
|
||||||
getAliases()
|
getAliases()
|
||||||
.forEach(name ->
|
.forEach(name ->
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ public class KebaModbus
|
|||||||
private static int timeout_ms = 10000;
|
private static int timeout_ms = 10000;
|
||||||
|
|
||||||
record RCacheEntry(String name, LocalDateTime ts, Integer value){};
|
record RCacheEntry(String name, LocalDateTime ts, Integer value){};
|
||||||
|
|
||||||
private Map<String, RCacheEntry> cache = new HashMap<>();
|
private Map<String, RCacheEntry> cache = new HashMap<>();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user