iobroker.aio
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -64,3 +64,3 @@ "use strict"; | ||
const url = `https://translate.yandex.net/api/v1.5/tr.json/translate?key=${apiKey}&text=${encodeURIComponent(text)}&lang=en-${targetLang}`; | ||
const response = await axios_1.default({ url, timeout: 15000 }); | ||
const response = await (0, axios_1.default)({ url, timeout: 15000 }); | ||
if (isArray((_a = response.data) === null || _a === void 0 ? void 0 : _a.text)) { | ||
@@ -84,3 +84,3 @@ return response.data.text[0]; | ||
const url = `http://translate.googleapis.com/translate_a/single?client=gtx&sl=en&tl=${targetLang}&dt=t&q=${encodeURIComponent(text)}&ie=UTF-8&oe=UTF-8`; | ||
const response = await axios_1.default({ url, timeout: 15000 }); | ||
const response = await (0, axios_1.default)({ url, timeout: 15000 }); | ||
if (isArray(response.data)) { | ||
@@ -101,1 +101,2 @@ // we got a valid response | ||
} | ||
//# sourceMappingURL=tools.js.map |
"use strict"; | ||
/* | ||
* Created with @iobroker/create-adapter v1.33.0 | ||
* Created with @iobroker/create-adapter v1.34.1 | ||
*/ | ||
@@ -28,8 +28,5 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
// The adapter-core module gives you access to the core ioBroker functions | ||
// you need to create an adapter | ||
const utils = __importStar(require("@iobroker/adapter-core")); | ||
//lib for http get | ||
const axios_1 = __importDefault(require("axios")); | ||
// Load your modules here, e.g.: | ||
// import * as fs from "fs"; | ||
class Aio extends utils.Adapter { | ||
@@ -41,208 +38,62 @@ constructor(options = {}) { | ||
}); | ||
this.adapterIntervals = {}; //halten von allen Intervallen | ||
this.url = ''; | ||
this.polltime = 30; | ||
this.polltime = 0; | ||
this.ip = ''; | ||
this.on('ready', this.onReady.bind(this)); | ||
this.on('unload', this.onUnload.bind(this)); | ||
} | ||
async setAioObject() { | ||
await this.setObjectNotExistsAsync('ColecTm', { | ||
type: 'state', | ||
common: { | ||
name: 'ColecTm', | ||
type: 'number', | ||
role: 'value', | ||
read: true, | ||
write: false, | ||
}, | ||
native: {}, | ||
}); | ||
await this.setObjectNotExistsAsync('PowerOutletPw', { | ||
type: 'state', | ||
common: { | ||
name: 'PowerOutletPw', | ||
type: 'number', | ||
role: 'value', | ||
read: true, | ||
write: false, | ||
}, | ||
native: {}, | ||
}); | ||
await this.setObjectNotExistsAsync('GridPw', { | ||
type: 'state', | ||
common: { | ||
name: 'GridPw', | ||
type: 'number', | ||
role: 'value', | ||
read: true, | ||
write: false, | ||
}, | ||
native: {}, | ||
}); | ||
await this.setObjectNotExistsAsync('UnitPrice', { | ||
type: 'state', | ||
common: { | ||
name: 'UnitPrice', | ||
type: 'number', | ||
role: 'value', | ||
read: true, | ||
write: false, | ||
}, | ||
native: {}, | ||
}); | ||
await this.setObjectNotExistsAsync('ConsPw', { | ||
type: 'state', | ||
common: { | ||
name: 'ConsPw', | ||
type: 'number', | ||
role: 'value', | ||
read: true, | ||
write: false, | ||
}, | ||
native: {}, | ||
}); | ||
await this.setObjectNotExistsAsync('BtSoc', { | ||
type: 'state', | ||
common: { | ||
name: 'BtSoc', | ||
type: 'number', | ||
role: 'value', | ||
read: true, | ||
write: false, | ||
}, | ||
native: {}, | ||
}); | ||
await this.setObjectNotExistsAsync('PcsPw', { | ||
type: 'state', | ||
common: { | ||
name: 'PcsPw', | ||
type: 'number', | ||
role: 'value', | ||
read: true, | ||
write: false, | ||
}, | ||
native: {}, | ||
}); | ||
await this.setObjectNotExistsAsync('AbsPcsPw', { | ||
type: 'state', | ||
common: { | ||
name: 'AbsPcsPw', | ||
type: 'number', | ||
role: 'value', | ||
read: true, | ||
write: false, | ||
}, | ||
native: {}, | ||
}); | ||
await this.setObjectNotExistsAsync('PvPw', { | ||
type: 'state', | ||
common: { | ||
name: 'PvPw', | ||
type: 'number', | ||
role: 'value', | ||
read: true, | ||
write: false, | ||
}, | ||
native: {}, | ||
}); | ||
await this.setObjectNotExistsAsync('GridStusCd', { | ||
type: 'state', | ||
common: { | ||
name: 'GridStusCd', | ||
type: 'number', | ||
role: 'value', | ||
read: true, | ||
write: false, | ||
}, | ||
native: {}, | ||
}); | ||
await this.setObjectNotExistsAsync('BtStusCd', { | ||
type: 'state', | ||
common: { | ||
name: 'BtStusCd', | ||
type: 'number', | ||
role: 'value', | ||
read: true, | ||
write: false, | ||
}, | ||
native: {}, | ||
}); | ||
await this.setObjectNotExistsAsync('BtPw', { | ||
type: 'state', | ||
common: { | ||
name: 'BtPw', | ||
type: 'number', | ||
role: 'value', | ||
read: true, | ||
write: false, | ||
}, | ||
native: {}, | ||
}); | ||
await this.setObjectNotExistsAsync('OperStusCd', { | ||
type: 'state', | ||
common: { | ||
name: 'OperStusCd', | ||
type: 'number', | ||
role: 'value', | ||
read: true, | ||
write: false, | ||
}, | ||
native: {}, | ||
}); | ||
await this.setObjectNotExistsAsync('EmsOpMode', { | ||
type: 'state', | ||
common: { | ||
name: 'EmsOpMode', | ||
type: 'number', | ||
role: 'value', | ||
read: true, | ||
write: false, | ||
}, | ||
native: {}, | ||
}); | ||
await this.setObjectNotExistsAsync('RankPer', { | ||
type: 'state', | ||
common: { | ||
name: 'RankPer', | ||
type: 'number', | ||
role: 'value', | ||
read: true, | ||
write: false, | ||
}, | ||
native: {}, | ||
}); | ||
await this.setObjectNotExistsAsync('ErrorCnt', { | ||
type: 'state', | ||
common: { | ||
name: 'ErrorCnt', | ||
type: 'number', | ||
role: 'value', | ||
read: true, | ||
write: false, | ||
}, | ||
native: {}, | ||
}); | ||
/** | ||
* Is called when databases are connected and adapter received configuration. | ||
*/ | ||
async onReady() { | ||
// debug | ||
this.log.debug('Config ist set to:'); | ||
this.log.debug('IP:' + this.config.ip); | ||
this.log.debug('Polltime:' + this.config.polltime); | ||
//Püfen die übergabe der IP | ||
if (this.config.ip) { | ||
if (this.config.ip != '0.0.0.0' && this.config.ip != '') { | ||
this.config.ip = this.config.ip.replace('http', ''); | ||
this.config.ip = this.config.ip.replace(':', ''); | ||
this.config.ip = this.config.ip.replace('/', ''); | ||
this.ip = this.config.ip; | ||
this.log.debug('Final Ip:' + this.ip); | ||
} | ||
else { | ||
this.log.error('No ip is set, adapter stop'); | ||
return; | ||
} | ||
} | ||
else { | ||
this.log.error('No ip is set, adapter stop'); | ||
return; | ||
} | ||
//Prüfen Polltime | ||
if (this.config.polltime > 0) { | ||
this.polltime = this.config.polltime; | ||
} | ||
else { | ||
this.log.error('Wrong Polltime (polltime < 0), adapter stop'); | ||
return; | ||
} | ||
//War alles ok, dann können wir die Daten abholen | ||
this.adapterIntervals = this.setInterval(() => this.getIntervallData(), this.polltime * 1000); | ||
} | ||
startIntervall() { | ||
/** | ||
* Is called when adapter shuts down - callback has to be called under any circumstances! | ||
*/ | ||
onUnload(callback) { | ||
try { | ||
axios_1.default(this.url + '/R3EMSAPP_REAL.ems?file=ESSRealtimeStatus.json').then(async (response) => { | ||
clearInterval(this.adapterIntervals); | ||
callback(); | ||
} | ||
catch (e) { | ||
callback(); | ||
} | ||
} | ||
getIntervallData() { | ||
try { | ||
this.log.debug('call: ' + 'http://' + this.ip + '/R3EMSAPP_REAL.ems?file=ESSRealtimeStatus.json'); | ||
(0, axios_1.default)('http://' + this.ip + '/R3EMSAPP_REAL.ems?file=ESSRealtimeStatus.json').then(async (response) => { | ||
this.log.debug('Get-Data from inverter:'); | ||
this.log.debug(JSON.stringify(response.data)); | ||
/* | ||
"ColecTm":"20210504222840", | ||
"PowerOutletPw":"0", | ||
"GridPw":0.07, | ||
"UnitPrice":0.00, | ||
"ConsPw":0.70, | ||
"BtSoc":73, | ||
"PcsPw":623.00, | ||
"AbsPcsPw":0.62, | ||
"PvPw":0.00, | ||
"GridStusCd":"0", | ||
"BtStusCd":"0", | ||
"BtPw":0.67, | ||
"OperStusCd":"0", | ||
"EmsOpMode":"0", | ||
"RankPer":0, | ||
"ErrorCnt":0 | ||
*/ | ||
await this.setStateAsync('ColecTm', { val: response.data.ESSRealtimeStatus.ColecTm, ack: true }); | ||
@@ -272,38 +123,10 @@ await this.setStateAsync('PowerOutletPw', { val: response.data.ESSRealtimeStatus.PowerOutletPw, ack: true }); | ||
this.setState('info.connection', false, true); | ||
this.log.error(error.message); | ||
} | ||
this.adapterIntervals = setTimeout(this.startIntervall.bind(this), this.polltime * 1000); | ||
} | ||
async onReady() { | ||
// Initialize your adapter here | ||
if (this.config.polltime > 0) { | ||
this.polltime = this.config.polltime; | ||
if (this.config.url != '') { | ||
this.url = this.config.url; | ||
this.log.debug('create AIO Objects'); | ||
this.setAioObject().then(() => { | ||
this.log.debug('start AIO Intervall'); | ||
this.startIntervall(); | ||
}); | ||
if (typeof error === 'string') { | ||
this.log.error(error); | ||
} | ||
else { | ||
console.log('No URL to AIO Portal set'); | ||
else if (error instanceof Error) { | ||
this.log.error(error.message); | ||
} | ||
} | ||
else { | ||
//Polltime zu klein | ||
this.log.error('Polltime to small'); | ||
} | ||
} | ||
onUnload(callback) { | ||
try { | ||
//clearTimeout(adapterIntervals.readAllStates); | ||
this.log.info('Adaptor aio cleaned up everything...'); | ||
this.setState('info.connection', false, true); | ||
callback(); | ||
} | ||
catch (e) { | ||
callback(); | ||
} | ||
} | ||
} | ||
@@ -318,1 +141,2 @@ if (require.main !== module) { | ||
} | ||
//# sourceMappingURL=main.js.map |
{ | ||
"common": { | ||
"name": "aio", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"news": { | ||
"0.0.2": { | ||
"en": "add typescript / react - bug fixes object types", | ||
"de": "Typscript / React hinzugefügt - Fehler bei Objekttypen behoben", | ||
"ru": "добавить машинописный текст / реакцию - исправляет ошибки типов объектов", | ||
"pt": "adicionar typescript / react - bug corrige tipos de objetos", | ||
"nl": "typoscript toevoegen / reageren - bugfixes objecttypen", | ||
"fr": "ajouter dactylographié / réagir - corrections de bugs types d'objets", | ||
"it": "aggiungi dattiloscritto / reagisci - correzioni di bug tipi di oggetti", | ||
"es": "agregar mecanografiado / reaccionar - errores corrige los tipos de objetos", | ||
"pl": "dodaj maszynopis / reaguj - naprawia błędy typów obiektów", | ||
"zh-cn": "添加打字稿/反应 - 错误修复对象类型" | ||
}, | ||
"0.0.1": { | ||
@@ -20,24 +32,24 @@ "en": "initial release", | ||
"titleLang": { | ||
"en": "Hansol Technics AIO", | ||
"de": "Hansol Technics AIO", | ||
"ru": "Hansol Technics AIO", | ||
"pt": "Hansol Technics AIO", | ||
"nl": "Hansol Technics AIO", | ||
"fr": "Hansol Technics AIO", | ||
"it": "Hansol Technics AIO", | ||
"es": "Hansol Technics AIO", | ||
"pl": "Hansol Technics AIO", | ||
"zh-cn": "汉索科技AIO" | ||
"en": "Read values from Hansol Technics AIO system", | ||
"de": "Read values from Hansol Technics AIO system", | ||
"ru": "Read values from Hansol Technics AIO system", | ||
"pt": "Read values from Hansol Technics AIO system", | ||
"nl": "Read values from Hansol Technics AIO system", | ||
"fr": "Read values from Hansol Technics AIO system", | ||
"it": "Read values from Hansol Technics AIO system", | ||
"es": "Read values from Hansol Technics AIO system", | ||
"pl": "Read values from Hansol Technics AIO system", | ||
"zh-cn": "Read values from Hansol Technics AIO system" | ||
}, | ||
"desc": { | ||
"en": "Read values from Hansol Technics AIO system", | ||
"de": "Lesen Sie die Werte aus dem AIO-System von Hansol Technics", | ||
"ru": "Считайте значения из системы Hansol Technics AIO", | ||
"pt": "Leia os valores do sistema AIO da Hansol Technics", | ||
"nl": "Lees waarden van het Hansol Technics AIO-systeem", | ||
"fr": "Lire les valeurs du système AIO Hansol Technics", | ||
"it": "Leggere i valori dal sistema Hansol Technics AIO", | ||
"es": "Leer valores del sistema AIO de Hansol Technics", | ||
"pl": "Odczytaj wartości z systemu Hansol Technics AIO", | ||
"zh-cn": "从Hansol Technics AIO系统读取值" | ||
"en": "aio", | ||
"de": "aio", | ||
"ru": "aio", | ||
"pt": "aio", | ||
"nl": "aio", | ||
"fr": "aio", | ||
"it": "aio", | ||
"es": "aio", | ||
"pl": "aio", | ||
"zh-cn": "aio" | ||
}, | ||
@@ -48,8 +60,11 @@ "authors": [ | ||
"keywords": [ | ||
"ESS Hansol AIO" | ||
"ioBroker", | ||
"ESS", | ||
"AIO", | ||
"Hansol" | ||
], | ||
"license": "MIT", | ||
"platform": "Javascript/Node.js", | ||
"main": "build/main.js", | ||
"icon": "aio.png", | ||
"main": "build/main.js", | ||
"enabled": true, | ||
@@ -62,3 +77,3 @@ "extIcon": "https://raw.githubusercontent.com/Newan/ioBroker.aio/master/admin/aio.png", | ||
"compact": true, | ||
"connectionType": "local", | ||
"connectionType": "cloud", | ||
"dataSource": "poll", | ||
@@ -73,29 +88,230 @@ "materialize": true, | ||
"native": { | ||
"url": "", | ||
"polltime": 30 | ||
"demoData": true, | ||
"polltime": 100, | ||
"ip": "0.0.0.0" | ||
}, | ||
"objects": [], | ||
"main": "build/main.js", | ||
"instanceObjects": [ | ||
{ | ||
"_id": "info", | ||
"type": "channel", | ||
"_id": "info.connection", | ||
"type": "state", | ||
"common": { | ||
"name": "Information" | ||
"role": "indicator.connected", | ||
"name": "If communication with aio works", | ||
"type": "boolean", | ||
"read": true, | ||
"write": false, | ||
"def": false | ||
}, | ||
"native": {} | ||
}, | ||
}, | ||
{ | ||
"_id": "info.connection", | ||
"type": "state", | ||
"common": { | ||
"role": "indicator.connected", | ||
"name": "If communication with aio works", | ||
"type": "boolean", | ||
"read": true, | ||
"write": false, | ||
"def": false | ||
"_id": "status.ColecTm", | ||
"type": "state", | ||
"common": { | ||
"role": "state", | ||
"name": "ColecTm", | ||
"type": "string", | ||
"read": true, | ||
"write": false, | ||
"def": false | ||
}, | ||
"native": {} | ||
}, | ||
"native": {} | ||
}] | ||
{ | ||
"_id": "status.PowerOutletPw", | ||
"type": "state", | ||
"common": { | ||
"role": "state", | ||
"name": "PowerOutletPw", | ||
"type": "string", | ||
"read": true, | ||
"write": false, | ||
"def": false | ||
}, | ||
"native": {} | ||
}, | ||
{ | ||
"_id": "status.GridPw", | ||
"type": "state", | ||
"common": { | ||
"role": "state", | ||
"name": "GridPw", | ||
"type": "number", | ||
"read": true, | ||
"write": false, | ||
"def": false | ||
}, | ||
"native": {} | ||
}, | ||
{ | ||
"_id": "status.UnitPrice", | ||
"type": "state", | ||
"common": { | ||
"role": "state", | ||
"name": "UnitPrice", | ||
"type": "number", | ||
"read": true, | ||
"write": false, | ||
"def": false | ||
}, | ||
"native": {} | ||
}, | ||
{ | ||
"_id": "status.ConsPw", | ||
"type": "state", | ||
"common": { | ||
"role": "state", | ||
"name": "ConsPw", | ||
"type": "number", | ||
"read": true, | ||
"write": false, | ||
"def": false | ||
}, | ||
"native": {} | ||
}, | ||
{ | ||
"_id": "status.BtSoc", | ||
"type": "state", | ||
"common": { | ||
"role": "state", | ||
"name": "BtSoc", | ||
"type": "number", | ||
"read": true, | ||
"write": false, | ||
"def": false | ||
}, | ||
"native": {} | ||
}, | ||
{ | ||
"_id": "status.PcsPw", | ||
"type": "state", | ||
"common": { | ||
"role": "state", | ||
"name": "PcsPw", | ||
"type": "number", | ||
"read": true, | ||
"write": false, | ||
"def": false | ||
}, | ||
"native": {} | ||
}, | ||
{ | ||
"_id": "status.AbsPcsPw", | ||
"type": "state", | ||
"common": { | ||
"role": "state", | ||
"name": "AbsPcsPw", | ||
"type": "number", | ||
"read": true, | ||
"write": false, | ||
"def": false | ||
}, | ||
"native": {} | ||
}, | ||
{ | ||
"_id": "status.PvPw", | ||
"type": "state", | ||
"common": { | ||
"role": "state", | ||
"name": "PvPw", | ||
"type": "number", | ||
"read": true, | ||
"write": false, | ||
"def": false | ||
}, | ||
"native": {} | ||
}, | ||
{ | ||
"_id": "status.GridStusCd", | ||
"type": "state", | ||
"common": { | ||
"role": "state", | ||
"name": "GridStusCd", | ||
"type": "string", | ||
"read": true, | ||
"write": false, | ||
"def": false | ||
}, | ||
"native": {} | ||
}, | ||
{ | ||
"_id": "status.BtStusCd", | ||
"type": "state", | ||
"common": { | ||
"role": "state", | ||
"name": "BtStusCd", | ||
"type": "string", | ||
"read": true, | ||
"write": false, | ||
"def": false | ||
}, | ||
"native": {} | ||
}, | ||
{ | ||
"_id": "status.BtPw", | ||
"type": "state", | ||
"common": { | ||
"role": "state", | ||
"name": "BtPw", | ||
"type": "number", | ||
"read": true, | ||
"write": false, | ||
"def": false | ||
}, | ||
"native": {} | ||
}, | ||
{ | ||
"_id": "status.OperStusCd", | ||
"type": "state", | ||
"common": { | ||
"role": "state", | ||
"name": "OperStusCd", | ||
"type": "string", | ||
"read": true, | ||
"write": false, | ||
"def": false | ||
}, | ||
"native": {} | ||
}, | ||
{ | ||
"_id": "status.EmsOpMode", | ||
"type": "state", | ||
"common": { | ||
"role": "state", | ||
"name": "EmsOpMode", | ||
"type": "string", | ||
"read": true, | ||
"write": false, | ||
"def": false | ||
}, | ||
"native": {} | ||
}, | ||
{ | ||
"_id": "status.RankPer", | ||
"type": "state", | ||
"common": { | ||
"role": "state", | ||
"name": "RankPer", | ||
"type": "number", | ||
"read": true, | ||
"write": false, | ||
"def": false | ||
}, | ||
"native": {} | ||
}, | ||
{ | ||
"_id": "status.ErrorCnt", | ||
"type": "state", | ||
"common": { | ||
"role": "state", | ||
"name": "ErrorCnt", | ||
"type": "number", | ||
"read": true, | ||
"write": false, | ||
"def": false | ||
}, | ||
"native": {} | ||
} | ||
] | ||
} |
{ | ||
"name": "iobroker.aio", | ||
"version": "0.0.1", | ||
"description": "Read values from Hansol Technics AIO system", | ||
"version": "0.0.2", | ||
"description": "aio", | ||
"author": { | ||
@@ -12,3 +12,6 @@ "name": "Newan", | ||
"keywords": [ | ||
"energy PV ESS Hansol AIO" | ||
"ioBroker", | ||
"template", | ||
"Smart Home", | ||
"home automation" | ||
], | ||
@@ -20,34 +23,34 @@ "repository": { | ||
"dependencies": { | ||
"@iobroker/adapter-core": "^2.4.0", | ||
"@sentry/browser": "^6.3.5", | ||
"axios": "^0.21.1" | ||
"@iobroker/adapter-core": "^2.5.1", | ||
"react-icons": "^4.3.1" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.13.16", | ||
"@babel/core": "^7.14.0", | ||
"@babel/plugin-proposal-decorators": "^7.13.15", | ||
"@babel/preset-env": "^7.14.1", | ||
"@babel/preset-typescript": "^7.13.0", | ||
"@iobroker/adapter-react": "^1.6.12", | ||
"@iobroker/testing": "^2.4.4", | ||
"@material-ui/core": "^4.11.4", | ||
"@material-ui/icons": "^4.11.2", | ||
"@types/chai": "^4.2.17", | ||
"@types/chai-as-promised": "^7.1.3", | ||
"@types/gulp": "^4.0.8", | ||
"@types/mocha": "^8.2.2", | ||
"@types/node": "^14.14.43", | ||
"@alcalzone/release-script": "^3.4.1", | ||
"@babel/cli": "^7.16.0", | ||
"@babel/core": "^7.16.0", | ||
"@babel/plugin-proposal-decorators": "^7.16.0", | ||
"@babel/preset-env": "^7.16.0", | ||
"@babel/preset-typescript": "^7.16.0", | ||
"@iobroker/adapter-react": "^2.0.14", | ||
"@iobroker/testing": "^2.5.2", | ||
"@material-ui/core": "^4.12.3", | ||
"@types/chai": "^4.2.22", | ||
"@types/chai-as-promised": "^7.1.4", | ||
"@types/gulp": "^4.0.9", | ||
"@types/mocha": "^9.0.0", | ||
"@types/node": "^14.17.32", | ||
"@types/proxyquire": "^1.3.28", | ||
"@types/react": "^16.14.5", | ||
"@types/react-dom": "^16.9.12", | ||
"@types/sinon": "^10.0.0", | ||
"@types/react": "^16.14.20", | ||
"@types/react-dom": "^16.9.14", | ||
"@types/sinon": "^10.0.6", | ||
"@types/sinon-chai": "^3.2.5", | ||
"@typescript-eslint/eslint-plugin": "^4.22.1", | ||
"@typescript-eslint/parser": "^4.22.1", | ||
"@typescript-eslint/eslint-plugin": "^5.2.0", | ||
"@typescript-eslint/parser": "^5.2.0", | ||
"axios": "^0.24.0", | ||
"chai": "^4.3.4", | ||
"chai-as-promised": "^7.1.1", | ||
"eslint": "^7.25.0", | ||
"eslint-plugin-react": "^7.23.2", | ||
"eslint": "^7.1.0", | ||
"eslint-plugin-react": "^7.26.1", | ||
"gulp": "^4.0.2", | ||
"mocha": "^8.3.2", | ||
"mocha": "^9.1.3", | ||
"parcel-bundler": "^1.12.5", | ||
@@ -57,9 +60,8 @@ "proxyquire": "^2.1.3", | ||
"react-dom": "^16.14.0", | ||
"react-icons": "^4.2.0", | ||
"rimraf": "^3.0.2", | ||
"sinon": "^10.0.0", | ||
"sinon-chai": "^3.6.0", | ||
"source-map-support": "^0.5.19", | ||
"ts-node": "^9.1.1", | ||
"typescript": "^4.2.4" | ||
"sinon": "^11.1.2", | ||
"sinon-chai": "^3.7.0", | ||
"source-map-support": "^0.5.20", | ||
"ts-node": "^10.4.0", | ||
"typescript": "^4.4.4" | ||
}, | ||
@@ -81,3 +83,4 @@ "main": "build/main.js", | ||
"check": "tsc --noEmit", | ||
"lint": "eslint --ext .ts,.tsx src/ admin/src/" | ||
"lint": "eslint --ext .ts,.tsx src/ admin/src/", | ||
"release": "release-script" | ||
}, | ||
@@ -84,0 +87,0 @@ "bugs": { |
@@ -18,4 +18,33 @@ ![Logo](admin/aio.png) | ||
## Help config | ||
Add your ip of your inverter in the config. The Adapter will generate the following URL, using the provided ip (YOUR_IP_HERE) : | ||
http://YOUR_IP_HERE/R3EMSAPP_REAL.ems?file=ESSRealtimeStatus.json | ||
## Test config | ||
Open the URL http://YOUR_IP_HERE/R3EMSAPP_REAL.ems?file=ESSRealtimeStatus.json in your browser. The output should be a JSON string like: | ||
```javascript | ||
{ | ||
"ESSRealtimeStatus":{ | ||
"ColecTm":"00000000000000", | ||
"PowerOutletPw":"0", | ||
"GridPw":0.00, | ||
"UnitPrice":0.00, | ||
"ConsPw":0.00, | ||
"BtSoc":0, | ||
"PcsPw":0.00, | ||
"AbsPcsPw":0.00, | ||
"PvPw":0.00, | ||
"GridStusCd":"0", | ||
"BtStusCd":"0", | ||
"BtPw":0.00, | ||
"OperStusCd":"0", | ||
"EmsOpMode":"0", | ||
"RankPer":0, | ||
"ErrorCnt":0 | ||
} | ||
} | ||
``` | ||
## Changelog | ||
### 0.0.2 | ||
* (Newan) add typescript / react - bug fixes object types | ||
@@ -22,0 +51,0 @@ ### 0.0.1 |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
7794842
2
15
72044
74
+ Addedreact-icons@^4.3.1
+ Addedreact@19.0.0(transitive)
+ Addedreact-icons@4.12.0(transitive)
- Removed@sentry/browser@^6.3.5
- Removedaxios@^0.21.1
- Removed@sentry/browser@6.19.7(transitive)
- Removed@sentry/core@6.19.7(transitive)
- Removed@sentry/hub@6.19.7(transitive)
- Removed@sentry/minimal@6.19.7(transitive)
- Removed@sentry/types@6.19.7(transitive)
- Removed@sentry/utils@6.19.7(transitive)
- Removedaxios@0.21.4(transitive)
- Removedfollow-redirects@1.15.9(transitive)
- Removedtslib@1.14.1(transitive)