crazymikefra / HA_RFPlayerNext

1 stars 1 forks source link

Modification pour log provisoire ligne en #, sinon # # et INFO diverse ! #10

Open Doubledom45 opened 1 year ago

Doubledom45 commented 1 year ago

Modification fichier custom_components/rfplayer/rflib/rfpparser.py

"""Parsers."""

from enum import Enum
import json
import logging
import re
from typing import Any, Callable, Dict, Generator, cast
from .protocols import *
import traceback

log = logging.getLogger(__name__)

PACKET_ID_SEP = "_"

PACKET_FIELDS = {
    "bat": "battery_level",
    "bat": "battery",
    "cmd": "command",
    "dtc": "detector",
    "sta": "status",
    "sen": "sensor",
    "cov": "cover",
    "swi":"switch",
    "temperature":"temperature",
    "hygrometry":"hygrometry",
    "prs":"pressure",
    "alm":"alarm",
    "tmr":"tamper",
    "bt1":"button1",
    "bt2":"button2",
    "bt3":"button3",
    "bt4":"button4",
    "btn":"button", #ajout pour EDISIO pour info numérique de la cde
    "spd":"speed",
    "dir":"direction",
    "uv":"uv",
    "nrj":"energy", # Retour energy de l'OWL
    "pow":"Power",
    "P1":"P1",
    "P2":"P2",
    "P3":"P3",
    "TRN":"TotalRain",
    "Rai":"Rain",
    "fnc":"functionMeaning",
    "sta":"stateMeaning",
    "mod":"modeMeaning",
    "d0":"d0",
    "d1":"d1",
    "d2":"d2",
    "d3":"d3",
    "typ":"subType",
    "dbg":"debug",
#   #Pour EDISIO 868
    "mod":"model",
    "info":"info",
    "type":'infoMeaning',
    "confort":"99",
    "eco":"98",
    "HG":"97",
    "ON":"01",
    "OFF":"02",
    "dim":"dim",
}

RTS_ELEM = {
    "0": "shu",
    "1": "por",
}

UNITS = {
    "bat": None,
    "cmd": None,
    "detector": None,
    "sta": None,
}

DTC_STATUS_LOOKUP = {
    "0": "closed",
    "2": "open",
    "8": "alive",
    "16": "assoc",
    "18": "test",
}

RTS_STATUS_LOOKUP = {
    "1" : "DOWN", #Down /OFF
    "4" : "MY", #My
    "7" : "UP", #Up /ON
    "13" : "ASSOC",

    "5" : "LEFT", #Left button
    "6" : "RIGHT", #Right button
}

VALUE_TRANSLATION = cast(
    Dict[str, Callable[[str], str]],
    {
        "detector": lambda x: DTC_STATUS_LOOKUP.get(x, "unknown"),
        "rts_status": lambda x: RTS_STATUS_LOOKUP.get(x, "unknown"),
        "rts_elem": lambda x: RTS_ELEM.get(x, "unknown"),
    },
)

PACKET_HEADER_RE = (
    "^("
    + "|".join(
        [
            "ZIA--",  # command reply
            "ZIA33",  # json reply
        ]
    )
    + ")"
)

packet_header_re = re.compile(PACKET_HEADER_RE)

PacketType = Dict[str, Any]

class PacketHeader(Enum):
    """Packet source identification."""

    master = "10"
    echo = "11"
    gateway = "20"

def valid_packet(packet: str) -> bool:
    """Check if packet is valid."""
    return bool(packet_header_re.match(packet))

def decode_packet(packet: str) -> list:
    """Decode packet."""
    packets_found = []
    data = cast(PacketType, {"node": PacketHeader.gateway.name})

   # # Welcome messages directly send
    if packet.startswith("ZIA--"):
        data["message"] = packet.replace("ZIA--", "")
        return [data]

    # # Protocols
    message = json.loads(packet.replace("ZIA33", ""))["frame"]
    data["protocol"] = message["header"]["protocolMeaning"]
    #log.debug("Packet : %s",packet)

    NewMotor=False

    try:
        packets_found.append(globals()["_".join([data["protocol"],"decode"])](data,message,PacketHeader.gateway.name))
        NewMotor=True
    except Exception as e:
        log.error("Protocol %s not implemented : %s", str(data["protocol"]),str(e))
        log.debug("Trace : %s",traceback.format_exc())
        log.debug("Message : %s", str(message))

