added people counter, door status, status lamp, soldering table
projection screen as rollershutter IR piloting of amplifier and BD playermaster
parent
17b392487e
commit
a02aee8dc4
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
|
||||
</project>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/openhab2.iml" filepath="$PROJECT_DIR$/openhab2.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,318 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="ce2b4c36-48c0-4c10-865f-25443d2ecb01" name="Default Changelist" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/items/level2.items" beforeDir="false" afterPath="$PROJECT_DIR$/items/level2.items" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/rules/level2.rules" beforeDir="false" afterPath="$PROJECT_DIR$/rules/level2.rules" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/services/addons.cfg" beforeDir="false" afterPath="$PROJECT_DIR$/services/addons.cfg" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/services/runtime.cfg" beforeDir="false" afterPath="$PROJECT_DIR$/services/runtime.cfg" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/things/level2.things" beforeDir="false" afterPath="$PROJECT_DIR$/things/level2.things" afterDir="false" />
|
||||
</list>
|
||||
<ignored path="$PROJECT_DIR$/out/" />
|
||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="ChangesViewManager">
|
||||
<option name="groupingKeys">
|
||||
<option value="directory" />
|
||||
</option>
|
||||
</component>
|
||||
<component name="FileEditorManager">
|
||||
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/things/level2.things">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="990">
|
||||
<caret line="66" column="43" selection-start-line="66" selection-start-column="43" selection-end-line="66" selection-end-column="43" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/items/level2.items">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="285">
|
||||
<caret line="20" selection-start-line="20" selection-end-line="20" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/things/all.things.sample">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="390">
|
||||
<caret line="26" column="89" lean-forward="true" selection-start-line="26" selection-start-column="89" selection-end-line="26" selection-end-column="89" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/rules/level2.rules">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="375">
|
||||
<caret line="25" selection-start-line="25" selection-end-line="25" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
</leaf>
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
<option name="RESET_MODE" value="HARD" />
|
||||
</component>
|
||||
<component name="IdeDocumentHistory">
|
||||
<option name="CHANGED_PATHS">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/services/chromecast.cfg" />
|
||||
<option value="$PROJECT_DIR$/things/level2.things" />
|
||||
<option value="$PROJECT_DIR$/items/level2.items" />
|
||||
<option value="$PROJECT_DIR$/rules/level2.rules" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectFrameBounds" extendedState="6">
|
||||
<option name="x" value="260" />
|
||||
<option name="y" value="27" />
|
||||
<option name="width" value="1394" />
|
||||
<option name="height" value="997" />
|
||||
</component>
|
||||
<component name="ProjectView">
|
||||
<navigator proportions="" version="1">
|
||||
<foldersAlwaysOnTop value="true" />
|
||||
</navigator>
|
||||
<panes>
|
||||
<pane id="ProjectPane">
|
||||
<subPane>
|
||||
<expand>
|
||||
<path>
|
||||
<item name="openhab2" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="openhab2" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="openhab2" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="openhab2" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="items" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="openhab2" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="openhab2" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="rules" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="openhab2" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="openhab2" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="services" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="openhab2" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="openhab2" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="things" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="openhab2" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="openhab2" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="transform" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
</expand>
|
||||
<select />
|
||||
</subPane>
|
||||
</pane>
|
||||
<pane id="Scope" />
|
||||
<pane id="PackagesPane" />
|
||||
</panes>
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
<property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1555019935945" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="RunDashboard">
|
||||
<option name="ruleStates">
|
||||
<list>
|
||||
<RuleState>
|
||||
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
|
||||
</RuleState>
|
||||
<RuleState>
|
||||
<option name="name" value="StatusDashboardGroupingRule" />
|
||||
</RuleState>
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="SvnConfiguration">
|
||||
<configuration />
|
||||
</component>
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="ce2b4c36-48c0-4c10-865f-25443d2ecb01" name="Default Changelist" comment="" />
|
||||
<created>1555006799282</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1555006799282</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="Add the first lamps">
|
||||
<created>1555007456798</created>
|
||||
<option name="number" value="00001" />
|
||||
<option name="presentableId" value="LOCAL-00001" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1555007456798</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00002" summary="Add beamer/chromecast items and rules">
|
||||
<created>1555014306510</created>
|
||||
<option name="number" value="00002" />
|
||||
<option name="presentableId" value="LOCAL-00002" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1555014306510</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00003" summary="Add the phone ringing flash light">
|
||||
<created>1555532343346</created>
|
||||
<option name="number" value="00003" />
|
||||
<option name="presentableId" value="LOCAL-00003" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1555532343346</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="4" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="-2" y="-1" width="1924" height="1057" extended-state="6" />
|
||||
<layout>
|
||||
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.18796591" />
|
||||
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
|
||||
<window_info id="Image Layers" order="2" />
|
||||
<window_info id="Designer" order="3" />
|
||||
<window_info id="UI Designer" order="4" />
|
||||
<window_info id="Capture Tool" order="5" />
|
||||
<window_info id="Favorites" order="6" side_tool="true" />
|
||||
<window_info anchor="bottom" id="Message" order="0" />
|
||||
<window_info anchor="bottom" id="Find" order="1" />
|
||||
<window_info anchor="bottom" id="Run" order="2" />
|
||||
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
|
||||
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
|
||||
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
|
||||
<window_info anchor="bottom" id="TODO" order="6" />
|
||||
<window_info anchor="bottom" id="Terminal" order="7" weight="0.49627262" />
|
||||
<window_info anchor="bottom" id="Event Log" order="8" side_tool="true" />
|
||||
<window_info active="true" anchor="bottom" id="Version Control" order="9" visible="true" weight="0.25026625" />
|
||||
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
|
||||
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
|
||||
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
|
||||
<window_info anchor="right" id="Palette" order="3" />
|
||||
<window_info anchor="right" id="Maven" order="4" />
|
||||
<window_info anchor="right" id="Theme Preview" order="5" />
|
||||
<window_info anchor="right" id="Capture Analysis" order="6" />
|
||||
<window_info anchor="right" id="Palette	" order="7" />
|
||||
</layout>
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
<option name="TAB_STATES">
|
||||
<map>
|
||||
<entry key="MAIN">
|
||||
<value>
|
||||
<State>
|
||||
<option name="RECENTLY_FILTERED_USER_GROUPS">
|
||||
<collection />
|
||||
</option>
|
||||
<option name="RECENTLY_FILTERED_BRANCH_GROUPS">
|
||||
<collection />
|
||||
</option>
|
||||
<option name="COLUMN_ORDER">
|
||||
<list>
|
||||
<option value="0" />
|
||||
<option value="1" />
|
||||
<option value="2" />
|
||||
<option value="3" />
|
||||
</list>
|
||||
</option>
|
||||
</State>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
<option name="RECENT_FILTERS">
|
||||
<map>
|
||||
<entry key="Branch">
|
||||
<value>
|
||||
<list />
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="User">
|
||||
<value>
|
||||
<list />
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="Add the first lamps" />
|
||||
<MESSAGE value="Add beamer/chromecast items and rules" />
|
||||
<MESSAGE value="Add the phone ringing flash light" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="Add the phone ringing flash light" />
|
||||
</component>
|
||||
<component name="editorHistoryManager">
|
||||
<entry file="file://$PROJECT_DIR$/transform/en.map">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/transform/readme.txt">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="75">
|
||||
<caret line="5" lean-forward="true" selection-start-line="5" selection-end-line="5" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/services/chromecast.cfg">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state>
|
||||
<caret column="32" selection-start-column="32" selection-end-column="32" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/things/level2.things">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="990">
|
||||
<caret line="66" column="43" selection-start-line="66" selection-start-column="43" selection-end-line="66" selection-end-column="43" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/items/level2.items">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="285">
|
||||
<caret line="20" selection-start-line="20" selection-end-line="20" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/rules/level2.rules">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="375">
|
||||
<caret line="25" selection-start-line="25" selection-end-line="25" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/things/all.things.sample">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="390">
|
||||
<caret line="26" column="89" lean-forward="true" selection-start-line="26" selection-start-column="89" selection-end-line="26" selection-end-column="89" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</component>
|
||||
<component name="masterDetails">
|
||||
<states>
|
||||
<state key="ProjectJDKs.UI">
|
||||
<settings>
|
||||
<last-edited>1.8</last-edited>
|
||||
<splitter-proportions>
|
||||
<option name="proportions">
|
||||
<list>
|
||||
<option value="0.2" />
|
||||
</list>
|
||||
</option>
|
||||
</splitter-proportions>
|
||||
</settings>
|
||||
</state>
|
||||
</states>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,22 @@
|
|||
Installing proxy for paperUI
|
||||
sudo bash
|
||||
apt-get update
|
||||
apt-get install nginx
|
||||
|
||||
rm /etc/nginx/sites-enabled/default
|
||||
cat >/etc/nginx/sites-available/openhab <<"EOF"
|
||||
server {
|
||||
listen 80;
|
||||
server_name lights.level2.lu;
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:8080/basicui/;
|
||||
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;
|
||||
}
|
||||
}
|
||||
EOF
|
||||
ln -s /etc/nginx/sites-available/openhab /etc/nginx/sites-enabled/
|
||||
service nginx restart
|
|
@ -0,0 +1 @@
|
|||
Switch all_engineering_lights "All Engineering Lights" <lightbulb> (engineering)
|
|
@ -0,0 +1 @@
|
|||
Switch all_lights "All Lights" <lightbulb> (level2)
|
|
@ -7,16 +7,22 @@ Group engineering "Engineering" (main_floor)
|
|||
Group lab "Lab" (main_floor)
|
||||
Group chill_zone "Chill Zone" (main_floor)
|
||||
Group entrance "Entrance" (main_floor)
|
||||
Group area42 "Area42" (main_floor)
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
|
||||
Switch entrance_door_status "Door Status" { channel="mqtt:topic:entrance_door_status:status" }
|
||||
Number entrance_people_counter "People Counter [%s]" <parents_1_1> (entrance)
|
||||
Switch entrance_door_status "Door Status" { channel="mqtt:topic:entrance_door_status:status" }
|
||||
Switch entrance_ceiling_lamps "Ceiling Lamps" <lightbulb> (entrance) { channel="mqtt:topic:entrance_ceiling_lamps:power" }
|
||||
Switch chill_zone_lamps "Lamps" <lightbulb> (chill_zone) { channel="mqtt:topic:chill_zone_lamps:power" }
|
||||
Switch engineering_table_lamps "Table Lamps" <lightbulb> (engineering) { channel="mqtt:topic:engineering_table_lamps:power" }
|
||||
Switch engineering_ceiling_lamps "Ceiling Lamps" <lightbulb> (engineering) { channel="mqtt:topic:engineering_ceiling_lamps:power" }
|
||||
Switch engineering_status_lamp "Status Lamp" <lightbulb> (engineering) { channel="mqtt:topic:engineering_status_lamp:power" }
|
||||
Switch engineering_ceiling_phone_flash "Ceiling Phone Flash" <lightbulb> (engineering) { channel="mqtt:topic:engineering_phone_flash:pulse" }
|
||||
Switch area42_status_lamp "Status Lamp" <lightbulb> (area42) { channel="mqtt:topic:area42_status_lamp:power" }
|
||||
Switch lab_soldering_table "Soldering table" <lightbulb> (lab) { channel="mqtt:topic:mosquitto:lab_soldering_table:power" }
|
||||
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
|
@ -38,6 +44,10 @@ Switch chill_zone_beamer
|
|||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
//Switch chill_zone_meaow "Meaow" {channel="exec:command:meaow:run"}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
Switch chill_zone_screen_button_up
|
||||
"Screen up"
|
||||
{ channel="mqtt:topic:chill_zone_screen:up", autoupdate="false" }
|
||||
|
@ -49,3 +59,10 @@ Switch chill_zone_screen_button_stop
|
|||
Switch chill_zone_screen_button_down
|
||||
"Screen down"
|
||||
{ channel="mqtt:topic:chill_zone_screen:down", autoupdate="false" }
|
||||
|
||||
Rollershutter chill_projection_screen "Projection Screen"
|
||||
|
||||
|
||||
String IRCode_01 "IR Code" { channel="mqtt:topic:mosquitto:irremote:ir_code" }
|
||||
String proxyIR
|
||||
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
Strategies {
|
||||
default = everyChange
|
||||
}
|
||||
|
||||
Items {
|
||||
entrance_people_counter: strategy = everyChange
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
rule "All Lights ON"
|
||||
when
|
||||
Item all_lights changed from OFF to ON
|
||||
then
|
||||
engineering_table_lamps.sendCommand("ON")
|
||||
engineering_ceiling_lamps.sendCommand("ON")
|
||||
//all_engineering_lights.postUpdate("ON")
|
||||
chill_zone_lamps.sendCommand("ON")
|
||||
entrance_ceiling_lamps.sendCommand("ON")
|
||||
end
|
||||
|
||||
|
||||
rule "All Lights OFF"
|
||||
when
|
||||
Item all_lights changed from ON to OFF
|
||||
then
|
||||
engineering_table_lamps.sendCommand("OFF")
|
||||
engineering_ceiling_lamps.sendCommand("OFF")
|
||||
chill_zone_lamps.sendCommand("OFF")
|
||||
entrance_ceiling_lamps.sendCommand("OFF")
|
||||
end
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
rule "Engineering Lights ON"
|
||||
when
|
||||
Item all_engineering_lights changed from OFF to ON
|
||||
then
|
||||
engineering_table_lamps.sendCommand("ON")
|
||||
engineering_ceiling_lamps.sendCommand("ON")
|
||||
end
|
||||
|
||||
|
||||
rule "Engineering Lights OFF"
|
||||
when
|
||||
Item all_engineering_lights changed from ON to OFF
|
||||
then
|
||||
engineering_table_lamps.sendCommand("OFF")
|
||||
engineering_ceiling_lamps.sendCommand("OFF")
|
||||
end
|
||||
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
rule "proxy IR mqtt"
|
||||
when
|
||||
Item proxyIR received command
|
||||
then
|
||||
IRCode_01.sendCommand(transform("MAP", "ir.map", receivedCommand.toString))
|
||||
end
|
|
@ -1,4 +1,6 @@
|
|||
|
||||
var Timer ChromeCastOffTimer = null
|
||||
|
||||
rule "Door Status"
|
||||
when
|
||||
Item entrance_door_status changed
|
||||
|
@ -15,6 +17,7 @@ then
|
|||
engineering_table_lamps.sendCommand("ON")
|
||||
engineering_ceiling_lamps.sendCommand("ON")
|
||||
engineering_status_lamp.sendCommand("ON")
|
||||
area42_status_lamp.sendCommand("ON")
|
||||
} else {
|
||||
logInfo('door', 'closed')
|
||||
// turn the beamer off
|
||||
|
@ -25,6 +28,8 @@ then
|
|||
engineering_table_lamps.sendCommand("OFF")
|
||||
engineering_ceiling_lamps.sendCommand("OFF")
|
||||
engineering_status_lamp.sendCommand("OFF")
|
||||
area42_status_lamp.sendCommand("OFF")
|
||||
lab_soldering_table.sendCommand("OFF")
|
||||
}
|
||||
|
||||
|
||||
|
@ -33,6 +38,31 @@ end
|
|||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
rule "Poll People Counter"
|
||||
when
|
||||
// sec min hour day month weekday year(opt)
|
||||
Time cron "*/2 * * ? * *"
|
||||
then
|
||||
val response = sendHttpGetRequest("http://10.2.113.8/output.cgi")
|
||||
val count = java.lang.Integer.parseInt(
|
||||
transform("XPATH", "/table/tr[4]/td[2]/text()", response).trim()
|
||||
)
|
||||
if ( count != Integer.parseInt(entrance_people_counter.previousState().state.toString)) {
|
||||
entrance_people_counter.postUpdate(count)
|
||||
}
|
||||
end
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
rule "Tweet People Count"
|
||||
when
|
||||
Item entrance_people_counter changed
|
||||
then
|
||||
// sendTweet('There are currently ' + entrance_people_counter.state.toString + ' hackers present. Just pass by!')
|
||||
end
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
rule "Phone Ringing"
|
||||
when
|
||||
Time cron "*/2 * * ? * *"
|
||||
|
@ -68,49 +98,47 @@ end
|
|||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
|
||||
rule "Chromecast changed"
|
||||
when
|
||||
Item chill_zone_chromecast_status changed
|
||||
then
|
||||
chill_zone_beamer.sendCommand("ON")
|
||||
chill_zone_screen_button_down.sendCommand("ON")
|
||||
val app = chill_zone_chromecast_status.state.toString
|
||||
if (app === null || app == UNDEF || app == 'UNDEF' || app == '' ) {
|
||||
// set input to DVI - hackerspace video
|
||||
sendHttpGetRequest("http://10.2.113.7/tgi/return.tgi?command=2a3109f6070566")
|
||||
logInfo('beamer', 'Switch to input DVI')
|
||||
val l2state = entrance_door_status.state.toString
|
||||
if (l2state == 'ON') {
|
||||
// do nothing if Level2 is closed
|
||||
|
||||
} else {
|
||||
|
||||
val app = chill_zone_chromecast_status.state.toString
|
||||
if (app === null || app == UNDEF || app == 'UNDEF' || app == '' || app == 'BackDrop' ) {
|
||||
// set input to DVI - hackerspace video
|
||||
logInfo('beamer', 'start 2min delay before switch input to DVI')
|
||||
// ChromeCastOffTimer.cancel() // stop any timer running
|
||||
ChromeCastOffTimer=createTimer(now.plusSeconds(30)) [
|
||||
app = chill_zone_chromecast_status.state.toString
|
||||
if (app === null || app == UNDEF || app == 'UNDEF' || app == '' || app == 'BackDrop' ) {
|
||||
sendHttpGetRequest("http://10.2.113.7/tgi/return.tgi?command=2a3109f6070566")
|
||||
logInfo('beamer', 'Switch to input DVI (after 2min)')
|
||||
} else {
|
||||
logInfo('beamer', 'after 2min, chromecast again streaming. Not switching off.')
|
||||
}
|
||||
]
|
||||
} else {
|
||||
if (ChromeCastOffTimer !== null) {
|
||||
logInfo('chromecast', 'disabling off timer')
|
||||
ChromeCastOffTimer.cancel() // stop any timer running
|
||||
} else {
|
||||
logInfo('chromecast', 'no off time running')
|
||||
}
|
||||
// only switch beamer on if chromecast is actually showing something
|
||||
logInfo('chromecast', 'is streaming from '+app)
|
||||
chill_zone_beamer.sendCommand("ON")
|
||||
chill_zone_screen_button_down.sendCommand("ON")
|
||||
// set input to HDMI2 - chromecast
|
||||
sendHttpGetRequest("http://10.2.113.7/tgi/return.tgi?command=2a3109f6071576")
|
||||
logInfo('beamer', 'Switch to input HDMI2')
|
||||
val state = chill_zone_beamer.state.toString
|
||||
logInfo('beamer', 'Switch from {} to input HDMI2',state)
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
rule "Screen up"
|
||||
when
|
||||
Item chill_zone_screen_button_up received command ON
|
||||
then
|
||||
logInfo('screen', 'Screen up')
|
||||
Thread::sleep(2000)
|
||||
chill_zone_screen_button_up.sendCommand(OFF)
|
||||
end
|
||||
|
||||
rule "Screen stop"
|
||||
when
|
||||
Item chill_zone_screen_button_stop received command ON
|
||||
then
|
||||
logInfo('screen', 'Screen stop')
|
||||
Thread::sleep(2000)
|
||||
chill_zone_screen_button_stop.sendCommand(OFF)
|
||||
end
|
||||
|
||||
rule "Screen down"
|
||||
when
|
||||
Item chill_zone_screen_button_down received command ON
|
||||
then
|
||||
logInfo('screen', 'Screen down')
|
||||
Thread::sleep(2000)
|
||||
chill_zone_screen_button_down.sendCommand(OFF)
|
||||
end
|
|
@ -0,0 +1,62 @@
|
|||
// this basically implements a vitual device
|
||||
// first the 3 buttons
|
||||
rule "Screen up"
|
||||
when
|
||||
Item chill_zone_screen_button_up received command ON
|
||||
then
|
||||
logInfo('screen', 'Screen up')
|
||||
Thread::sleep(1000)
|
||||
chill_zone_screen_button_up.sendCommand(OFF)
|
||||
end
|
||||
|
||||
rule "Screen stop"
|
||||
when
|
||||
Item chill_zone_screen_button_stop received command ON
|
||||
then
|
||||
logInfo('screen', 'Screen stop')
|
||||
Thread::sleep(1000)
|
||||
chill_zone_screen_button_stop.sendCommand(OFF)
|
||||
end
|
||||
|
||||
rule "Screen down"
|
||||
when
|
||||
Item chill_zone_screen_button_down received command ON
|
||||
then
|
||||
logInfo('screen', 'Screen down')
|
||||
Thread::sleep(1000)
|
||||
chill_zone_screen_button_down.sendCommand(OFF)
|
||||
end
|
||||
|
||||
// and here is the thing as a window blind
|
||||
rule "Chill Projection Screen"
|
||||
when
|
||||
Item chill_projection_screen received command
|
||||
then
|
||||
switch(receivedCommand.toString.toUpperCase){
|
||||
case "UP": {
|
||||
chill_zone_screen_button_up.sendCommand("ON")
|
||||
}
|
||||
case "STOP": {
|
||||
chill_zone_screen_button_stop.sendCommand("ON")
|
||||
}
|
||||
case "DOWN": {
|
||||
chill_zone_screen_button_down.sendCommand("ON")
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
// val maxCount = 1
|
||||
// if (count > maxCount) {
|
||||
//logInfo("loggerName", "more than {}", maxCount)
|
||||
// chill_zone_meaow.sendCommand("ON")
|
||||
|
||||
|
||||
// while(chill_zone_meaow.state != OFF){
|
||||
// Thread::sleep(500)
|
||||
// }
|
||||
|
||||
// Thread::sleep(3500)
|
||||
|
||||
//playSound("doorbell.mp3")
|
||||
// }
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
# 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
|
||||
legacy = true
|
||||
|
||||
# A comma-separated list of bindings to install (e.g. "binding = sonos,knx,zwave")
|
||||
binding = chromecast,mqtt,http1,exec,systeminfo
|
||||
|
@ -35,10 +35,10 @@ binding = chromecast,mqtt,http1,exec,systeminfo
|
|||
ui = basic,habmin,habpanel,paper
|
||||
|
||||
# A comma-separated list of persistence services to install (e.g. "persistence = rrd4j,jpa")
|
||||
#persistence = influxdb
|
||||
persistence = mapdb
|
||||
|
||||
# A comma-separated list of actions to install (e.g. "action = mail,pushover")
|
||||
action = mail
|
||||
action = mail,twitter,mqtt
|
||||
|
||||
# A comma-separated list of transformation services to install (e.g. "transformation = map,jsonpath")
|
||||
transformation = jsonpath,map,regex,scale,xpath
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
# The persistence service to use if no other is specified.
|
||||
#
|
||||
#org.eclipse.smarthome.persistence:default=
|
||||
org.eclipse.smarthome.persistence:default=mapdb
|
||||
|
||||
################### AUDIO #######################
|
||||
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
sitemap default label="Level2" {
|
||||
Frame label="Lights" {
|
||||
Switch item=chill_zone_lamps label="Chill Lights" icon="light"
|
||||
Switch item=all_engineering_lights label="Engineering Lights" icon="light"
|
||||
Switch item=all_lights label="All Lights" icon="light"
|
||||
}
|
||||
Frame label="Multimedia" {
|
||||
Switch item=chill_zone_beamer label="Beamer" icon="projector"
|
||||
// mir brauchen en screen rule mat 3 status dei een kann setzen
|
||||
// Switch item=chill_zone_screen_button_up label="Projection Screen (todo)" icon="screen" mappings=[up="up",stop="stop",down="down"]
|
||||
Switch item=chill_projection_screen icon="screen" mappings=[UP="up",STOP="stop",DOWN="down"]
|
||||
|
||||
Frame label="Amplifier" {
|
||||
Switch item=proxyIR label="power" mappings=['amp_on'='on','amp_off'='off']
|
||||
Switch item=proxyIR label="volume" mappings=['amp_volup'='up','amp_voldown'='down']
|
||||
Selection item=proxyIR label="input" mappings=['amp_jack1'='jack1','amp_jack2'='jack2','amp_hdmi'='hdmi','amp_optical'='optical','amp_cd'='cd','amp_tuner'='tuner']
|
||||
}
|
||||
Frame label="Bluray" {
|
||||
Switch item=proxyIR label="power" mappings=['br_power'='power']
|
||||
Switch item=proxyIR label="play" mappings=['br_play'='play','br_pause'='pause'] icon="mediacontrol"
|
||||
Switch item=proxyIR label="control" mappings=['br_menu'='menu','br_ok'='ok']
|
||||
Switch item=proxyIR label="navigate" mappings=['br_left'='left','br_up'='up','br_down'='down','br_right'='right'] icon="movecontrol"
|
||||
Switch item=proxyIR label="language" mappings=['br_language'='audio','br_subtitle'='subtitles']
|
||||
}
|
||||
}
|
||||
Frame label="Other" {
|
||||
// een knaeppchen deen nemmen aus geht
|
||||
Switch item=lab_soldering_table label="Soldering Table" icon="poweroutlet" mappings=[OFF="off"]
|
||||
Switch item=engineering_ceiling_phone_flash label="Phone flashlight" icon="siren" mappings=[OFF="off"]
|
||||
// wei switchen ech dei 2 status lights?. Dat hei ass fir status un ze maachen falls se net un wiren
|
||||
Switch item=area42_status_lamp label="Status lights (todo)" mappings=[ON="ON"]
|
||||
}
|
||||
Frame label="Main Floor" icon="firstfloor" {
|
||||
Group item=engineering
|
||||
// Group item=lab
|
||||
Group item=chill_zone
|
||||
Group item=entrance
|
||||
|
||||
// Selection item=chill_zone_beamer_input
|
||||
// label="Beamer Input"
|
||||
// mappings=[
|
||||
// 0="DVI", // Hackerspace video
|
||||
// 1="HDMI 1",
|
||||
// 2="HDMI 2", // Chromecast
|
||||
// 3="VGA 1",
|
||||
// 4="VGA 2"
|
||||
// ]
|
||||
}
|
||||
Frame label="Ground Floor" icon="groundfloor" {
|
||||
Group item=ground_floor
|
||||
// Image url="https://raw.githubusercontent.com/wiki/openhab/openhab/images/features.png"
|
||||
}
|
||||
}
|
|
@ -76,7 +76,38 @@ Bridge mqtt:broker:mosquitto "Mosquitto" [
|
|||
]
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
Thing topic area42_status_lamp "Area42 Status Lamp" @ "Area42" {
|
||||
Channels:
|
||||
Type switch : power "Power" [
|
||||
commandTopic="cmnd/area42/status_lamp/Power"
|
||||
]
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
Thing topic lab_soldering_table "Soldering table" @ "Lab" {
|
||||
Channels:
|
||||
Type switch : power "Power" [
|
||||
commandTopic="cmnd/lab/soldering_table/Power", stateTopic="stat/lab/soldering_table/Power"
|
||||
]
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------§
|
||||
|
||||
|
||||
Thing topic irremote "IR remote" @ "Chill Zone" {
|
||||
|
||||
Type string : ir_code "ircode"
|
||||
[ commandTopic="cmnd/chill_zone/irremote/IRSEND"
|
||||
]
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// See services/chromecast.cfg for the callback URL
|
||||
Thing chromecast:chromecast:b000d809ccb35a409a3dd3d14e0fbf08 [ipAddress="10.2.113.120", port=8009]
|
||||
|
||||
//Thing exec:command:meaow [command="espeak -s 250 'meow meow meow meow meow meow meow meow' && espeak -s 250 -p 99 'meow meow meow meow meow meow' && espeak -s 250 -p 10 'meow meow meow meow meow meow' && espeak -s 30 -p 1 'meow meow meow meow'", autorun=false]
|
||||
//Thing exec:command:meaow [command="espeak -s 250 'meow meow meow meow meow meow meow meow'", autorun=false]
|
|
@ -0,0 +1,22 @@
|
|||
amp_off = {"Protocol":"NEC","Bits":32,"Data":"0xA55AD827"}
|
||||
amp_on = {"Protocol":"NEC","Bits":32,"Data":"0xA55A38C7"}
|
||||
amp_jack1 = {"Protocol":"NEC","Bits":32,"Data":"0xA55AF00F"}
|
||||
amp_jack2 = {"Protocol":"NEC","Bits":32,"Data":"0xA55A708F"}
|
||||
amp_hdmi = {"Protocol":"NEC","Bits":32,"Data":"0xA55AA15E"}
|
||||
amp_optical = {"Protocol":"NEC","Bits":32,"Data":"0xA55A8877"}
|
||||
amp_cd = {"Protocol":"NEC","Bits":32,"Data":"0xA55A32CD"}
|
||||
amp_tuner = {"Protocol":"NEC","Bits":32,"Data":"0xA55AE21D"}
|
||||
amp_volup = {"Protocol":"NEC","Bits":32,"Data":"0xA55A50AF"}
|
||||
amp_voldown = {"Protocol":"NEC","Bits":32,"Data":"0xA55AD02F"}
|
||||
|
||||
br_power = {"Protocol":"SONY","Bits":20,"Data":"0xA8B47"}
|
||||
br_menu = {"Protocol":"SONY","Bits":20,"Data":"0x34B47"}
|
||||
br_up = {"Protocol":"SONY","Bits":20,"Data":"0x9CB47"}
|
||||
br_down = {"Protocol":"SONY","Bits":20,"Data":"0x5CB47"}
|
||||
br_left = {"Protocol":"SONY","Bits":20,"Data":"0xDCB47"}
|
||||
br_right = {"Protocol":"SONY","Bits":20,"Data":"0x3CB47"}
|
||||
br_ok = {"Protocol":"SONY","Bits":20,"Data":"0xBCB47"}
|
||||
br_pause = {"Protocol":"SONY","Bits":20,"Data":"0x98B47"}
|
||||
br_play = {"Protocol":"SONY","Bits":20,"Data":"0x58B47"}
|
||||
br_language = {"Protocol":"SONY","Bits":20,"Data":"0x26B47"}
|
||||
br_subtitle = {"Protocol":"SONY","Bits":20,"Data":"0xC6B47"}
|
Loading…
Reference in New Issue