[solarwatt] Initial contribution for solarwatt energy manager (#10091)
* [ADD] First version which was tested with my local setup. Signed-off-by: Sven Carstens <s.carstens@gmx.de> Signed-off-by: Sven Carstens <sven.carstens@aoe.com> * [ADD] Refactoring, add calculated value for direct self consumption and prepare for more. Signed-off-by: Sven Carstens <s.carstens@gmx.de> * [ADD] Add chanel description to README and make some channels advanced. Signed-off-by: Sven Carstens <s.carstens@gmx.de> * [MOD] Remove wrong colon in channel types. Signed-off-by: Sven Carstens <s.carstens@gmx.de> * [MOD] Put colon at the right place in channel types. Signed-off-by: Sven Carstens <s.carstens@gmx.de> * [MOD] Fix spelling of PVPlant in constants and things. Signed-off-by: Sven Carstens <s.carstens@gmx.de> * [MOD] Separate channelName from energy manager tagName. Signed-off-by: Sven Carstens <s.carstens@gmx.de> * [MOD] Reduce loglevels and fix findings from code-analysis. Signed-off-by: Sven Carstens <s.carstens@gmx.de> * [MOD] Move all custom calculations to the handler instances, remove custom tracking of child handlers, fix wrong calculation of the "direct consumed" values. Signed-off-by: Sven Carstens <s.carstens@gmx.de> * [MOD] Improve README and remove unnecessary Nullable and NotNull annotations. Signed-off-by: Sven Carstens <s.carstens@gmx.de> * [MOD] Change wrong ItemType for power items in README Signed-off-by: Sven Carstens <s.carstens@gmx.de> * [MOD] Change modeConverter to Switch Signed-off-by: Sven Carstens <s.carstens@gmx.de> * [MOD] Relay stateDevice to Thing status, anything but "OK" means ThingStatus.OFFLINE Signed-off-by: Sven Carstens <s.carstens@gmx.de> * [MOD] Remove stateDevice from items as it is represented by the device status. Signed-off-by: Sven Carstens <s.carstens@gmx.de> * [MOD] Improve README and remove unnecessary logging. Signed-off-by: Sven Carstens <s.carstens@gmx.de> * [MOD] Improve README. Signed-off-by: Sven Carstens <s.carstens@gmx.de> * [MOD] Improve README. Signed-off-by: Sven Carstens <s.carstens@gmx.de> * [MOD] Allow child things to be configured by hand with a guid. Signed-off-by: Sven Carstens <s.carstens@gmx.de> * [MOD] Allow child things to be configured by hand with a guid. Signed-off-by: Sven Carstens <s.carstens@gmx.de> * [MOD] Improve README and move things config to separate config.xml Signed-off-by: Sven Carstens <s.carstens@gmx.de> * [MOD] Improve README and remove all trace/debug logging. Signed-off-by: Sven Carstens <s.carstens@gmx.de> * [MOD] Use real channel timestamp as the refresh trigger. Signed-off-by: Sven Carstens <s.carstens@gmx.de> Co-authored-by: Sven Carstens <sven.carstens@aoe.com>
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<binding:binding id="solarwatt" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:binding="https://openhab.org/schemas/binding/v1.0.0"
|
||||
xsi:schemaLocation="https://openhab.org/schemas/binding/v1.0.0 https://openhab.org/schemas/binding-1.0.0.xsd">
|
||||
|
||||
<name>Solarwatt Binding</name>
|
||||
<description>This is the binding for Solarwatt Energymanager.</description>
|
||||
|
||||
</binding:binding>
|
||||
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<config-description:config-descriptions
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:config-description="https://openhab.org/schemas/config-description/v1.0.0"
|
||||
xsi:schemaLocation="https://openhab.org/schemas/config-description/v1.0.0
|
||||
https://openhab.org/schemas/config-description-1.0.0.xsd">
|
||||
<config-description uri="thing-type:solarwatt:energymanager">
|
||||
<parameter name="hostname" type="text">
|
||||
<label>Host Name</label>
|
||||
<description>The host name/ip address of the solarwatt energymanager.</description>
|
||||
<context>network-address</context>
|
||||
</parameter>
|
||||
<parameter name="refresh" type="integer" unit="s">
|
||||
<label>Refresh Data Period</label>
|
||||
<description>Period between updates to the devices data in seconds.
|
||||
</description>
|
||||
<default>30</default>
|
||||
<unitLabel>s</unitLabel>
|
||||
<advanced>true</advanced>
|
||||
</parameter>
|
||||
<parameter name="rescan" type="integer" unit="min">
|
||||
<label>Redetect Devices Period</label>
|
||||
<description>Period between updates to the detected devices in minutes.
|
||||
</description>
|
||||
<default>5</default>
|
||||
<unitLabel>min</unitLabel>
|
||||
<advanced>true</advanced>
|
||||
</parameter>
|
||||
</config-description>
|
||||
|
||||
<config-description uri="thing-type:solarwatt:device">
|
||||
<parameter name="guid" type="text">
|
||||
<label>Guid of Device</label>
|
||||
<description>Guid of the device as used by the solarwatt energymanager.</description>
|
||||
</parameter>
|
||||
</config-description>
|
||||
</config-description:config-descriptions>
|
||||
@@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<thing:thing-descriptions bindingId="solarwatt"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
|
||||
xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">
|
||||
|
||||
<bridge-type id="energymanager">
|
||||
<label>Solarwatt Energymanager</label>
|
||||
<description>Solarwatt Energymanager is the bridge to all things attached to the PV production system.
|
||||
</description>
|
||||
|
||||
<representation-property>hostname</representation-property>
|
||||
|
||||
<config-description-ref uri="thing-type:solarwatt:energymanager"/>
|
||||
</bridge-type>
|
||||
|
||||
<thing-type id="evstation">
|
||||
<supported-bridge-type-refs>
|
||||
<bridge-type-ref id="energymanager"/>
|
||||
</supported-bridge-type-refs>
|
||||
|
||||
<label>EV Station</label>
|
||||
<description>Electric vehicle charger station</description>
|
||||
|
||||
<representation-property>IdName</representation-property>
|
||||
|
||||
<config-description-ref uri="thing-type:solarwatt:device"/>
|
||||
</thing-type>
|
||||
|
||||
<thing-type id="batteryconverter">
|
||||
<supported-bridge-type-refs>
|
||||
<bridge-type-ref id="energymanager"/>
|
||||
</supported-bridge-type-refs>
|
||||
|
||||
<label>Battery Converter</label>
|
||||
<description>Battery converter to supply AC from battery storage.</description>
|
||||
|
||||
<representation-property>IdName</representation-property>
|
||||
|
||||
<config-description-ref uri="thing-type:solarwatt:device"/>
|
||||
</thing-type>
|
||||
|
||||
<thing-type id="location">
|
||||
<supported-bridge-type-refs>
|
||||
<bridge-type-ref id="energymanager"/>
|
||||
</supported-bridge-type-refs>
|
||||
|
||||
<label>Location</label>
|
||||
<description>Location aggregates all things taking part in the production process.</description>
|
||||
|
||||
<representation-property>IdName</representation-property>
|
||||
|
||||
<config-description-ref uri="thing-type:solarwatt:device"/>
|
||||
</thing-type>
|
||||
|
||||
<thing-type id="pvplant">
|
||||
<supported-bridge-type-refs>
|
||||
<bridge-type-ref id="energymanager"/>
|
||||
</supported-bridge-type-refs>
|
||||
|
||||
<label>PV Plant</label>
|
||||
<description>Photovoltaic plant generating DC from solar energy.</description>
|
||||
|
||||
<representation-property>IdName</representation-property>
|
||||
|
||||
<config-description-ref uri="thing-type:solarwatt:device"/>
|
||||
</thing-type>
|
||||
|
||||
<thing-type id="gridflow">
|
||||
<supported-bridge-type-refs>
|
||||
<bridge-type-ref id="energymanager"/>
|
||||
</supported-bridge-type-refs>
|
||||
|
||||
<label>Gridflow</label>
|
||||
<description>Gridflow regulates interaction with the external power grid.</description>
|
||||
|
||||
<representation-property>IdName</representation-property>
|
||||
|
||||
<config-description-ref uri="thing-type:solarwatt:device"/>
|
||||
</thing-type>
|
||||
|
||||
<thing-type id="powermeter">
|
||||
<supported-bridge-type-refs>
|
||||
<bridge-type-ref id="energymanager"/>
|
||||
</supported-bridge-type-refs>
|
||||
|
||||
<label>Power Meter</label>
|
||||
<description>Power meter for produced or consumed energy</description>
|
||||
|
||||
<representation-property>IdName</representation-property>
|
||||
|
||||
<config-description-ref uri="thing-type:solarwatt:device"/>
|
||||
</thing-type>
|
||||
|
||||
<thing-type id="inverter">
|
||||
<supported-bridge-type-refs>
|
||||
<bridge-type-ref id="energymanager"/>
|
||||
</supported-bridge-type-refs>
|
||||
|
||||
<label>Inverter</label>
|
||||
<description>Inverter supplying AC from DC.</description>
|
||||
|
||||
<representation-property>IdName</representation-property>
|
||||
|
||||
<config-description-ref uri="thing-type:solarwatt:device"/>
|
||||
</thing-type>
|
||||
|
||||
</thing:thing-descriptions>
|
||||
Reference in New Issue
Block a user