#    #if packets_found==[None]:
#    #    log.error("No packets found in %s", str(message))
#    #log.debug("Packets Found : %s", str(packets_found))
    return packets_found

def encode_packet(packet: PacketType) -> str:
    """Construct packet string from packet dictionary."""
    command = str(packet["command"]).upper()
    protocol = str(packet["protocol"]).upper()
    if "id" in packet:
        return f"ZIA++{command} {protocol} ID {packet['id']}"
    if "address" in packet:
        return f"ZIA++{command} {protocol} {packet['address']}"
#    # else:
#    #     return f"ZIA++{command} {protocol}"
    raise Exception("No ID or Address found")

def serialize_packet_id(packet: PacketType) -> str:
    """Serialize packet identifiers into one reversible string."""
#    log.debug("Serialize packet %s", str(packet))
    return PACKET_ID_SEP.join(
        filter(
            None,
            [
                packet.get("protocol", None),
                packet.get("id", None),
                packet.get("switch", None),
            ],
        )
    )

def deserialize_packet_id(packet_id: str) -> Dict[str, str]:
    """Deserialize packet id."""
    if packet_id == "rfplayer":
        return {"protocol": "unknown"}

    if packet_id == "ZIA":
        return {"protocol": "ZIA++"}

    if packet_id.lower().startswith("chacon"):
        return {
            "protocol": "chacon",
            "address": packet_id.split(PACKET_ID_SEP)[1],
        }

    if packet_id.startswith("dooya_v4"):
        return {
            "protocol": "dooya_v4",
            "id": packet_id.replace("dooya_v4_", "").split(PACKET_ID_SEP)[0],
            "switch": packet_id.replace("dooya_v4_", "").split(PACKET_ID_SEP)[0],
        }

    packet_id_splited = packet_id.split(PACKET_ID_SEP)
    packet = {
        "protocol": packet_id_splited[0],
        "id": packet_id_splited[1],
    }
    if len(packet_id_splited) > 2:
        packet["switch"] = packet_id_splited[2]

    return packet

def packet_events(packet: PacketType) -> Generator[PacketType, None, None]:
    platform=None
#    log.debug("packet:%s", str(packet))
    """Handle packet events."""
    field_abbrev = {
        v: k
        for k, v in sorted(
            PACKET_FIELDS.items(), key=lambda x: (x[1], x[0]), reverse=True
        )
    }

    packet_id = serialize_packet_id(packet)

    events = {f: v for f, v in packet.items() if f in field_abbrev}
    forceid=None
    for f, v in packet.items():
#        log.debug("f:%s,v:%s", f, v)
        if f == "platform":
            platform=v
        if f == "protocol":
            protocol=v
        if f == "forceid" :
            forceid=v
    for sensor, value in events.items():
#        log.debug("packet_events, sensor:%s,value:%s", sensor, value)
        unit = packet.get(sensor + "_unit", None)

        if forceid==None:
            id=packet_id + field_abbrev[sensor] + PACKET_ID_SEP + field_abbrev[sensor]
        else :
            id=forceid

        yield {
            "id": id,
            sensor: value,
            "value":value,
            "unit": unit,
            "platform": platform,
            "protocol": protocol
        }

OK...

Modification fichier custom_components/rfplayer/rflib/rfpprotocol.py


"""Asyncio protocol implementation of RFplayer."""

import asyncio
from datetime import timedelta
from fnmatch import fnmatchcase
from functools import partial
import logging
from typing import Any, Callable, Coroutine, Optional, Sequence, Tuple, Type

from serial_asyncio import create_serial_connection

