Cloud stuff

This commit is contained in:
Gunnar Skjold
2025-02-14 18:04:12 +01:00
parent 795d2d0375
commit fe739c51d3
2 changed files with 8 additions and 7 deletions

View File

@@ -170,7 +170,7 @@ bool CloudConnector::init() {
void CloudConnector::update(AmsData& data, EnergyAccounting& ea) {
unsigned long now = millis();
if(now-lastUpdate < config.interval*1000) {
if(now-lastUpdate < ((unsigned long)config.interval)*1000) {
return;
};
bool sendFirst = lastUpdate == 0;
@@ -546,6 +546,7 @@ void CloudConnector::update(AmsData& data, EnergyAccounting& ea) {
if(ret == 0) {
if(stream != NULL) {
stream->write(encryptedBuffer, rsa->len);
stream->flush();
} else {
memcpy(httpBuffer + sendBytes, encryptedBuffer, rsa->len);
}

View File

@@ -611,9 +611,9 @@
}
},
"node_modules/@types/node": {
"version": "22.13.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.2.tgz",
"integrity": "sha512-Z+r8y3XL9ZpI2EY52YYygAFmo2/oWfNSj4BCpAXE2McAexDk8VcnBMGC9Djn9gTKt4d2T/hhXqmPzo4hfIXtTg==",
"version": "22.13.4",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.4.tgz",
"integrity": "sha512-ywP2X0DYtX3y08eFVx5fNIw7/uIv8hYUKgXoK8oayJlLnKcRfEYCxWMVE1XagUdVtCJlZT1AU4LXEABW+L1Peg==",
"dev": true,
"dependencies": {
"undici-types": "~6.20.0"
@@ -1238,9 +1238,9 @@
"dev": true
},
"node_modules/electron-to-chromium": {
"version": "1.5.98",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.98.tgz",
"integrity": "sha512-bI/LbtRBxU2GzK7KK5xxFd2y9Lf9XguHooPYbcXWy6wUoT8NMnffsvRhPmSeUHLSDKAEtKuTaEtK4Ms15zkIEA=="
"version": "1.5.100",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.100.tgz",
"integrity": "sha512-u1z9VuzDXV86X2r3vAns0/5ojfXBue9o0+JDUDBKYqGLjxLkSqsSUoPU/6kW0gx76V44frHaf6Zo+QF74TQCMg=="
},
"node_modules/emoji-regex": {
"version": "9.2.2",