Page 7 sur 20

Re: Plugin Rfplayer Rfp1000

Publié : 15 juin 2017, 11:00
par zaraki673
yellowsky a écrit : heartbeat = ?
un signal pour dire "je suis toujours la/présent"
yellowsky a écrit : Je dois avouer que je n'ai pas bien compris comment enregistrer dans le configurateur.
- Dois-je enregistrer le signal ON et le signal OFF du capteur?
- Quand je le fais j'ai bien la led qui s'illumine mais rien de spécial dans les logs, donc je ne sais pas vraiment si cela c'est bien passé ou non...
je n'ai pas d'équipements rf non reconnu (uniquement du dio), du coup je ne vais pas pouvoir t'aider a ce sujet n'ayant pas pu le tester.
deennoo a publier un article sur son blog sur l'utilisation du rfplayer

Re: Plugin Rfplayer Rfp1000

Publié : 15 juin 2017, 15:12
par ogulf
Bonjour,

Tout nouveau sur le forum, j'essaye de configurer mon RFPLayer reçu hier.
J'ai bien pris connaissance des prérequis (Python, Domoticz en beta).
J'ai mis un USB persistant pour le RFPlayer, ce dernier est bien ajouté à la liste de mes matériels.
Cependant, j'ai un message d'erreur dans la log de Domoticz au démarrage, et aucun dispositif n'est associé au RFPlayer...
Sauriez-vous me dire ce que j'ai raté ?


2017-06-15 15:10:09.572 Domoticz V3.7972 (c)2012-2017 GizMoCuz
2017-06-15 15:10:09.573 Build Hash: a4623e3, Date: 2017-06-14 07:38:22
2017-06-15 15:10:09.573 Startup Path: /home/domoticz/domoticz/
2017-06-15 15:10:09.607 Sunrise: 05:50:00 SunSet:21:29:00
2017-06-15 15:10:09.607 EventSystem: reset all events...
2017-06-15 15:10:09.691 PluginSystem: Started, Python version '3.4.2'.
2017-06-15 15:10:09.700 Active notification Subsystems: email (1/12)
2017-06-15 15:10:09.701 WebServer(HTTP) started on address: :: with port 8080
2017-06-15 15:10:09.707 WebServer(SSL) started on address: :: with port 443
2017-06-15 15:10:09.709 Proxymanager started.
2017-06-15 15:10:09.710 Starting shared server on: :::6144
2017-06-15 15:10:09.710 TCPServer: shared server started...
2017-06-15 15:10:09.711 RxQueue: queue worker started...
2017-06-15 15:10:11.712 DarkSky: Started...
2017-06-15 15:10:11.712 Wunderground: Worker started...
2017-06-15 15:10:11.712 EventSystem: reset all events...
2017-06-15 15:10:11.713 EventSystem: reset all device statuses...
2017-06-15 15:10:11.816 Python EventSystem: Module not found - Trying to initialize.
2017-06-15 15:10:11.818 Python EventSystem: Initalizing event module.
2017-06-15 15:10:11.819 EventSystem: Started
2017-06-15 15:10:12.109 PluginSystem: Entering work loop.
2017-06-15 15:10:12.211 OpenZWave: using config in: /home/domoticz/domoticz/Config/
2017-06-15 15:10:12.218 OpenZWave: Starting...
2017-06-15 15:10:12.218 OpenZWave: Version: 1.4-2501-g5af6780-dirty
2017-06-15 15:10:12.298 (RFPlayer) Initialized version 1.0.0, author 'zaraki673 - Drooz'
2017-06-15 15:10:12.302 (RFPlayer) Debug log level set to: 'true'.
2017-06-15 15:10:12.303 (RFPlayer) 'HomeFolder':'/home/domoticz/domoticz/plugins/rfplayer/'
2017-06-15 15:10:12.303 (RFPlayer) 'Version':'1.0.0'
2017-06-15 15:10:12.303 (RFPlayer) 'Name':'RFPlayer'
2017-06-15 15:10:12.303 (RFPlayer) 'HardwareID':'7'
2017-06-15 15:10:12.303 (RFPlayer) 'Key':'RFplayer'
2017-06-15 15:10:12.303 (RFPlayer) 'Author':'zaraki673 - Drooz'
2017-06-15 15:10:12.303 (RFPlayer) 'Mode6':'Debug'
2017-06-15 15:10:12.303 (RFPlayer) 'Mode4':'True'
2017-06-15 15:10:12.303 (RFPlayer) 'Mode5':'False'
2017-06-15 15:10:12.303 (RFPlayer) 'Port':'0'
2017-06-15 15:10:12.303 (RFPlayer) 'SerialPort':'/dev/ttyUSBRFPlayer'
2017-06-15 15:10:12.303 (RFPlayer) Device count: 0
2017-06-15 15:10:12.303 Error: (RFPlayer) 'onStart' failed 'AttributeError':''module' object has no attribute 'Transport''.
2017-06-15 15:10:12.303 Error: (RFPlayer) ----> Line 242 in /home/domoticz/domoticz/plugins/rfplayer/plugin.py, function onStart
2017-06-15 15:10:12.303 Error: (RFPlayer) ----> Line 163 in /home/domoticz/domoticz/plugins/rfplayer/plugin.py, function onStart
2017-06-15 15:10:12.401 OpenZWave: Driver Ready

