First commit
|
@ -0,0 +1,75 @@
|
|||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
#root /usr/share/nginx/html;
|
||||
#index index.html index.htm;
|
||||
|
||||
add_header 'Access-Control-Allow-Origin' '*' always;
|
||||
add_header 'Access-Control-Allow_Credentials' 'true' always;
|
||||
add_header 'Access-Control-Allow-Headers' 'Authorization,Accept,Origin,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range' always;
|
||||
add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH' always;
|
||||
add_header X-Frame-Options SAMEORIGIN;
|
||||
location / {
|
||||
proxy_pass http://localhost:8080/basicui/app/;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
proxy_read_timeout 3600;
|
||||
}
|
||||
|
||||
location /mdl {
|
||||
proxy_pass http://localhost:8080/basicui/mdl;
|
||||
}
|
||||
location /roboto.css {
|
||||
proxy_pass http://localhost:8080/basicui/roboto.css;
|
||||
}
|
||||
location /material-icons.css {
|
||||
proxy_pass http://localhost:8080/basicui/material-icons.css;
|
||||
}
|
||||
location /smarthome.css {
|
||||
proxy_pass http://localhost:8080/basicui/smarthome.css;
|
||||
}
|
||||
location /smarthome.js {
|
||||
proxy_pass http://localhost:8080/basicui/smarthome.js;
|
||||
}
|
||||
location /icon {
|
||||
proxy_pass http://localhost:8080/icon;
|
||||
}
|
||||
location /rest {
|
||||
proxy_pass http://localhost:8080/rest;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
}
|
||||
location /fonts {
|
||||
proxy_pass http://localhost:8080/basicui/fonts;
|
||||
}
|
||||
location /images {
|
||||
proxy_pass http://localhost:8080/basicui/images;
|
||||
}
|
||||
|
||||
location /grafana/ {
|
||||
proxy_pass http://localhost:3000/;
|
||||
proxy_set_header Host $host;
|
||||
}
|
||||
|
||||
# Proxy Grafana Live WebSocket connections.
|
||||
location /grafana/api/live {
|
||||
rewrite ^/grafana/(.*) /$1 break;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_pass http://localhost:3000/;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
<html>
|
||||
<h1>openHAB user provided static content</h1>
|
||||
<p>Serve your own static html pages or resources from here. Files stored in the openHAB configuration subfolder <tt>html</tt> will be available through the HTTP server of openHAB, e.g. <a href="http://device-address:8080/static/image.png">http://device-address:8080/static/image.png</a>.</p>
|
||||
<p>Resources for sitemap elements (image, video,...) can also be provided though this folder.</p>
|
||||
</html>
|
|
@ -0,0 +1,3 @@
|
|||
Serve your own static html pages or resources from here.
|
||||
Files stored in this folder will be available through the HTTP server of openHAB, e.g. "http://device-address:8080/static/image.png".
|
||||
Resources for sitemap elements (image, video,...) can also be provided though this folder.
|
After Width: | Height: | Size: 7.6 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 16 KiB |
|
@ -0,0 +1,6 @@
|
|||
Your additional icons go here.
|
||||
Icons can be provided as png (32x32) or preferably as svg files.
|
||||
ClassicUI and BasicUI can be configured to accept svg (default) or png icons.
|
||||
|
||||
Check out the openHAB documentation for more details:
|
||||
https://www.openhab.org/docs/configuration/items.html#icons
|
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 20 KiB |
|
@ -0,0 +1,22 @@
|
|||
Group gDC_Load "DC Elektronische Last, Kunkin KP184, 150V 40A 400W"
|
||||
|
||||
Number DC_Load_Voltage "Spannung [%.3f V]" (gDC_Load)
|
||||
Number DC_Load_Current "Strom [%.3f A]" (gDC_Load)
|
||||
Switch DC_Load_OnOff "Eingang [MAP(dc_load_EinAus.map):%s]" (gDC_Load)
|
||||
Number DC_Load_Mode "Modus [MAP(dc_load_mode.map):%s]" (gDC_Load)
|
||||
Number DC_Load_Power "Leistung [%.2f W]" (gDC_Load)
|
||||
Number DC_Load_Watthours "Wattstunden [%.3f Wh]" (gDC_Load)
|
||||
Number DC_Load_Amperehours "Amperestunden [%.3f Ah]" (gDC_Load)
|
||||
|
||||
Switch DC_Load_Set_OnOff "Lasteingang schalten" (gDC_Load)
|
||||
Number DC_Load_Set_Voltage "Spannungs Sollwert [%.3f V]" (gDC_Load)
|
||||
Number DC_Load_Set_Current "Strom Sollwert [%.3f A]" (gDC_Load)
|
||||
Number DC_Load_Set_Resistance "Widerstand Sollwert [%.1f Ohm]" (gDC_Load)
|
||||
Number DC_Load_Set_Power "Leistungs Sollwert [%.1f W]" (gDC_Load)
|
||||
Number DC_Load_Set_Mode "Modus [MAP(dc_load_mode.map):%s]" (gDC_Load)
|
||||
Switch DC_Load_Set_Reset "Zähler zurücksetzen" (gDC_Load)
|
||||
|
||||
Switch DC_Load_Set_BattMode "Akku entladen" (gDC_Load)
|
||||
Number DC_Load_Set_Batt_MinVoltage "Entladeschlussspannung [%.3f V]" (gDC_Load)
|
||||
|
||||
Number DC_Load_Timer "Timer [%.0f s]" (gDC_Load)
|
|
@ -0,0 +1,23 @@
|
|||
Group gDC_Supply "DC Labornetzgerät, Riden RD6018, 60V 18A"
|
||||
|
||||
Number DC_Supply_Voltage "Spannung [%.2f V]" (gDC_Supply) {channel="modbus:data:dcsupply:dcsupply_main:voltage_actual:number", expire="1m,0"}
|
||||
Number DC_Supply_Current "Strom [%.2f A]" (gDC_Supply) {channel="modbus:data:dcsupply:dcsupply_main:current_actual:number", expire="1m,0"}
|
||||
Number DC_Supply_Input_Voltage "Eingangsspannung [%.2f V]" (gDC_Supply) {channel="modbus:data:dcsupply:dcsupply_main:voltage_input:number", expire="1m,0"}
|
||||
Number DC_Supply_Protection "Sicherheitsabschaltung [MAP(dc_supply_protection.map):%s]" (gDC_Supply) {channel="modbus:data:dcsupply:dcsupply_main:protection:number", expire="1m,0"}
|
||||
Number DC_Supply_Amperehours "Amperestunden [%.3f Ah]" (gDC_Supply) {channel="modbus:data:dcsupply:dcsupply_sec:ampere_hours:number", expire="1m,0"}
|
||||
Number DC_Supply_Watthours "Wattstunden [%.3f Wh]" (gDC_Supply) {channel="modbus:data:dcsupply:dcsupply_sec:watt_hours:number", expire="1m,0"}
|
||||
Number DC_Supply_Power "Leistung [%.1f W]" (gDC_Supply) {channel="modbus:data:dcsupply:dcsupply_main:power:number", expire="1m,0"}
|
||||
Number DC_Supply_Mode "Modus [MAP(dc_supply_mode.map):%s]" (gDC_Supply) {channel="modbus:data:dcsupply:dcsupply_main:mode:number", expire="1m,0"}
|
||||
|
||||
Number DC_Supply_Voltage_Setpoint "Spannungs Sollwert [%.2f V]" (gDC_Supply) {channel="modbus:data:dcsupply:dcsupply_main:voltage_setpoint:number", expire="1m,0"}
|
||||
Number DC_Supply_Current_Setpoint "Strom Sollwert [%.2f A]" (gDC_Supply) {channel="modbus:data:dcsupply:dcsupply_main:current_setpoint:number", expire="1m,0"}
|
||||
Number DC_Supply_PowerOnOff "Lastausgang schalten" (gDC_Supply) {channel="modbus:data:dcsupply:dcsupply_main:output_enable:number", expire="1m,0"}
|
||||
|
||||
Number DC_Supply_Temp_Internal "Temperatur Intern [%.0f °C]" (gDC_Supply) {channel="modbus:data:dcsupply:dcsupply_main:temperature_internal:number", expire="1m,0"}
|
||||
Number DC_Supply_Temp_External "Temperatur Extern [%.0f °C]" (gDC_Supply) {channel="modbus:data:dcsupply:dcsupply_sec:temperature_external:number", expire="1m,0"}
|
||||
Number DC_Supply_Temp_External_Active (gDC_Supply) {channel="modbus:data:dcsupply:dcsupply_sec:temperature_external_active:number", expire="1m,0"}
|
||||
|
||||
Number DC_Supply_Batt_Active "Batterielademodus [MAP(dc_supply_battmode.map):%s]" (gDC_Supply) {channel="modbus:data:dcsupply:dcsupply_sec:battery_mode_active:number", expire="1m,0"}
|
||||
Number DC_Supply_Batt_Voltage "Batteriespannung [%.2f V]" (gDC_Supply) {channel="modbus:data:dcsupply:dcsupply_sec:voltage_battery:number", expire="1m,0"}
|
||||
Number DC_Supply_Timer "Timer [%.0f s]" (gDC_Supply)
|
||||
Switch DC_Supply_Set_Reset "Zähler zurücksetzen" (gDC_Supply)
|
|
@ -0,0 +1,5 @@
|
|||
Your item definitions go here.
|
||||
All items files have to have the ".items" file extension and must follow a special syntax.
|
||||
|
||||
Check out the openHAB documentation for more details:
|
||||
https://www.openhab.org/docs/configuration/items.html
|
|
@ -0,0 +1,12 @@
|
|||
Strategies {
|
||||
everyHour : "0 0 * * * ?"
|
||||
everyDay : "0 0 0 * * ?"
|
||||
everySecond : "* * * ? * * *"
|
||||
every1Min : "0 0/1 * 1/1 * ? *"
|
||||
every10Sec : "*/10 * * ? * * *"
|
||||
default = everyChange
|
||||
}
|
||||
|
||||
//Items {
|
||||
// DC_Load_Power, DC_Load_Watthours, DC_Load_Amperehours : strategy = every1Min
|
||||
//}
|
|
@ -0,0 +1,7 @@
|
|||
Strategies {
|
||||
default = everyUpdate
|
||||
}
|
||||
|
||||
Items {
|
||||
* : strategy = everyChange, restoreOnStartup
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
Your persistence configuration goes here.
|
||||
All persistence files have to have the ".persist" file extension and must follow a special syntax.
|
||||
|
||||
Check out the openHAB documentation for more details:
|
||||
https://www.openhab.org/docs/configuration/persistence.html
|
|
@ -0,0 +1,7 @@
|
|||
/*rule "Convert Voltage"
|
||||
when
|
||||
Item DC_Supply_Voltage changed
|
||||
then
|
||||
DC_Supply_Voltage.postUpdate(String::format("%1.2f",DC_Supply_Voltage.state as DecimalType / 10))
|
||||
end
|
||||
*/
|
|
@ -0,0 +1,67 @@
|
|||
rule "Reset DC Load Ah Wh Timer"
|
||||
when
|
||||
Item DC_Load_Set_Reset changed to ON
|
||||
then
|
||||
DC_Load_Amperehours.sendCommand("0");
|
||||
DC_Load_Watthours.sendCommand("0");
|
||||
DC_Load_Timer.sendCommand("0");
|
||||
DC_Load_Set_Reset.sendCommand("OFF");
|
||||
end
|
||||
|
||||
rule "Calculate DC Load Timer"
|
||||
when
|
||||
Time cron "* * * ? * * *"
|
||||
then
|
||||
if (DC_Load_OnOff.state == ON) {
|
||||
val temp = (DC_Load_Timer.state as Number) + 1;
|
||||
DC_Load_Timer.sendCommand(temp);
|
||||
}
|
||||
if (DC_Load_Timer.state == NULL || DC_Load_Timer.state == "") {
|
||||
DC_Load_Timer.sendCommand("0");
|
||||
}
|
||||
end
|
||||
|
||||
rule "Calculate DC Load Power"
|
||||
when
|
||||
Item DC_Load_Voltage changed or Item DC_Load_Current changed
|
||||
then
|
||||
val temp = (DC_Load_Voltage.state as Number) * (DC_Load_Current.state as Number);
|
||||
DC_Load_Power.sendCommand(temp);
|
||||
end
|
||||
|
||||
rule "Calculate DC Load Amperehours"
|
||||
when
|
||||
Time cron "* * * ? * * *"
|
||||
then
|
||||
if (DC_Load_OnOff.state == ON) {
|
||||
val temp = (DC_Load_Current.state as Number) / 3600;
|
||||
DC_Load_Amperehours.sendCommand(temp + (DC_Load_Amperehours.state as Number));
|
||||
}
|
||||
if (DC_Load_Amperehours.state == NULL || DC_Load_Amperehours.state == "") {
|
||||
DC_Load_Amperehours.sendCommand("0");
|
||||
}
|
||||
end
|
||||
|
||||
rule "Calculate DC Load Watthours"
|
||||
when
|
||||
Time cron "* * * ? * * *"
|
||||
then
|
||||
if (DC_Load_OnOff.state == ON) {
|
||||
val temp = (DC_Load_Power.state as Number) / 3600;
|
||||
DC_Load_Watthours.sendCommand(temp + (DC_Load_Watthours.state as Number));
|
||||
}
|
||||
if (DC_Load_Watthours.state == NULL || DC_Load_Watthours.state == "") {
|
||||
DC_Load_Watthours.sendCommand("0");
|
||||
}
|
||||
end
|
||||
|
||||
rule "Stop Battery Discharge"
|
||||
when
|
||||
Item DC_Load_Voltage changed
|
||||
then
|
||||
if (DC_Load_Set_BattMode.state == ON) {
|
||||
if (DC_Load_Voltage.state < DC_Load_Set_Batt_MinVoltage.state) {
|
||||
DC_Load_Set_OnOff.sendCommand("OFF");
|
||||
}
|
||||
}
|
||||
end
|
|
@ -0,0 +1,12 @@
|
|||
rule "Send datavalues from DC Load to history if input is powered on"
|
||||
when
|
||||
Time cron "*/10 * * ? * * *"
|
||||
then
|
||||
if (DC_Load_OnOff.state == ON) {
|
||||
DC_Load_Voltage.persist("influxdb")
|
||||
DC_Load_Current.persist("influxdb")
|
||||
DC_Load_Power.persist("influxdb")
|
||||
DC_Load_Watthours.persist("influxdb")
|
||||
DC_Load_Watthours.persist("influxdb")
|
||||
}
|
||||
end
|
|
@ -0,0 +1,22 @@
|
|||
rule "Reset DC Supply Ah Wh Timer"
|
||||
when
|
||||
Item DC_Supply_Set_Reset changed to ON
|
||||
then
|
||||
DC_Load_Amperehours.sendCommand("0");
|
||||
DC_Load_Watthours.sendCommand("0");
|
||||
DC_Supply_Timer.sendCommand("0");
|
||||
DC_Supply_Set_Reset.sendCommand("OFF");
|
||||
end
|
||||
|
||||
rule "Calculate DC Supply Timer"
|
||||
when
|
||||
Time cron "* * * ? * * *"
|
||||
then
|
||||
if (DC_Supply_PowerOnOff.state == 1) {
|
||||
val temp = (DC_Supply_Timer.state as Number) + 1;
|
||||
DC_Supply_Timer.sendCommand(temp);
|
||||
}
|
||||
if (DC_Supply_Timer.state == NULL || DC_Supply_Timer.state == "") {
|
||||
DC_Supply_Timer.sendCommand("0");
|
||||
}
|
||||
end
|
|
@ -0,0 +1,22 @@
|
|||
rule "Send datavalues from DC Supply to history if output is powered on"
|
||||
when
|
||||
Time cron "*/10 * * ? * * *"
|
||||
then
|
||||
if (DC_Supply_PowerOnOff.state == ON) {
|
||||
DC_Supply_Voltage.persist("influxdb")
|
||||
DC_Supply_Current.persist("influxdb")
|
||||
DC_Supply_Power.persist("influxdb")
|
||||
DC_Supply_Amperehours.persist("influxdb")
|
||||
DC_Supply_Watthours.persist("influxdb")
|
||||
DC_Supply_Temp_Internal.persist("influxdb")
|
||||
}
|
||||
end
|
||||
|
||||
rule "Send external temperature if connected to history"
|
||||
when
|
||||
Time cron "*/10 * * ? * * *"
|
||||
then
|
||||
if (DC_Supply_Temp_External_Active.state == ON) {
|
||||
DC_Supply_Temp_External.persist("influxdb")
|
||||
}
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
Your rules go here.
|
||||
All rule files have to have the ".rules" file extension and must follow a special syntax.
|
||||
|
||||
Check out the openHAB documentation for more details:
|
||||
https://www.openhab.org/docs/configuration/rules-dsl.html
|
|
@ -0,0 +1,5 @@
|
|||
Your scripts go here.
|
||||
All script files have to have the ".script" file extension and must follow a special syntax.
|
||||
|
||||
Check out the openHAB documentation for more details:
|
||||
https://www.openhab.org/docs/configuration/rules-dsl.html#scripts
|
|
@ -0,0 +1,50 @@
|
|||
# The installation package of this openHAB instance
|
||||
# Note: This is only regarded at the VERY FIRST START of openHAB
|
||||
# Note: If you want to specify your add-ons yourself through entries below, set the package to "minimal"
|
||||
# as otherwise your definition might be in conflict with what the installation package defines.
|
||||
#
|
||||
# Optional. If not set, the dashboard (https://<yourserver>:8080/) will ask you to choose a package.
|
||||
#
|
||||
# Valid options:
|
||||
# - minimal : Installation only with dashboard, but no UIs or other add-ons. Use this for custom setups.
|
||||
# - simple : Setup for using openHAB purely through UIs - you need to expect MANY constraints in functionality!
|
||||
# - standard : Default setup for normal users, best for textual setup
|
||||
# - expert : Setup for expert users, especially for people migrating from openHAB 1.x
|
||||
# - demo : A demo setup which includes UIs, a few bindings, config files etc.
|
||||
#
|
||||
# See https://www.openhab.org/docs/configuration/packages.html for a detailed explanation of these packages.
|
||||
#
|
||||
#package = minimal
|
||||
|
||||
# Access Remote Add-on Repository
|
||||
# Defines whether the remote openHAB add-on repository should be used for browsing and installing add-ons.
|
||||
# This not only makes latest snapshots of add-ons available, it is also required for the installation of
|
||||
# any legacy 1.x add-on. (default is true)
|
||||
#
|
||||
#remote = true
|
||||
|
||||
# Include legacy 1.x bindings. If set to true, it also allows the installation of 1.x bindings for which there is
|
||||
# already a 2.x version available (requires remote repo access, see above). (default is false)
|
||||
#
|
||||
#legacy = true
|
||||
|
||||
# A comma-separated list of bindings to install (e.g. "binding = sonos,knx,zwave")
|
||||
#binding =
|
||||
|
||||
# A comma-separated list of UIs to install (e.g. "ui = basic,paper")
|
||||
#ui =
|
||||
|
||||
# A comma-separated list of persistence services to install (e.g. "persistence = rrd4j,jpa")
|
||||
#persistence =
|
||||
|
||||
# A comma-separated list of actions to install (e.g. "action = mail,pushover")
|
||||
#action =
|
||||
|
||||
# A comma-separated list of transformation services to install (e.g. "transformation = map,jsonpath")
|
||||
#transformation =
|
||||
|
||||
# A comma-separated list of voice services to install (e.g. "voice = marytts,freetts")
|
||||
#voice =
|
||||
|
||||
# A comma-separated list of miscellaneous services to install (e.g. "misc = myopenhab")
|
||||
#misc =
|
|
@ -0,0 +1,6 @@
|
|||
url=http://localhost:8086
|
||||
version=V1
|
||||
user=openhab2
|
||||
password=0ZYDJu6G000
|
||||
db=power_station
|
||||
retentionPolicy=autogen
|
|
@ -0,0 +1,5 @@
|
|||
# the commit interval in seconds (optional, default to '5')
|
||||
#commitinterval=5
|
||||
|
||||
# issue a commit even if the state did not change (optional, defaults to 'false')
|
||||
#commitsamestate=false
|
|
@ -0,0 +1,6 @@
|
|||
Your service configurations will reside here.
|
||||
All configuration files have to have the ".cfg" file extension.
|
||||
Service configuration files are automatically created as soon as you install an add-on that can be configured.
|
||||
|
||||
Check out the openHAB documentation for more details:
|
||||
https://www.openhab.org/docs/configuration/services.html
|
|
@ -0,0 +1,86 @@
|
|||
##################### LOCALE ####################
|
||||
|
||||
# The default language that should be used. If not specified, the system default locale is used.
|
||||
# The ISO 639 alpha-2 or alpha-3 language code (if there is no alpha-2 one).
|
||||
# Example: "en" (English), "de" (German), "ja" (Japanese), "kok" (Konkani)
|
||||
#
|
||||
#org.eclipse.smarthome.i18n:language=
|
||||
|
||||
# The region that should be used.
|
||||
# ISO 3166 alpha-2 country code or UN M.49 numeric-3 area code.
|
||||
# Example: "US" (United States), "DE" (Germany), "FR" (France), "029" (Caribbean)
|
||||
#
|
||||
#org.eclipse.smarthome.i18n:region=
|
||||
|
||||
################ PERSISTENCE ####################
|
||||
|
||||
# The persistence service to use if no other is specified.
|
||||
#
|
||||
#org.eclipse.smarthome.persistence:default=
|
||||
|
||||
################### AUDIO #######################
|
||||
|
||||
# This parameter defines the default audio source to use (if not set, the first available one will be used.
|
||||
#
|
||||
#org.eclipse.smarthome.audio:defaultSource=
|
||||
|
||||
# This parameter defines the default audio sink to use (if not set, the first available one will be used.
|
||||
#
|
||||
#org.eclipse.smarthome.audio:defaultSink=
|
||||
|
||||
##################### VOICE #####################
|
||||
|
||||
# This parameter defines the default text-to-speech service to use (if not set, the first available one will be used.
|
||||
#
|
||||
#org.eclipse.smarthome.voice:defaultTTS=
|
||||
|
||||
# This parameter defines the default speech-to-text service to use (if not set, the first available one will be used.
|
||||
#
|
||||
#org.eclipse.smarthome.voice:defaultSTT=
|
||||
|
||||
# The default voice to use if no specific TTS service or voice is specified.
|
||||
#
|
||||
#org.eclipse.smarthome.voice:defaultVoice=
|
||||
|
||||
# The default human language interpreter to use if no other is specified.
|
||||
#
|
||||
#org.eclipse.smarthome.voice:defaultHLI=
|
||||
|
||||
################### EPHEMERIS ###################
|
||||
|
||||
# This parameter defines the default list of usual non workable days for the Ephemeris service.
|
||||
# The value has to be surrounded by square brackets ('[' and ']') and optionally contain value delimiters - a comma ',' to be interpreted as a list of values.
|
||||
# Example: [SATURDAY,SUNDAY]
|
||||
#
|
||||
org.openhab.ephemeris:dayset-weekend=[SATURDAY,SUNDAY]
|
||||
|
||||
# This parameter defines the default list of usual workable days for the Ephemeris service.
|
||||
# The value has to be surrounded by square brackets ('[' and ']') and optionally contain value delimiters - a comma ',' to be interpreted as a list of values.
|
||||
#
|
||||
org.openhab.ephemeris:dayset-school=[MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY]
|
||||
|
||||
################ MISCELLANOUS ###################
|
||||
|
||||
# The karaf sshHost parameter configures the bind address for the ssh login to karaf.
|
||||
# Default is 127.0.0.1 (localhost), so it is only possible to login from the local machine.
|
||||
#
|
||||
# Setting this to the address of another network interfaces will allow login from this network.
|
||||
# Setting this to 0.0.0.0 will allow login from all network interfaces.
|
||||
#
|
||||
# !!! Security warning !!!
|
||||
# Remember to change default login/password, if you allow external login.
|
||||
# See https://www.openhab.org/docs/administration/console.html for details.
|
||||
#
|
||||
#org.apache.karaf.shell:sshHost = 0.0.0.0
|
||||
|
||||
# Setting this to true will automatically approve all inbox entries and create Things for them,
|
||||
# so that they are immediately available in the system (default is false)
|
||||
#
|
||||
#org.eclipse.smarthome.inbox:autoApprove=true
|
||||
|
||||
# This setting allows to switch between a "simple" and an "advanced" mode for item management.
|
||||
# In simple mode (autoLinks=true), links and their according items are automatically created for new Things.
|
||||
# In advanced mode (autoLinks=false), the user has the full control about which items channels are linked to.
|
||||
# Existing links will remain untouched. (default is true)
|
||||
#
|
||||
#org.eclipse.smarthome.links:autoLinks=false
|
|
@ -0,0 +1,71 @@
|
|||
sitemap default label="Power Station Manager" {
|
||||
Frame label="Labornetzgerät - Übersicht" {
|
||||
Text item=DC_Supply_Voltage valuecolor=[>40="orange",>50="red"] icon="voltage.png"
|
||||
Text item=DC_Supply_Current valuecolor=[>10="orange",>15="red"] icon="current.png"
|
||||
Text item=DC_Supply_Amperehours valuecolor=[>0="purple"] icon="electric_ah.png"
|
||||
Text item=DC_Supply_Watthours valuecolor=[>0="purple"] icon="electric_wh.png"
|
||||
Text item=DC_Supply_Power valuecolor=[<49="grey",>49="green",>200="orange"] icon="power.png"
|
||||
Text item=DC_Supply_Protection valuecolor=[0="green", >=1="red"] icon="sicherheitsschaltung.png"
|
||||
Text item=DC_Supply_Mode valuecolor=[0="green", 1="red"] icon="mode.png"
|
||||
Text item=DC_Supply_Input_Voltage valuecolor=[<60="red",>64="green"] icon="input_voltage.png"
|
||||
Text item=DC_Supply_Timer icon="timer.png"
|
||||
Switch item=DC_Supply_Set_Reset mappings=[ON="Reset"] icon="reset.png"
|
||||
}
|
||||
Frame label="Labornetzgerät - Batterie-Lader und Temperaturen" {
|
||||
Text item=DC_Supply_Temp_Internal icon=temperature
|
||||
Text item=DC_Supply_Temp_External icon=temperature visibility=[DC_Supply_Temp_External_Active == 0]
|
||||
Text label="Temperatur Extern [Nicht angeschl.]" icon=temperature visibility=[DC_Supply_Temp_External_Active == 1]
|
||||
Text item=DC_Supply_Batt_Active valuecolor=[1="green"] icon="batterycharger.png"
|
||||
Text item=DC_Supply_Batt_Voltage visibility=[DC_Supply_Batt_Active == 1] icon="voltage.png"
|
||||
}
|
||||
Frame label="Labornetzgerät - Sollwerte" {
|
||||
Setpoint item=DC_Supply_Voltage_Setpoint step=0.1 minValue=0.5 maxValue=60 icon="pressure"
|
||||
Text label="" icon="none"
|
||||
Switch item=DC_Supply_Voltage_Setpoint label="" icon="quick_select.png" mappings=[3.3="3.3V", 4.2="4.2V", 5="5V", 7="7V", 12="12V", 15="15V", 24="24V", 30="30V", 48="48V", 54="54V", 60="60V"]
|
||||
Text label="" icon="none"
|
||||
Setpoint item=DC_Supply_Current_Setpoint step=0.1 minValue=0.1 maxValue=18 icon="pressure"
|
||||
Text label="" icon="none"
|
||||
Switch item=DC_Supply_Current_Setpoint label="" icon="quick_select.png" mappings=[1="1A", 2="2A", 3="3A", 4="4A", 5="5A", 6="6A", 7="7A", 8="8A", 9="9A", 10="10A", 12="12A", 14="14A", 18="18A"]
|
||||
Text label="" icon="none"
|
||||
Switch item=DC_Supply_PowerOnOff mappings=[0="Aus", 1 = "Ein"] icon=switch
|
||||
|
||||
}
|
||||
Frame label="Elektronisch DC Last - Übersicht" {
|
||||
Text item=DC_Load_Voltage valuecolor=[>40="orange",>50="red"] icon="voltage.png"
|
||||
Text item=DC_Load_Current valuecolor=[>10="orange",>15="red"] icon="current.png"
|
||||
Text item=DC_Load_Amperehours valuecolor=[>0="purple"] icon="electric_ah.png"
|
||||
Text item=DC_Load_Watthours valuecolor=[>0="purple"] icon="electric_wh.png"
|
||||
Text item=DC_Load_Power valuecolor=[>5="purple"] icon="power.png"
|
||||
Text item=DC_Load_Mode icon="mode.png"
|
||||
Text item=DC_Load_OnOff valuecolor=[OFF="green", ON="red"] icon=switch
|
||||
Text item=DC_Load_Timer icon="timer.png"
|
||||
Switch item=DC_Load_Set_Reset mappings=[ON="Reset"] icon="reset.png"
|
||||
}
|
||||
Frame label="Batterie Entlade Trend" {
|
||||
Webview url="grafana/d-solo/5_pfO0Wgz/dc-load-battery-discharging?orgId=1&panelId=2&refresh=1m" icon="none" height=15
|
||||
}
|
||||
Frame label="Elektronisch DC Last - Sollwerte" {
|
||||
Setpoint item=DC_Load_Set_Voltage step=0.1 minValue=0.5 maxValue=150 icon="pressure" visibility=[DC_Load_Mode == 0]
|
||||
Text label="" icon="none" visibility=[DC_Load_Mode == 0]
|
||||
Switch item=DC_Load_Set_Voltage label="" icon="quick_select.png" mappings=[3.3="3.3V", 4="4V", 5="5V", 7="7V", 12="12V", 15="15V", 24="24V", 30="30V", 50="50V", 80="80V", 100="100V", 120="120V", 150="150V"] visibility=[DC_Load_Mode == 0]
|
||||
Text label="" icon="none" visibility=[DC_Load_Mode == 0]
|
||||
Setpoint item=DC_Load_Set_Current step=0.1 minValue=0.1 maxValue=40 icon="pressure" visibility=[DC_Load_Mode == 1]
|
||||
Text label="" icon="none" visibility=[DC_Load_Mode == 1]
|
||||
Switch item=DC_Load_Set_Current label="" icon="quick_select.png" mappings=[1="1A", 2="2A", 3="3A", 4="4A", 5="5A", 6="6A", 7="7A", 8="8A", 10="10A", 20="20A", 30="30A", 35="35A", 40="40A"] visibility=[DC_Load_Mode == 1]
|
||||
Text label="" icon="none" visibility=[DC_Load_Mode == 1]
|
||||
Setpoint item=DC_Load_Set_Resistance minValue=0.1 maxValue=1000 icon="pressure" visibility=[DC_Load_Mode == 2]
|
||||
Text label="" icon="none" visibility=[DC_Load_Mode == 2]
|
||||
Switch item=DC_Load_Set_Resistance label="" icon="quick_select.png" mappings=[1="1Ohm", 2="2Ohm", 3="3Ohm", 4="4Ohm", 5="5Ohm", 6="6Ohm", 7="7Ohm", 8="8Ohm", 10="10Ohm", 20="20Ohm", 30="30Ohm", 35="35Ohm", 40="40Ohm"] visibility=[DC_Load_Mode == 2]
|
||||
Text label="" icon="none" visibility=[DC_Load_Mode == 2]
|
||||
Setpoint item=DC_Load_Set_Power step=1 minValue=1 maxValue=400 icon="pressure" visibility=[DC_Load_Mode == 3]
|
||||
Text label="" icon="none" visibility=[DC_Load_Mode == 3]
|
||||
Switch item=DC_Load_Set_Power label="" icon="quick_select.png" mappings=[1="1W", 2="2W", 3="3W", 4="4W", 5="5W", 6="6W", 7="7W", 8="8W", 10="10W", 100="100W", 200="200W", 300="300W", 400="400W"] visibility=[DC_Load_Mode == 3]
|
||||
Text label="" icon="none" visibility=[DC_Load_Mode == 3]
|
||||
Setpoint item=DC_Load_Set_Mode minValue=0 maxValue=3 icon="pressure" visibility=[DC_Load_Set_OnOff == "OFF"]
|
||||
Text label="" icon="none"
|
||||
Switch item=DC_Load_Set_BattMode icon="battery" visibility=[DC_Load_Set_OnOff == "OFF"]
|
||||
Setpoint item=DC_Load_Set_Batt_MinVoltage icon="battery" step=0.1
|
||||
//Text label="" icon="none" visibility=[DC_Load_Set_OnOff == "OFF"]
|
||||
Switch item=DC_Load_Set_OnOff mappings=[OFF="Aus", ON = "Ein"] icon=switch
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
Your sitemap definitions go here.
|
||||
All sitemap files have to have the ".sitemap" file extension and must follow a special syntax.
|
||||
|
||||
Check out the openHAB documentation for more details:
|
||||
https://www.openhab.org/docs/configuration/sitemaps.html
|
|
@ -0,0 +1,24 @@
|
|||
Bridge modbus:serial:dcsupply [ port="/dev/ttyDCSupply", baud=115200, stopBits="1.0", parity="none", dataBits=8, encoding="rtu" ] {
|
||||
|
||||
Bridge poller dcsupply_main [ start=4, length=15, refresh=500, type="holding" ] {
|
||||
Thing data temperature_internal [ readStart="5", readValueType="int16" ]
|
||||
Thing data voltage_setpoint [ readStart="8", readValueType="uint16" , readTransform="JS(divide100.js)", writeStart="8", writeType="holding", writeValueType="int16", writeTransform="JS(multiply100.js)"]
|
||||
Thing data current_setpoint [ readStart="9", readValueType="uint16", readTransform="JS(divide100.js)", writeStart="9", writeType="holding", writeValueType="int16", writeTransform="JS(multiply100.js)"]
|
||||
Thing data voltage_actual [ readStart="10", readValueType="uint16", readTransform="JS(divide100.js)"]
|
||||
Thing data current_actual [ readStart="11", readValueType="uint16", readTransform="JS(divide100.js)"]
|
||||
Thing data power [ readStart="13", readValueType="uint16", readTransform="JS(divide100.js)"]
|
||||
Thing data voltage_input [ readStart="14", readValueType="uint16", readTransform="JS(divide100.js)"]
|
||||
Thing data protection [ readStart="16", readValueType="uint16" ]
|
||||
Thing data mode [ readStart="17", readValueType="uint16" ]
|
||||
Thing data output_enable [ readStart="18", readValueType="uint16", writeStart="18", writeType="holding", writeStart="18", writeValueType="int16"]
|
||||
}
|
||||
|
||||
Bridge poller dcsupply_sec [ start=32, length=11, refresh=500, type="holding" ] {
|
||||
Thing data battery_mode_active [ readStart="32", readValueType="uint16" ]
|
||||
Thing data voltage_battery [ readStart="33", readValueType="uint16", readTransform="JS(divide100.js)"]
|
||||
Thing data temperature_external_active [ readStart="34", readValueType="int16" ]
|
||||
Thing data temperature_external [ readStart="35", readValueType="int16" ]
|
||||
Thing data ampere_hours [ readStart="38", readValueType="uint32", readTransform="JS(divide1000.js)"]
|
||||
Thing data watt_hours [ readStart="40", readValueType="uint32", readTransform="JS(divide1000.js)" ]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
Your thing definitions go here.
|
||||
All thing files have to have the ".things" file extension and must follow a special syntax.
|
||||
|
||||
Check out the openHAB documentation for more details:
|
||||
https://www.openhab.org/docs/configuration/things.html
|
|
@ -0,0 +1,2 @@
|
|||
ON=Ein
|
||||
OFF=Aus
|
|
@ -0,0 +1,4 @@
|
|||
0=Konstantspannung
|
||||
1=Konstantstrom
|
||||
2=Konstantwiderstand
|
||||
3=Konstantleistung
|
|
@ -0,0 +1,2 @@
|
|||
1=ON
|
||||
0=OFF
|
|
@ -0,0 +1,2 @@
|
|||
0=Inaktiv
|
||||
1=Aktiv
|
|
@ -0,0 +1,2 @@
|
|||
0=Konstantspannung
|
||||
1=Konstantstrom
|
|
@ -0,0 +1,3 @@
|
|||
2=OCP
|
||||
1=OVP
|
||||
0=OK
|
|
@ -0,0 +1,3 @@
|
|||
CLOSED=zu
|
||||
OPEN=offen
|
||||
NULL=undefiniert
|
|
@ -0,0 +1,4 @@
|
|||
(function(i) {
|
||||
return parseFloat(i) / 100;
|
||||
})(input)
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
(function(i) {
|
||||
return parseFloat(i) / 1000;
|
||||
})(input)
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
CLOSED=closed
|
||||
OPEN=open
|
||||
NULL=unknown
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
(function(i) {
|
||||
return parseFloat(i) * 100;
|
||||
})(input)
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
(function(i) {
|
||||
return parseFloat(i) * 1000;
|
||||
})(input)
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
Transformations like map or jsonpath can utilize configuration files with data definitions.
|
||||
These files have their specific file extensions and syntax definition.
|
||||
|
||||
Check out the openHAB documentation for more details:
|
||||
https://www.openhab.org/docs/configuration/transformations.html
|
|
@ -0,0 +1,6 @@
|
|||
(function(i) {
|
||||
if (parseInt(i) > 0)
|
||||
return "ON"
|
||||
else
|
||||
return "OFF";
|
||||
})(input)
|
|
@ -0,0 +1,3 @@
|
|||
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="A50285BI", SYMLINK+="ttyDCLoad"
|
||||
SUBSYSTEM=="tty", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", SYMLINK+="ttyDCSupply"
|
||||
|