zyroad Posted October 16, 2012 Share Posted October 16, 2012 Hello, everyone!I wrote a driver for a Zigbee device which have two RELAY output and has been linked to two Motorized Screens. The driver receive proxy commands from and send notifies to the motorized screens. I want the relay state to be show in the UI icon of motorized screen. I think C4:SendToProxy() should be used but I can't find details in the documents of DriverWorks. I tried some different ways and still not work.In c4i file----------connections definition----------------- <connection> <id>1</id> <facing>6</facing> <connectionname>Relay 1</connectionname> <type>1</type> <consumer>False</consumer> <audiosource>False</audiosource> <videosource>False</videosource> <linelevel>False</linelevel> <hidden>False</hidden> <classes> <class> <classname>RELAY</classname> </class> </classes> </connection> <connection> <id>2</id> <facing>6</facing> <connectionname>Relay 2</connectionname> <type>1</type> <consumer>False</consumer> <audiosource>False</audiosource> <videosource>False</videosource> <linelevel>False</linelevel> <hidden>False</hidden> <classes> <class> <classname>RELAY</classname> </class> </classes> </connection>----------------------------------I have tried to send notifies through:C4:SendToProxy(1, "STATE_CLOSED", "")C4:SendToProxy(1, "CLOSED", "")C4:SendToProxy(1, "STATE_CLOSED", "NOTIFY")C4:SendToProxy(1, "CLOSED", "NOTIFY")C4:SendToProxy(1, "STATE_CHANGED", {STATE = 1})......But the icon of toggle did not changed. What's the exact usage of C4:SendToProxy? Link to comment Share on other sites More sharing options...
RyanE Posted October 16, 2012 Share Posted October 16, 2012 C4:SendToProxy(1, "CLOSED", {}, "NOTIFY")CLOSED and OPEN do not have parameters, but they require an 'empty' parameters table before the 4th parameter, which in this case is required, and indicates that the Message Type being sent is a 'Notify', not a 'Command', as this is a control binding.i.e. Proxy bindings default to 'notifies', control bindings default to 'commands'.A bit confusing, but it makes it work without requiring the Message Type most of the time.RyanE Link to comment Share on other sites More sharing options...
zyroad Posted October 17, 2012 Author Share Posted October 17, 2012 RyanE:Thank you! It works.Is there some documents where this kind of issues were descripted?zhouyong Link to comment Share on other sites More sharing options...
RyanE Posted October 17, 2012 Share Posted October 17, 2012 The Proxy/Protocol guide has most proxy info, but the API Reference Guide would've had the correct call parameters.Both of which are included with the DriverWorks SDK documentation.RyanE Link to comment Share on other sites More sharing options...
Parity Posted February 13, 2017 Share Posted February 13, 2017 Not sure if documentation has changed around this, however, this does not seem to work for me. I have a RELAY connection on binding 2. This is connected to say a FAN or RADIANT FLOOR. When in the FAN is switched on, the following is received: PRX_CMD.CLOSE received on Binding 2 The relay is closed on the device and the following is executed Link to comment Share on other sites More sharing options...
Parity Posted February 13, 2017 Share Posted February 13, 2017 Not sure if documentation has changed around this, however, this does not seem to work for me. I have a RELAY connection on binding 2. This is connected to say a FAN or RADIANT FLOOR. When in the FAN is switched on, the following is received: PRX_CMD.CLOSE received on Binding 2 The relay is closed on the device and the following is executed C4:SendToProxy(2, "CLOSED", {}, "NOTIFY") Nothing changes on the UI or the status date/time. Similarly if C4:SendToProxy(2, "OPEN", {}, "NOTIFY") is executed. If I invert the relay, the UI does change. Please assist. Link to comment Share on other sites More sharing options...
msgreenf Posted February 13, 2017 Share Posted February 13, 2017 Opened and closed Sent from my STV100-1 using Tapatalk Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.