Re: Plugin Rfplayer Rfp1000

Publié : 15 juin 2017, 15:28
par zaraki673
tu peux m envoyer la ligne 242 et 163 du plugin.py

merci

Re: Plugin Rfplayer Rfp1000

Publié : 15 juin 2017, 15:56
par ogulf
La ligne 163 est appelée par la ligne 242 du script.

########### create device if not find ###############
if IsCreated == False :
nbrdevices=nbrdevices+1
Domoticz.Device(Name="Manual Switch - " + Parameters["Mode2"], Unit=nbrdevices, Type=16, Switchtype=0).Create()
Devices[nbrdevices].Update(nValue =0,sValue = "0",Options = Options)
Domoticz.Log("Plugin has " + str(len(Devices)) + " devices associated with it.")
DumpConfigToLog()
Domoticz.Transport("Serial", Parameters["SerialPort"], Baud=115200) <=== ligne 163
Domoticz.Protocol("None") # None,XML,JSON,HTTP
Domoticz.Connect()
ReqRcv=''
return

...
...

def onStart():
global _plugin
_plugin.onStart() <=== ligne 242


information importante : je viens de m'apercevoir que je n'avais pas la DERNIERE version du script... Je viens de la télécharger, je refais un essai

Plus d'erreur !!

Je suis désolé... je vérifierai mieux la prochaine fois ! ;)

Re: Plugin Rfplayer Rfp1000

Publié : 15 juin 2017, 17:31
par zaraki673
ogulf a écrit : Je suis désolé... je vérifierai mieux la prochaine fois ! ;)
pas de soucis ;)

Re: Plugin Rfplayer Rfp1000

Publié : 15 juin 2017, 18:54
par yellowsky
zaraki673 a écrit : un signal pour dire "je suis toujours la/présent"
Évidemment... suis-je bête

Je vais essayer cela, merci pour le lien.

Re: Plugin Rfplayer Rfp1000

Publié : 15 juin 2017, 19:24
par zaraki673
yellowsky a écrit : Je vais essayer cela, merci pour le lien.
de rien tiens moi au courant ;)

Re: Plugin Rfplayer Rfp1000

Publié : 16 juin 2017, 11:10
par ogulf
Après avoir débranché mon RFPlayer du Raspberry, puis rebranché, je vois passer ce message dans la log de Domoticz, avec une erreur :

Code : Tout sélectionner

