Skip to content
Snippets Groups Projects
Commit c19de935 authored by Paul's avatar Paul :turtle:
Browse files

add mpd

parent e6aba81b
No related branches found
No related tags found
No related merge requests found
.vscode
- name: Configure openhab - name: Configure openhab
hosts: home hosts: home
handlers:
- name: restart openhab
systemd:
name: openhab.service
state: restarted
tasks: tasks:
- name: Configure things - name: Configure things
notify: restart openhab
copy: copy:
src: "things/nbsp.things" src: "things/nbsp.things"
dest: "/etc/openhab/things/" dest: "/etc/openhab/things/"
- name: Configure items - name: Configure items
copy: notify: restart openhab
template:
src: "items/nbsp.items" src: "items/nbsp.items"
dest: "/etc/openhab/items/" dest: "/etc/openhab/items/"
- name: Configure rules
notify: restart openhab
copy:
src: "rules/nbsp.rules"
dest: "/etc/openhab/rules/"
// MPDs
Thing mpd:mpd:mpd_wartezimmer "MPD Wartezimmer"@"Wartezimmer" [ ipAddress="mpd.wartezimmer.nobreakspace.org", port=6600 ]
Thing mpd:mpd:mpd_leipzig "MPD Leipzig"@"Werkstatt" [ ipAddress="mpd.leipzig.nobreakspace.org", port=6600 ]
Thing mpd:mpd:mpd_augenpruefraum "MPD Augenprüfraum"@"Augenorüfraum" [ ipAddress="mpd.augenpruefraum.nobreakspace.org", port=6600 ]
// Lightswitch Comfyzone
Thing mqtt:topic:tasmota:tasmota_7C8E28 "Lightswitch Comfyzone"(mqtt:broker:openhab)@"Comfyzone" [ availabilityTopic="tele/tasmota_7C8E28/LWT", payloadAvailable="Online", payloadNotAvailable="Offline" ] { Thing mqtt:topic:tasmota:tasmota_7C8E28 "Lightswitch Comfyzone"(mqtt:broker:openhab)@"Comfyzone" [ availabilityTopic="tele/tasmota_7C8E28/LWT", payloadAvailable="Online", payloadNotAvailable="Offline" ] {
Channels: Channels:
// Sonoff Basic / Sonoff S20 Smart Socket (Read and switch on-state) // Sonoff Basic / Sonoff S20 Smart Socket (Read and switch on-state)
......
// Syntax: // Syntax:
// Type ID "Name" <Icon> {thing_config} // Type ID "Name" <Icon> {thing_config}
// MPDs
{% for mpd in ["augenpruefraum", "wartezimmer", "leipzig"] %}
// MPD {{ mpd }}
Player mpd_{{ mpd }}_player "Player" { channel = "mpd:mpd:mpd_{{ mpd }}:control" }
Dimmer mpd_{{ mpd }}_volume "Volume [%d %%]" { channel = "mpd:mpd:mpd_{{ mpd }}:volume" }
Switch mpd_{{ mpd }}_stop "Stop" { channel = "mpd:mpd:mpd_{{ mpd }}:stop" }
String mpd_{{ mpd }}_album "Album [%s]" { channel = "mpd:mpd:mpd_{{ mpd }}:currentalbum" }
String mpd_{{ mpd }}_artist "Artist [%s]" { channel = "mpd:mpd:mpd_{{ mpd }}:currentartist" }
String mpd_{{ mpd }}_name "Name [%s]" { channel = "mpd:mpd:mpd_{{ mpd }}:currentname" }
Number mpd_{{ mpd }}_song "Song [%d]" { channel = "mpd:mpd:mpd_{{ mpd }}:currentsong" }
Number mpd_{{ mpd }}_song_id "Song Id [%d]" { channel = "mpd:mpd:mpd_{{ mpd }}:currentsongid" }
String mpd_{{ mpd }}_title "Title [%s]" { channel = "mpd:mpd:mpd_{{ mpd }}:currenttitle" }
Number mpd_{{ mpd }}_track "Track [%d]" { channel = "mpd:mpd:mpd_{{ mpd }}:currenttrack" }
{% endfor %}
// Items for Light in augenrprüfraum // Items for Light in augenrprüfraum
Switch augenpruefraum_lightswitch1 "Augenprüfraum 1" <switch> {channel="mqtt:topic:tasmota:tasmota_7C8E28:PowerSwitch1"} Switch augenpruefraum_lightswitch1 "Augenprüfraum 1" <switch> {channel="mqtt:topic:tasmota:tasmota_7C8E28:PowerSwitch1"}
Switch augenpruefraum_lightswitch2 "Augenprüfraum 2" <switch> {channel="mqtt:topic:tasmota:tasmota_7C8E28:PowerSwitch2"} Switch augenpruefraum_lightswitch2 "Augenprüfraum 2" <switch> {channel="mqtt:topic:tasmota:tasmota_7C8E28:PowerSwitch2"}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment