{"id":795,"date":"2010-10-21T23:40:47","date_gmt":"2010-10-21T21:40:47","guid":{"rendered":"http:\/\/richardconsulting.ro\/blog\/?p=795"},"modified":"2012-02-02T11:07:51","modified_gmt":"2012-02-02T09:07:51","slug":"connecting-sonos-with-knx","status":"publish","type":"post","link":"https:\/\/richardconsulting.ro\/blog\/2010\/10\/connecting-sonos-with-knx\/","title":{"rendered":"Connecting Sonos with KNX"},"content":{"rendered":"<p>After some more work I came up with a better solution written on C# by using <a title=\"UPnP tools for .NET\" href=\"http:\/\/opentools.homeip.net\/dev-tools-for-upnp\">Open Software&#8217;s UPnP stacks<\/a>. The advantage is that the whole solution is installable and works out of the box.<\/p>\n<p>Every user is only responsible to edit the <em>UniqueDeviceNames.ini<\/em> file in a proper way. We assist this step too.<\/p>\n<h3>What you need<\/h3>\n<ol>\n<li>A KNX installation and properly defined group addresses (see <code>[commands list]<\/code> section of the ini file). Also you need a KNX\/IP interface to be able to transmit selected KNX telegrams via IP network. In particular, a Gira HomeServer can perform this function.<\/li>\n<li>A Sonos system. We will discover all online ZonePlayers and put them in a text file for your convenience. Do not mind anymore the complicated IDs, will use only friendly names as you see them in the original Sonos Controlles.<\/li>\n<li>A Windows box with Microsoft .NET Framework 2.0<\/li>\n<li>The <a title=\"Sonos KNX v1.01\" href=\"http:\/\/richardconsulting.ro\/blog\/wp-content\/uploads\/2010\/10\/SonosKNXServiceSetup.zip\">Sonos KNX interface Setup v1.0.0 kit from here<\/a>. PLEASE DO NOT INSTALL THIS VERSION ANYMORE! CHECK BELOW FOR UPDATES!<\/li>\n<\/ol>\n<h3>How to install<\/h3>\n<ol>\n<li>Double click on setup.exe and follow the directions on the screen. Accept all security warnings (windows and firewall). Remember the installation folder location.<\/li>\n<li>Go to computer management, expand Services and look for <em>SonosHS <\/em>service. Start it (only once, the service is set to automatic startup for the future)<\/li>\n<li>in about 30 seconds a filename <em>UniqueDevicesNames.txt<\/em> will be written in the installation folder. Check this file to make sure you use the proper Zone Players friendly names in the next step<\/li>\n<li>edit the file <em>UniqueDevicesNames.ini <\/em>and make sure to use proper group addresses and zone player names in sections <code>[map_to_zone]<\/code> and <code>[map_to_command]<\/code>. For a list of available zones see <em>UniqueDevicesNames.txt<\/em> and for a list of available commands see the <code>[commands list - this section is only informative]<\/code> section. Also make sure you input proper IP and port addresses for the KNX IP interface.<\/li>\n<li>save the ini file. there is no need to restart the service, all should work from now on<\/li>\n<\/ol>\n<h3>How to debug<\/h3>\n<p>Stay tuned, I will post a Windows form application with identical functionality soon. Just look at the form and see if you can properly receive the KNX telegrams. The source code (VS2010 solution) is available <a title=\"Contact page\" href=\"\/blog\/cum-ne-gasiti\/\">upon request<\/a>.<\/p>\n<h3>Known issues<\/h3>\n<ol>\n<li>if you add a Zone Player after the service starts, this Zone Player will not be visible to the interface until the service <em>SonosHS<\/em> is restarted (or the computer is restarted)<\/li>\n<li>not all commands are implemented at this moment<\/li>\n<li>there is no feedback implemented from Sonos to the KNX<\/li>\n<li>the solution requires some CPU and memory optimization<\/li>\n<\/ol>\n<p>Enjoy!<\/p>\n<h2>UPDATE 22\/10\/2010<\/h2>\n<p>Here are the new setup kits for version 1.0.2. See below change log for more information<\/p>\n<ol>\n<li><a title=\"Sonos KNX Windows Service v1.0.2\" href=\"http:\/\/richardconsulting.ro\/blog\/wp-content\/uploads\/2010\/10\/SonosKNXServiceSetup102.zip\">Windows service setup kit<\/a><\/li>\n<li><a title=\"Sonos KNX Windows App v1.0.2\" href=\"http:\/\/richardconsulting.ro\/blog\/wp-content\/uploads\/2010\/10\/SonosKNXAppSetup102.zip\">Windows application setup kit<\/a><\/li>\n<\/ol>\n<h3>ChangeLog<\/h3>\n<pre>1.0.2\r\n\r\n- compatible with 32 and 64 bits systems\r\n- added: toggleMute 1bit command\r\n- added: balance control via EIS6 command (0=max left, 50=balanced, 100=max right)\r\n- added: play mode change via KNX 4 bit control with 0:NORMAL, 1:INTRO, 2:SHUFFLE, 3:RANDOM, 4:REPEAT_ONE, 5:REPEAT_ALL, 6-15:NORMAL\r\n- got rid of UniqueDeviceNames.txt file, now we manage the [zone_list] section inside the UniqueDeviceNsmes.ini file directly\r\n- more debug information in EventViewer, under Application logs, source SonosHS\r\n- the service starts automatically, no need for user intervention (not nice solution but it works)\r\n\r\nissues: Sonos ZonePlayers seem to respond inaccurately to Play Mode commands, perhaps the UPnP standard implementation does not match between Sonos and Open Software (Intel)\r\n\r\n1.0.1 - initial version x86 compatible only\r\n- supports transport commands: play, stop, pause, next, previous, mute, unmute\r\n- supports volume commands: master volume via EIS 6 (0...100)<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>After some more work I came up with a better solution written on C# by using Open Software&#8217;s UPnP stacks. The advantage is that the whole solution is installable and works out of the box. Every user is only responsible to edit the UniqueDeviceNames.ini file in a proper way. We assist this step too. What [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35,34],"tags":[20],"class_list":["post-795","post","type-post","status-publish","format-standard","hentry","category-knx-home-automation","category-multiroom-audio","tag-sonos"],"_links":{"self":[{"href":"https:\/\/richardconsulting.ro\/blog\/wp-json\/wp\/v2\/posts\/795","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/richardconsulting.ro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/richardconsulting.ro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/richardconsulting.ro\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/richardconsulting.ro\/blog\/wp-json\/wp\/v2\/comments?post=795"}],"version-history":[{"count":1,"href":"https:\/\/richardconsulting.ro\/blog\/wp-json\/wp\/v2\/posts\/795\/revisions"}],"predecessor-version":[{"id":1035,"href":"https:\/\/richardconsulting.ro\/blog\/wp-json\/wp\/v2\/posts\/795\/revisions\/1035"}],"wp:attachment":[{"href":"https:\/\/richardconsulting.ro\/blog\/wp-json\/wp\/v2\/media?parent=795"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/richardconsulting.ro\/blog\/wp-json\/wp\/v2\/categories?post=795"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/richardconsulting.ro\/blog\/wp-json\/wp\/v2\/tags?post=795"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}