crazymikefra / HA_RFPlayer

RFPlayer plugin for Home assistant
0 stars 0 forks source link

JAMMING management #5

Open crazymikefra opened 1 year ago

crazymikefra commented 1 year ago
    pour le JAMMING sensor
2023-02-26 18:37:34.661 DEBUG (MainThread) [custom_components.rfplayer.rflib.rfpparser] Message : {'header': {'frameType': '0', 'cluster': '0', 'dataFlag': '0', 'rfLevel': '-61', 'floorNoise': '-101', 'rfQuality': '10', 'protocol': '15', 'protocolMeaning': 'JAMMING', 'infoType': '1', 'frequency': '433920'}, 'infos': {'subType': '1', 'id': '0', 'subTypeMeaning': 'ON'}}
2023-02-26 18:37:34.661 WARNING (MainThread) [custom_components.rfplayer.rflib.rfpprotocol] no valid packet

2023-02-26 18:37:39.736 ERROR (MainThread) [custom_components.rfplayer.rflib.rfpparser] Protocol JAMMING not implemented : 'subType'
2023-02-26 18:37:39.738 DEBUG (MainThread) [custom_components.rfplayer.rflib.rfpparser] Trace : Traceback (most recent call last):
  File "/config/custom_components/rfplayer/rflib/rfpparser.py", line 140, in decode_packet
    packets_found.append(globals()["_".join([data["protocol"],"decode"])](data,message,PacketHeader.gateway.name))
  File "/config/custom_components/rfplayer/rflib/protocols.py", line 362, in JAMMING_decode
    decoding=globals()["_".join(["infoType",decoded_items["infoType"],"decode"])](message['infos'])
  File "/config/custom_components/rfplayer/rflib/infotypes.py", line 66, in infoType_1_decode
    fields_found["command"]=fields_found["subType"]
KeyError: 'subType'

2023-02-26 18:37:39.738 DEBUG (MainThread) [custom_components.rfplayer.rflib.rfpparser] Message : {'header': {'frameType': '0', 'cluster': '0', 'dataFlag': '1', 'rfLevel': '-89', 'floorNoise': '-106', 'rfQuality': '4', 'protocol': '15', 'protocolMeaning': 'JAMMING', 'infoType': '1', 'frequency': '868350'}, 'infos': {'subType': '0', 'id': '0', 'subTypeMeaning': 'OFF'}}
2023-02-26 18:37:39.739 WARNING (MainThread) [custom_components.rfplayer.rflib.rfpprotocol] no valid packet

'subTypeMeaning': 'OFF et ON 'subtype' 0 et 1

_Originally posted by @Doubledom45 in https://github.com/crazymikefra/HA_RFPlayerNext/discussions/3#discussioncomment-5115716_

crazymikefra commented 1 year ago

Capteur diagnostique de base désactivé. Passage en création dynamique

Doubledom45 commented 1 year ago

Ok pour le JAMMING... Il faut que je vois pour sa fonction sur un switch, car pas d'ID lors d'envoie de trame soit en JAMMING ou en SIMULATE (sert pour test)... [ j'ai créé des cde en switch pour palier, sinon il faut tester ces JAMMING et SIMULATE et autorisé l'envoie sans ID comme EDISOFRAMME]