Remote long press on Broadlink

Hi felipediel,
I have the following code JgAYANZSajkZHRs3Nh0ZORocGzc3Gzc4NwANBQAAAAAAAAAAAAAAAAAA

How could I identify the part which should be repeated?

Many thanks for your help!

Open the Python shell and…

>>> from base64 import b64decode, b64encode
>>> b = bytearray(b64decode('JgAYANZSajkZHRs3Nh0ZORocGzc3Gzc4NwANBQAAAAAAAAAAAAAAAAAA'))
>>> b[1]
0  # Your code repeats 0 times.
>>> b[1] = 50  # Assign 50 repetitions.
>>> b = b64encode(b)
>>> b
b'JjIYANZSajkZHRs3Nh0ZORocGzc3Gzc4NwANBQAAAAAAAAAAAAAAAAAA'

Many thanks for your answer @felipediel!
I did it, but apparentlz it doesn’t work. I did change the number from 50 to 200, but the result is the same.

I tested it locally and it works. Make sure to b64decode before and b64encode after. This is your code with 255 repetitions:

Jv8YANZSajkZHRs3Nh0ZORocGzc3Gzc4NwANBQAAAAAAAAAAAAAAAAAA

Apologies if it wasn’t clear from my side. In effect I can generate the code, but when I add it to my configuration.yaml it doesn’t work seems the code is not correct…

Show me your config.

config

- name: pellets_on_off
        command_on: "Jv8YANZSajkZHRs3Nh0ZORocGzc3Gzc4NwANBQAAAAAAAAAAAAAAAAAA"
        command_off: "Jv8YANZSajkZHRs3Nh0ZORocGzc3Gzc4NwANBQAAAAAAAAAAAAAAAAAA"

The config looks ok, but I see that you are using the same code to turn it on and off. This can be problematic. Most devices use a toggle bit in the code. You need to learn two codes, one for each command.

Thanks, basically it’s exactly the same code. In effect I use then the on integrated into a script and only use the on. Looking to the older answers and the Panasonic example the code should be much longer, I searched for a while without any success. Broadlink told me as well they currently don’t support this action…

The problem is not related to the number of repetitions. You are sending the wrong code. I extracted the codes for you. I hope it works.

Panasonic

Type 1: Turn on/turn off

‘JgBmAG43Dg4OKQ4ODg4ODg4ODg4ODg4ODg4ODg4ODg4OKQ4ODg4ODg4ODg4ODg4ODg4ODg4pDg4ODg4ODg4ODg4ODg4ODg4pDg4OKQ4pDikOKQ4ODg4OKQ4ODikOKQ4pDikODg4pDgAFZAAA’

Type 2: Turn on/turn off

‘JgDMAHQ3EA0QKRANEAwQDRAMEA0QDBEMEA0QDBANEAwRKRAMEA0QDBANEA0QDBANEAwQDRApEA0QDBANEAwRDBANEAwQDRApEA0QKRApECkQKRANEA0QKRAMECoQKRApECkQDRApEAAJenQ3EA0QKRANEAwQDRAMEA0QDBEMEA0QDBANEAwRKRAMEA0QDBANEA0QDBANEAwQDRApEA0QDBANEA0QDBANEAwQDRApEA0QKRApECkQKRANEA0QKRAMECoQKRApECkQDRApEAANBQAAAAAAAAAAAAAAAA==’

Type 3: Turn on/turn off

‘IwBmAHI5Dg4OKw4ODg4ODg4ODg4ODg4ODg4ODg4ODg4OKw4ODg4ODg4ODg4ODg4ODg4ODg4rDg4ODg4ODg4ODg4ODg4ODg4rDg4OKw4rDisOKw4ODg4OKw4ODisOKw4rDisODg4rDgAJfgAA’

Hi Felipe

i have a similar issue turning on my pellet stove, and have nearly given up. i can control the temp and fan but cant figure out the 2sec power press to start and stop it. Do you mind sharing how you got the codes? Everytime i try the long press a different sequence appears.

thanks
Fred

Sorry, I didn’t find any code for pellet stoves. If you find the codes in a crowd-sourced database (IRDB, LIRC etc), there are several modules out there that can help with conversions:


@fredanaman
If your stove uses an Evo board, you could use an ESP? Still very rudimental, but basics work

Hi, thanks. My stove wasnt listed on the site, so will have to try going through the company.

thanks again

@aceindy thanks, i need to find out if i do have an Evo board in my stove. I think i do (Fuoco Delia), but need to confirm. Also i am new to this, when u mentioned the ESP01, is it possible to use the M5stack, as i bought a couple for another infrared prj (which didnt pan out)?

thanks
Fred

Hi felipediel
I missed your message.
My code isn’t for a Panasonic,I was just taking the example.My equipment is a heater,so the broadlink reads the code I sent you, but it doesn’t work. …

Try learning the code with a long press.

Thanks. The code I have sent was the result of the long press, but it doesn’t take all the code. In parallel I opened a ticket within Broadlink, but they just said they don’t support long-press.

I believe we would be able to repeat the payload manually if we would be able to identify the part of the code, but…

I will abandom.

Thanks anyway!!!

looks like it https://koen.vervloesem.eu/blog/you-can-now-use-the-m5stack-core-in-esphome/
haven’t tried it though…

thanks, will have a read.

Fred