2017-06-16 11:00:44.695 (RFPlayer) Received 380 bytes of data:.
2017-06-16 11:00:44.695 (RFPlayer) 5a 49 41 33 33 7b 20 22 66 72 61 6d 65 22 20 3a 7b 22 68 65 ZIA33{."frame".:{"he
2017-06-16 11:00:44.695 (RFPlayer) 61 64 65 72 22 3a 20 7b 22 66 72 61 6d 65 54 79 70 65 22 3a ader":.{"frameType":
2017-06-16 11:00:44.695 (RFPlayer) 20 22 30 22 2c 20 22 63 6c 75 73 74 65 72 22 3a 20 22 30 22 ."0",."cluster":."0"
2017-06-16 11:00:44.695 (RFPlayer) 2c 20 22 64 61 74 61 46 6c 61 67 22 3a 20 22 31 22 2c 20 22 ,."dataFlag":."1",."
2017-06-16 11:00:44.695 (RFPlayer) 72 66 4c 65 76 65 6c 22 3a 20 22 2d 31 30 30 22 2c 20 22 66 rfLevel":."-100",."f
2017-06-16 11:00:44.695 (RFPlayer) 6c 6f 6f 72 4e 6f 69 73 65 22 3a 20 22 2d 31 30 36 22 2c 20 loorNoise":."-106",.
2017-06-16 11:00:44.695 (RFPlayer) 22 72 66 51 75 61 6c 69 74 79 22 3a 20 22 32 22 2c 20 22 70 "rfQuality":."2",."p
2017-06-16 11:00:44.695 (RFPlayer) 72 6f 74 6f 63 6f 6c 22 3a 20 22 38 22 2c 20 22 70 72 6f 74 rotocol":."8",."prot
2017-06-16 11:00:44.695 (RFPlayer) 6f 63 6f 6c 4d 65 61 6e 69 6e 67 22 3a 20 22 58 32 44 22 2c ocolMeaning":."X2D",
2017-06-16 11:00:44.695 (RFPlayer) 20 22 69 6e 66 6f 54 79 70 65 22 3a 20 22 31 31 22 2c 20 22 ."infoType":."11",."
2017-06-16 11:00:44.696 (RFPlayer) 66 72 65 71 75 65 6e 63 79 22 3a 20 22 38 36 38 33 35 30 22 frequency":."868350"
2017-06-16 11:00:44.696 (RFPlayer) 7d 2c 22 69 6e 66 6f 73 22 3a 20 7b 22 73 75 62 54 79 70 65 },"infos":.{"subType
2017-06-16 11:00:44.696 (RFPlayer) 22 3a 20 22 30 22 2c 20 22 73 75 62 54 79 70 65 4d 65 61 6e ":."0",."subTypeMean
2017-06-16 11:00:44.696 (RFPlayer) 69 6e 67 22 3a 20 22 44 65 74 65 63 74 6f 72 2f 53 65 6e 73 ing":."Detector/Sens
2017-06-16 11:00:44.696 (RFPlayer) 6f 72 22 2c 20 22 69 64 22 3a 20 22 32 36 30 30 34 37 31 32 or",."id":."26004712
2017-06-16 11:00:44.696 (RFPlayer) 38 30 22 2c 20 22 71 75 61 6c 69 66 69 65 72 22 3a 20 22 38 80",."qualifier":."8
2017-06-16 11:00:44.696 (RFPlayer) 22 2c 20 22 71 75 61 6c 69 66 69 65 72 4d 65 61 6e 69 6e 67 ",."qualifierMeaning
2017-06-16 11:00:44.696 (RFPlayer) 22 3a 20 7b 20 22 66 6c 61 67 73 22 3a 20 5b 22 53 75 70 65 ":.{."flags":.["Supe
2017-06-16 11:00:44.696 (RFPlayer) 72 76 69 73 6f 72 2f 41 6c 69 76 65 22 5d 7d 7d 7d 7d 0a 0d rvisor/Alive"]}}}}..
2017-06-16 11:00:44.696 (RFPlayer) Calling message handler 'onMessage'.
2017-06-16 11:00:44.696 (RFPlayer) Last Message was 2.255893 seconds ago, Message clear
2017-06-16 11:00:44.697 (RFPlayer) ZIA33{ "frame" :{"header": {"frameType": "0", "cluster": "0", "dataFlag": "1", "rfLevel": "-100", "floorNoise": "-106", "rfQuality": "2", "protocol": "8", "protocolMeaning": "X2D", "infoType": "11", "frequency": "868350"},"infos": {"subType": "0", "subTypeMeaning": "Detector/Sensor", "id": "2600471280", "qualifier": "8", "qualifierMeaning": { "flags": ["Supervisor/Alive"]}}}}
2017-06-16 11:00:44.697 (RFPlayer) infoType : 11
2017-06-16 11:00:44.697 (RFPlayer) Error while decoding or reading JSON
2017-06-16 11:00:44.697 (RFPlayer) Debug : Error Decoding/Reading { "frame" :{"header": {"frameType": "0", "cluster": "0", "dataFlag": "1", "rfLevel": "-100", "floorNoise": "-106", "rfQuality": "2", "protocol": "8", "protocolMeaning": "X2D", "infoType": "11", "frequency": "868350"},"infos": {"subType": "0", "subTypeMeaning": "Detector/Sensor", "id": "2600471280", "qualifier": "8", "qualifierMeaning": { "flags": ["Supervisor/Alive"]}}}}
2017-06-16 11:00:46.300 (RFPlayer) Calling message handler 'onHeartbeat'.
2017-06-16 11:00:56.268 (RFPlayer) Calling message handler 'onHeartbeat'. 
Rappel de mon équipement : programmateur chauffage DeltaDore Deltia 833 (3 zones en X2D) et récepteur RF660FP

Je n'ai fait aucune action sur l'émetteur X2D.
Je ne vois donc pas comment je pourrais avoir une trame de type "Detector/Sensor" ? Sauf s'il s'agit de la température mesurée et affichée par le programmateur ? Mais dans ce cas, je ne vois pas de champ pouvant contenir cette température (24.1°C au moment où j'écris ces lignes) ?...

Comme en plus je ne sais pas comment récupérer la trame brute (j'ai envoyé un mail à Ziblue dans ce sens), impossible de savoir comment devrait être formatée cette "infotype 11".

Re: Plugin Rfplayer Rfp1000

Publié : 16 juin 2017, 13:40
par zaraki673
comme pour yellowsky
(cf https://easydomoticz.com/forum/viewtopi ... =50#p37443 )
ca semble etre juste un message pour dire "je suis toujours la" provenant de l 'id 2600471280 qui est ... pas connu dans ce que tu m'as transmis :D

est-ce que cela peut venir d'un autre capteur (alarme, voisins)

trame brut (binaire) ? ou json (decodé par le rfplayer)?
le infotype 11 c'est pour les alarmes et les volets, thermostat c est infotype 10 ;)

Re: Plugin Rfplayer Rfp1000

Publié : 16 juin 2017, 13:55
par ogulf
Je n'ai pas d'autres émetteur X2D à la maison, alors oui ça pourrait venir d'un voisin... Je vais pouvoir piloter son installation ?? :lol: :lol:

Inutile d'investir plus donc, mais c'est bien un 'infotype=11' qui est reçu, et qui pose problème au script python au moment de récupérer les 3 valeurs du "qualifier"...

2017-06-16 11:00:44.697 (RFPlayer) ZIA33{ "frame" :{"header": {"frameType": "0", "cluster": "0", "dataFlag": "1", "rfLevel": "-100", "floorNoise": "-106", "rfQuality": "2", "protocol": "8", "protocolMeaning": "X2D", "infoType": "11", "frequency": "868350"},"infos": {"subType": "0", "subTypeMeaning": "Detector/Sensor", "id": "2600471280", "qualifier": "8", "qualifierMeaning": { "flags": ["Supervisor/Alive"]}}}}
2017-06-16 11:00:44.697 (RFPlayer) infoType : 11
2017-06-16 11:00:44.697 (RFPlayer) Error while decoding or reading JSON

Et dans le script, dans le pavé InfoType 11, le SubTupe 0 est traité comme suit (extrait) :

##############################################################################################################
#####################################Frame infoType 11 Alarm X2D protocol / Shutter ####################
##############################################################################################################
if infoType == "11":
protocol = DecData['frame']['header']['protocol']
SubType = DecData['frame']['infos']['subType']
##############################################################################################################
if SubType == "0" : # Detector/sensor
id = DecData['frame']['infos']['id']
qualifier = list(bin(DecData['frame']['infos']['qualifier'])[2:])
Tamper=qualifier[0]
Alarm=qualifier[1]
Battery=qualifier[2]
if Tamper=="0" and Alarm=="0" :
status=0
if Tamper=="1" and Alarm=="0" :
status=10
if Tamper=="0" and Alarm=="1" :
status=20
if Tamper=="1" and Alarm=="1" :
status=30
if Battery=="0" :
Battery=100
else :
Battery=5
Options = {"infoType":infoType, "id": str(id), "protocol": str(protocol), "subType": str(SubType), "LevelActions": "||||", "LevelNames": "Off|Tamper|Alarm|Tamper+Alarm", "LevelOffHidden": "False", "SelectorStyle": "0"}
Domoticz.Debug("Options to find or set : " + str(Options))

N'ayant pas la trace "Options to find or set" dans la log, j'en déduis que l'erreur arrive avant la série de test "IF", donc à priori sur l'instruction "qualifier =..."

Quant à la trame, je pensais bien à la trame binaire... Car si le RFPlayer ne sait pas la décoder... le plugin non plus (sauf si je me trompe ?).