NAME
Protocol::IR::Proto::JVC48 - JVC-48 protocol handler (48-bit Kaseikyo, OEM 3/1)
VERSION
version 1.0
SYNOPSIS
use Protocol::IR::Converter;
my $converter = Protocol::IR::Converter->new();
# From a raw 48-bit value or from parameters
my $code = $converter->import_code('JVC-48', '0x030122210300');
my $code = $converter->import_code('JVC-48',
{ address => 34, subaddress => 33, command => 3 });
DESCRIPTION
The JVC-48 protocol transmits 48-bit frames at 37 kHz: six bytes -- OEM code 3, OEM code 1, device, subdevice, function, and a checksum -- each sent LSB-first, preceded by a 3456/1728 us header and followed by a stop mark. A single frame carries all six bytes; the repeat is a whole-frame retransmission invisible to the single-frame decoder here. The checksum byte is device ^ subdevice ^ function, the same rule the Panasonic member of the Kaseikyo family uses. JVC-48 has no subaddress semantics of its own; a missing subdevice sends a zero field.
The data value matches Tasmota's DataLSB field: OEM1 in bits 40-47, OEM2 in bits 32-39, device in bits 24-31, subdevice in bits 16-23, function in bits 8-15, and the checksum in bits 0-7. The display form (Tasmota Data) is the per-byte bit reversal; see decode_byte_order.
METHODS
decode_raw
my $code = $class->decode_raw('0x030122210300');
Builds an Protocol::IR::Code from the raw 48-bit accumulated value.
decode_byte_order
my $code = $class->decode_byte_order($raw, $lsb);
Decodes from either byte order: $lsb true reads the accumulated (DataLSB) form, false reads the display (Data) form reached by reversing the bits within each byte.
decode_params
my $code = $class->decode_params(address => 34, subaddress => 33, command => 3);
Builds an Protocol::IR::Code from discrete parameters. Accepts address or device, subaddress or subdevice, and command or function.
decode_timing
my $code = $class->decode_timing(\@burst_pairs_us);
Decodes an arrayref of microsecond [mark_us, space_us] pairs. Returns an Protocol::IR::Code when the header, 48 data bits, and stop bit match the JVC-48 timing signature, otherwise undef.
to_pronto
my $pronto = $class->to_pronto($ir_code);
Encodes an Protocol::IR::Code object as a Pronto Hex string at 37 kHz.
SUPPORT
Source code: https://github.com/bwarden/perl-protocol-ir
Bug reports and feature requests: https://github.com/bwarden/perl-protocol-ir/issues
AUTHOR
Brett T. Warden <bwarden@cpan.org>
COPYRIGHT AND LICENSE
Copyright (c) 2026 Brett T. Warden
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation.