mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev
This commit is contained in:
14370
interface/package-lock.json
generated
14370
interface/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -8,7 +8,7 @@
|
||||
"@emotion/styled": "^11.10.5",
|
||||
"@msgpack/msgpack": "^2.8.0",
|
||||
"@mui/icons-material": "^5.11.0",
|
||||
"@mui/material": "^5.11.2",
|
||||
"@mui/material": "^5.11.3",
|
||||
"@table-library/react-table-library": "4.0.23",
|
||||
"@types/lodash": "^4.14.191",
|
||||
"@types/node": "^18.11.18",
|
||||
@@ -29,7 +29,7 @@
|
||||
"react-router-dom": "^6.6.1",
|
||||
"react-scripts": "5.0.1",
|
||||
"sockette": "^2.0.6",
|
||||
"typesafe-i18n": "^5.18.0",
|
||||
"typesafe-i18n": "^5.18.1",
|
||||
"typescript": "^4.9.4"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@@ -70,7 +70,7 @@ const de: Translation = {
|
||||
TEMP_SENSOR: 'Temperatursensor',
|
||||
TEMP_SENSORS: 'Temperatursensoren',
|
||||
WRITE_CMD_SENT: 'Befehl schreiben wurde gesendet',
|
||||
WRITE_CMD_FAILED: 'Befehl schreiben failed', // TODO
|
||||
WRITE_CMD_FAILED: 'Befehl schreiben failed', // TODO translate
|
||||
EMS_BUS_WARNING: 'EMS-Bus getrennt. Wenn diese Warnung nach einigen Sekunden immer noch besteht, überprüfen Sie bitte die Einstellungen und das Board-Profil',
|
||||
EMS_BUS_SCANNING: 'Suche nach EMS Geräten...',
|
||||
CONNECTED: 'Verbunden',
|
||||
|
||||
@@ -69,8 +69,8 @@ const fr: Translation = {
|
||||
SENSOR: 'Capteur',
|
||||
TEMP_SENSOR: 'Capteur de température',
|
||||
TEMP_SENSORS: 'Capteurs de température',
|
||||
WRITE_CMD_SENT: 'Envoyer la commande sent', // TODO
|
||||
WRITE_CMD_FAILED: 'Envoyer la commande failed', // TODO
|
||||
WRITE_CMD_SENT: 'Envoyer la commande sent', // TODO translate
|
||||
WRITE_CMD_FAILED: 'Envoyer la commande failed', // TODO translate
|
||||
EMS_BUS_WARNING: 'Bus EMS déconnecté. Si ce message persiste après quelques secondes, vérifiez les paramètres et la configuration de la carte.',
|
||||
EMS_BUS_SCANNING: 'Scan des appareils EMS...',
|
||||
CONNECTED: 'Connecté',
|
||||
@@ -249,10 +249,10 @@ const fr: Translation = {
|
||||
MQTT_INT_HEARTBEAT: 'Battements',
|
||||
MQTT_QUEUE: 'Queue MQTT',
|
||||
DEFAULT: 'Défaut',
|
||||
MQTT_ENTITY_FORMAT: 'Entity ID format', // TODO
|
||||
MQTT_ENTITY_FORMAT_0: 'Single instance, long name (v3.4)',// TODO
|
||||
MQTT_ENTITY_FORMAT_1: 'Single instance, short name', // TODO
|
||||
MQTT_ENTITY_FORMAT_2: 'Multiple instances, short name', // TODO
|
||||
MQTT_ENTITY_FORMAT: 'Entity ID format', // TODO translate
|
||||
MQTT_ENTITY_FORMAT_0: 'Single instance, long name (v3.4)',// TODO translate
|
||||
MQTT_ENTITY_FORMAT_1: 'Single instance, short name', // TODO translate
|
||||
MQTT_ENTITY_FORMAT_2: 'Multiple instances, short name', // TODO translate
|
||||
MQTT_CLEAN_SESSION: 'Flag Clean Session',
|
||||
MQTT_RETAIN_FLAG: 'Toujours activer le Retain Flag',
|
||||
INACTIVE: 'Inactif',
|
||||
|
||||
@@ -69,8 +69,8 @@ const nl: Translation = {
|
||||
SENSOR: 'Sensor',
|
||||
TEMP_SENSOR: 'Temperatuur sensor',
|
||||
TEMP_SENSORS: 'Temperatuur Sensoren',
|
||||
WRITE_CMD_SENT: 'Schrijf commando sent', // TODO
|
||||
WRITE_CMD_FAILED: 'Schrijf commando failed', // TODO
|
||||
WRITE_CMD_SENT: 'Schrijf commando sent', // TODO translate
|
||||
WRITE_CMD_FAILED: 'Schrijf commando failed', // TODO translate
|
||||
EMS_BUS_WARNING: 'EMS bus niet gevonden. Als deze waarschuwing blijft staan na een paar seconden dan loop de instellingen na en in het bijzonder het apparaat type profiel na.',
|
||||
EMS_BUS_SCANNING: 'Scannen naar EMS apparaten...',
|
||||
CONNECTED: 'Verbonden',
|
||||
@@ -249,10 +249,10 @@ const nl: Translation = {
|
||||
MQTT_INT_HEARTBEAT: 'Heartbeat',
|
||||
MQTT_QUEUE: 'MQTT Queue',
|
||||
DEFAULT: 'Default',
|
||||
MQTT_ENTITY_FORMAT: 'Entity ID format', // TODO
|
||||
MQTT_ENTITY_FORMAT_0: 'Single instance, long name (v3.4)', // TODO
|
||||
MQTT_ENTITY_FORMAT_1: 'Single instance, short name', // TODO
|
||||
MQTT_ENTITY_FORMAT_2: 'Multiple instances, short name', // TODO
|
||||
MQTT_ENTITY_FORMAT: 'Entity ID format', // TODO translate
|
||||
MQTT_ENTITY_FORMAT_0: 'Single instance, long name (v3.4)', // TODO translate
|
||||
MQTT_ENTITY_FORMAT_1: 'Single instance, short name', // TODO translate
|
||||
MQTT_ENTITY_FORMAT_2: 'Multiple instances, short name', // TODO translate
|
||||
MQTT_CLEAN_SESSION: 'Clean Session aan',
|
||||
MQTT_RETAIN_FLAG: 'Retain flag aan',
|
||||
INACTIVE: 'Inactief',
|
||||
|
||||
@@ -69,8 +69,8 @@ const no: Translation = {
|
||||
SENSOR: 'Sensor',
|
||||
TEMP_SENSOR: 'Temperatursensor',
|
||||
TEMP_SENSORS: 'Temperaturesensorer',
|
||||
WRITE_CMD_SENT: 'Skriv kommando sent', // TODO
|
||||
WRITE_CMD_FAILED: 'Skriv kommando failed', // TODO
|
||||
WRITE_CMD_SENT: 'Skriv kommando sent', // TODO translate
|
||||
WRITE_CMD_FAILED: 'Skriv kommando failed', // TODO translate
|
||||
EMS_BUS_WARNING: 'EMS bussen koblet ned. Hvis denne advarselen fortsetter etter noen f¨sekunder sjekk instillinger og prosessorkort',
|
||||
EMS_BUS_SCANNING: 'Søker etter EMS enheter...',
|
||||
CONNECTED: 'Tilkoblet',
|
||||
@@ -249,10 +249,10 @@ const no: Translation = {
|
||||
MQTT_INT_HEARTBEAT: 'Heartbeat',
|
||||
MQTT_QUEUE: 'MQTT Queue',
|
||||
DEFAULT: 'Standard',
|
||||
MQTT_ENTITY_FORMAT: 'Entity ID format', // TODO
|
||||
MQTT_ENTITY_FORMAT_0: 'Single instance, long name (v3.4)', // TODO
|
||||
MQTT_ENTITY_FORMAT_1: 'Single instance, short name', // TODO
|
||||
MQTT_ENTITY_FORMAT_2: 'Multiple instances, short name', // TODO
|
||||
MQTT_ENTITY_FORMAT: 'Entity ID format', // TODO translate
|
||||
MQTT_ENTITY_FORMAT_0: 'Single instance, long name (v3.4)', // TODO translate
|
||||
MQTT_ENTITY_FORMAT_1: 'Single instance, short name', // TODO translate
|
||||
MQTT_ENTITY_FORMAT_2: 'Multiple instances, short name', // TODO translate
|
||||
MQTT_CLEAN_SESSION: 'Benytt Clean Session',
|
||||
MQTT_RETAIN_FLAG: 'Alltid sett Retain flag',
|
||||
INACTIVE: 'Innaktiv',
|
||||
|
||||
@@ -142,7 +142,7 @@ const DashboardData: FC = () => {
|
||||
common_theme,
|
||||
{
|
||||
Table: `
|
||||
--data-table-library_grid-template-columns: 40px 100px repeat(1, minmax(0, 1fr)) 100px 40px;
|
||||
--data-table-library_grid-template-columns: 40px 160px repeat(1, minmax(0, 1fr)) 100px 40px;
|
||||
`,
|
||||
BaseRow: `
|
||||
.td {
|
||||
@@ -704,9 +704,9 @@ const DashboardData: FC = () => {
|
||||
{tableList.map((device: Device, index: number) => (
|
||||
<Row key={device.id} item={device}>
|
||||
<Cell stiff>
|
||||
<DeviceIcon type={device.t} />
|
||||
<DeviceIcon type_id={device.t} />
|
||||
</Cell>
|
||||
<Cell stiff>{device.t}</Cell>
|
||||
<Cell stiff>{device.tn}</Cell>
|
||||
<Cell>{device.n}</Cell>
|
||||
<Cell stiff>{device.e}</Cell>
|
||||
<Cell stiff>
|
||||
@@ -719,7 +719,7 @@ const DashboardData: FC = () => {
|
||||
{(coreData.active_sensors > 0 || coreData.analog_enabled) && (
|
||||
<Row key="sensor" item={{ id: 'sensor' }}>
|
||||
<Cell>
|
||||
<DeviceIcon type="Sensor" />
|
||||
<DeviceIcon type_id={1} />
|
||||
</Cell>
|
||||
<Cell>Sensors</Cell>
|
||||
<Cell>{LL.ATTACHED_SENSORS()}</Cell>
|
||||
|
||||
@@ -13,33 +13,56 @@ import { AiOutlineAlert } from 'react-icons/ai';
|
||||
import { AiOutlineChrome } from 'react-icons/ai';
|
||||
|
||||
interface DeviceIconProps {
|
||||
type: string;
|
||||
type_id: number;
|
||||
}
|
||||
|
||||
const DeviceIcon: FC<DeviceIconProps> = ({ type }) => {
|
||||
switch (type) {
|
||||
case 'Boiler':
|
||||
case 'Heatsource':
|
||||
return <CgSmartHomeBoiler />;
|
||||
case 'Sensor':
|
||||
// matches emsdevice.h DeviceType
|
||||
const enum DeviceType {
|
||||
SYSTEM = 0,
|
||||
DALLASSENSOR,
|
||||
ANALOGSENSOR,
|
||||
BOILER,
|
||||
THERMOSTAT,
|
||||
MIXER,
|
||||
SOLAR,
|
||||
HEATPUMP,
|
||||
GATEWAY,
|
||||
SWITCH,
|
||||
CONTROLLER,
|
||||
CONNECT,
|
||||
ALERT,
|
||||
PUMP,
|
||||
GENERIC,
|
||||
HEATSOURCE,
|
||||
UNKNOWN
|
||||
}
|
||||
|
||||
const DeviceIcon: FC<DeviceIconProps> = ({ type_id }) => {
|
||||
switch (type_id) {
|
||||
case DeviceType.DALLASSENSOR:
|
||||
case DeviceType.ANALOGSENSOR:
|
||||
return <MdOutlineSensors />;
|
||||
case 'Solar':
|
||||
return <FaSolarPanel />;
|
||||
case 'Thermostat':
|
||||
case DeviceType.BOILER:
|
||||
case DeviceType.HEATSOURCE:
|
||||
return <CgSmartHomeBoiler />;
|
||||
case DeviceType.THERMOSTAT:
|
||||
return <MdThermostatAuto />;
|
||||
case 'Mixer':
|
||||
case DeviceType.MIXER:
|
||||
return <AiOutlineControl />;
|
||||
case 'Heatpump':
|
||||
case DeviceType.SOLAR:
|
||||
return <FaSolarPanel />;
|
||||
case DeviceType.HEATPUMP:
|
||||
return <GiHeatHaze />;
|
||||
case 'Switch':
|
||||
return <TiFlowSwitch />;
|
||||
case 'Connect':
|
||||
return <VscVmConnect />;
|
||||
case 'Gateway':
|
||||
case DeviceType.GATEWAY:
|
||||
return <AiOutlineGateway />;
|
||||
case 'Alert':
|
||||
case DeviceType.SWITCH:
|
||||
return <TiFlowSwitch />;
|
||||
case DeviceType.CONTROLLER:
|
||||
case DeviceType.CONNECT:
|
||||
return <VscVmConnect />;
|
||||
case DeviceType.ALERT:
|
||||
return <AiOutlineAlert />;
|
||||
case 'Pump':
|
||||
case DeviceType.PUMP:
|
||||
return <AiOutlineChrome />;
|
||||
default:
|
||||
return null;
|
||||
|
||||
@@ -180,7 +180,7 @@ const SettingsCustomization: FC = () => {
|
||||
return (
|
||||
<>
|
||||
{de.n && (de.n[0] === '!' ? LL.COMMAND() + ': ' + de.n.slice(1) : de.cn && de.cn !== '' ? de.cn : de.n) + ' '}(
|
||||
<Link target="_blank" href={APIURL + devices?.devices[selectedDevice].t + '/' + de.id}>
|
||||
<Link target="_blank" href={APIURL + devices?.devices[selectedDevice].tn + '/' + de.id}>
|
||||
{de.id}
|
||||
</Link>
|
||||
)
|
||||
|
||||
@@ -59,7 +59,8 @@ export interface Status {
|
||||
}
|
||||
export interface Device {
|
||||
id: string; // id index
|
||||
t: string; // type
|
||||
tn: string; // device type translated name
|
||||
t: number; // device type id
|
||||
b: string; // brand
|
||||
n: string; // name
|
||||
d: number; // deviceid
|
||||
@@ -110,7 +111,8 @@ export interface DeviceShort {
|
||||
d?: number; // deviceid
|
||||
p?: number; // productid
|
||||
s: string; // shortname
|
||||
t?: string; // device type name
|
||||
t?: number; // device type id
|
||||
tn?: string; // device type internal name
|
||||
}
|
||||
|
||||
export interface Devices {
|
||||
|
||||
Reference in New Issue
Block a user