import itemów

This commit is contained in:
root
2018-07-01 21:48:05 +02:00
commit 78d4c6c5e1
6 changed files with 172 additions and 0 deletions

5
items/README Normal file
View File

@@ -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'.

7
items/astro.items Normal file
View File

@@ -0,0 +1,7 @@
DateTime dtSunset_Time "Zachód Słońca [%1$tH:%1$tM]" <sun> {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"}

5
items/kodi.items Normal file
View File

@@ -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]" }

10
items/mpd.items Normal file
View File

@@ -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" }

24
items/onewire.items Normal file
View File

@@ -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]" <temperature> (spizarnia, temperatury) { onewire="deviceId=28.D57325030000;propertyName=temperature" }
Number t_schowek "Schowek [%.1f °C]" <temperature> (schowek, temperatury) { onewire="deviceId=28.6B4925030000;propertyName=temperature" }
Number t_przedpokoj "Przedpokój [%.1f °C]" <temperature> (przedpokoj, temperatury) { onewire="deviceId=28.726F25030000;propertyName=temperature" }
Number t_gabinet "Gabinet [%.1f °C]" <temperature> (gabinet, temperatury) { onewire="deviceId=28.3A4D25030000;propertyName=temperature" }
Number t_salonpd "Salon pd [%.1f °C]" <temperature> (salonpd, temperatury) { onewire="deviceId=28.357D25030000;propertyName=temperature" }
Number t_salonpln "Salon płn [%.1f °C]" <temperature> (salonpln, temperatury) { onewire="deviceId=28.FE7A25030000;propertyName=temperature" }
Number t_sypialnia "Sypialnia [%.1f °C]" <temperature> (sypialnia, temperatury) { onewire="deviceId=28.A14825030000;propertyName=temperature" }
Number t_kuchnia_lodowka "Lodówka [%.1f °C]" <temperature> (kuchnia) { onewire="deviceId=28.CB7925030000;propertyName=temperature" }
Number t_kuchnia_zamrazalnik "Zamrażalnik [%.1f °C]" <temperature> (kuchnia) { onewire="deviceId=28.AD3C25030000;propertyName=temperature" }
Number t_kuchnia_woda_zimna "Woda zimna [%.1f °C]" <temperature> (temperatury, kuchnia) { onewire="deviceId=28.D7A12B060000;propertyName=temperature" }
Number t_kuchnia_woda_ciepla "Woda ciepła [%.1f °C]" <temperature> { onewire="deviceId=28.D77325030000;propertyName=temperature" }

121
items/wifi.items Normal file
View File

@@ -0,0 +1,121 @@
/* vim: set filetype=cpp
IN
Item myItem {mqtt="<direction>[<broker>:<topic>:<type>:<transformer>], <direction>[<broker>:<topic>:<type>:<transformation>], ..."}
Item myItem {mqtt="<direction>[<broker>:<topic>:<type>:<transformer>:<regex_filter>], <direction>[<broker>:<topic>:<type>:<transformation>], ..."}
OUT
Item itemName { mqtt="<direction>[<broker>:<topic>:<type>:<trigger>:<transformation>]" }
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" <whites> { 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> (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" <whites> { 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> (wifi) { mqtt="<[motherqtt:/sonoff02/wifi/:state:default]" }
Switch rSONOFF02 "Conn s02 [%s]" { mqtt="<[motherqtt:/sonoff02/lwt:state:MAP(espeasy_lwt.map)]" }
Switch sSONOFF03 "Wiatrak" <fan> { 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 %%]" <cistern> { mqtt="<[motherqtt:/sonoff03/dht22/humidity:state:default]" }
Number t_lazienka "Temperatura [%.1f °C]" <temperature> (temperatury) { mqtt="<[motherqtt:/sonoff03/dht22/temperature:state:default]" }
Number wSONOFF03 "Wifi s03 wiatrak [%d dB]" <wifi> (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" <whites> { 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" <whites> { 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> (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 <fan>
Switch sD1MINI01_bieg1 "Okap bieg 1 [%s]" <fan> { mqtt=">[motherqtt:/d1mini01/gpio/12:command:ON:1],>[motherqtt:/d1mini01/gpio/12:command:OFF:0]" }
Switch sD1MINI01_bieg2 "Okap bieg 2 [%s]" <fan> { mqtt=">[motherqtt:/d1mini01/gpio/15:command:ON:1],>[motherqtt:/d1mini01/gpio/15:command:OFF:0]" }
Switch sD1MINI01_bieg3 "Okap bieg 3 [%s]" <fan> { mqtt=">[motherqtt:/d1mini01/gpio/16:command:ON:1],>[motherqtt:/d1mini01/gpio/16:command:OFF:0]" }
Switch sD1MINI01_swiatlo "Okap światło [%s]" <whites> { mqtt=">[motherqtt:/d1mini01/gpio/4:command:ON:1],>[motherqtt:/d1mini01/gpio/4:command:OFF:0]" }
Number dD1MINI01_swiatlo "Okap światło jasność [%s]" <whites> { mqtt=">[motherqtt:/d1mini01/pwm/4:command:*:default]" }
Switch sD1MINI01_lampki_sufitowe "Lampki sufitowe [%s]" <whites> { 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]" <whites> { mqtt=">[motherqtt:/d1mini01/pwm/5:command:*:default]" } */
/* command motherqtt:/d1mini01/cmd , .sendCommand("pwm,2,128,500") */
Number wD1MINI01 "Wifi d1m01 okap [%d dB]" <wifi> (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]" <whites> { 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]" <whites> { 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]" <whites> { 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> (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> (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" <present>
Number lWC_lux "WC jasność [%.1f lux]" { mqtt="<[motherqtt:/d1mini04/BH1750/lux:state:default]" }
Switch sD1MINI04_refresh "Odświeżenie WC" <wifi> {
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> (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" <whites> { 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> (wifi) { mqtt="<[motherqtt:/d1mini06/wifi/:state:default]" }
Switch rD1MINI06 "Conn d1m06 [%s]" { mqtt="<[motherqtt:/d1mini06/lwt:state:MAP(espeasy_lwt.map)]" }