minor fixes for Openhab v2.5.x
parent
ca25d4ca1f
commit
bdcc945450
|
@ -0,0 +1,2 @@
|
||||||
|
# For security reasons all commands that are used by the exec binding or transformation need to be whitelisted.
|
||||||
|
# Every command needs to be listed on a separate line below.
|
|
@ -7,11 +7,13 @@ rule "Startup"
|
||||||
when
|
when
|
||||||
System started
|
System started
|
||||||
then
|
then
|
||||||
|
logInfo("door", "Startup space status button "+ entrance_door_status.state.toString)
|
||||||
if (entrance_door_status.state.toString == 'OFF') {
|
if (entrance_door_status.state.toString == 'OFF') {
|
||||||
SpaceStatus = 'open'
|
SpaceStatus = 'open'
|
||||||
} else {
|
} else {
|
||||||
SpaceStatus = 'closed'
|
SpaceStatus = 'closed'
|
||||||
}
|
}
|
||||||
|
logInfo("door", "Startup space status set to "+ SpaceStatus)
|
||||||
end
|
end
|
||||||
|
|
||||||
rule "Door Status"
|
rule "Door Status"
|
||||||
|
@ -87,11 +89,15 @@ then
|
||||||
val count = java.lang.Integer.parseInt(
|
val count = java.lang.Integer.parseInt(
|
||||||
transform("XPATH", "/table/tr[4]/td[2]/text()", response).trim()
|
transform("XPATH", "/table/tr[4]/td[2]/text()", response).trim()
|
||||||
)
|
)
|
||||||
|
// logInfo("door", "People counter raw value is "+ count + " previous is "+ Integer.parseInt(entrance_people_counter.previousState().state.toString))
|
||||||
|
// logInfo("door", "People counter space status "+ SpaceStatus)
|
||||||
|
|
||||||
if ( SpaceStatus == 'closed' ) {
|
if ( SpaceStatus == 'closed' ) {
|
||||||
count=0
|
count=0
|
||||||
}
|
}
|
||||||
if ( count != Integer.parseInt(entrance_people_counter.previousState().state.toString)) {
|
if ( count != Integer.parseInt(entrance_people_counter.previousState().state.toString)) {
|
||||||
entrance_people_counter.postUpdate(count)
|
entrance_people_counter.postUpdate(count)
|
||||||
|
logInfo("door", "People counter set to "+ count)
|
||||||
// fresh run needs a max init, later we use persistence to init
|
// fresh run needs a max init, later we use persistence to init
|
||||||
if (entrance_people_counter_max.state == NULL) {entrance_people_counter_max.postUpdate(count) }
|
if (entrance_people_counter_max.state == NULL) {entrance_people_counter_max.postUpdate(count) }
|
||||||
// count is bigger, so we got a new maximum
|
// count is bigger, so we got a new maximum
|
||||||
|
|
|
@ -38,7 +38,7 @@ ui = basic,habmin,habpanel,paper
|
||||||
persistence = mapdb
|
persistence = mapdb
|
||||||
|
|
||||||
# A comma-separated list of actions to install (e.g. "action = mail,pushover")
|
# A comma-separated list of actions to install (e.g. "action = mail,pushover")
|
||||||
action = mail,twitter
|
action = twitter
|
||||||
|
|
||||||
# A comma-separated list of transformation services to install (e.g. "transformation = map,jsonpath")
|
# A comma-separated list of transformation services to install (e.g. "transformation = map,jsonpath")
|
||||||
transformation = jsonpath,map,regex,scale,xpath
|
transformation = jsonpath,map,regex,scale,xpath
|
||||||
|
@ -47,5 +47,5 @@ transformation = jsonpath,map,regex,scale,xpath
|
||||||
#voice =
|
#voice =
|
||||||
|
|
||||||
# A comma-separated list of miscellaneous services to install (e.g. "misc = myopenhab")
|
# A comma-separated list of miscellaneous services to install (e.g. "misc = myopenhab")
|
||||||
misc = #restdocs
|
misc =
|
||||||
|
|
||||||
|
|
|
@ -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
|
|
@ -20,5 +20,5 @@ case "$1" in
|
||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
/usr/bin/curl --max-time 1 --silent --data key="$spaceapikey" --data-urlencode sensors='{"state":{"open":'"$openstate"',"lastchange":'"$nai"'}}' https://spaceapi.syn2cat.lu/sensor/set
|
/usr/bin/curl --max-time 3 --silent --data key="$spaceapikey" --data-urlencode sensors='{"state":{"open":'"$openstate"',"lastchange":'"$nai"'}}' https://spaceapi.syn2cat.lu/sensor/set
|
||||||
|
|
||||||
|
|
|
@ -9,5 +9,5 @@ then
|
||||||
fi
|
fi
|
||||||
spaceapikey="$(cat "$(dirname $0)"/spaceapikey.txt)"
|
spaceapikey="$(cat "$(dirname $0)"/spaceapikey.txt)"
|
||||||
presency="$1"
|
presency="$1"
|
||||||
/usr/bin/curl --max-time 1 --silent --data key="$spaceapikey" --data-urlencode sensors='{"sensors":{"people_now_present":[{"value":'"$presency"'}]}}' https://spaceapi.syn2cat.lu/sensor/set
|
/usr/bin/curl --max-time 3 --silent --data key="$spaceapikey" --data-urlencode sensors='{"sensors":{"people_now_present":[{"value":'"$presency"'}]}}' https://spaceapi.syn2cat.lu/sensor/set
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue