[英]Send IRsend with mqtt to a Tasmota ir device
I am writing a home automation program using Tasmota devices. 我正在使用Tasmota设备编写家庭自动化程序。 I have a YTF IR Bridge working well with most of my remotes.
我的YTF IR桥与大多数遥控器都能很好地配合使用。 for example with an Apple TV I can send
例如使用Apple TV我可以发送
{"Protocol":"NEC","Bits":32,"Data":0x77E14005}
to select the menu. 选择菜单。
I have come up with a problem with the Foxtel remote. 我想出了Foxtel遥控器的问题。 I have found codes for this on the net.
我在网上找到了用于此的代码。 eg
例如
Vol +
0000 0073 0000 0012 000F 000A 0006 000A 0006 0016 0006 000A 0006 0010 0006 0016 0006 0016 0006 000A 0006 000A 0006 000A 0006 0016 0006 0010 0006 0016 0006 000A 0006 0010 0006 000A 0006 000A 0006 0CA0 0000 0073 0000 0012 000F 000A 0006 000A 0006 0016 0006 000A 0006 0010 0006 0016 0006 0016 0006 000A 0006 000A 0006 000A 0006 0016 0006 0010 0006 0016 0006 000A 0006 0010 0006 000A 0006 000A 0006 0CA0
Vol – 0000 0073 0000 0012 000F 000A 0006 000A 0006 0016 0006 000A 0006 0010 0006 0016 0006 0016 0006 000A 0006 000A 0006 000A 0006 0016 0006 0010 0006 0016 0006 000A 0006 0010 0006 000A 0006 0010 0006 0C9B 卷-0000 0073 0000 0012 000F 000A 0006 000A 0006 0016 0006 000A 0006 0010 0006 0016 0006 0016 0006 000A 0006 000A 0006 000A 0006 0016 0006 0010 0006 0016 0006 000A 0006 0010 0006 000A 0006 0010 0006 0C9B
I then converted these to ascii from hex and sent 然后,我将它们从十六进制转换为ASCII并发送
cmnd/ir-bridge/IRSend 0,115,0,18,15,10,6,10,6,22,6,10,6,16,6,22,6,22,6,10,6,10,6,10,6,22,6,16,6,22,6,10,6,16,6,10,6,10,6,3232
with no result from the Foxtel box. Foxtel框没有结果。 Could anyone give some clues on how to send this raw data.
任何人都可以提供一些有关如何发送此原始数据的线索。
I had success with another group and found out how to decode this. 我在另一个小组中取得了成功,并且发现了如何对此进行解码。 here is the Basic4Java code I use.
这是我使用的Basic4Java代码。
Dim sb As StringBuilder
sb.Initialize
Dim Spllited() As String
Spllited = Regex.Split(" ",payload)
Dim N As Int
N = Bit.ParseInt(Spllited(1), 16)
Dim Frequency As Int = (1000000/(N * .241246)/1000)
Dim pulse As Float = (1000/Frequency)
sb.Append(Frequency).Append(",") ' Add frequency
Dim OneTime As Int = Bit.ParseInt(Spllited(2), 16)
Dim Repeat As Int = Bit.ParseInt(Spllited(3), 16)
For z = 4 To Spllited.Length-1
Dim Int_Number As Int
Int_Number = Bit.ParseInt(Spllited(z), 16)
Dim t As Int = Int_Number * pulse
sb.Append(t)
If z <> Spllited.Length-1 Then sb.Append(",")
Next
payload = sb.ToString
Tom 汤姆
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.