Erreur de communication TMS:FAIL:DIS
Publié : 03 août 2019, 11:29
Bonjour tout le monde,
Je suis commence à faire mes capteurs MySensors et je rencontre quelques problèmes de comm... J'ai prévu de faire une passerelle sur un Wemos Mini+NRF2401 avec antenne déportée et un capteur sur un arduino mini sans antenne déportée. J'ai mis les condo de 47uF entre le 3V3 et le GND de l'antenne. Pour commencer simplement, j'ai pris les exemples présents dans la bibliothèque.
J'ai mis Jeedom en mode inclusion (au cas où...)
Ci dessous le log de la gateway
Celui du noeud :
Le sketch de la gateway
Celui du noeud :
Mes essais :
1 - GW Wemos + NRF24 antenne déportée : TSM ok
2 - GW Wemos + NRF24 : TSM ok
3 - GW Arduino Uno + NRF24 : TSM ok
-> J'en déduis donc les deux antennes comme ok (exact ?)
4 - Noeud Arduino mini + NRF24 antenne déportée : TSM FAIL
5 - Noeud Arduino mini + NRF24 : TSM FAIL
6 - Noeud Arduino Uno + NRF : TSM FAIL
-> J'en déduis que le problème ne vient pas du mini, car le Uno avec la même antenne fonctionne en GW et pas en noeud.
J'ai vérifié plusieurs fois les câblages et changé les câbles duponts sur les platines.
J'ai aussi suivi la procédure de débug trouvé sur le site MySensor que je mets en PJ au cas où ca intéresse quelqu'un. Avec tout ca, je ne vois que trois problèmes :
A - Il y a un problème de sketch. Mais vu que j'ai pris les exemples des bibliothèques, je ne pense pas
B - Il y a un gros problème entre la chaise et le clavier -> Fort probable que j'ai raté un manip' ou pas compris un truc
C - Autre ?
Là, je sèche... Est ce que quelqu'un a une idée ?
Merci !
Je suis commence à faire mes capteurs MySensors et je rencontre quelques problèmes de comm... J'ai prévu de faire une passerelle sur un Wemos Mini+NRF2401 avec antenne déportée et un capteur sur un arduino mini sans antenne déportée. J'ai mis les condo de 47uF entre le 3V3 et le GND de l'antenne. Pour commencer simplement, j'ai pris les exemples présents dans la bibliothèque.
J'ai mis Jeedom en mode inclusion (au cas où...)
Ci dessous le log de la gateway
Code : Tout sélectionner
11:11:59.957 -> 0;255;3;0;9;0 MCO:BGN:INIT GW,CP=RNNGA---,REL=255,VER=2.3.1
11:11:59.957 -> 0;255;3;0;9;5 TSM:INIT
11:11:59.957 -> 0;255;3;0;9;7 TSF:WUR:MS=0
11:11:59.957 -> 0;255;3;0;9;14 TSM:INIT:TSP OK
11:11:59.957 -> 0;255;3;0;9;17 TSM:INIT:GW MODE
11:11:59.957 -> 0;255;3;0;9;20 TSM:READY:ID=0,PAR=0,DIS=0
11:11:59.957 -> 0;255;3;0;9;24 MCO:REG:NOT NEEDED
11:11:59.957 -> 0;255;3;0;14;Gateway startup complete.
11:11:59.991 -> 0;255;0;0;18;2.3.1
11:11:59.991 -> 0;255;3;0;9;28 MCO:BGN:STP
11:11:59.991 -> 0;255;3;0;9;34 MCO:BGN:INIT OK,TSP=1
11:11:59.991 -> 0;255;3;0;9;37 TSM:READY:NWD REQ
11:12:00.026 -> 0;255;3;0;9;76 TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
Code : Tout sélectionner
11:13:26.312 -> 16 MCO:BGN:INIT NODE,CP=RNNNA---,REL=255,VER=2.3.1
11:13:26.346 -> 26 TSM:INIT
11:13:26.346 -> 27 TSF:WUR:MS=0
11:13:26.346 -> 33 !TSM:INIT:TSP FAIL
11:13:26.346 -> 35 TSM:FAIL:CNT=1
11:13:26.346 -> 37 TSM:FAIL:DIS
11:13:26.346 -> 38 TSF:TDI:TSL
Code : Tout sélectionner
/*
The MySensors Arduino library handles the wireless radio link and protocol
between your home built sensors/actuators and HA controller of choice.
The sensors forms a self healing radio network with optional repeaters. Each
repeater and gateway builds a routing tables in EEPROM which keeps track of the
network topology allowing messages to be routed to nodes.
Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
Copyright (C) 2013-2018 Sensnology AB
Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
Documentation: http://www.mysensors.org
Support Forum: http://forum.mysensors.org
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
*******************************
REVISION HISTORY
Version 1.0 - Henrik EKblad
Contribution by a-lurker and Anticimex,
Contribution by Norbert Truchsess <norbert.truchsess@t-online.de>
Contribution by Ivo Pullens (ESP8266 support)
DESCRIPTION
The EthernetGateway sends data received from sensors to the WiFi link.
The gateway also accepts input on ethernet interface, which is then sent out to the radio network.
VERA CONFIGURATION:
Enter "ip-number:port" in the ip-field of the Arduino GW device. This will temporarily override any serial configuration for the Vera plugin.
E.g. If you want to use the default values in this sketch enter: 192.168.178.66:5003
LED purposes:
- To use the feature, uncomment any of the MY_DEFAULT_xx_LED_PINs in your sketch, only the LEDs that is defined is used.
- RX (green) - blink fast on radio message received. In inclusion mode will blink fast only on presentation received
- TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly
- ERR (red) - fast blink on error during transmission error or receive crc error
See https://www.mysensors.org/build/connect_radio for wiring instructions.
If you are using a "barebone" ESP8266, see
https://www.mysensors.org/build/esp8266_gateway#wiring-for-barebone-esp8266
Inclusion mode button:
- Connect GPIO5 (=D1) via switch to GND ('inclusion switch')
Hardware SHA204 signing is currently not supported!
Make sure to fill in your ssid and WiFi password below for ssid & pass.
*/
// Enable debug prints to serial monitor
#define MY_DEBUG
// Use a bit lower baudrate for serial prints on ESP8266 than default in MyConfig.h
#define MY_BAUD_RATE 9600
// Enables and select radio type (if attached)
#define MY_RADIO_RF24
//#define MY_RADIO_RFM69
//#define MY_RADIO_RFM95
#define MY_GATEWAY_ESP8266
#define MY_WIFI_SSID " xxxxx "
#define MY_WIFI_PASSWORD "xxxxxx"
// Enable UDP communication
//#define MY_USE_UDP // If using UDP you need to set MY_CONTROLLER_IP_ADDRESS below
// Set the hostname for the WiFi Client. This is the hostname
// it will pass to the DHCP server if not static.
#define MY_HOSTNAME "Mysensor"
// Enable MY_IP_ADDRESS here if you want a static ip address (no DHCP)
//#define MY_IP_ADDRESS XXX XXX XXX XXX
// If using static ip you can define Gateway and Subnet address as well
//#define MY_IP_GATEWAY_ADDRESS XXX XXX XXX XXX
//#define MY_IP_SUBNET_ADDRESS XXX XXX XXX XXX
// The port to keep open on node server mode
#define MY_PORT 5003
// How many clients should be able to connect to this gateway (default 1)
#define MY_GATEWAY_MAX_CLIENTS 10
// Controller ip address. Enables client mode (default is "server" mode).
// Also enable this if MY_USE_UDP is used and you want sensor data sent somewhere.
//#define MY_CONTROLLER_IP_ADDRESS 192, 168, 178, 68
// Enable inclusion mode
//#define MY_INCLUSION_MODE_FEATURE
// Enable Inclusion mode button on gateway
//#define MY_INCLUSION_BUTTON_FEATURE
// Set inclusion mode duration (in seconds)
//#define MY_INCLUSION_MODE_DURATION 60
// Digital pin used for inclusion mode button
//#define MY_INCLUSION_MODE_BUTTON_PIN D1
// Set blinking period
//#define MY_DEFAULT_LED_BLINK_PERIOD 300
// Flash leds on rx/tx/err
// Led pins used if blinking feature is enabled above
//#define MY_DEFAULT_ERR_LED_PIN 16 // Error led pin
//#define MY_DEFAULT_RX_LED_PIN 16 // Receive led pin
//#define MY_DEFAULT_TX_LED_PIN 16 // the PCB, on board LED
#if defined(MY_USE_UDP)
#include <WiFiUdp.h>
#endif
#include <ESP8266WiFi.h>
#include <MySensors.h>
void setup()
{
// Setup locally attached sensors
}
void presentation()
{
// Present locally attached sensors here
}
void loop()
{
// Send locally attached sensors data here
}
Code : Tout sélectionner
/**
* The MySensors Arduino library handles the wireless radio link and protocol
* between your home built sensors/actuators and HA controller of choice.
* The sensors forms a self healing radio network with optional repeaters. Each
* repeater and gateway builds a routing tables in EEPROM which keeps track of the
* network topology allowing messages to be routed to nodes.
*
* Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
* Copyright (C) 2013-2015 Sensnology AB
* Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
*
* Documentation: http://www.mysensors.org
* Support Forum: http://forum.mysensors.org
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*
*******************************
*
* REVISION HISTORY
* Version 1.0: Henrik EKblad
* Version 1.1 - 2016-07-20: Converted to MySensors v2.0 and added various improvements - Torben Woltjen (mozzbozz)
*
* DESCRIPTION
* This sketch provides an example of how to implement a humidity/temperature
* sensor using a DHT11/DHT-22.
*
* For more information, please visit:
* http://www.mysensors.org/build/humidity
*
*/
// Enable debug prints
#define MY_DEBUG
// Enable and select radio type attached
#define MY_RADIO_RF24
//#define MY_RADIO_RFM69
//#define MY_RS485
#define MY_NODE_ID 1
#include <SPI.h>
#include <MySensors.h>
#include <DHT.h>
// Set this to the pin you connected the DHT's data pin to
#define DHT_DATA_PIN 3
// Set this offset if the sensor has a permanent small offset to the real temperatures.
// In Celsius degrees (as measured by the device)
#define SENSOR_TEMP_OFFSET 0
// Sleep time between sensor updates (in milliseconds)
// Must be >1000ms for DHT22 and >2000ms for DHT11
static const uint64_t UPDATE_INTERVAL = 6000;
// Force sending an update of the temperature after n sensor reads, so a controller showing the
// timestamp of the last update doesn't show something like 3 hours in the unlikely case, that
// the value didn't change since;
// i.e. the sensor would force sending an update every UPDATE_INTERVAL*FORCE_UPDATE_N_READS [ms]
static const uint8_t FORCE_UPDATE_N_READS = 10;
#define CHILD_ID_HUM 0
#define CHILD_ID_TEMP 1
float lastTemp;
float lastHum;
uint8_t nNoUpdatesTemp;
uint8_t nNoUpdatesHum;
bool metric = true;
MyMessage msgHum(CHILD_ID_HUM, V_HUM);
MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
DHT dht (DHT_DATA_PIN, DHT22);
void presentation()
{
// Send the sketch version information to the gateway
sendSketchInfo("TemperatureAndHumidity", "1.1");
// Register all sensors to gw (they will be created as child devices)
present(CHILD_ID_HUM, S_HUM);
present(CHILD_ID_TEMP, S_TEMP);
metric = getControllerConfig().isMetric;
}
void setup()
{
/* dht.setup(DHT_DATA_PIN); // set data pin of DHT sensor
if (UPDATE_INTERVAL <= dht.getMinimumSamplingPeriod()) {
Serial.println("Warning: UPDATE_INTERVAL is smaller than supported by the sensor!");
}
// Sleep for the time of the minimum sampling period to give the sensor time to power up
// (otherwise, timeout errors might occure for the first reading)
sleep(dht.getMinimumSamplingPeriod());
*/
}
void loop()
{
// Force reading sensor, so it works also after sleep()
/*
dht.readSensor(true);
*/
// Get temperature from DHT library
float temperature = dht.readTemperature();
if (isnan(temperature)) {
Serial.println("Failed reading temperature from DHT!");
} else if (temperature != lastTemp || nNoUpdatesTemp == FORCE_UPDATE_N_READS) {
// Only send temperature if it changed since the last measurement or if we didn't send an update for n times
lastTemp = temperature;
// apply the offset before converting to something different than Celsius degrees
temperature += SENSOR_TEMP_OFFSET;
/*
if (!metric) {
temperature = dht.toFahrenheit(temperature);
}
*/
// Reset no updates counter
nNoUpdatesTemp = 0;
send(msgTemp.set(temperature, 1));
#ifdef MY_DEBUG
Serial.print("T: ");
Serial.println(temperature);
#endif
} else {
// Increase no update counter if the temperature stayed the same
nNoUpdatesTemp++;
}
// Get humidity from DHT library
float humidity = dht.readHumidity();
if (isnan(humidity)) {
Serial.println("Failed reading humidity from DHT");
} else if (humidity != lastHum || nNoUpdatesHum == FORCE_UPDATE_N_READS) {
// Only send humidity if it changed since the last measurement or if we didn't send an update for n times
lastHum = humidity;
// Reset no updates counter
nNoUpdatesHum = 0;
send(msgHum.set(humidity, 1));
#ifdef MY_DEBUG
Serial.print("H: ");
Serial.println(humidity);
#endif
} else {
// Increase no update counter if the humidity stayed the same
nNoUpdatesHum++;
}
// Sleep for a while to save energy
sleep(UPDATE_INTERVAL);
}
1 - GW Wemos + NRF24 antenne déportée : TSM ok
2 - GW Wemos + NRF24 : TSM ok
3 - GW Arduino Uno + NRF24 : TSM ok
-> J'en déduis donc les deux antennes comme ok (exact ?)
4 - Noeud Arduino mini + NRF24 antenne déportée : TSM FAIL
5 - Noeud Arduino mini + NRF24 : TSM FAIL
6 - Noeud Arduino Uno + NRF : TSM FAIL
-> J'en déduis que le problème ne vient pas du mini, car le Uno avec la même antenne fonctionne en GW et pas en noeud.
J'ai vérifié plusieurs fois les câblages et changé les câbles duponts sur les platines.
J'ai aussi suivi la procédure de débug trouvé sur le site MySensor que je mets en PJ au cas où ca intéresse quelqu'un. Avec tout ca, je ne vois que trois problèmes :
A - Il y a un problème de sketch. Mais vu que j'ai pris les exemples des bibliothèques, je ne pense pas
B - Il y a un gros problème entre la chaise et le clavier -> Fort probable que j'ai raté un manip' ou pas compris un truc
C - Autre ?
Là, je sèche... Est ce que quelqu'un a une idée ?
Merci !