From 78d4c6c5e1ea95ac665b550af981a54ef5480f53 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 1 Jul 2018 21:48:05 +0200 Subject: [PATCH] =?UTF-8?q?import=20item=C3=B3w?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- items/README | 5 ++ items/astro.items | 7 +++ items/kodi.items | 5 ++ items/mpd.items | 10 ++++ items/onewire.items | 24 +++++++++ items/wifi.items | 121 ++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 172 insertions(+) create mode 100644 items/README create mode 100644 items/astro.items create mode 100644 items/kodi.items create mode 100644 items/mpd.items create mode 100644 items/onewire.items create mode 100644 items/wifi.items diff --git a/items/README b/items/README new file mode 100644 index 0000000..9ef0d59 --- /dev/null +++ b/items/README @@ -0,0 +1,5 @@ +Put any file containing item definitions here. They will be activated automatically. + +Note: Item definition files must have the extension '*.items' + +Demo-files can be obtained from the archive 'distribution-demo-*.zip'. diff --git a/items/astro.items b/items/astro.items new file mode 100644 index 0000000..addae0f --- /dev/null +++ b/items/astro.items @@ -0,0 +1,7 @@ + +DateTime dtSunset_Time "Zachód Słońca [%1$tH:%1$tM]" {astro="planet=sun, type=set, property=end"} + +Switch sSunset_Event { astro="planet=sun, type=set, property=end"} +Switch sSunset_Event_in_halfhour { astro="planet=sun, type=set, property=end, offset=-30"} +Switch sSunset_Event_in_hour { astro="planet=sun, type=set, property=end, offset=-60"} + diff --git a/items/kodi.items b/items/kodi.items new file mode 100644 index 0000000..379f3f5 --- /dev/null +++ b/items/kodi.items @@ -0,0 +1,5 @@ +Dimmer Kodi_Volume "Głośność Kodi [%s]" (Kodi, salon) { xbmc="=[#salon|Application.Volume]" } +String Kodi_Title "Odtwarzanie: [%s]" (Kodi, salon) { xmbc="<[#salon|Player.Title]" } +Switch Kodi_PlayPause "Kodi Play/Pause" { xbmc=">[#salon|Player.PlayPause]" } +/*Switch Kodi_PlayPause "Kodi Play/Pause" { xbmc=">[#salon|Player.PlayPause]", autoupdate="false" } */ +String Kodi_State "Kodi State [%s]" { xbmc="<[#salon|Player.State]" } diff --git a/items/mpd.items b/items/mpd.items new file mode 100644 index 0000000..aef89f0 --- /dev/null +++ b/items/mpd.items @@ -0,0 +1,10 @@ +String Mpd_CurrentTrack "Current track [%s]" { mpd="TITLE:quodlibet:tracktitle" } +String Mpd_CurrentArtist "Current artist [%s]" { mpd="ARTIST:quodlibet:trackartist" } +String Mpd_ConcatInfo "Tytuł: [%s]" + +Switch Mpd_quodlibet_StartStop "Muzyka Start/Stop" (QuodLibet, salon) { mpd="ON:quodlibet:play, OFF:quodlibet:stop" } +Switch Mpd_quodlibet_StartStop_expected "Muzyka wg automatyki" +Switch Mpd_quodlibet_NextPrev "Piosenka" (QuodLibet, salon) { mpd="ON:quodlibet:next, OFF:quodlibet:prev" } +Dimmer Mpd_quodlibet_VolumeControl "Głośność muzyki [%d%%]" (QuodLibet, salon) { mpd="INCREASE:quodlibet:volume_increase, DECREASE:quodlibet:volume_decrease, PERCENT:quodlibet:volume" } + + diff --git a/items/onewire.items b/items/onewire.items new file mode 100644 index 0000000..c1ad190 --- /dev/null +++ b/items/onewire.items @@ -0,0 +1,24 @@ + +Group temperatury + +Switch sOWFS01 "Światełka [%s]" { onewire="deviceId=12.0C7045000000;propertyName=PIO.A" } +Switch sOWFS01_expected "Światełka wg automatyki" +Switch sOWFS02 "Lampka nocna [%s]" { onewire="deviceId=12.C56E45000000;propertyName=PIO.A" } +/*Switch sOWFS03 "OneWire włącznik 03 [%s]" { onewire="deviceId=12.7B6845000000;propertyName=PIO.A" } */ + +Number t_spizarnia "Spiżarnia [%.1f °C]" (spizarnia, temperatury) { onewire="deviceId=28.D57325030000;propertyName=temperature" } +Number t_schowek "Schowek [%.1f °C]" (schowek, temperatury) { onewire="deviceId=28.6B4925030000;propertyName=temperature" } +Number t_przedpokoj "Przedpokój [%.1f °C]" (przedpokoj, temperatury) { onewire="deviceId=28.726F25030000;propertyName=temperature" } +Number t_gabinet "Gabinet [%.1f °C]" (gabinet, temperatury) { onewire="deviceId=28.3A4D25030000;propertyName=temperature" } +Number t_salonpd "Salon pd [%.1f °C]" (salonpd, temperatury) { onewire="deviceId=28.357D25030000;propertyName=temperature" } +Number t_salonpln "Salon płn [%.1f °C]" (salonpln, temperatury) { onewire="deviceId=28.FE7A25030000;propertyName=temperature" } +Number t_sypialnia "Sypialnia [%.1f °C]" (sypialnia, temperatury) { onewire="deviceId=28.A14825030000;propertyName=temperature" } + +Number t_kuchnia_lodowka "Lodówka [%.1f °C]" (kuchnia) { onewire="deviceId=28.CB7925030000;propertyName=temperature" } +Number t_kuchnia_zamrazalnik "Zamrażalnik [%.1f °C]" (kuchnia) { onewire="deviceId=28.AD3C25030000;propertyName=temperature" } + +Number t_kuchnia_woda_zimna "Woda zimna [%.1f °C]" (temperatury, kuchnia) { onewire="deviceId=28.D7A12B060000;propertyName=temperature" } +Number t_kuchnia_woda_ciepla "Woda ciepła [%.1f °C]" { onewire="deviceId=28.D77325030000;propertyName=temperature" } + + + diff --git a/items/wifi.items b/items/wifi.items new file mode 100644 index 0000000..b1e5377 --- /dev/null +++ b/items/wifi.items @@ -0,0 +1,121 @@ + +/* vim: set filetype=cpp + + IN + Item myItem {mqtt="[:::], [:::], ..."} + Item myItem {mqtt="[::::], [:::], ..."} + + OUT + Item itemName { mqtt="[::::]" } + + pulses, pwms, etc : https://www.letscontrolit.com/wiki/index.php/GPIO + +spis treści +sonoff01 +sonoff02 - lampka stół +sonoff03 - łazeinka +sonoff04 - przedpokój przy drzwiach wejściowych +d1mini01 - okap +d1mini02 - blat ledki +d1mini03 - prototyp / pilot na kanapie +d1mini04 - odświeżacz +d1mini05 - wskazówka interneu +d1mini06 - schodowy przy salonie +*/ + +/* moc sygnalu */ +Group wifi + +Switch sSONOFF01 "Lampki kanapowe" { mqtt=">[motherqtt:/sonoff01/gpio/12:command:ON:1],>[motherqtt:/sonoff01/gpio/12:command:OFF:0]" } +Number dSONOFF01LED "Lampki kanapowe LED [%s]" { mqtt=">[motherqtt:/sonoff01/pwm/13:command:*:default]" } +Number wSONOFF01 "Wifi s01 kanapa [%d dB]" (wifi) { mqtt="<[motherqtt:/sonoff01/wifi/:state:default]" } +Switch rSONOFF01 "Conn s01 [%s]" { mqtt="<[motherqtt:/sonoff01/status:state:MAP(espeasy_lwt.map)]" } + + +Switch sSONOFF02 "Lampka nad stołem" { mqtt=">[motherqtt:/sonoff02/gpio/12:command:ON:1],>[motherqtt:/sonoff02/gpio/12:command:OFF:0]" } +Switch sSONOFF02_expected "Lampka nad stołem spodziewana" +Number dSONOFF02LED "Lampka stół LED [%s]" { mqtt=">[motherqtt:/sonoff02/pwm/13:command:*:default]" } +Number wSONOFF02 "Wifi s02 stół [%d dB]" (wifi) { mqtt="<[motherqtt:/sonoff02/wifi/:state:default]" } +Switch rSONOFF02 "Conn s02 [%s]" { mqtt="<[motherqtt:/sonoff02/lwt:state:MAP(espeasy_lwt.map)]" } + + +Switch sSONOFF03 "Wiatrak" { mqtt=">[motherqtt:/sonoff03/gpio/12:command:ON:1],>[motherqtt:/sonoff03/gpio/12:command:OFF:0]" } +Number dSONOFF03LED "Wiatrak LED [%s]" { mqtt=">[motherqtt:/sonoff03/pwm/13:command:*:default]" } +Number h_lazienka "Wilgotność [%.1f %%]" { mqtt="<[motherqtt:/sonoff03/dht22/humidity:state:default]" } +Number t_lazienka "Temperatura [%.1f °C]" (temperatury) { mqtt="<[motherqtt:/sonoff03/dht22/temperature:state:default]" } +Number wSONOFF03 "Wifi s03 wiatrak [%d dB]" (wifi) { mqtt="<[motherqtt:/sonoff03/wifi/:state:default]" } +Switch rSONOFF03 "Conn s03 [%s]" { mqtt="<[motherqtt:/sonoff03/status:state:MAP(espeasy_lwt.map)]" } + + +/* przedpokój - sonoff przy drzwiach wejściowych */ +/* LED podpięta jako status */ +Switch sSONOFF06 "Przedpokój" { mqtt=">[motherqtt:/sonoff06/gpio/12:command:ON:1],>[motherqtt:/sonoff06/gpio/12:command:OFF:0]" } +Number dSONOFF06LED "Przedpokój sonoff LED [%s]" { mqtt=">[motherqtt:/sonoff06/pwm/13:command:*:default]" } +Switch sSONOFF06LED "Przedpokój LED" { mqtt=">[motherqtt:/sonoff06/gpio/13:command:ON:1],>[motherqtt:/sonoff06/gpio/13:command:OFF:0]" } +Switch sSONOFF06KEY "Włącznik hall przy drzwiach wejściowych [%s]" { mqtt="<[motherqtt:/sonoff06/touch/wejscie:state:MAP(espeasy_onoff.map)]" } +Number wSONOFF06 "Wifi s06 przedpokój [%d dB]" (wifi) { mqtt="<[motherqtt:/sonoff06/wifi/:state:default]" } +Switch rSONOFF06 "Conn s06 [%s]" { mqtt="<[motherqtt:/sonoff06/lwt:state:MAP(espeasy_lwt.map)]" } + + + +/* d1mini w okapie */ +Number sOKAP_speed +Switch sD1MINI01_bieg1 "Okap bieg 1 [%s]" { mqtt=">[motherqtt:/d1mini01/gpio/12:command:ON:1],>[motherqtt:/d1mini01/gpio/12:command:OFF:0]" } +Switch sD1MINI01_bieg2 "Okap bieg 2 [%s]" { mqtt=">[motherqtt:/d1mini01/gpio/15:command:ON:1],>[motherqtt:/d1mini01/gpio/15:command:OFF:0]" } +Switch sD1MINI01_bieg3 "Okap bieg 3 [%s]" { mqtt=">[motherqtt:/d1mini01/gpio/16:command:ON:1],>[motherqtt:/d1mini01/gpio/16:command:OFF:0]" } +Switch sD1MINI01_swiatlo "Okap światło [%s]" { mqtt=">[motherqtt:/d1mini01/gpio/4:command:ON:1],>[motherqtt:/d1mini01/gpio/4:command:OFF:0]" } +Number dD1MINI01_swiatlo "Okap światło jasność [%s]" { mqtt=">[motherqtt:/d1mini01/pwm/4:command:*:default]" } + +Switch sD1MINI01_lampki_sufitowe "Lampki sufitowe [%s]" { mqtt=">[motherqtt:/d1mini01/gpio/5:command:ON:0],>[motherqtt:/d1mini01/gpio/5:command:OFF:1]" } /* reversed here */ +/*Number dD1MINI01_swiatlo "Okap światło jasność [%s]" { mqtt=">[motherqtt:/d1mini01/pwm/5:command:*:default]" } */ +/* command motherqtt:/d1mini01/cmd , .sendCommand("pwm,2,128,500") */ + +Number wD1MINI01 "Wifi d1m01 okap [%d dB]" (wifi) { mqtt="<[motherqtt:/d1mini01/wifi/:state:default]" } +Switch rD1MINI01 "Conn d1m01 [%s]" { mqtt="<[motherqtt:/d1mini01/status:state:MAP(espeasy_lwt.map)]" } + + + +/* lampki LED nad blatem */ +/* Switch sD1MINI02MOS "Lampki nad blatem [%s]" { mqtt=">[motherqtt:/d1mini02/gpio/5:command:ON:1],>[motherqtt:/d1mini02/gpio/5:command:OFF:0]" } */ +/* włączanie - fade w 200ms, wyłączanie - fade w 600ms */ +Switch sD1MINI02MOS "Lampki nad blatem [%s]" { mqtt=">[motherqtt:/d1mini02/cmd:command:ON:PWM,5,1023,200],>[motherqtt:/d1mini02/cmd:command:OFF:PWM,5,0,600]" } +Number dD1MINI02MOS "Lampki nad blatem śc [%s]" { mqtt=">[motherqtt:/d1mini02/pwm/5:command:*:1]" } +Switch sD1MINI02LEDS "Włącznik nad blatem [%s]" { mqtt="<[motherqtt:/d1mini02/switch/leds:state:MAP(espeasy_onoff.map)]" } +Number wD1MINI02 "Wifi d1m02 blat [%d dB]" (wifi) { mqtt="<[motherqtt:/d1mini02/wifi/:state:default]" } +Switch rD1MINI02 "Conn d1m02 [%s]" { mqtt="<[motherqtt:/d1mini02/lwt:state:MAP(espeasy_lwt.map)]" } + + +/* prototyp */ +Switch sD1MINI03_button_green "Podświetlany przycisk zielony [%s]" { mqtt="<[motherqtt:/d1mini03/button/green:state:MAP(espeasy_onoff.map)]" } +Switch sD1MINI03_button_yellow "Podświetlany przycisk żółty [%s]" { mqtt="<[motherqtt:/d1mini03/button/yellow:state:MAP(espeasy_onoff.map)]" } +Switch sD1MINI03_button_red "Podświetlany przycisk czerwony [%s]" { mqtt="<[motherqtt:/d1mini03/button/red:state:MAP(espeasy_onoff.map)]" } +/* wylaczony - lekkie podswietlenie (1000), wlaczony - full bright (pwm 0) */ +Switch sD1MINI03_light_green "d1m03 light green [%s]" { mqtt=">[motherqtt:/d1mini03/pwm/14:command:ON:900],>[motherqtt:/d1mini03/pwm/14:command:OFF:1021]" } +Switch sD1MINI03_light_yellow "d1m03 light yellow [%s]" { mqtt=">[motherqtt:/d1mini03/pwm/13:command:ON:900],>[motherqtt:/d1mini03/pwm/13:command:OFF:1021]" } +Switch sD1MINI03_light_red "d1m03 light red [%s]" { mqtt=">[motherqtt:/d1mini03/pwm/5:command:ON:900],>[motherqtt:/d1mini03/pwm/5:command:OFF:1021]" } +Number wD1MINI03 "Wifi d1m03 prototyp [%d dB]" (wifi) { mqtt="<[motherqtt:/d1mini03/wifi/:state:default]" } +Switch rD1MINI03 "Conn d1m03 [%s]" { mqtt="<[motherqtt:/d1mini03/status:state:MAP(espeasy_lwt.map)]" } + + + +/* odświeżacz */ +Switch sWC_occupied "WC zajęte" +Number lWC_lux "WC jasność [%.1f lux]" { mqtt="<[motherqtt:/d1mini04/BH1750/lux:state:default]" } +Switch sD1MINI04_refresh "Odświeżenie WC" { + mqtt=">[motherqtt:/d1mini04/gpio/14:command:ON:1],>[motherqtt:/d1mini04/gpio/14:command:OFF:0]", + expire="6s,command=OFF" + } + +Number wD1MINI04 "Wifi d1m04 WC [%d dB]" (wifi) { mqtt="<[motherqtt:/d1mini04/wifi/:state:default]" } +Switch rD1MINI04 "Conn d1m04 [%s]" { mqtt="<[motherqtt:/d1mini04/lwt:state:MAP(espeasy_lwt.map)]" } + + +/* przedpokój włącznik przy salonie */ + +/* diodka teraz jako status działa +Number dD1MINI06LED "Przedpokój d1mini LED [%s]" { mqtt=">[motherqtt:/sonoff06/pwm/13:command:*:default]" } +Switch sD1MINI06LED "Przedpokój LED" { mqtt=">[motherqtt:/d1mini06/gpio/13:command:ON:1],>[motherqtt:/sonoff06/gpio/13:command:OFF:0]" } +*/ +Switch sD1MINI06KEY "Włącznik hall przy salonie [%s]" { mqtt="<[motherqtt:/d1mini06/salon/switch:state:MAP(espeasy_onoff.map)]" } /* GPIO14 */ +Number wD1MINI06 "Wifi d1m06 przedpokój [%d dB]" (wifi) { mqtt="<[motherqtt:/d1mini06/wifi/:state:default]" } +Switch rD1MINI06 "Conn d1m06 [%s]" { mqtt="<[motherqtt:/d1mini06/lwt:state:MAP(espeasy_lwt.map)]" }