Hallo,
hier meine Vorlage für Go.e Charger V2.
go.e-modbus.json (27,6 KB)
Profile hatte ich per Skript angelegt (wird nicht gebraucht, sind in der Vorlage):
<?php
if (!IPS_VariableProfileExists('GOe_Status')) {
IPS_CreateVariableProfile('GOe_Status', 1);
IPS_SetVariableProfileIcon('GOe_Status', 'Ok');
IPS_SetVariableProfileAssociation("GOe_Status", 1, "Ladestation bereit, kein Fahrzeug", "", 0xFFFFFF);
IPS_SetVariableProfileAssociation("GOe_Status", 2, "Fahrzeug lädt", "", 0xFFFFFF);
IPS_SetVariableProfileAssociation("GOe_Status", 3, "Warten auf Fahrzeug", "", 0xFFFFFF);
IPS_SetVariableProfileAssociation("GOe_Status", 4, "Ladung beendet, Fahrzeug noch verbunden", "", 0xFFFFFF);
}
if (!IPS_VariableProfileExists('GOe_Error')) {
IPS_CreateVariableProfile('GOe_Error', 1);
IPS_SetVariableProfileIcon('GOe_Error', 'Ok');
IPS_SetVariableProfileAssociation("GOe_Error", 0, "Kein Fehler", "", 0x00FF00);
IPS_SetVariableProfileAssociation("GOe_Error", 1, "FI Schutzschalter", "", 0xFF0000);
IPS_SetVariableProfileAssociation("GOe_Error", 3, "Fehler an Phase", "", 0xFF0000);
IPS_SetVariableProfileAssociation("GOe_Error", 8, "Keine Erdung", "", 0xFF0000);
IPS_SetVariableProfileAssociation("GOe_Error", 10, "Interner Fehler", "", 0xFF0000);
}
if (!IPS_VariableProfileExists('GOe_Access')) {
IPS_CreateVariableProfile('GOe_Access', 1);
IPS_SetVariableProfileAssociation("GOe_Access", 0, "frei zugänglich", "", 0x00FF00);
IPS_SetVariableProfileAssociation("GOe_Access", 1, "RFID Identifizierung", "", 0xFF0000);
IPS_SetVariableProfileAssociation("GOe_Access", 2, "Strompreis / automatisch", "", 0xFF0000);
}
if (!IPS_VariableProfileExists('GOe_Amp')) {
IPS_CreateVariableProfile('GOe_Amp', 1);
IPS_SetVariableProfileDigits('GOe_Amp', 0);
IPS_SetVariableProfileIcon('GOe_Amp', 'Electricity');
IPS_SetVariableProfileText('GOe_Amp', "", " A");
IPS_SetVariableProfileValues('GOe_Amp', 6, 32, 1);
}
if (!IPS_VariableProfileExists('GOe_Amp.f')) {
IPS_CreateVariableProfile('GOe_Amp.f', 2);
IPS_SetVariableProfileDigits('GOe_Amp.f', 1);
IPS_SetVariableProfileIcon('GOe_Amp.f', 'Electricity');
IPS_SetVariableProfileText('GOe_Amp.f', "", " A");
}
if (!IPS_VariableProfileExists('GOe_AmpCable')) {
IPS_CreateVariableProfile('GOe_AmpCable', 1);
IPS_SetVariableProfileDigits('GOe_AmpCable', 0);
IPS_SetVariableProfileIcon('GOe_AmpCable', 'Electricity');
IPS_SetVariableProfileAssociation("GOe_AmpCable", 0, "Kein Kabel", "", 0xFF0000);
for ($i = 1; $i <= 25; $i++) {
IPS_SetVariableProfileAssociation("GOe_AmpCable", $i, number_format($i, 0) . " A", "", 0xFFFFFF);
}
IPS_SetVariableProfileAssociation("GOe_AmpCable", 30, "30 A", "", 0xFFFFFF);
IPS_SetVariableProfileAssociation("GOe_AmpCable", 32, "32 A", "", 0xFFFFFF);
}
if (!IPS_VariableProfileExists('GOe_Adapter')) {
IPS_CreateVariableProfile('GOe_Adapter', 1);
IPS_SetVariableProfileIcon('GOe_Adapter', 'Ok');
IPS_SetVariableProfileAssociation("GOe_Adapter", 0, "kein Adapter", "", 0xFFFFFF);
IPS_SetVariableProfileAssociation("GOe_Adapter", 1, "16A Adapter", "", 0xFFFFFF);
}
if (!IPS_VariableProfileExists('GOe_Volt')) {
IPS_CreateVariableProfile('GOe_Volt', 1);
IPS_SetVariableProfileDigits('GOe_Volt', 0);
IPS_SetVariableProfileIcon('GOe_Volt', 'Electricity');
IPS_SetVariableProfileText('GOe_Volt', "", " V");
}
if (!IPS_VariableProfileExists('GOe_Energy')) {
IPS_CreateVariableProfile('GOe_Energy', 2);
IPS_SetVariableProfileDigits('GOe_Energy', 1);
IPS_SetVariableProfileIcon('GOe_Energy', 'Electricity');
}
IPS_SetVariableProfileText('GOe_Energy', "", " kWh");
if (!IPS_VariableProfileExists('GOe_Power')) {
IPS_CreateVariableProfile('GOe_Power', 2);
IPS_SetVariableProfileDigits('GOe_Power', 1);
IPS_SetVariableProfileIcon('GOe_Power', 'Electricity');
}
IPS_SetVariableProfileText('GOe_Power', "", " kW");
if (!IPS_VariableProfileExists('GOe_CableUnlockMode')) {
IPS_CreateVariableProfile('GOe_CableUnlockMode', 1);
IPS_SetVariableProfileIcon('GOe_CableUnlockMode', 'Plug');
IPS_SetVariableProfileAssociation("GOe_CableUnlockMode", 0, "verriegelt, wenn Auto angeschlossen", "", 0x00FF00);
IPS_SetVariableProfileAssociation("GOe_CableUnlockMode", 1, "am Ladeende entriegeln", "", 0xFFCC00);
IPS_SetVariableProfileAssociation("GOe_CableUnlockMode", 2, "immer verriegelt", "", 0xFF0000);
}
if (!IPS_VariableProfileExists('GOe_singlePhaseCharging')) {
IPS_CreateVariableProfile('GOe_singlePhaseCharging', 0);
IPS_SetVariableProfileAssociation("GOe_singlePhaseCharging", 0, "3phasig", "", 0x00FF00);
IPS_SetVariableProfileAssociation("GOe_singlePhaseCharging", 1, "1phasig", "", 0xFFCC00);
}
if (!IPS_VariableProfileExists('GOe_Phase')) {
IPS_CreateVariableProfile('GOe_Phase', 1);
IPS_SetVariableProfileAssociation("GOe_Phase", 8, "L1", "", 0xFFFFFF);
IPS_SetVariableProfileAssociation("GOe_Phase", 16, "L1+L2", "", 0xFFFFFF);
IPS_SetVariableProfileAssociation("GOe_Phase", 56, "L1+L2+L3", "", 0xFFFFFF);
IPS_SetVariableProfileAssociation("GOe_Phase", 63, "L1+L2+L3 - L1+L2+L3", "", 0xFFFFFF);
}
if (!IPS_VariableProfileExists('GOe_kwh')) {
IPS_CreateVariableProfile('GOe_kwh', 1);
IPS_SetVariableProfileDigits('GOe_kwh', 0);
IPS_SetVariableProfileIcon('GOe_kwh', 'Electricity');
IPS_SetVariableProfileText('GOe_kwh', "", " kWh");
}
ps Vorlage ausgetauscht, Volt_N Fehler behoben.