Comme annoncé, ce forum est passé en lecture seule au 1er janvier 2020. Désormais nous vous invitons à vous rendre sur notre nouvelle page communauté :
Image

A très bientôt !

Problème type donnée après inclusion

Retrouvez ici des sujets concernant le protocole mySensors et les modules domotiques de type mySensors utilisés avec JEEDOM
/!\ Plugin mySensors non officiel
tdouez
Timide
Messages : 9
Inscription : 05 août 2019, 12:06
Localisation : Genech

Problème type donnée après inclusion

Message par tdouez » 08 oct. 2019, 10:20

Bonjour à tous,

J'ai réalisé un capteur pour ma consommation d'eau.
J'ai un problème pendant l'inclusion dans jeedom, les types de valeurs ne correspondent pas à mon type de capteur S_WATER.

Voilà une copie d'écran sous Jeedom du problème et un extrait de mon arduino.
Avez-vous une idée ?

Code : Tout sélectionner

#define CHILD_ID_FLOW	0                   // Id of the sensor child flow
#define CHILD_ID_PULSE  1                 // Id of the sensor child pulse
#define CHILD_ID_VOLUME 2                   // Id of the sensor child volume
#define CHILD_ID_PULSE_FACTOR  	3           // Id of the sensor child pulse factor
#define CHILD_ID_LEAK_THRESHOLD 4           // Id of the sensor child leak threshold
#define CHILD_ID_LEAK  5                    // Id of the sensor child leak

MyMessage flowMsg(CHILD_ID_FLOW, V_FLOW);  		     // l/mn
MyMessage volumeMsg(CHILD_ID_VOLUME, V_VOLUME);      // liter by day
MyMessage lastCounterMsg(CHILD_ID_PULSE, V_VAR1);   // pulse
MyMessage pulseFactor(CHILD_ID_PULSE_FACTOR, V_VAR2);      // pulse_factor
MyMessage leakThreshold(CHILD_ID_LEAK_THRESHOLD, V_VAR3);    // leak_threshold
MyMessage leak(CHILD_ID_LEAK, V_VAR4);             // leak

void presentation()
{
  // Send the sketch version information to the gateway and Controller
  sendSketchInfo("FB Water Meter", "1.2.1");

  // Register this device as Water flow sensor
  present(CHILD_ID_FLOW, S_WATER);
  present(CHILD_ID_PULSE, S_WATER);
  present(CHILD_ID_VOLUME, S_WATER); 
  present(CHILD_ID_PULSE_FACTOR, S_WATER);
  present(CHILD_ID_LEAK_THRESHOLD, S_WATER);
  present(CHILD_ID_LEAK, S_WATER);
  }
  
  void setup()
{
  // initialize our digital pins internal pullup resistor so one pulse switches from high to low (less distortion)
	pinMode(DIGITAL_INPUT_SENSOR, INPUT_PULLUP);

  loadConfig();

  Serial.print(F("Pulse factor: "));
  Serial.println(storage_config.pulse_factor);
  Serial.print(F("Leak threshold: "));
  Serial.println(storage_config.leak_threshold);
  
  pulseCount = oldPulseCount = 0;

  // Fetch last known pulse count value from gw
  request(CHILD_ID_PULSE, V_VAR1);
  
  setSyncProvider(requestSync); 
  //setTime(1357041600); // Jan 1 2013);
  
  lastSend = lastPulse = millis();

  attachInterrupt(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR), onPulse, FALLING);

}

   
Pièces jointes
j.png
j.png (89.78 Kio) Consulté 3172 fois

Répondre

Revenir vers « [Plugin Tiers] MySensors »

Qui est en ligne ?

Utilisateurs parcourant ce forum : Aucun utilisateur inscrit et 1 invité