Merge PR #344: Shelly: Add support for the Shelly 3EM
commit
2757b389cb
|
|
@ -10,6 +10,7 @@ The currently supported devices are:
|
|||
* Shelly RGBW2
|
||||
* Shelly Dimmer / Dimmer 2
|
||||
* Shelly Button 1
|
||||
* Shelly 3EM
|
||||
|
||||
## Requirements
|
||||
Shelly devices communicate with via MQTT. This means, in order to add Shelly devices to nymea, the nymea instance is required
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ IntegrationPluginShelly::IntegrationPluginShelly()
|
|||
m_idParamTypeMap[shellyDimmerThingClassId] = shellyDimmerThingIdParamTypeId;
|
||||
m_idParamTypeMap[shelly25ThingClassId] = shelly25ThingIdParamTypeId;
|
||||
m_idParamTypeMap[shellyButton1ThingClassId] = shellyButton1ThingIdParamTypeId;
|
||||
m_idParamTypeMap[shellyEm3ThingClassId] = shellyEm3ThingIdParamTypeId;
|
||||
|
||||
m_usernameParamTypeMap[shelly1ThingClassId] = shelly1ThingUsernameParamTypeId;
|
||||
m_usernameParamTypeMap[shelly1pmThingClassId] = shelly1pmThingUsernameParamTypeId;
|
||||
|
|
@ -73,6 +74,7 @@ IntegrationPluginShelly::IntegrationPluginShelly()
|
|||
m_usernameParamTypeMap[shellyDimmerThingClassId] = shellyDimmerThingUsernameParamTypeId;
|
||||
m_usernameParamTypeMap[shelly25ThingClassId] = shelly25ThingUsernameParamTypeId;
|
||||
m_usernameParamTypeMap[shellyButton1ThingClassId] = shellyButton1ThingUsernameParamTypeId;
|
||||
m_usernameParamTypeMap[shellyEm3ThingClassId] = shellyEm3ThingUsernameParamTypeId;
|
||||
|
||||
m_passwordParamTypeMap[shelly1ThingClassId] = shelly1ThingPasswordParamTypeId;
|
||||
m_passwordParamTypeMap[shelly1pmThingClassId] = shelly1pmThingPasswordParamTypeId;
|
||||
|
|
@ -81,6 +83,7 @@ IntegrationPluginShelly::IntegrationPluginShelly()
|
|||
m_passwordParamTypeMap[shellyDimmerThingClassId] = shellyDimmerThingPasswordParamTypeId;
|
||||
m_passwordParamTypeMap[shelly25ThingClassId] = shelly25ThingPasswordParamTypeId;
|
||||
m_passwordParamTypeMap[shellyButton1ThingClassId] = shellyButton1ThingPasswordParamTypeId;
|
||||
m_passwordParamTypeMap[shellyEm3ThingClassId] = shellyEm3ThingPasswordParamTypeId;
|
||||
|
||||
m_connectedDeviceParamTypeMap[shelly1ThingClassId] = shelly1ThingConnectedDeviceParamTypeId;
|
||||
m_connectedDeviceParamTypeMap[shelly1pmThingClassId] = shelly1pmThingConnectedDeviceParamTypeId;
|
||||
|
|
@ -104,6 +107,7 @@ IntegrationPluginShelly::IntegrationPluginShelly()
|
|||
m_connectedStateTypesMap[shellyRgbw2ThingClassId] = shellyRgbw2ConnectedStateTypeId;
|
||||
m_connectedStateTypesMap[shellyDimmerThingClassId] = shellyDimmerConnectedStateTypeId;
|
||||
m_connectedStateTypesMap[shellyButton1ThingClassId] = shellyButton1ConnectedStateTypeId;
|
||||
m_connectedStateTypesMap[shellyEm3ThingClassId] = shellyEm3ConnectedStateTypeId;
|
||||
m_connectedStateTypesMap[shellySwitchThingClassId] = shellySwitchConnectedStateTypeId;
|
||||
m_connectedStateTypesMap[shellyGenericThingClassId] = shellyGenericConnectedStateTypeId;
|
||||
m_connectedStateTypesMap[shellyLightThingClassId] = shellyLightConnectedStateTypeId;
|
||||
|
|
@ -120,6 +124,7 @@ IntegrationPluginShelly::IntegrationPluginShelly()
|
|||
m_signalStrengthStateTypesMap[shellyRgbw2ThingClassId] = shellyRgbw2SignalStrengthStateTypeId;
|
||||
m_signalStrengthStateTypesMap[shellyDimmerThingClassId] = shellyDimmerSignalStrengthStateTypeId;
|
||||
m_signalStrengthStateTypesMap[shellyButton1ThingClassId] = shellyButton1SignalStrengthStateTypeId;
|
||||
m_signalStrengthStateTypesMap[shellyEm3ThingClassId] = shellyEm3SignalStrengthStateTypeId;
|
||||
m_signalStrengthStateTypesMap[shellySwitchThingClassId] = shellySwitchSignalStrengthStateTypeId;
|
||||
m_signalStrengthStateTypesMap[shellyGenericThingClassId] = shellyGenericSignalStrengthStateTypeId;
|
||||
m_signalStrengthStateTypesMap[shellyLightThingClassId] = shellyLightSignalStrengthStateTypeId;
|
||||
|
|
@ -138,6 +143,7 @@ IntegrationPluginShelly::IntegrationPluginShelly()
|
|||
m_powerStateTypeMap[shellyGenericPMThingClassId] = shellyGenericPMPowerStateTypeId;
|
||||
m_powerStateTypeMap[shellyLightPMThingClassId] = shellyLightPMPowerStateTypeId;
|
||||
m_powerStateTypeMap[shellySocketPMThingClassId] = shellySocketPMPowerStateTypeId;
|
||||
m_powerStateTypeMap[shellyEm3ThingClassId] = shellyEm3PowerStateTypeId;
|
||||
|
||||
m_currentPowerStateTypeMap[shellyPlugThingClassId] = shellyPlugCurrentPowerStateTypeId;
|
||||
m_currentPowerStateTypeMap[shellyRgbw2ThingClassId] = shellyRgbw2CurrentPowerStateTypeId;
|
||||
|
|
@ -146,12 +152,14 @@ IntegrationPluginShelly::IntegrationPluginShelly()
|
|||
m_currentPowerStateTypeMap[shellyLightPMThingClassId] = shellyLightPMCurrentPowerStateTypeId;
|
||||
m_currentPowerStateTypeMap[shellySocketPMThingClassId] = shellySocketPMCurrentPowerStateTypeId;
|
||||
m_currentPowerStateTypeMap[shellyRollerThingClassId] = shellyRollerCurrentPowerStateTypeId;
|
||||
m_currentPowerStateTypeMap[shellyEm3ThingClassId] = shellyEm3CurrentPowerStateTypeId;
|
||||
|
||||
m_totalEnergyConsumedStateTypeMap[shellyPlugThingClassId] = shellyPlugTotalEnergyConsumedStateTypeId;
|
||||
m_totalEnergyConsumedStateTypeMap[shellyGenericPMThingClassId] = shellyGenericPMTotalEnergyConsumedStateTypeId;
|
||||
m_totalEnergyConsumedStateTypeMap[shellyLightPMThingClassId] = shellyLightPMTotalEnergyConsumedStateTypeId;
|
||||
m_totalEnergyConsumedStateTypeMap[shellySocketPMThingClassId] = shellySocketPMTotalEnergyConsumedStateTypeId;
|
||||
m_totalEnergyConsumedStateTypeMap[shellyRollerThingClassId] = shellyRollerTotalEnergyConsumedStateTypeId;
|
||||
m_totalEnergyConsumedStateTypeMap[shellyEm3ThingClassId] = shellyEm3TotalEnergyConsumedStateTypeId;
|
||||
|
||||
m_colorStateTypeMap[shellyRgbw2ThingClassId] = shellyRgbw2ColorStateTypeId;
|
||||
m_colorTemperatureStateTypeMap[shellyRgbw2ThingClassId] = shellyRgbw2ColorTemperatureStateTypeId;
|
||||
|
|
@ -166,6 +174,7 @@ IntegrationPluginShelly::IntegrationPluginShelly()
|
|||
m_updateStatusStateTypesMap[shellyRgbw2ThingClassId] = shellyRgbw2UpdateStatusStateTypeId;
|
||||
m_updateStatusStateTypesMap[shellyDimmerThingClassId] = shellyDimmerUpdateStatusStateTypeId;
|
||||
m_updateStatusStateTypesMap[shellyButton1ThingClassId] = shellyButton1UpdateStatusStateTypeId;
|
||||
m_updateStatusStateTypesMap[shellyEm3ThingClassId] = shellyEm3UpdateStatusStateTypeId;
|
||||
|
||||
m_currentVersionStateTypesMap[shelly1ThingClassId] = shelly1CurrentVersionStateTypeId;
|
||||
m_currentVersionStateTypesMap[shelly1pmThingClassId] = shelly1pmCurrentVersionStateTypeId;
|
||||
|
|
@ -174,6 +183,7 @@ IntegrationPluginShelly::IntegrationPluginShelly()
|
|||
m_currentVersionStateTypesMap[shellyRgbw2ThingClassId] = shellyRgbw2CurrentVersionStateTypeId;
|
||||
m_currentVersionStateTypesMap[shellyDimmerThingClassId] = shellyDimmerCurrentVersionStateTypeId;
|
||||
m_currentVersionStateTypesMap[shellyButton1ThingClassId] = shellyButton1CurrentVersionStateTypeId;
|
||||
m_currentVersionStateTypesMap[shellyEm3ThingClassId] = shellyEm3CurrentVersionStateTypeId;
|
||||
|
||||
m_availableVersionStateTypesMap[shelly1ThingClassId] = shelly1AvailableVersionStateTypeId;
|
||||
m_availableVersionStateTypesMap[shelly1pmThingClassId] = shelly1pmAvailableVersionStateTypeId;
|
||||
|
|
@ -182,6 +192,7 @@ IntegrationPluginShelly::IntegrationPluginShelly()
|
|||
m_availableVersionStateTypesMap[shellyRgbw2ThingClassId] = shellyRgbw2AvailableVersionStateTypeId;
|
||||
m_availableVersionStateTypesMap[shellyDimmerThingClassId] = shellyDimmerAvailableVersionStateTypeId;
|
||||
m_availableVersionStateTypesMap[shellyButton1ThingClassId] = shellyButton1AvailableVersionStateTypeId;
|
||||
m_availableVersionStateTypesMap[shellyEm3ThingClassId] = shellyEm3AvailableVersionStateTypeId;
|
||||
|
||||
m_batteryLevelStateTypeMap[shellyButton1ThingClassId] = shellyButton1BatteryLevelStateTypeId;
|
||||
|
||||
|
|
@ -202,6 +213,7 @@ IntegrationPluginShelly::IntegrationPluginShelly()
|
|||
m_powerActionTypesMap[shellyGenericPMPowerActionTypeId] = shellyGenericPMThingClassId;
|
||||
m_powerActionTypesMap[shellyLightPMPowerActionTypeId] = shellyLightPMThingClassId;
|
||||
m_powerActionTypesMap[shellySocketPMPowerActionTypeId] = shellySocketPMThingClassId;
|
||||
m_powerActionTypesMap[shellyEm3PowerActionTypeId] = shellyEm3ThingClassId;
|
||||
|
||||
m_powerActionParamTypesMap[shellyPlugPowerActionTypeId] = shellyPlugPowerActionPowerParamTypeId;
|
||||
m_powerActionParamTypesMap[shellyGenericPowerActionTypeId] = shellyGenericPowerActionPowerParamTypeId;
|
||||
|
|
@ -210,6 +222,7 @@ IntegrationPluginShelly::IntegrationPluginShelly()
|
|||
m_powerActionParamTypesMap[shellyGenericPMPowerActionTypeId] = shellyGenericPMPowerActionPowerParamTypeId;
|
||||
m_powerActionParamTypesMap[shellyLightPMPowerActionTypeId] = shellyLightPMPowerActionPowerParamTypeId;
|
||||
m_powerActionParamTypesMap[shellySocketPMPowerActionTypeId] = shellySocketPMPowerActionPowerParamTypeId;
|
||||
m_powerActionParamTypesMap[shellyEm3PowerActionTypeId] = shellyEm3PowerActionPowerParamTypeId;
|
||||
|
||||
m_colorPowerActionTypesMap[shellyRgbw2PowerActionTypeId] = shellyRgbw2ThingClassId;
|
||||
m_colorPowerActionParamTypesMap[shellyRgbw2PowerActionPowerParamTypeId] = shellyRgbw2PowerActionTypeId;
|
||||
|
|
@ -240,6 +253,7 @@ IntegrationPluginShelly::IntegrationPluginShelly()
|
|||
m_updateActionTypesMap[shellyRgbw2PerformUpdateActionTypeId] = shellyRgbw2ThingClassId;
|
||||
m_updateActionTypesMap[shellyDimmerPerformUpdateActionTypeId] = shellyDimmerThingClassId;
|
||||
m_updateActionTypesMap[shellyButton1PerformUpdateActionTypeId] = shellyButton1ThingClassId;
|
||||
m_updateActionTypesMap[shellyEm3PerformUpdateActionTypeId] = shellyEm3ThingClassId;
|
||||
}
|
||||
|
||||
IntegrationPluginShelly::~IntegrationPluginShelly()
|
||||
|
|
@ -270,6 +284,8 @@ void IntegrationPluginShelly::discoverThings(ThingDiscoveryInfo *info)
|
|||
namePattern = QRegExp("^shellyswitch25-[0-9A-Z]+$");
|
||||
} else if (info->thingClassId() == shellyButton1ThingClassId) {
|
||||
namePattern = QRegExp("^shellybutton1-[0-9-A-Z]+$");
|
||||
} else if (info->thingClassId() == shellyEm3ThingClassId) {
|
||||
namePattern = QRegExp("^shellyem3-[0-9A-Z]+$");
|
||||
}
|
||||
if (!entry.name().contains(namePattern)) {
|
||||
continue;
|
||||
|
|
@ -306,13 +322,7 @@ void IntegrationPluginShelly::setupThing(ThingSetupInfo *info)
|
|||
{
|
||||
Thing *thing = info->thing();
|
||||
|
||||
if (thing->thingClassId() == shelly1ThingClassId
|
||||
|| thing->thingClassId() == shelly1pmThingClassId
|
||||
|| thing->thingClassId() == shellyPlugThingClassId
|
||||
|| thing->thingClassId() == shellyRgbw2ThingClassId
|
||||
|| thing->thingClassId() == shellyDimmerThingClassId
|
||||
|| thing->thingClassId() == shelly25ThingClassId
|
||||
|| thing->thingClassId() == shellyButton1ThingClassId) {
|
||||
if (m_idParamTypeMap.contains(thing->thingClassId())) {
|
||||
setupShellyGateway(info);
|
||||
return;
|
||||
}
|
||||
|
|
@ -486,6 +496,14 @@ void IntegrationPluginShelly::executeAction(ThingActionInfo *info)
|
|||
return;
|
||||
}
|
||||
|
||||
if (action.actionTypeId() == shellyEm3ResetActionTypeId) {
|
||||
MqttChannel *channel = m_mqttChannels.value(thing);
|
||||
QString shellyId = thing->paramValue(shellyEm3ThingIdParamTypeId).toString();
|
||||
channel->publish("shellies/" + shellyId + "/command", "reset_data");
|
||||
info->finish(Thing::ThingErrorNoError);
|
||||
return;
|
||||
}
|
||||
|
||||
if (action.actionTypeId() == shellyRollerCalibrateActionTypeId) {
|
||||
Thing *parentDevice = myThings().findById(thing->parentId());
|
||||
MqttChannel *channel = m_mqttChannels.value(parentDevice);
|
||||
|
|
@ -543,7 +561,7 @@ void IntegrationPluginShelly::onPublishReceived(MqttChannel *channel, const QStr
|
|||
return;
|
||||
}
|
||||
|
||||
qCDebug(dcShelly()) << "Publish received from" << thing->name() << topic << payload;
|
||||
qCDebug(dcShelly()) << "Publish received from" << thing->name() << topic;
|
||||
|
||||
QString shellyId = thing->paramValue(m_idParamTypeMap.value(thing->thingClassId())).toString();
|
||||
if (topic == "shellies/" + shellyId + "/info") {
|
||||
|
|
@ -554,7 +572,7 @@ void IntegrationPluginShelly::onPublishReceived(MqttChannel *channel, const QStr
|
|||
qCWarning(dcShelly()) << qUtf8Printable(payload);
|
||||
return;
|
||||
}
|
||||
qCDebug(dcShelly()) << "Payload:" << qUtf8Printable(jsonDoc.toJson());
|
||||
// qCDebug(dcShelly()) << "Payload:" << qUtf8Printable(jsonDoc.toJson());
|
||||
QVariantMap data = jsonDoc.toVariant().toMap();
|
||||
|
||||
// Wifi signal strength
|
||||
|
|
@ -758,6 +776,65 @@ void IntegrationPluginShelly::onPublishReceived(MqttChannel *channel, const QStr
|
|||
thing->emitEvent(eventTypeId, ParamList() << Param(paramTypeId, param));
|
||||
}
|
||||
}
|
||||
|
||||
topicMatcher = QRegExp("shellies/" + shellyId + "/emeter/[0-2]/.*");
|
||||
if (topicMatcher.exactMatch(topic) && thing->thingClassId() == shellyEm3ThingClassId) {
|
||||
int channel = topic.split('/').at(3).toInt();
|
||||
QString stateName = topic.split('/').at(4);
|
||||
QVariant value = payload;
|
||||
QHash<int, QHash<QString, StateTypeId>> channelMap;
|
||||
QHash<QString, StateTypeId> stateTypeIdMap;
|
||||
stateTypeIdMap["power"] = shellyEm3PhaseAPowerStateTypeId;
|
||||
stateTypeIdMap["pf"] = shellyEm3PhaseAPowerFactorStateTypeId;
|
||||
stateTypeIdMap["current"] = shellyEm3PhaseACurrentStateTypeId;
|
||||
stateTypeIdMap["voltage"] = shellyEm3PhaseAVoltageStateTypeId;
|
||||
stateTypeIdMap["total"] = shellyEm3PhaseATotalEnergyConsumedStateTypeId;
|
||||
stateTypeIdMap["total_returned"] = shellyEm3PhaseATotalEnergyReturnedStateTypeId;
|
||||
channelMap[0] = stateTypeIdMap;
|
||||
stateTypeIdMap["power"] = shellyEm3PhaseBPowerStateTypeId;
|
||||
stateTypeIdMap["pf"] = shellyEm3PhaseBPowerFactorStateTypeId;
|
||||
stateTypeIdMap["current"] = shellyEm3PhaseBCurrentStateTypeId;
|
||||
stateTypeIdMap["voltage"] = shellyEm3PhaseBVoltageStateTypeId;
|
||||
stateTypeIdMap["total"] = shellyEm3PhaseBTotalEnergyConsumedStateTypeId;
|
||||
stateTypeIdMap["total_returned"] = shellyEm3PhaseBTotalEnergyReturnedStateTypeId;
|
||||
channelMap[1] = stateTypeIdMap;
|
||||
stateTypeIdMap["power"] = shellyEm3PhaseCPowerStateTypeId;
|
||||
stateTypeIdMap["pf"] = shellyEm3PhaseCPowerFactorStateTypeId;
|
||||
stateTypeIdMap["current"] = shellyEm3PhaseCCurrentStateTypeId;
|
||||
stateTypeIdMap["voltage"] = shellyEm3PhaseCVoltageStateTypeId;
|
||||
stateTypeIdMap["total"] = shellyEm3PhaseCTotalEnergyConsumedStateTypeId;
|
||||
stateTypeIdMap["total_returned"] = shellyEm3PhaseCTotalEnergyReturnedStateTypeId;
|
||||
channelMap[2] = stateTypeIdMap;
|
||||
StateTypeId stateTypeId = channelMap.value(channel).value(stateName);
|
||||
if (stateTypeId.isNull()) {
|
||||
qCWarning(dcShelly()) << "Unhandled emeter value for channel" << channel << stateName;
|
||||
return;
|
||||
}
|
||||
double factor = 1;
|
||||
if (stateName == "total" || stateName == "total_returned") {
|
||||
factor = 0.001;
|
||||
}
|
||||
|
||||
thing->setStateValue(stateTypeId, value.toDouble() * factor);
|
||||
|
||||
// Some optimization specific to the EM3: We receive each phase in a separate mqtt message
|
||||
// and calculate the total ourselves. In order to not produce intermediate totals for each incoming message
|
||||
// we'll only refresh the total when we get the last value for the last channel.
|
||||
if (channel == 2 && stateName == "total_returned") {
|
||||
double grandTotal = thing->stateValue(shellyEm3PhaseATotalEnergyConsumedStateTypeId).toDouble();
|
||||
grandTotal += thing->stateValue(shellyEm3PhaseBTotalEnergyConsumedStateTypeId).toDouble();
|
||||
grandTotal += thing->stateValue(shellyEm3PhaseCTotalEnergyConsumedStateTypeId).toDouble();
|
||||
thing->setStateValue(shellyEm3TotalEnergyConsumedStateTypeId, grandTotal);
|
||||
double grandTotalReturned = thing->stateValue(shellyEm3PhaseATotalEnergyReturnedStateTypeId).toDouble();
|
||||
grandTotalReturned += thing->stateValue(shellyEm3PhaseBTotalEnergyReturnedStateTypeId).toDouble();
|
||||
grandTotalReturned += thing->stateValue(shellyEm3PhaseCTotalEnergyReturnedStateTypeId).toDouble();
|
||||
thing->setStateValue(shellyEm3TotalEnergyProducedStateTypeId, grandTotalReturned);
|
||||
double totalPower = thing->stateValue(shellyEm3PhaseAPowerStateTypeId).toDouble();
|
||||
totalPower += thing->stateValue(shellyEm3PhaseBPowerStateTypeId).toDouble();
|
||||
totalPower += thing->stateValue(shellyEm3PhaseCPowerStateTypeId).toDouble();
|
||||
thing->setStateValue(shellyEm3CurrentPowerStateTypeId, totalPower);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void IntegrationPluginShelly::updateStatus()
|
||||
|
|
|
|||
|
|
@ -925,6 +925,290 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "ba293550-d2af-4463-b973-e1812ab67b96",
|
||||
"name": "shellyEm3",
|
||||
"displayName": "Shelly 3EM",
|
||||
"createMethods": ["discovery"],
|
||||
"interfaces": [ "extendedsmartmeterconsumer", "extendedsmartmeterproducer", "wirelessconnectable", "update"],
|
||||
"paramTypes": [
|
||||
{
|
||||
"id": "a80894d2-dfba-4699-892d-081702b0f1f5",
|
||||
"name":"id",
|
||||
"displayName": "Shelly ID",
|
||||
"type": "QString",
|
||||
"readOnly": true
|
||||
},
|
||||
{
|
||||
"id": "21e11417-b862-44e6-828f-d65207328630",
|
||||
"name": "username",
|
||||
"displayName": "Username (optional)",
|
||||
"type": "QString"
|
||||
},
|
||||
{
|
||||
"id": "29aee8f6-ed40-41c5-83c9-32c8aa89c7ea",
|
||||
"name": "password",
|
||||
"displayName": "Password (optional)",
|
||||
"type": "QString"
|
||||
}
|
||||
],
|
||||
"stateTypes": [
|
||||
{
|
||||
"id": "08bd7743-af98-4328-bbca-64280afc5a87",
|
||||
"name": "connected",
|
||||
"displayName": "Connected",
|
||||
"displayNameEvent": "Connected or disconnected",
|
||||
"type": "bool",
|
||||
"defaultValue": false,
|
||||
"cached": false
|
||||
},
|
||||
{
|
||||
"id": "0f147c29-aefd-4926-a979-35dfeaec12c0",
|
||||
"name": "signalStrength",
|
||||
"displayName": "Signal strength",
|
||||
"displayNameEvent": "Signal strength changed",
|
||||
"type": "uint",
|
||||
"minValue": 0,
|
||||
"maxValue": 100,
|
||||
"unit": "Percentage",
|
||||
"defaultValue": 0
|
||||
},
|
||||
{
|
||||
"id": "67050a5a-cc78-4d11-a7d9-a9db528029ff",
|
||||
"name": "totalEnergyConsumed",
|
||||
"displayName": "Total consumed energy",
|
||||
"displayNameEvent": "Total consumed energy changed",
|
||||
"type": "double",
|
||||
"unit": "KiloWattHour",
|
||||
"defaultValue": 0
|
||||
},
|
||||
{
|
||||
"id": "088cb7df-9187-4206-ae5b-18a00e4f1969",
|
||||
"name": "totalEnergyProduced",
|
||||
"displayName": "Total returned energy",
|
||||
"displayNameEvent": "Total returned energy changed",
|
||||
"type": "double",
|
||||
"unit": "KiloWattHour",
|
||||
"defaultValue": 0
|
||||
},
|
||||
{
|
||||
"id": "3fc2a87f-cd33-4d1f-b7a6-75ffcb4e7cc4",
|
||||
"name": "currentPower",
|
||||
"displayName": "Current power",
|
||||
"displayNameEvent": "Current power changed",
|
||||
"type": "double",
|
||||
"unit": "Watt",
|
||||
"defaultValue": 0
|
||||
},
|
||||
{
|
||||
"id": "432ba180-936d-4700-907e-766264bfdd35",
|
||||
"name": "phaseAPower",
|
||||
"displayName": "Power (Phase A)",
|
||||
"displayNameEvent": "Power (Phase A) changed",
|
||||
"type": "double",
|
||||
"unit": "Watt",
|
||||
"defaultValue": 0
|
||||
},
|
||||
{
|
||||
"id": "50be490b-ba5d-4b1f-806c-9e15b915c1eb",
|
||||
"name": "phaseAPowerFactor",
|
||||
"displayName": "Power factor (Phase A)",
|
||||
"displayNameEvent": "Power factor (Phase A) changed",
|
||||
"type": "double",
|
||||
"defaultValue": 0
|
||||
},
|
||||
{
|
||||
"id": "5fa79319-756b-4b2c-87b1-59ff996b8435",
|
||||
"name": "phaseACurrent",
|
||||
"displayName": "Current (Phase A)",
|
||||
"displayNameEvent": "Current (Phase A) changed",
|
||||
"type": "double",
|
||||
"unit": "Ampere",
|
||||
"defaultValue": 0
|
||||
},
|
||||
{
|
||||
"id": "5977ffab-cdcf-409c-940b-aa0a59de84a5",
|
||||
"name": "phaseAVoltage",
|
||||
"displayName": "Voltage (Phase A)",
|
||||
"displayNameEvent": "Voltage (Phase A) changed",
|
||||
"type": "double",
|
||||
"unit": "Volt",
|
||||
"defaultValue": 0
|
||||
},
|
||||
{
|
||||
"id": "ba25ef68-bb52-4e96-a8fb-137aae966104",
|
||||
"name": "phaseATotalEnergyConsumed",
|
||||
"displayName": "Total consumed energy (Phase A)",
|
||||
"displayNameEvent": "Total consumed energy (Phase A) changed",
|
||||
"type": "double",
|
||||
"unit": "KiloWattHour",
|
||||
"defaultValue": 0
|
||||
},
|
||||
{
|
||||
"id": "34562cd3-b178-4f68-903d-a01e20d0ad76",
|
||||
"name": "phaseATotalEnergyReturned",
|
||||
"displayName": "Total returned energy (Phase A)",
|
||||
"displayNameEvent": "Total returned energy (Phase A) changed",
|
||||
"type": "double",
|
||||
"unit": "KiloWattHour",
|
||||
"defaultValue": 0
|
||||
},
|
||||
{
|
||||
"id": "02edeedb-8a93-41f8-8bc5-09031b7d2d4d",
|
||||
"name": "phaseBPower",
|
||||
"displayName": "Power (Phase B)",
|
||||
"displayNameEvent": "Power (Phase B) changed",
|
||||
"type": "double",
|
||||
"unit": "Watt",
|
||||
"defaultValue": 0
|
||||
},
|
||||
{
|
||||
"id": "f56504bb-0c6c-4425-831c-771b23aadf19",
|
||||
"name": "phaseBPowerFactor",
|
||||
"displayName": "Power factor (Phase B)",
|
||||
"displayNameEvent": "Power factor (Phase B) changed",
|
||||
"type": "double",
|
||||
"defaultValue": 0
|
||||
},
|
||||
{
|
||||
"id": "a4151601-fe77-418a-a2c1-6376e32da3bd",
|
||||
"name": "phaseBCurrent",
|
||||
"displayName": "Current (Phase B)",
|
||||
"displayNameEvent": "Current (Phase B) changed",
|
||||
"type": "double",
|
||||
"unit": "Ampere",
|
||||
"defaultValue": 0
|
||||
},
|
||||
{
|
||||
"id": "7c846993-fb06-48ef-987c-7b35d9671070",
|
||||
"name": "phaseBVoltage",
|
||||
"displayName": "Voltage (Phase B)",
|
||||
"displayNameEvent": "Voltage (Phase B) changed",
|
||||
"type": "double",
|
||||
"unit": "Volt",
|
||||
"defaultValue": 0
|
||||
},
|
||||
{
|
||||
"id": "6636e6a0-e3ca-4654-9506-4302c4e8eed7",
|
||||
"name": "phaseBTotalEnergyConsumed",
|
||||
"displayName": "Total consumed energy (Phase B)",
|
||||
"displayNameEvent": "Total consumed energy (Phase B) changed",
|
||||
"type": "double",
|
||||
"unit": "KiloWattHour",
|
||||
"defaultValue": 0
|
||||
},
|
||||
{
|
||||
"id": "d70a0d1a-cac1-4250-85fa-4859ad2dc947",
|
||||
"name": "phaseBTotalEnergyReturned",
|
||||
"displayName": "Total returned energy (Phase B)",
|
||||
"displayNameEvent": "Total returned energy (Phase B) changed",
|
||||
"type": "double",
|
||||
"unit": "KiloWattHour",
|
||||
"defaultValue": 0
|
||||
},
|
||||
{
|
||||
"id": "82277a4e-49cc-45f4-8b29-470ce99333b6",
|
||||
"name": "phaseCPower",
|
||||
"displayName": "Power (Phase C)",
|
||||
"displayNameEvent": "Power (Phase C) changed",
|
||||
"type": "double",
|
||||
"unit": "Watt",
|
||||
"defaultValue": 0
|
||||
},
|
||||
{
|
||||
"id": "2e2c622f-1575-4d0b-a0c0-78bc03748c1e",
|
||||
"name": "phaseCPowerFactor",
|
||||
"displayName": "Power factor (Phase C)",
|
||||
"displayNameEvent": "Power factor (Phase C) changed",
|
||||
"type": "double",
|
||||
"defaultValue": 0
|
||||
},
|
||||
{
|
||||
"id": "ab78aa9c-aa73-4f5d-8d21-38c83c5e9e7c",
|
||||
"name": "phaseCCurrent",
|
||||
"displayName": "Current (Phase C)",
|
||||
"displayNameEvent": "Current (Phase C) changed",
|
||||
"type": "double",
|
||||
"unit": "Ampere",
|
||||
"defaultValue": 0
|
||||
},
|
||||
{
|
||||
"id": "cd7af1b2-d5f0-4c2e-b85c-84f23ae1fbb9",
|
||||
"name": "phaseCVoltage",
|
||||
"displayName": "Voltage (Phase C)",
|
||||
"displayNameEvent": "Voltage (Phase C) changed",
|
||||
"type": "double",
|
||||
"unit": "Volt",
|
||||
"defaultValue": 0
|
||||
},
|
||||
{
|
||||
"id": "452c2159-aa2f-4217-80e5-4b492b69671e",
|
||||
"name": "phaseCTotalEnergyConsumed",
|
||||
"displayName": "Total consumed energy (Phase C)",
|
||||
"displayNameEvent": "Total consumed energy (Phase C) changed",
|
||||
"type": "double",
|
||||
"unit": "KiloWattHour",
|
||||
"defaultValue": 0
|
||||
},
|
||||
{
|
||||
"id": "de248e26-b617-4d22-9175-752e2d695274",
|
||||
"name": "phaseCTotalEnergyReturned",
|
||||
"displayName": "Total returned energy (Phase C)",
|
||||
"displayNameEvent": "Total returned energy (Phase C) changed",
|
||||
"type": "double",
|
||||
"unit": "KiloWattHour",
|
||||
"defaultValue": 0
|
||||
},
|
||||
{
|
||||
"id": "8e25bbc2-54d8-4aa1-8ca5-f61b5f17a03b",
|
||||
"name": "updateStatus",
|
||||
"displayName": "Update status",
|
||||
"displayNameEvent": "Update status changed",
|
||||
"type": "QString",
|
||||
"possibleValues": ["idle", "available", "updating"],
|
||||
"defaultValue": "idle"
|
||||
},
|
||||
{
|
||||
"id": "f9ddb9f1-1251-484e-bdce-531d584d8f6a",
|
||||
"name": "currentVersion",
|
||||
"displayName": "Current firmware version",
|
||||
"displayNameEvent": "Current firmware version changed",
|
||||
"type": "QString",
|
||||
"defaultValue": ""
|
||||
},
|
||||
{
|
||||
"id": "27f1e394-642f-4a90-88bf-1ef9ba88b10b",
|
||||
"name": "availableVersion",
|
||||
"displayName": "Available firmware version",
|
||||
"displayNameEvent": "Available firmware version changed",
|
||||
"type": "QString",
|
||||
"defaultValue": ""
|
||||
},
|
||||
{
|
||||
"id": "639dda4c-e354-43ca-a785-fbe6806986e2",
|
||||
"name": "power",
|
||||
"displayName": "Powered",
|
||||
"displayNameEvent": "Turned on or off",
|
||||
"displayNameAction": "Turn on or off",
|
||||
"type": "bool",
|
||||
"defaultValue": false,
|
||||
"writable": true,
|
||||
"ioType": "digitalOutput"
|
||||
}
|
||||
],
|
||||
"actionTypes": [
|
||||
{
|
||||
"id": "f230d689-53f8-4542-9b20-9993b1c2eb27",
|
||||
"name": "performUpdate",
|
||||
"displayName": "Start firmware update"
|
||||
},
|
||||
{
|
||||
"id": "87772e43-1bf7-496b-b8be-46db39f71700",
|
||||
"name": "reset",
|
||||
"displayName": "Reset data"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "512c3c7d-d6a6-4d2a-bccd-83147e5f9a25",
|
||||
"name": "shellyGeneric",
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue