Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


Recommended Posts

Posted

 

@raphael02 Many thanks for your code. Do you have the same for RF?

 

 

 

On 4/21/2023 at 11:00 PM, raphael02 said:

I added the following "learn" functions myself to the posted hub FQA (LearnIRCode (instead "learn" and GetLearnedIRCode can then be used in the "control" FQA to learn and acquire the code):

 

 

function RM4:LearnIRCode(func)
    local payload = makeEmptyTable(16)
    payload[1] = 0x04
    payload[2] = 0x00
 
    payload[3] = 0x03
 
    self:sendPacket(
        0x6a,
        payload,
        function(actionResult, errCode, payload)            
            func(actionResult, errCode, payload)
        end
    )
end
 
function RM4:GetLearnedIRCode(func)
    local payload = makeEmptyTable(16)
    payload[1] = 0x04
    payload[2] = 0x00
    payload[3] = 0x04
 
    self:sendPacket(
        0x6a,
        payload,
        function(actionResult, errCode, payload)            
            func(actionResult, errCode, payload)
        end
    )
end
 
 
function QuickApp:LearnIRCode(ipAddress, deviceType)
 
    local device = nil
    if deviceType and deviceType == 0x51da then
        device = RM4(ipAddress)
        self:debug("RM4")
    else
        device = RM3(ipAddress)
    end
 
    device:auth(
        function(authResult, errCode, payload)
            --print("AUTH", authResult, errCode, dump(payload))
            if authResult then
                device:LearnIRCode(
                    function(actionResult, errCode, payload)
--            print("AUTH", authResult, errCode, dump(payload))
                    end
                )
            else
                self:error("Can`t auth device " .. ipAddress)
            end
       end
    )
end
 
function QuickApp:GetLearnedIRCode(ipAddress, deviceType)
 
    local device = nil
    if deviceType and deviceType == 0x51da then
        device = RM4(ipAddress)
        self:debug("RM4")
    else
        device = RM3(ipAddress)
    end
 
    device:auth(
        function(authResult, errCode, payload)
            --print("AUTH", authResult, errCode, dump(payload))
            if authResult then
                device:GetLearnedIRCode(
                    function(actionResult, errCode, payload)
--                   print("AUTH", authResult, errCode, dump(payload))
 
             local strOut = ""
             for i, plelement in ipairs(payload) do
             --strOut = strOut .. string.char(plelement)
 
               -- *** Cut first 6 data elements (prefix 152 0 4 0 0 0 (dec)) form learned code, each valid code starts with 2600 (hex) and edns with 000d05 (hex) ***
               if (> 6) then
                 -- *** Convert returned data from number to ASCII data ***
                 strOut = strOut .. toHex(string.char(plelement))
               end
             end
 
             print ("Learned code: ", strOut)
           end
                )
            else
                self:error("Can`t auth device " .. ipAddress)
            end
       end
    )
end

 

 

 

 

 

 

The returned code is already hex, so it doesn't has to be base64 decoded and converted to hex before sending.

 

  • 1 month later...
Posted
On 5/9/2023 at 5:50 AM, PallasCat said:

@brv29a you need to downgrade RM 4pro firmware from v62093 to v62092. it worked for me. 

How would you access any of those two versions?

I'm stuck on v52079.

 

 

  • Like 1
  • 3 weeks later...
Posted
On 6/10/2023 at 5:07 AM, uKER said:

How would you access any of those two versions?

I'm stuck on v52079.

 

 

I upgraded to 62093 via broadlink app on smartphone. then asked support team to send previous version [email protected] 

  • 3 months later...
Posted
On 19/4/2023 at 7:07, ABDULLAH258 said:

@brv29a Lamentablemente no encontré ninguna solución. Desactivé el antivirus y desactivé el firewall pero no pasó nada.

This is the only solution that can be done, and it did help me to get the IR codes. I did not find any solution to be able to extract the IR codes with the Broadlink Manager application.

 

Posted
On 10/19/2023 at 6:18 PM, castillo marco arturo said:

This is the only solution that can be done, and it did help me to get the IR codes. I did not find any solution to be able to extract the IR codes with the Broadlink Manager application.

 

Yes I can do it with home assistant in my home or office but this is not capable in client's house so I am still working with linux

  • Like 1
  • 5 months later...
Posted

Hey @Phenix, is there a current broadlink_hub.fqa working with the RM4 pro?

I tried to follow this video: 


I found code on this thread with commands to call the "Broadlink_hub (v7).fqa" and use its learn function, but apperantly the "Broadlink_hub (v7).fqa" does not provide this function?

I have seen @mrmoon having the same issues, but i checked the ID i am using and i set it to the Hub. Is it necesarry to set the device hex code for RM4 Pro to 0x5212? But even with this adjustment, i have the problem of not having a learn function. Another person here added custom learn functions, but they seem to only work with the RM4, as he asks for the specific hexcode of the RM4. 

Any help would be great!

  • 1 month later...
Posted

Hi - I’ve not looked at this for a while as I migrated to HA. Let me get my head around it again and I will come back to you

Posted
function QuickApp:learnRM4()
    self:debug("button1 turned on")
    self:updateProperty("value", true)
 
fibaro.call(219, "learn", "192.168.1.94", 0x51da) -- Only for RM4
end

Please login or register to see this attachment.

  • 3 months later...
Posted

I lost my YouTube channel, but created a new one with the same tutorials uploaded - ContineoHomes if you are looking for the how to videos on this topic

Please login or register to see this link.

 

Please login or register to see this link.

 

 

Please login or register to see this link.

let me know if you need any help?

  • 3 months later...
Posted (edited)

Please login or register to see this attachment.

 The 62092 version:url:

Please login or register to see this link.

Please login or register to see this attachment.



and here i change one code with version 62093:

 

Edited by lux
Posted (edited)

for discover button error ! here i change one code with version 62093:an error appears: "Error: discovery msg - incorrect size"
files > manager:

Please login or register to see this code.



Please login or register to see this attachment.

Please login or register to see this attachment.

Edited by lux

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...