from .rfpparser import (
    PacketType,
    decode_packet,
    encode_packet,
    packet_events,
    valid_packet,
)

log = logging.getLogger(__name__)

TIMEOUT = timedelta(seconds=5)

class ProtocolBase(asyncio.Protocol):
    """Manage low level rfplayer protocol."""

    transport = None  # type: asyncio.BaseTransport

    def __init__(
        self,
        loop: Optional[asyncio.AbstractEventLoop] = None,
        disconnect_callback: Optional[Callable[[Optional[Exception]], None]] = None,
        **kwargs: Any,
    ) -> None:
        """Initialize class."""
        if loop:
            self.loop = loop
        else:
            self.loop = asyncio.get_event_loop()
        self.packet = ""
        self.buffer = ""
        self.packet_callback = None  # type: Optional[Callable[[PacketType], None]]
        self.disconnect_callback = disconnect_callback

    def connection_made(self, transport: asyncio.BaseTransport) -> None:
        """Just logging for now.
        INFO LORS DU FACTORYRESET
        SENSITIVITY H/L =0 Default value - High sensitivity (-0dB)
        SELECTIVITY H/L =0 : Default value - Medium selectivity (300Khz)
        DSPTRIGGER Default values -  H 868Mhz = 6dBm /L 433 Mhz = 8dBm -- Valeur : de 4 à 20 [La valeur 0 remet la valeur par défaut] C'est le niveau de détection Trame et Analyse !
        RFLINK default RFLINK engine is enabled
        RFLINKTRIGGER Default values - H 868Mhz = 10dBm  /L 433 Mhz = 12dBm -- Valeur : de 4 à 20 [La valeur 0 remet la valeur par défaut] C'est le niveau de détection en RFLINK de Trame et Analyse !
        LBT Default value : 16dBm    Val : 6 à 30 dBm Le Rfplayer attendra ( maxi 3 sec) un silence avant d'envoyer des trames        
        """
        self.transport = transport
        self.send_raw_packet("ZIA++HELLO")
        self.send_raw_packet("ZIA++FACTORYRESET")
        self.send_raw_packet("ZIA++RECEIVER + *")
        self.send_raw_packet("ZIA++FORMAT JSON")
        self.send_raw_packet("ZIA++STATUS") # si tu envoie la demande de status, il faut autoriser le log ?

    def data_received(self, data: bytes) -> None:
        """Add incoming data to buffer."""
        try:
            decoded_data = data.decode()
#             log.debug("data:", decoded_data)
        except UnicodeDecodeError:
            invalid_data = data.decode(errors="replace")
            log.warning("Error during decode of data, invalid data: %s", invalid_data)
        else:
            log.debug("received data: %s", decoded_data.strip())
            self.buffer += decoded_data
            self.handle_lines()

    def handle_lines(self) -> None:
        """Assemble incoming data into per-line packets."""
        while "\n\r" in self.buffer:
            line, self.buffer = self.buffer.split("\n\r", 1)
            if valid_packet(line):
                self.handle_raw_packet(line)
            else:
                log.warning("dropping invalid data: %s", line) # Voir ZIA66 = reception trame EDISIOFRAME

    def handle_raw_packet(self, raw_packet: str) -> None:
        """Handle one raw incoming packet."""
        raise NotImplementedError()

    def send_raw_packet(self, packet: str) -> None:
        """Encode and put packet string onto write buffer."""
        data = bytes(packet + "\n\r", "utf-8")
        log.debug("writing data: %s", repr(data))
        self.transport.write(data)  # type: ignore

    def connection_lost(self, exc: Optional[Exception]) -> None:
        """Log when connection is closed, if needed call callback."""
        if exc:
            log.exception("disconnected due to exception")
        else:
            log.info("disconnected because of close/abort.")
        if self.disconnect_callback:
            self.disconnect_callback(exc)

