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 !

diag gateway série

Retrouvez ici des sujets concernant le protocole mySensors et les modules domotiques de type mySensors utilisés avec JEEDOM
/!\ Plugin mySensors non officiel
po220
Timide
Messages : 8
Inscription : 26 août 2018, 13:34

diag gateway série

Message par po220 » 02 juin 2019, 17:24

Bonjour

Je débute avec jeedom et mysensor

Je me suis fait une serial gateway et un nœud température+ humidité qui fonctionnent très bien avec MYSController
Une fois cette gateway connecté au raspberry sur lequel tourne Jeedom je peux sélectionner et activer la gateway qui apparait tout OK dans le démon.
Mais aucune communication de mon noeud semble arriver , le mode inclusion me dit qu'aucun mysensor n'est détecté.

J'ai lu des tonnes de choses sur ce forum parlant de problèmes de version (jeedom, du plugin d'un serialPort (je ne sais pas de quoi on cause là) ou de mysensor) et des soucis de baudrate à paramétrer dans un fichier perdu au fin fond de /var/www/html/plugins/mySensors

J'ai exploré longuement ce dossier sans trouver le serialport.js indiqué

Bref au final
-je ne trouve rien pour configurer le baudrate coté jeedom (je sais qu'il me faut du 38400)
-je ne comprends pas où se configure le port série, donc déjà pas possible de diagnostiquer ça
-je n'ai pas de log m'indiquant un quelconque problème coté jeedom, tous les feux sont au vert.

=> comment puis je diagnostiquer mon affaire ?

Merci

J'ai jeedom V3.3.24 sur un raspberryPi 3 B+

jlb
Timide
Messages : 41
Inscription : 21 déc. 2015, 11:16
Localisation : Provence

Re: diag gateway série

Message par jlb » 09 juin 2019, 00:11

Bonjour po220

Pour la gateway il vaut mieux utiliser 1 nrf24l01+ avec ampli
voici le sketch que j'utilise

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.
*
*******************************
*
* DESCRIPTION
* The ArduinoGateway prints data received from sensors on the serial link.
* The gateway accepts input on seral which will be sent out on radio network.
*
* The GW code is designed for Arduino Nano 328p / 16MHz
*
* Wire connections (OPTIONAL):
* - Inclusion button should be connected between digital pin 3 and GND
* - RX/TX/ERR leds need to be connected between +5V (anode) and digital pin 6/5/4 with resistor 270-330R in a series
*
* LEDs (OPTIONAL):
* - To use the feature, uncomment any of the MY_DEFAULT_xx_LED_PINs
* - RX (green) - blink fast on radio message recieved. In inclusion mode will blink fast only on presentation recieved
* - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly
* - ERR (red) - fast blink on error during transmission error or recieve crc error
*
*/

// Enable debug prints to serial monitor
#define MY_DEBUG


// Enable and select radio type attached
#define MY_RADIO_NRF24
//#define MY_RADIO_RFM69

// Set LOW transmit power level as default, if you have an amplified NRF-module and
// power your radio separately with a good regulator you can turn up PA level.
//#define MY_RF24_PA_LEVEL RF24_PA_LOW
#define MY_RF24_PA_LEVEL RF24_PA_MAX

// Enable serial gateway
#define MY_GATEWAY_SERIAL

// Define a lower baud rate for Arduino's running on 8 MHz (Arduino Pro Mini 3.3V & SenseBender)
#if F_CPU == 8000000L
#define MY_BAUD_RATE 38400
#endif

// Enable inclusion mode
#define MY_INCLUSION_MODE_FEATURE
// Enable Inclusion mode button on gateway
//#define MY_INCLUSION_BUTTON_FEATURE

// Inverses behavior of inclusion button (if using external pullup)
//#define MY_INCLUSION_BUTTON_EXTERNAL_PULLUP

// 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  3

// Set blinking period
#define MY_DEFAULT_LED_BLINK_PERIOD 300

// Inverses the behavior of leds
//#define MY_WITH_LEDS_BLINKING_INVERSE

// Flash leds on rx/tx/err
// Uncomment to override default HW configurations
//#define MY_DEFAULT_ERR_LED_PIN 4  // Error led pin
//#define MY_DEFAULT_RX_LED_PIN  6  // Receive led pin
//#define MY_DEFAULT_TX_LED_PIN  5  // the PCB, on board LED

#include <MySensors.h>

void setup()
{
    // Setup locally attached sensors
}

void presentation()
{
    // Present locally attached sensors
}

void loop()
{
    // Send locally attached sensor data here
}
et coté jeedom
Capture.PNG
Capture.PNG (75.06 Kio) Consulté 2119 fois
ensuite sur ton node lance ce sketch

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-2017 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.
 *
 *******************************
 *
 * DESCRIPTION
 *
 * This sketch clears radioId, relayId and other routing information in EEPROM back to factory default
 *
 */
// load core modules only
#define MY_CORE_ONLY

#include <MySensors.h>

void setup()
{
    Serial.begin(MY_BAUD_RATE);
    Serial.println("Started clearing. Please wait...");
    for (uint16_t i=0; i<EEPROM_LOCAL_CONFIG_ADDRESS; i++) {
        hwWriteConfig(i,0xFF);
    }
    Serial.println("Clearing done.");
}

void loop()
{
    // Nothing to do here...
}
ensuite passe en mode inclusion sur jeedom et téléverse ton sketch sur ton node

A+
Jeedom 3.3.24 Raspberry pi3 + ssd 16go + Mysensors serial
28 capteurs / actionneurs Msensors
ImperiHome

po220
Timide
Messages : 8
Inscription : 26 août 2018, 13:34

Re: diag gateway série

Message par po220 » 09 juin 2019, 08:59

Bonjour

Je m'en suis sorti en forçant 115200Baud qui semblait être la vitesse par défaut coté jeedom.
mais dans le croquis il y a un truc qui parle du baud rate a mettre plus bas sur un arduino à 8MHz, ce qui semble être mon cas. donc ca semble fonctionner mais je suis en dehors des clous.

Merci

Répondre

Revenir vers « [Plugin Tiers] MySensors »

Qui est en ligne ?

Utilisateurs parcourant ce forum : Aucun utilisateur inscrit et 4 invités