Bluscream
-
Posts
4 -
Joined
-
Last visited
Posts posted by Bluscream
-
-
@jason or anyone. Is there a tool or website available that helps me convert the flirc codes to the new format? I have a bunch of flirc codes lying around that need updating to use with the new Pi software. I tried getting phind.com to write a tool for me which resulted in this python code:
import math
# define constantsPRONTO_CODE = '0000'FREQUENCY = '006D'ZERO = '0000'PULSE = 9025SPACE = 4391# input sequence (change this to your input)ir_sequence = [0,9025,4391,643,448,617,469,643,443,643,448,638,448,617,470,643,443,643,1568,617,1597,643,1568,643,1572,643,1568,643,1568,621,1594,643,1568,643,448,643,1568,643,443,643,447,617,469,643,444,643,447,639,447,643,444,643,443,643,1568,621,1593,643,1568,617,1598,643,1567,643,1567,647,1568,643]# convert IR sequence to Pronto Codepronto_sequence = []for i in range(2, len(ir_sequence), 2):space = ir_sequence[i]pulse = ir_sequence[i+1]pulse_hex = hex(int(pulse/PULSE*0x10))space_hex = hex(int(space/SPACE*0x10))pronto_sequence.append(str(space_hex)[2:].zfill(4))pronto_sequence.append(str(pulse_hex)[2:].zfill(4))print(PRONTO_CODE, FREQUENCY, ZERO, ZERO, ''.join(pronto_sequence))but it gave me a completely different result from the working expected pronto code that i have for that one command:
Expected result:0000 006D 0022 0000 0159 00AD 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0042 0014 0042 0015 0041 0016 0041 0015 0042 0015 0042 0015 0042 0015 0042 0015 0016 0016 0042 0015 0016 0016 0016 0016 0016 0016 0016 0016 0016 0015 0016 0015 0016 0016 0016 0016 0041 0015 0041 0016 0042 0015 0042 0015 0042 0015 0041 0015 0041 0015 06C3Actual result:0000 006D 0000 0000 001000010001000100010001000100010001000100010001000100010001000100050001000500010005000100050001000500010005000100050001000500010001000100050001000100010001000100010001000100010001000100010001000100010001000100050001000500010005000100050001000500010005000100050001EDIT: I now also tried your tool from above but it says "--pattern" can and can't be used at the same time:
blu@automater:/var/www $ irtools help decode 0,9025,4391,643,448,617,469,643,443,643,448,638,448,617,470,643,443,643,1568,617,1597,643,1568,643,1572,643,1568,643,1568,621,1594,643,1568,643,448,643,1568,643,443,643,447,617,469,643,444,643,447,639,447,643,444,643,443,643,1568,621,1593,643,1568,617,1598,643,1567,643,1567,647,1568,643
Help for `decode' command:
usage: decode <opts>
decode --pattern=143,2123,13...
OPTIONS:
-l, --listen open the hardware, listen, decode results
-r, --read read and decode from a file
-t, --time comma delimited timing in microseconds
-x, --raw +8248 -1291 +212 ...
-p, --pronto pronto comma delimited pattern
-e, --elapsed show elapsed time
blu@automater:/var/www $ irtools decode --pattern=0,9025,4391,643,448,617,469,643,443,643,448,638,448,617,470,643,443,643,1568,617,1597,643,1568,643,1572,643,156
8,643,1568,621,1594,643,1568,643,448,643,1568,643,443,643,447,617,469,643,444,643,447,639,447,643,444,643,443,643,1568,621,1593,643,1568,617,1598,643,1567,643,15
67,647,1568,643
[W] lib/libcmds/cmds.c handle_longopt(181): `decode' doesn not take '--pattern' option
Error: must specify an optionEDIT 2:
I now found the right command to atleast send the old commands in the meantime: irtools sendir --ik=23000 --repeat=0 --csv="0,9025,4391,..." -
On 2/13/2021 at 5:26 AM, jason said:
If you need help with the sdk, let me know. It would be better to write a daemon that keeps the device open and you send it a command. Sorry. I’m deep in another product right now. You’ll understand when it comes out
Are you still deep in "that other product"? ^^
-
Have you figured this out? Maybe the flirc_util can be rewritten to handle this?
https://github.com/flirc/sdk/blob/26e271e49325ec7e449a705e4d438c7d0426fd0d/libs/flirc/flirc.h#L997
Generic IR receiver (ideally IR to MQTT)
in Ideas and Suggestions
Posted
This would be the ideal outcome, if it was mqtt then it would be imediatly compatible with a whole host of devices.