了解三星电视的IR代码 [英] Understanding IR codes for Samsung TV

查看:130
本文介绍了了解三星电视的IR代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以帮助我了解如何在使用ESP8266-HTTP-IR-Blaster库的项目中使用RAW IR数据吗?

Can somebody help me to understand how could I use RAW IR data in an project using ESP8266-HTTP-IR-Blaster library ?

我已经根据 https:创建了一个带有IR发送器和接收器的NodeMCU板.//github.com/mdhiggins/ESP8266-HTTP-IR-Blaster

只要我使用捕获的代码(例如),一切都可以正常工作: http://NodeMCU-IP/msg?code = E0E040BF:SAMSUNG:32 这是电源按钮(E0E040BF)的代码

Everything is working fine as long as I'm using the captured codes for ex.: http://NodeMCU-IP/msg?code=E0E040BF:SAMSUNG:32 This is the Code for the Power button (E0E040BF)

当我在家庭自动化系统中使用它时,如果我有专用的ON和OFF序列,这对我非常有益,可以在这里找到:

As I'm using it in a home automation system, it would very beneficial for me if I had a dedicated ON and OFF sequence, which I found here: http://www.remotecentral.com/cgi-bin/mboard/rc-discrete/thread.cgi?5780 , but unable to translate, modify, or send it via RAW data.

使用Node-red,尝试了许多方法,还为原始项目实现了MQTT客户端,但是无论如何我都不接受这些代码.不发送.

Using Node-red, tried many ways, also implemented a MQTT client to the original project, but did not accept these codes anyhow I try. Does not sends it.

也尝试作为JSON使用,没有帮助.

Also tried as a JSON, didn't help.

[
    {
    "type":"raw",
    "data":"[0000, 006D, 0000, 0022, 00AC, 00AC, 0015, 0040, 0015, 0040, 0015, 0040, 0015, 0015, 0015, 0015, 0015, 0015, 0015, 0015, 0015, 0015, 0015, 0040, 0015, 0040, 0015, 0040, 0015, 0015, 0015, 0015, 0015, 0015, 0015, 0015, 0015, 0015, 0015, 0015, 0015, 0015, 0015, 0015, 0015, 0040, 0015, 0040, 0015, 0015, 0015, 0015, 0015, 0040, 0015, 0040, 0015, 0040, 0015, 0040, 0015, 0015, 0015, 0015, 0015, 0040, 0015, 0040, 0015, 0015, 0015, 0689]",
    "khz":38
    }
]

有什么主意我接下来可以尝试什么?

Any idea what could I try next?

推荐答案

您在上方显示的有关"Pronto格式"的简介在

A good introduction to the 'Pronto format' that you show above is at Remote Central

对于上述特定示例,对于您的远程中央链接,完整代码以十六进制表示的16位数字序列给出,中间有空格:

For the specific example above, for a Samsung OFF code given at your remote central link, the full code is given as a sequence of 16-bit numbers represented in hexadecimal with spaces in between:

0000 006D 0000 0022 00AC 00AC 0015 0040 0015 0040 0015 0040 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0040 0015 0040 0015 0040 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0040 0015 0040 0015 0015 0015 0015 0015 0040 0015 0040 0015 0040 0015 0040 0015 0015 0015 0015 0015 0040 0015 0040 0015 0015 0015 0689

您可以将其分解为一个序言(在此处细分以引起兴趣,但是如果您已经有可用的Samsung代码,则不需要此符号):

You can break that down as a preamble (broken out here for interest, but not needed if you already have a working Samsung code):

  • 0x0000-这是原始代码格式数据
  • 0x006D-频率109十进制= 38.028kHz(请参见上面的链接进行计算)
  • 0x0000-第一个序列中没有突发对
  • 0x0022-34个十进制-跟随34个突发信号对
  • 00AC 00AC-第一个信号突发-以38kHz的频率打开0xAC(十进制的172个)周期,关闭相同的数量
  • 然后是32对数据突发对"(如果您已经为同一设备使用了其他代码,这可能是您唯一需要的位)
  • 0015 0689-信号的最终突发-开启0x15(十进制21个)周期,关闭持续0x689(十进制1673)周期,确保在传输下一个代码之前44ms没有任何IR

要手动解释数据,请以8个数字为一组将其复制出来(例如,复制到文本编辑器中):

To interpret the data manually, copy it out (e.g. into a text editor) in groups of 8 numbers:

0015 0040 0015 0040 0015 0040 0015 0015 
0015 0015 0015 0015 0015 0015 0015 0015 
0015 0040 0015 0040 0015 0040 0015 0015 
0015 0015 0015 0015 0015 0015 0015 0015 
0015 0015 0015 0015 0015 0015 0015 0040 
0015 0040 0015 0015 0015 0015 0015 0040 
0015 0040 0015 0040 0015 0040 0015 0015
0015 0015 0015 0040 0015 0040 0015 0015 

然后:

  • 忽略所有数字都相同的列(即使上面的列也代表打开时间-0x15 = 38kHz时IR的21个十进制周期)
  • 对于其余列(代表休假时间),将大数字(在这种情况下为0x40)替换为"1",将小数字(0x15)替换为"0".

第一行

0015 0040 0015 0040 0015 0040 0015 0015 

忽略偶数列离开:

0040 0040 0040 0015 

用1和0代替那些

1    1    1    0

如果将其转换为十六进制,则为'E'

and if you convert that into hexadecimal, it's 'E'

下一行是"0",然后是"E",然后是"0"(已经很高兴看到它以与上面的其他三星代码相同的E0E0开头...),其余各行使其成为E0E019E6

Next line is '0', then 'E' then '0' (already it's comforting to see it starting with the same E0E0 that starts your other Samsung code above...), and the remaining lines make it E0E019E6

对ON代码执行相同操作会给您E0E09966

Doing the same with the ON code gives you E0E09966

由于我最近需要用相同的代码解决相同的问题,因此我可以确认我的三星电视对这些代码的响应为OFF和ON.

And as I've needed to solve the same problem just recently for the same codes, I can confirm that my Samsung TV responds to those codes as OFF and ON.

毫不奇怪,有各种各样的软件工具可以在格式之间进行转换,并且种类繁多的格式可以描述相同的信号( xkcd ).例如, irdb.tk 会将上述字符串解码为协议NECx2,设备7,子设备7,OBC 152".由您决定是否必须

Not surprisingly, there are a variety of software tools to convert between formats, and a huge range of formats to describe the same signal (explained very well by xkcd). For example, irdb.tk will decode the above string to "Protocol NECx2, device 7, subdevice 7, OBC 152". It's up to you to know that you have to

  • 对设备编号'07'进行位反转以获得'E0'
  • 对子设备编号(也为'07')进行位反转以获得'E0'
  • 将152转换为十六进制,然后反转这些位以获取'19'
  • 将最后两位计算为(0xFF-位反转的OBC),0xFF-0x19 = 0xE6,给出最后8位'E6'

这篇关于了解三星电视的IR代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