]> git.basschouten.com Git - openhab-addons.git/commitdiff
[yamahamusiccast] Add discovery information (#16231)
authorFlorian Hotze <florianh_dev@icloud.com>
Fri, 19 Jan 2024 18:39:12 +0000 (19:39 +0100)
committerGitHub <noreply@github.com>
Fri, 19 Jan 2024 18:39:12 +0000 (19:39 +0100)
* [yamahamusiccast] Add discovery information

Seems like Yamaha is using uppercase `YAMAHA CORPORATION` for the manufacturer info of non-MusicCast devices and normal case `Yamaha Corporation` for MusicCast devices.

* [yamaha] Fix REGEXes for Yamaha binding suggestion and improve description

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
bundles/org.openhab.binding.yamahamusiccast/src/main/resources/OH-INF/addon/addon.xml
bundles/org.openhab.binding.yamahamusiccast/src/main/resources/OH-INF/i18n/yamahamusiccast.properties
bundles/org.openhab.binding.yamahareceiver/src/main/resources/OH-INF/addon/addon.xml
bundles/org.openhab.binding.yamahareceiver/src/main/resources/OH-INF/i18n/yamahareceiver.properties

index 311e4b9e154d18ce5381074f478109223f7d2c5e..14a7da4745284b723b9046d866680baef60d456a 100644 (file)
@@ -4,8 +4,24 @@
        xsi:schemaLocation="https://openhab.org/schemas/addon/v1.0.0 https://openhab.org/schemas/addon-1.0.0.xsd">
 
        <type>binding</type>
-       <name>Yamaha Musiccast Binding</name>
-       <description>This is the binding for Yamaha Musiccast</description>
+       <name>Yamaha MusicCast Binding</name>
+       <description>This is the binding for Yamaha MusicCast.</description>
        <connection>local</connection>
 
+       <discovery-methods>
+               <discovery-method>
+                       <service-type>upnp</service-type>
+                       <match-properties>
+                               <match-property>
+                                       <name>manufacturer</name>
+                                       <regex>.*Yamaha.*</regex>
+                               </match-property>
+                               <match-property>
+                                       <name>deviceType</name>
+                                       <regex>.*MediaRenderer.*</regex>
+                               </match-property>
+                       </match-properties>
+               </discovery-method>
+       </discovery-methods>
+
 </addon:addon>
index 9c6439ee0baa0631d92a26fb607c91474aa6f746..905cc3c11fe02e84c5677a8d9c29de1746b53158 100644 (file)
@@ -1,7 +1,7 @@
 # add-on
 
-addon.yamahamusiccast.name = Yamaha Musiccast Binding
-addon.yamahamusiccast.description = This is the binding for Yamaha Musiccast
+addon.yamahamusiccast.name = Yamaha MusicCast Binding
+addon.yamahamusiccast.description = This is the binding for Yamaha MusicCast.
 
 # thing types
 
index 192fe07be48218273a72ded8a4ba2eb5371f299e..a8724b936d3bfb5f61a77dd4f5bb1305805dbfb7 100644 (file)
@@ -5,7 +5,7 @@
 
        <type>binding</type>
        <name>YamahaReceiver Binding</name>
-       <description>For all network enabled Yamaha receivers.</description>
+       <description>This is the binding for network enabled Yamaha receivers (without MusicCast support).</description>
        <connection>local</connection>
 
        <discovery-methods>
@@ -14,7 +14,7 @@
                        <match-properties>
                                <match-property>
                                        <name>manufacturer</name>
-                                       <regex>(?i).*YAMAHA.*</regex>
+                                       <regex>.*YAMAHA.*</regex>
                                </match-property>
                                <match-property>
                                        <name>deviceType</name>
index 65e3d86c953455bc3c1ac3b219eb8aa358cc9bfb..e297ca4c08f59cc3b118f8becfcd399bc300f443 100644 (file)
@@ -1,7 +1,7 @@
 # add-on
 
 addon.yamahareceiver.name = YamahaReceiver Binding
-addon.yamahareceiver.description = For all network enabled Yamaha receivers.
+addon.yamahareceiver.description = This is the binding for network enabled Yamaha receivers (without MusicCast support).
 
 # thing types
 
@@ -160,8 +160,8 @@ channel-type.yamahareceiver.surroundProgram.state.option.Sci-Fi = Sci-Fi
 channel-type.yamahareceiver.surroundProgram.state.option.Spectacle = Spectacle
 channel-type.yamahareceiver.surroundProgram.state.option.Standard = Standard
 channel-type.yamahareceiver.surroundProgram.state.option.Pro\ Logic = Pro Logic
-channel-type.yamahareceiver.surroundProgram.state.option.Neo:6 Music = Neo:6 Music
-channel-type.yamahareceiver.surroundProgram.state.option.Neo:6 Cinema = Neo:6 Cinema
+channel-type.yamahareceiver.surroundProgram.state.option.Neo\:6\ Music = Neo:6 Music
+channel-type.yamahareceiver.surroundProgram.state.option.Neo\:6\ Cinema = Neo:6 Cinema
 channel-type.yamahareceiver.surroundProgram.state.option.PLII[x]\ Game = PLII[x] Game
 channel-type.yamahareceiver.surroundProgram.state.option.PLII[x]\ Music = PLII[x] Music
 channel-type.yamahareceiver.surroundProgram.state.option.PLII[x]\ Movie = PLII[x] Movie