class PacketHandling(ProtocolBase):
    """Handle translating rfplayer packets to/from python primitives."""

    def __init__(
        self,
        *args: Any,
        packet_callback: Optional[Callable[[PacketType], None]] = None,
        **kwargs: Any,
    ) -> None:
        """Add packethandling specific initialization.
        packet_callback: called with every complete/valid packet
        received.
        """
        log.debug("PacketHandling")
        super().__init__(*args, **kwargs)
        if packet_callback:
            self.packet_callback = packet_callback

    def handle_raw_packet(self, raw_packet: str) -> None:
        """Parse raw packet string into packet dict."""
        packets = []
        try:
            packets = decode_packet(raw_packet)
        except BaseException:
            log.exception("failed to parse packet data: %s", raw_packet)

        if packets:
            for packet in packets:
                if packet != None:
                    #log.debug("decoded packet: %s", packet)
                    if "ok" in packet:
#                        # handle response packets internally
                        log.debug("command response: %s", packet)
                        self.handle_response_packet(packet)
                    else:
                        #log.debug("handle packet: %s", packet)
                        self.handle_packet(packet)
        else:
            log.warning("no valid packet")

    def handle_packet(self, packet: PacketType) -> None:
        """Process incoming packet dict and optionally call callback."""
        if self.packet_callback:
#            # forward to callback
#            #log.debug("forwarding packet: %s to %s", packet,self.packet_callback.__code__)
            self.packet_callback(packet)
        else:
            log.debug("packet with no callback %s", packet)

    def handle_response_packet(self, packet: PacketType) -> None:
        """Handle response packet."""
        raise NotImplementedError()

    def send_packet(self, fields: PacketType) -> None:
        """Concat fields and send packet to gateway."""
        encoded_packet = encode_packet(fields)
        self.send_raw_packet(encoded_packet)

    def send_command(
        self,
        protocol: str,
        command: str,
        device_address: str = None,
        device_id: str = None,
    ) -> None:
        """Send device command to rfplayer gateway."""
        if device_id is not None:
            if protocol == "EDISIOFRAME" :
                self.send_raw_packet(f"ZIA++{protocol} {device_id}")
## modif envoie cde Protocol sans ID si jamming ( commande )
            elif protocol == "JAMMING" :
                if command == "ON" :
                    self.send_raw_packet(f"ZIA++{protocol} 7")
                elif command == "OFF" :
                    self.send_raw_packet(f"ZIA++{protocol} 0")
                else:
                    self.send_raw_packet(f"ZIA++{protocol} {command}")
            else :
##                self.send_raw_packet(f"ZIA++{command} {protocol} ID {device_id}")
## modif d'ordre d'envoie
                self.send_raw_packet(f"ZIA++{command} ID {device_id} {protocol}")
        elif device_address is not None:
            DIM_ADDON=""
            if command == "DIM" :
                DIM_ADDON="%50"
##            self.send_raw_packet(f"ZIA++{command} {protocol} {device_address} {DIM_ADDON}")
## modif d'ordre d'envoie
            self.send_raw_packet(f"ZIA++{command} {device_address} {protocol} {DIM_ADDON}")
        elif protocol == "EDISIOFRAME":
            self.send_raw_packet(f"ZIA++{command}")
#        # else:
#        #     self.send_raw_packet(f"ZIA++{protocol} {command}")
#####
        else:
##bug jamming id=0
            if protocol == "JAMMING" :
                self.send_raw_packet(f"ZIA++{protocol} {command}")
## modif d'ordre d'envoie
            else :
                self.send_raw_packet(f"ZIA++{command} {protocol}")

class CommandSerialization(PacketHandling):
    """Logic for ensuring asynchronous commands are sent in order."""

    def __init__(
        self,
        *args: Any,
        packet_callback: Optional[Callable[[PacketType], None]] = None,
        **kwargs: Any,
    ) -> None:
        """Add packethandling specific initialization."""
