Skip to content

Instantly share code, notes, and snippets.

@vills
Created August 12, 2024 20:43
Show Gist options
  • Save vills/590c154b377ac50acab079328e4ddaf9 to your computer and use it in GitHub Desktop.
Save vills/590c154b377ac50acab079328e4ddaf9 to your computer and use it in GitHub Desktop.
@Wobak
Copy link

Wobak commented Aug 27, 2025

Hey @vills. I just tried this following this file : github.com/smartHomeHub/SmartIR/blob/master/codes/climate/1287.json

You can see that the code for Off is the following :
JgB0AGk3DQ4NDg0oDQ4NKA0ODQ4NDg0oDSgNDg0ODQ4NKA0oDQ4NDg0ODQ4NDg0ODQ4NDg0ODQ4NDg0ODQ4NKA0ODQ4NDg0ODQ4NDg0ODSgNDg0ODQ4NDg0oDQ4NDg0ODQ4NDg0ODSgNDg0oDSgNKA0oDSgNKA0ADQUAAA==

Your script gives :

# python3.11 broadlink_to_tuya.py JgB0AGk3DQ4NDg0oDQ4NKA0ODQ4NDg0oDSgNDg0ODQ4NKA0oDQ4NDg0ODQ4NDg0ODQ4NDg0ODQ4NDg0ODQ4NKA0ODQ4NDg0ODQ4NDg0ODSgNDg0ODQ4NDg0oDQ4NDg0ODQ4NDg0ODSgNDg0oDSgNKA0oDSgNKA0ADQUAAA==
WARNING - Ignored extra data: [13, 5, 0, 0]
INFO - Raw data: [3198, 1675, 396, 426, 396, 426, 396, 1218, 396, 426, 396, 1218, 396, 426, 396, 426, 396, 426, 396, 1218, 396, 1218, 396, 426, 396, 426, 396, 426, 396, 1218, 396, 1218, 396, 426, 396, 426, 396, 426, 396, 426, 396, 426, 396, 426, 396, 426, 396, 426, 396, 426, 396, 426, 396, 426, 396, 426, 396, 426, 396, 1218, 396, 426, 396, 426, 396, 426, 396, 426, 396, 426, 396, 426, 396, 426, 396, 1218, 396, 426, 396, 426, 396, 426, 396, 426, 396, 1218, 396, 426, 396, 426, 396, 426, 396, 426, 396, 426, 396, 426, 396, 1218, 396, 426, 396, 1218, 396, 1218, 396, 1218, 396, 1218, 396, 1218, 396, 1218, 396, 0]
INFO - Tuya code: B34MiwaMAaoBgAMBwgTgBQfgAxfgGxPgHwPgFzfgCx/gEzPgA7fgCwMBAAA=

While sensus gives the following :
Raw: 3198, 1675, 366, 396, 366, 396, 366, 1188, 366, 396, 366, 1188, 366, 396, 366, 396, 366, 396, 366, 1188, 366, 1188, 366, 396, 366, 396, 366, 396, 366, 1188, 366, 1188, 366, 396, 366, 396, 366, 396, 366, 396, 366, 396, 366, 396, 366, 396, 366, 396, 366, 396, 366, 396, 366, 396, 366, 396, 366, 396, 366, 1188, 366, 396, 366, 396, 366, 396, 366, 396, 366, 396, 366, 396, 366, 396, 366, 1188, 366, 396, 366, 396, 366, 396, 366, 396, 366, 1188, 366, 396, 366, 396, 366, 396, 366, 396, 366, 396, 366, 396, 366, 1188, 366, 396, 366, 1188, 366, 1188, 366, 1188, 366, 1188, 366, 1188, 366, 1188, 366, 35966
Tuya: B34MiwaMAasBgAMBwwTgBQfgAxfgGxPgHwPgFzfgCx/gEzPgA7fgCwMBfow=

The code give by sensus works, while the one by this script doesn't.

Any idea on what could be causing this and how to fix it?

@vills
Copy link
Author

vills commented Aug 27, 2025

No ideas, tbh. I just compelled foreign algorithms in a single script. And this works with my Fujitsu ac somehow

@Wobak
Copy link

Wobak commented Aug 27, 2025

Mine is also a Fujitsu :)

lucky you then, I'll try and dig deeper !

@Wobak
Copy link

Wobak commented Aug 27, 2025

Using https://gist.github.com/svyatogor/7839d00303998a9fa37eb48494dd680f worked for me. Thanks for your help anyways

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment