Jump to content
C4 Forums | Control4

JSTRONG

c4Forums Member
  • Posts

    1,035
  • Joined

  • Last visited

  • Days Won

    15

Posts posted by JSTRONG

  1. Just now, jakblak said:

    Strange, the API documentation does indicate that -46 should be a valid value at least when volume display is "DB".  @Cartnj, would you mind trying the snippet below and then replying with the output from the log?.  It's the same as above but this time it's explicitly setting the display to "DB"

    
    gSystemVolumeDisplay = DB
    local volumeLevel = 40
    local minDeviceLevel = -92
    local maxDeviceLevel = 23
    local volumeLevel_dB = ConvertVolumeToDevice(volumeLevel, minDeviceLevel, maxDeviceLevel)
    tVolumeSetCommandMap_dB[0].value = volumeLevel_dB
    local command = tVolumeSetCommandMap_dB[0]
    
    QueueCommand(command)

     

    Thanks Jak here is the output

    LUA_ERROR [id: 275][name: Sony HT-NT3][file: receiver_HT-NT3_Network_DriverWorks__Sony.c4i]: [string "C4Commands"]:1: unexpected symbol near ' '
     

  2. 39 minutes ago, jakblak said:

    @dinom Try pasting the following commands into the Lua window of the driver and you can verify if there needs to be a conversion from a volume level to a db level

    
    local volumeLevel = 40
    local minDeviceLevel = -92
    local maxDeviceLevel = 23
    local volumeLevel_dB = ConvertVolumeToDevice(volumeLevel, minDeviceLevel, maxDeviceLevel)
    tVolumeSetCommandMap_dB[0].value = volumeLevel_dB
    local command = tVolumeSetCommandMap_dB[0]
    
    QueueCommand(command)

    This is the equivalent of setting the volume level to 40 then converting it to the db scale (-92 to 23) that the API is looking for instead of the 0-50 scale that it's currently using.  Feel free to set the volumeLevel to any number between 0 to 100 and see if you get the desired effect

    Jakblak here is my Lua output after entering that command

    ProcessVolumeLevel(level in=40, level out=-46)
    --- Queue ---
      first = 2526
      last = 2525
      number in queue = 0
      maximum size = 100
     next value =
    SendCommand(), sCommand =
    QueueCommand(), sCommand =
    SendToNetwork(6000, {"feature":"main.volumedb","id":2529,"type":"set","value":-46})
    Starting Timer: SendCommand
    ReceivedFromNetwork(), idBinding = 6000, nPort = 33336, sData = {
       "id" : 2529,
       "type" : "result",
       "value" : "ERR"
    }
    GetMessage()
    HandleMessage({
       "id" : 2529,
       "type" : "result",
       "value" : "ERR"
    })
    GetMessage()
    Send Timer expired
    Send Timer expired - Pop Command:, Send Next Command
     

  3. 10 minutes ago, dinom said:

    So the Lua  command window is present, including a button to "execute", but that command sequence doesn't seem to do anything.

    One interesting tidbit I learned from within Composer HE, there is a "virtual" remote control I can use to control the Sony sound bar, and it has a direct volume control.  I can set this to any value from 0 to 50 and it commands the sound bar to the exact same value.  So doesn't that indicate that the driver is setting the volume 1:1 and not scaling by 2x?

    But look at the control4 app or a touchpanel with a slider and it shows double the amount on your soundbar

  4. Just setup temporarily hardly used Triad 4 zone 8 channel TS-PAMP4-100 $550 in original box (was $1200)

    new condition triad one in white. Opened box but never used it. Includes power cord and triad one only. Not sure what else was included in the box $375

    pakedge SX-24p8 Poe network switch. $500

  5. 17 minutes ago, jakblak said:

    The driver is not encrypted and I spent a few minutes going through it looking for the cause.  What I've found is that the driver does in fact convert from a 0-100 scale to a 0-50 scale via the function below. 

    • Values being sent to this function are:
      • volLevel = 20
      • minVolLevel = 0
      • maxVolLevel = 100  
      • minDeviceLevel = 0
      • maxDeviceLevel = 50
    
    function ProcessVolumeLevel(volLevel, minVolLevel, maxVolLevel, minDeviceLevel, maxDeviceLevel)
    	  local level = (volLevel-minVolLevel)/(maxVolLevel-minVolLevel)
    	  --Dbg:Info("level = " .. level)
    	  local vl=(level*(maxDeviceLevel-minDeviceLevel))+minDeviceLevel
    	  --Dbg:Info("vl = " .. vl)
    	  vl= tonumber(("%.".."0".."f"):format(vl))
    	  --Dbg:Info("vl new = " .. vl)
    	  Dbg:Info("ProcessVolumeLevel(level in=" .. volLevel .. ", level out=" .. vl .. ")")
    	  return vl
    end

    The resulting output from the debug logs is this:

    
    ReceivedFromProxy(): SET_VOLUME_LEVEL on binding 5001; Call Function SET_VOLUME_LEVEL()
    OUTPUT:  4000
    LEVEL:  40
    ProcessVolumeLevel(level in=40, level out=20)
    PRX_CMD.SET_VOLUME_LEVEL(), volumeLevel_dB = 20

    A volume level of 40 is coming into this function and is converted to 20 db.  A SET_VOLUME_LEVEL (with a value of 20 db) command is then queued up to be sent to the sound bar.  Looks like there may be a problem in the sound bar api or the firmware 

    Thank you. Is this something that can be fixed easily ?

  6. OK I got it working and its wicked Cool!!

    I didn't realize I had to type out the actual words "Todays High Temp" etc.. 

    Cant wait to wake the whole house up with the time date and weather at 6am!

    IS there anyway to round up the weather numbers? the weather results come in as 93.56 degrees.. Hoping we can just have it say 93 or 94

     

  7. On 7/13/2019 at 6:13 PM, Omar said:
    7 hours ago, Shivam Paw said:

    You'd want to setup a scheduler for 6:30am every day and then program something like:

    Screenshot-2019-07-03-at-12.15.48.jpg

    1112 in that example is the Device ID of the DarkSky driver. It will be something different in your project. You can find it by hovering over the driver in system design. Lines 3, 5 & 7 use Concatenate Variable to Text to Speak programming command. The other concatenate ones are Concatenate text to Text to Speak.

     

    Thanks for the example. I guess I am missing a step..  when I press execute, it does not make any announcements in my code below

     

     

    speak_weather.jpg

  8. Thanks very much for that info. 

    I made it stupid simple.  I simply have the inside switch wired to the outside switch when the coach is in the driveway. The coach router gets disconnected and all coach devices get ip from the dhcp server inside the home. So it’s now on the home lan.  

     

    When the coach leaves the driveway I disconnect the switch connection from the inside switch and reconnect the coach router which is already connected to the cell modem. Coach devices will now get ip from the coach dhcp router which has reserved ip addresses for the devices so I don’t lose control4 addressing  

     

    The matrix now has 2 sat receivers  Joey for when it’s in the driveway  and a Wally for on the road dish watching

     

     

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.