#        #log.debug("CommandSerialization")
        super().__init__(*args, **kwargs)
        if packet_callback:
            self.packet_callback = packet_callback
        self._event = asyncio.Event()
        self._lock = asyncio.Lock()

    def handle_response_packet(self, packet: PacketType) -> None:
        """Handle response packet."""
        log.debug("handle_response_packet")
        self._last_ack = packet
        self._event.set()

    async def send_command_ack(
        self,
        protocol: str,
        command: str,
        device_address: str = None,
        device_id: str = None,
    ) -> bool:
        """Send command, wait for gateway to repond."""
        async with self._lock:
            self.send_command(protocol, command, device_address, device_id)
            self._event.clear()
#            # await self._event.wait()
        return True

class EventHandling(PacketHandling):
    """Breaks up packets into individual events with ids'.

    Most packets represent a single event (light on, measured
    temperature), but some contain multiple events (temperature and
    humidity). This class adds logic to convert packets into individual
    events each with their own id based on packet details (protocol,
    switch, etc).
    """

    def __init__(
        self,
        *args: Any,
        event_callback: Optional[Callable[[PacketType], None]] = None,
        ignore: Optional[Sequence[str]] = None,
        **kwargs: Any,
    ) -> None:
        """Add eventhandling specific initialization."""
        super().__init__(*args, **kwargs)
        self.event_callback = event_callback
#        # suppress printing of packets
        log.debug("EventHandling")
        if not kwargs.get("packet_callback"):
            self.packet_callback = lambda x: None
        if ignore:
            log.debug("ignoring: %s", ignore)
            self.ignore = ignore
        else:
            self.ignore = []

    def _handle_packet(self, packet: PacketType) -> None:
        """Event specific packet handling logic."""
        events = packet_events(packet)

        for event in events:
            if self.ignore_event(event["id"]):
                log.debug("ignoring event with id: %s", event)
                continue
            log.debug("got event: %s", event)
            if self.event_callback:
                self.event_callback(event)
            else:
                self.handle_event(event)

    def handle_event(self, event: PacketType) -> None:
        """Handle of incoming event (print)."""
        log.debug("_handle_event")
        string = "{id:<32} "
        if "command" in event:
            string += "{command}"
        if "cover" in event:
            string += "{cover}"
        if "platform" in event:
            string += "{platform}"
        elif "version" in event:
            if "hardware" in event:
                string += "{hardware} {firmware} "
            string += "V{version} R{revision}"
        else:
            string += "{value}"
            if event.get("unit"):
                string += " {unit}"

        print(string.format(**event))

    def handle_packet(self, packet: PacketType) -> None:
        """Apply event specific handling and pass on to packet handling."""
        self._handle_packet(packet)
        super().handle_packet(packet)

    def ignore_event(self, event_id: str) -> bool:
        """Verify event id against list of events to ignore."""
        for ignore in self.ignore:
            if fnmatchcase(event_id, ignore):
                log.debug("ignore_event")
                return True
        return False

class RfplayerProtocol(CommandSerialization, EventHandling):
    """Combine preferred abstractions that form complete Rflink interface."""

def create_rfplayer_connection(
    port: str,
    baud: int = 115200,
    protocol: Type[ProtocolBase] = RfplayerProtocol,
    packet_callback: Optional[Callable[[PacketType], None]] = None,
    event_callback: Optional[Callable[[PacketType], None]] = None,
    disconnect_callback: Optional[Callable[[Optional[Exception]], None]] = None,
    ignore: Optional[Sequence[str]] = None,
    loop: Optional[asyncio.AbstractEventLoop] = None,
) -> "Coroutine[Any, Any, Tuple[asyncio.BaseTransport, ProtocolBase]]":
    """Create Rflink manager class, returns transport coroutine."""
    if loop is None:
        loop = asyncio.get_event_loop()
    # use default protocol if not specified
    protocol_factory = partial(
        protocol,
        loop=loop,
        packet_callback=packet_callback,
        event_callback=event_callback,
        disconnect_callback=disconnect_callback,
        ignore=ignore if ignore else [],
    )

    # setup serial connection
    conn = create_serial_connection(loop, protocol_factory, port, baud)

    return conn

OK ...

