Converge devices and IP_KEEP_OPEN
staticattic
Posts: 200
I have some IP controlled Converge devices. The customer recently contacted me and informed that every 20 minutes or so, the volume of the room will drop to 0. When they looked at the front panel of the Converge, the GAIN values are all dropping to -30. Here's what is happening:
The engineer that designed and installed the room devices told me what I could and could not touch inside his Converge's. Short version, when ramping the volume, I am really changing the gain on the inputs plus 1 or minus 1 relative to its current value. No problems there. But here is where things start to get flakey. He wanted me to have a range with -30 as the starting point. That way, even when the user cranks the volume all the way up, they can't exceed his maximum value that he will let them go. That being the case, everytime the users power on the room, the Netlinx sets all GAIN values to -30. When the Netlinx first makes contact with the Converge, the Converge asks for a user name and password. I created STRING handlers to handle putting in the user name and password based on text in the buffer for the Converge like this:
Inside the function, there is a string handler that searches for 'password' and sends 'converge' as the response. Once the connection is established, the Netlinx then sends all levels to -30. I am thinking after 20 minutes or so, the Converge will automatically close the connection if nothing is sent. When it does, since KEEP_OPEN has been flagged, the Master will reestablish the call thereby needing to reenter the User name and password, which will cause the system to incorrectly lower the volume to -30.
I do not have a Converge to play with and I am having to troubleshoot this over the phone. I can think of several "safe" ways to handle this, but wanted your opinions. One safe way would be to send a status queary every 5 minutes or so via a repeating timeline. The other would be to remove the lines of code that send the Converge to -30 upon connection. A third option, would involve a flag for system power. If the system power = 1, don't set the gains to -30. Else, set the gains to -30.
I have another question about my function, but I'll ask that in another thread so as to stay on topic.
The engineer that designed and installed the room devices told me what I could and could not touch inside his Converge's. Short version, when ramping the volume, I am really changing the gain on the inputs plus 1 or minus 1 relative to its current value. No problems there. But here is where things start to get flakey. He wanted me to have a range with -30 as the starting point. That way, even when the user cranks the volume all the way up, they can't exceed his maximum value that he will let them go. That being the case, everytime the users power on the room, the Netlinx sets all GAIN values to -30. When the Netlinx first makes contact with the Converge, the Converge asks for a user name and password. I created STRING handlers to handle putting in the user name and password based on text in the buffer for the Converge like this:
DATA_EVENT[dvConverge] { ONLINE: { b1212A_Online = TRUE } OFFLINE: { b1212A_Online = FALSE IF(b1212A_KeepOpen) { WAIT RETRY_TIME IP_CLIENT_OPEN(dvConverge.port,cConverge,lServerPort,TCP) } STRING: { IF(FIND_STRING(cConverge_Buff,'user:',1)) { SEND_STRING dvConverge,"'clearone',13" } WHILE(FIND_STRING(cConverge_Buff,"13,10",1)) { fnConverge_Response() } } } }
Inside the function, there is a string handler that searches for 'password' and sends 'converge' as the response. Once the connection is established, the Netlinx then sends all levels to -30. I am thinking after 20 minutes or so, the Converge will automatically close the connection if nothing is sent. When it does, since KEEP_OPEN has been flagged, the Master will reestablish the call thereby needing to reenter the User name and password, which will cause the system to incorrectly lower the volume to -30.
I do not have a Converge to play with and I am having to troubleshoot this over the phone. I can think of several "safe" ways to handle this, but wanted your opinions. One safe way would be to send a status queary every 5 minutes or so via a repeating timeline. The other would be to remove the lines of code that send the Converge to -30 upon connection. A third option, would involve a flag for system power. If the system power = 1, don't set the gains to -30. Else, set the gains to -30.
I have another question about my function, but I'll ask that in another thread so as to stay on topic.
0
Comments
Thanks for the reply. You are right, ClearOne devices are pretty simple when it comes to parsing strings. Yes, I am parsing the data and keeping track of the variable. If a user goes to the front panel of the Converge and starts ramping GAINs up and down, the bargraph on the panel changes as well. The range he gave me was -30 for the low and 0 for the high. My bargraphs are set up with those same values (to keep from having to do any crazy math) and change via the GAIN value. I was just going back over my programming, and it seems to be that I am "double tapping" the -30 command. I have that value in the startup time line and again whenever the Converge connects. Now that I have found that, I think removing the lines resetting the values when the connection is made is my best choice.