Doubledom45 commented 1 year ago

Pour initialisé certains protocoles [ Test] je fais des boutons qui appellent la fonction RECEIVER ! image Les commandes OK, mais pas en liste si je récupère le state .Donc je fais un par un !

 DEBUG (MainThread) [custom_components.rfplayer] Rfplayer send command for {'command': 'RECEIVER -*', 'protocol': '', 'automatic_add': False}
 DEBUG (MainThread) [custom_components.rfplayer.rflib.rfpprotocol] writing data: b'ZIA++RECEIVER -* \n\r'
 DEBUG (MainThread) [custom_components.rfplayer.rflib.rfpprotocol] received data: ZIA--RECEIVED PROTOCOLS:
 DEBUG (MainThread) [custom_components.rfplayer] Rfplayer send command for {'command': 'RECEIVER + CHACON', 'protocol': '', 'automatic_add': False}
 DEBUG (MainThread) [custom_components.rfplayer.rflib.rfpprotocol] writing data: b'ZIA++RECEIVER + CHACON \n\r'
 DEBUG (MainThread) [custom_components.rfplayer.rflib.rfpprotocol] received data: ZIA--RECEIVED PROTOCOLS: CHACON
 DEBUG (MainThread) [custom_components.rfplayer] Rfplayer send command for {'command': 'RECEIVER + EDISIO', 'protocol': '', 'automatic_add': False}
 DEBUG (MainThread) [custom_components.rfplayer.rflib.rfpprotocol] writing data: b'ZIA++RECEIVER + EDISIO \n\r'
 DEBUG (MainThread) [custom_components.rfplayer.rflib.rfpprotocol] received data: ZIA--RECEIVED PROTOCOLS: CHACON EDISIO
 DEBUG (MainThread) [custom_components.rfplayer] Rfplayer send command for {'command': 'RECEIVER + VISONIC', 'protocol': '', 'automatic_add': False}
 DEBUG (MainThread) [custom_components.rfplayer.rflib.rfpprotocol] writing data: b'ZIA++RECEIVER + VISONIC \n\r'
 DEBUG (MainThread) [custom_components.rfplayer.rflib.rfpprotocol] received data: ZIA--RECEIVED PROTOCOL
 DEBUG (MainThread) [custom_components.rfplayer.rflib.rfpprotocol] received data: S: VISONIC CHACON EDISIO
 DEBUG (MainThread) [custom_components.rfplayer] Rfplayer send command for {'command': 'RECEIVER + RTS', 'protocol': '', 'automatic_add': False}
 DEBUG (MainThread) [custom_components.rfplayer.rflib.rfpprotocol] writing data: b'ZIA++RECEIVER + RTS \n\r'
 DEBUG (MainThread) [custom_components.rfplayer.rflib.rfpprotocol] received data: ZIA--RECEIVED PROTOCOLS: RTS VISONIC CHACON EDISIO
 DEBUG (MainThread) [custom_components.rfplayer] Rfplayer send command for {'command': 'RECEIVER + OREGONV3/OWL', 'protocol': '', 'automatic_add': False}
 DEBUG (MainThread) [custom_components.rfplayer.rflib.rfpprotocol] writing data: b'ZIA++RECEIVER + OREGONV3/OWL \n\r'
 DEBUG (MainThread) [custom_components.rfplayer.rflib.rfpprotocol] received data: ZIA--RECEIVED PROTOCOLS: RTS VISONIC CHACON OREGONV3/OWL EDISIO
 DEBUG (MainThread) [custom_components.rfplayer] Rfplayer send command for {'command': 'RECEIVER - OREGONV3/OWL', 'protocol': '', 'automatic_add': False}
 DEBUG (MainThread) [custom_components.rfplayer.rflib.rfpprotocol] writing data: b'ZIA++RECEIVER - OREGONV3/OWL \n\r'
 DEBUG (MainThread) [custom_components.rfplayer.rflib.rfpprotocol] received data: ZIA--RECEIVED PROTOCOLS: RTS VISONIC CHACON EDISIO
 DEBUG (MainThread) [custom_components.rfplayer] Rfplayer send command for {'command': 'RECEIVER - RTS', 'protocol': '', 'automatic_add': False}
 DEBUG (MainThread) [custom_components.rfplayer.rflib.rfpprotocol] writing data: b'ZIA++RECEIVER - RTS \n\r'
 DEBUG (MainThread) [custom_components.rfplayer.rflib.rfpprotocol] received data: ZIA--RECEIVED PROTOCOLS:
 DEBUG (MainThread) [custom_components.rfplayer.rflib.rfpprotocol] received data: VISONIC CHACON EDISIO
 DEBUG (MainThread) [custom_components.rfplayer] Rfplayer send command for {'command': 'RECEIVER - VISONIC', 'protocol': '', 'automatic_add': False}
 DEBUG (MainThread) [custom_components.rfplayer.rflib.rfpprotocol] writing data: b'ZIA++RECEIVER - VISONIC \n\r'
 DEBUG (MainThread) [custom_components.rfplayer.rflib.rfpprotocol] received data: ZIA--RECEIVED PROTOCOLS: CHACON EDISIO
 DEBUG (MainThread) [custom_components.rfplayer] Rfplayer send command for {'command': 'RECEIVER - EDISIO', 'protocol': '', 'automatic_add': False}
 DEBUG (MainThread) [custom_components.rfplayer.rflib.rfpprotocol] writing data: b'ZIA++RECEIVER - EDISIO \n\r'
 DEBUG (MainThread) [custom_components.rfplayer.rflib.rfpprotocol] received data: ZIA--RECEIVED PROTOCOLS: CHACON
 DEBUG (MainThread) [custom_components.rfplayer] Rfplayer send command for {'command': 'RECEIVER - CHACON', 'protocol': '', 'automatic_add': False}
 DEBUG (MainThread) [custom_components.rfplayer.rflib.rfpprotocol] writing data: b'ZIA++RECEIVER - CHACON \n\r'
 DEBUG (MainThread) [custom_components.rfplayer.rflib.rfpprotocol] received data: ZIA--RECEIVED PROTOCOLS:
 DEBUG (MainThread) [custom_components.rfplayer] Rfplayer send command for {'command': 'RECEIVER -*', 'protocol': '', 'automatic_add': False}
 DEBUG (MainThread) [custom_components.rfplayer.rflib.rfpprotocol] writing data: b'ZIA++RECEIVER -* \n\r'
 DEBUG (MainThread) [custom_components.rfplayer.rflib.rfpprotocol] received data: ZIA--RECEIVED PROTOCOLS:
 DEBUG (MainThread) [custom_components.rfplayer] Rfplayer send command for {'command': 'RECEIVER +*', 'protocol': '', 'automatic_add': False}
 DEBUG (MainThread) [custom_components.rfplayer.rflib.rfpprotocol] writing data: b'ZIA++RECEIVER +* \n\r'
 DEBUG (MainThread) [custom_components.rfplayer.rflib.rfpprotocol] received data: ZIA--RECEIVED PROTOCOLS: X10 RTS VISONIC BLYSS CHACON OREGONV1 OREGONV2 OREGONV3/OWL DOMIA X2D KD101 PARROT TIC FS20 EDISIO
Doubledom45 commented 1 year ago

Test de la double cde sur EDISIO [ pas compatible sur tout "subType"] il ne faut pas de perturbation de message !, pour avoir info de retour. cde EDISIO avec retour de l'info

Doubledom45 commented 1 year ago

POUR LE JAMMING, il y a toujours le bug sur le slider créé par le custom_components/rfplayer/number.py ! Moi je fais un slider en dehors du prog, pour tester cette fonction ! Avec une entité temps et niveau de détection..

cde JAMMING PS: le test sur le temps en seconde est en réel, donc attendre pour résultat !

Doubledom45 commented 1 year ago

Je vais voir le GP F1. Bonne lecture @+Dom