mySensors
Re: [Sujet officiel] mySensors
@kraku,
Il semblerait que tu as un problème de NRF.
La gateway semble OK, mais si tu n'as pas de liaison entre NRF.....tu n'aura pas de ID.
Envoyé de mon Nexus 7 en utilisant Tapatalk
Il semblerait que tu as un problème de NRF.
La gateway semble OK, mais si tu n'as pas de liaison entre NRF.....tu n'aura pas de ID.
Envoyé de mon Nexus 7 en utilisant Tapatalk
RPI3 avec mSATA
RFXcom; RFLink; Z-Wave; Mysensors; ESPEasy
Noeuds MySensors-téléinfo-Température-Distance-Baromètre-relais
Noeuds ESPEasy-open-garage-relais-PIR-Station Météo
RFXcom; RFLink; Z-Wave; Mysensors; ESPEasy
Noeuds MySensors-téléinfo-Température-Distance-Baromètre-relais
Noeuds ESPEasy-open-garage-relais-PIR-Station Météo
Re: [Sujet officiel] mySensors
@NeoSlugman => Comment je peux faire pour avoir le moniteur série de la Gateway, elle est branchée sur le PI?
@rol-rider => j'ai essayé plusieurs nodes donc plusieurs NRF mais je ne suis pas certain d'avoir changé celui de la Gateway. j'essaye ce soir
@rol-rider => j'ai essayé plusieurs nodes donc plusieurs NRF mais je ne suis pas certain d'avoir changé celui de la Gateway. j'essaye ce soir
-
- Actif
- Messages : 629
- Inscription : 13 janv. 2015, 23:17
- Localisation : France - 38 - Nord Isére
Re: [Sujet officiel] mySensors
@neoSlugman : le nrf tu l'as bien mis sur la face opposée au nano ?
Le probleme vient de la carte que je t'ai envoyée ?
Le probleme vient de la carte que je t'ai envoyée ?
Re: [Sujet officiel] mySensors
Bon NRF changés sur la gateway et le node,
Même log....
19-02-2016 19:24:53 | info | Jeedom url : http://192.168.0.89:80/core/api/jeeApi. ... 2BSrHCc73U
19-02-2016 19:24:53 | info | gwPort : 0
19-02-2016 19:24:53 | info | gwType : Serial
19-02-2016 19:24:53 | info | gwAddress : /dev/ttyUSB1
19-02-2016 19:24:53 | info | Inclusion : on
19-02-2016 19:24:57 | info | server bound on 8019
19-02-2016 19:24:57 | info | connected to serial gateway at /dev/ttyUSB1
19-02-2016 19:24:57 | info | Save Gateway Status 1
19-02-2016 19:24:57 | info | connected to serial gateway at /dev/ttyUSB1
19-02-2016 19:24:57 | info | Save Gateway Status 1
19-02-2016 19:24:58 | debug | Got response saveSensor: 200
19-02-2016 19:24:59 | debug | Got response saveSensor: 200
Par contre le moniteur série sur le node a changé
read and drop: 0-4-0 s=0,c=0,t=0,pt=0,l=0,sg=0:
ver mismatch
read and drop: 0-4-0 s=0,c=0,t=0,pt=0,l=0,sg=0:
ver mismatch
read and drop: 0-4-0 s=0,c=0,t=0,pt=0,l=0,sg=0:
ver mismatch
read and drop: 0-4-0 s=0,c=0,t=0,pt=0,l=0,sg=0:
ver mismatch
read and drop: 0-4-0 s=0,c=0,t=0,pt=0,l=0,sg=0:
ver mismatch
find parent
UN conflit de version?
Même log....
19-02-2016 19:24:53 | info | Jeedom url : http://192.168.0.89:80/core/api/jeeApi. ... 2BSrHCc73U
19-02-2016 19:24:53 | info | gwPort : 0
19-02-2016 19:24:53 | info | gwType : Serial
19-02-2016 19:24:53 | info | gwAddress : /dev/ttyUSB1
19-02-2016 19:24:53 | info | Inclusion : on
19-02-2016 19:24:57 | info | server bound on 8019
19-02-2016 19:24:57 | info | connected to serial gateway at /dev/ttyUSB1
19-02-2016 19:24:57 | info | Save Gateway Status 1
19-02-2016 19:24:57 | info | connected to serial gateway at /dev/ttyUSB1
19-02-2016 19:24:57 | info | Save Gateway Status 1
19-02-2016 19:24:58 | debug | Got response saveSensor: 200
19-02-2016 19:24:59 | debug | Got response saveSensor: 200
Par contre le moniteur série sur le node a changé
read and drop: 0-4-0 s=0,c=0,t=0,pt=0,l=0,sg=0:
ver mismatch
read and drop: 0-4-0 s=0,c=0,t=0,pt=0,l=0,sg=0:
ver mismatch
read and drop: 0-4-0 s=0,c=0,t=0,pt=0,l=0,sg=0:
ver mismatch
read and drop: 0-4-0 s=0,c=0,t=0,pt=0,l=0,sg=0:
ver mismatch
read and drop: 0-4-0 s=0,c=0,t=0,pt=0,l=0,sg=0:
ver mismatch
find parent
UN conflit de version?
Re: [Sujet officiel] mySensors
Bonjour,
Je débute dans l'aventure MySensors avec une install toute propre depuis 4-5 jours et j'ai exactement le même soucis que kraku :
Tout semble OK sauf qu'il m'est impossible d'ajouter des noeuds.
J'ai une gateway ethernet pour info et rapsberry 2
J'ai passé 3 jours à chercher en vain.
Est-ce que les personnes qui sont passé en V2 peuvent ajouter des nodes sans soucis ?
Je soupçonne le plugin !
Je débute dans l'aventure MySensors avec une install toute propre depuis 4-5 jours et j'ai exactement le même soucis que kraku :
Tout semble OK sauf qu'il m'est impossible d'ajouter des noeuds.
J'ai une gateway ethernet pour info et rapsberry 2
J'ai passé 3 jours à chercher en vain.
Est-ce que les personnes qui sont passé en V2 peuvent ajouter des nodes sans soucis ?
Je soupçonne le plugin !
Dernière édition par Zambinou le 20 févr. 2016, 12:59, édité 1 fois.
Re: [Sujet officiel] mySensors
dans le setup du sketch il faut une fonction present() pour chaque capteur
et aussi
sendSketchInfo()
je te conseille un wait(300) entre chaque envoi de données
et aussi
sendSketchInfo()
je te conseille un wait(300) entre chaque envoi de données
A lire avant de demander de l'aide sur wifilightV2
Debian DIY Jessie
30 ampoules
Rfxcom : 20 modules
Mysensors : 24 nœuds
Téléinfo
Z wave : 15 modules
Debian DIY Jessie
30 ampoules
Rfxcom : 20 modules
Mysensors : 24 nœuds
Téléinfo
Z wave : 15 modules
Re: [Sujet officiel] mySensors
on voit bien un nœud avec ID1, mais pas la présentation, qui doit se faire lors du reboot du nœud, donc on ne peut pas te dire si elle est bonne ou pas, par contre ta clé api.....on la voit bien !!
installe MYSContoller tu verras les info qui passent en plus avec une gateway internet, tu peux te connecter en plus de jeedom.
installe MYSContoller tu verras les info qui passent en plus avec une gateway internet, tu peux te connecter en plus de jeedom.
RPI3 avec mSATA
RFXcom; RFLink; Z-Wave; Mysensors; ESPEasy
Noeuds MySensors-téléinfo-Température-Distance-Baromètre-relais
Noeuds ESPEasy-open-garage-relais-PIR-Station Météo
RFXcom; RFLink; Z-Wave; Mysensors; ESPEasy
Noeuds MySensors-téléinfo-Température-Distance-Baromètre-relais
Noeuds ESPEasy-open-garage-relais-PIR-Station Météo
Re: [Sujet officiel] mySensors
Avec MyScontroller je vois bien la présentation du noeud au reboot du noeud,
J'ai bien present et sendsketchinfo dans le setup du sketch (sketch d'exemple de l'IDE arduino).
Merci du coup de paluche (L'API, piouffff, disparue )
J'ai bien present et sendsketchinfo dans le setup du sketch (sketch d'exemple de l'IDE arduino).
Merci du coup de paluche (L'API, piouffff, disparue )
Re: [Sujet officiel] mySensors
D'ailleurs est-ce normal de n'avoir aucun menu dans le plugin mysensors ?
Re: [Sujet officiel] mySensors
Personne pour me donner une piste?yaazzz a écrit :Bonjour,
Bien que je pense qu'il s'agisse d'un truc à la c..n que je loupe je n'arrive pas à m'en dépatouiller depuis deux jours ;(
Lorsque le plugin s’installe j'ai :et quand le daemon se lance il ne va pas chercher le bon fichier :Code : Tout sélectionner
/var/www/html/plugins/mySensors/node/node_modules/serialport/build/Release/node-v11-linux-x64/serialport.node
Soyez indulgents si j'ai loupé un trucCode : Tout sélectionner
Cannot find module '/var/www/html/plugins/mySensors/node/node_modules/serialport/build/Release/node-v46-linux-x64/serialport.node'
Re: [Sujet officiel] mySensors
Au risque d'être lourd, tu as un exemple de comment il faut introduire ces fonctions?bcaro a écrit :dans le setup du sketch il faut une fonction present() pour chaque capteur
et aussi
sendSketchInfo()
je te conseille un wait(300) entre chaque envoi de données
Re: [Sujet officiel] mySensors
Hello,
Voici le code d'un de mes noeuds.
Aucun souci en V2.
David.
Voici le code d'un de mes noeuds.
Aucun souci en V2.
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.
*
*/
/**************************************************************************************/
/* Temperature, humidity and luminosity measurements. */
/* */
/* Version : 1.1.7 */
/* Date : 16/02/2016 */
/* Modified by : David Carlier */
/**************************************************************************************/
/* --------------- */
/* RST | | A5 */
/* RX | | A4 */
/* TX | ARDUINO | A3 */
/* RFM69 (DIO0) --------- D2 | UNO | A2 */
/* DHT22 --------- D3 | | A1 */
/* Power --------- D4 | ATMEGA 328p | A0 --------- Light dep. resistor */
/* +3v --------- VCC | | GND --------- GND */
/* GND --------- GND | 8MHz int. | REF */
/* OSC | | VCC --------- +3v */
/* OSC | | D13 --------- RFM69 (SCK) */
/* D5 | | D12 --------- RFM69 (MISO) */
/* D6 | | D11 --------- RFM69 (MOSI) */
/* D7 | | D10 --------- RFM69 (NSS) */
/* D8 | | D9 */
/* --------------- */
/* */
/* Power = Vcc for LDR. */
/* +3v = 2*AA */
/* */
/**************************************************************************************/
#include <SPI.h>
#include <MySensor.h>
#include <dht.h>
#include <MyTransportRFM69.h>
#include <MySigningAtsha204Soft.h>
#define CHILD_ID_HUM 0
#define CHILD_ID_TEMP 1
#define CHILD_ID_LIGHT 2
#define CHILD_ID_VOLTAGE 3
#define LIGHT_SENSOR_ANALOG_PIN 0
#define HUMIDITY_SENSOR_DIGITAL_PIN 3
#define POWER_PIN 4
unsigned long SLEEP_TIME = 850000; // Sleep time between reads (in milliseconds) (close to 15')
//unsigned long SLEEP_TIME = 550000; // Sleep time between reads (in milliseconds) (close to 10')
//unsigned long SLEEP_TIME = 275000; // Sleep time between reads (in milliseconds) (close to 5')
//Construct MySensors library
MySigningAtsha204Soft signer;
MyHwATMega328 hw;
MyTransportRFM69 transport;
MySensor gw(transport, hw, signer);
dht DHT;
MyMessage msgHum(CHILD_ID_HUM, V_HUM);
MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
MyMessage msgLum(CHILD_ID_LIGHT, V_LEVEL);
MyMessage msgVolt(CHILD_ID_VOLTAGE, V_VOLTAGE);
/**************************************************************************************/
/* Initialization */
/**************************************************************************************/
void setup()
{
//Get time (for setup duration)
#ifdef DEBUG
unsigned long startTime = millis();
#endif
//Start MySensors
gw.begin();
//Send the Sketch Version Information to the Gateway
gw.sendSketchInfo("GHAS sensor", "1.1.7");
//Register all sensors to gw (they will be created as child devices)
gw.present(CHILD_ID_HUM, S_HUM);
gw.present(CHILD_ID_TEMP, S_TEMP);
gw.present(CHILD_ID_LIGHT, S_LIGHT_LEVEL);
gw.present(CHILD_ID_VOLTAGE, S_MULTIMETER);
//Delay for DHT22
delay(1500);
//Print setup debug
#ifdef DEBUG
int duration = millis() - startTime;
Serial.print("[Setup duration: "); Serial.print(duration, DEC); Serial.println(" ms]");
#endif
}
/**************************************************************************************/
/* Main loop */
/**************************************************************************************/
void loop()
{
//Get time (for a complete loop)
#ifdef DEBUG
unsigned long startTime = millis();
#endif
//Power on
powerOnPeripherals();
//Get DHT22 data
int dht22Result = DHT.read22(HUMIDITY_SENSOR_DIGITAL_PIN);
switch (dht22Result)
{
case DHTLIB_OK:
//Serial.println("OK,\t");
break;
case DHTLIB_ERROR_CHECKSUM:
#ifdef DEBUG
Serial.println("Checksum error,\t");
#endif
break;
case DHTLIB_ERROR_TIMEOUT:
#ifdef DEBUG
Serial.println("Time out error,\t");
#endif
break;
case DHTLIB_ERROR_CONNECT:
#ifdef DEBUG
Serial.println("Connect error,\t");
#endif
break;
case DHTLIB_ERROR_ACK_L:
#ifdef DEBUG
Serial.println("Ack Low error,\t");
#endif
break;
case DHTLIB_ERROR_ACK_H:
#ifdef DEBUG
Serial.println("Ack High error,\t");
#endif
break;
default:
#ifdef DEBUG
Serial.println("Unknown error,\t");
#endif
break;
}
//Get temperature and humidity
float temperature = 0;
float humidity = 0;
if (dht22Result == DHTLIB_OK)
{
temperature = DHT.temperature;
humidity = DHT.humidity;
}
//Get power before luminosity to use real voltage
float realVoltage = getVoltage() / 100.0;
int batteryPcnt = realVoltage * 100 / 3.0;
if (batteryPcnt > 100) {batteryPcnt = 100;}
int lux = computeIlluminance(realVoltage);
//Power off
powerOffPeripherals();
//Send data to gateway
gw.send(msgHum.set(humidity, 1));
gw.send(msgTemp.set(temperature, 1));
gw.send(msgLum.set(lux));
gw.send(msgVolt.set(realVoltage, 2));
gw.sendBatteryLevel(batteryPcnt);
//Print debug
#ifdef DEBUG
Serial.print(temperature, 1);
Serial.print(" degC");
Serial.print(" ");
Serial.print(humidity, 1);
Serial.print(" %");
Serial.print(" ");
Serial.print(lux);
Serial.print(" lx");
Serial.print(" ");
Serial.print(realVoltage);
Serial.print(" v");
int duration = millis() - startTime;
Serial.print(" ");
Serial.print("["); Serial.print(duration, DEC); Serial.println(" ms]");
Serial.flush();
#endif
//Sleep
gw.sleep(SLEEP_TIME);
}
/**************************************************************************************/
/* Allows to compute illuminance (in LUX) from LIGHT_SENSOR_ANALOG_PIN. */
/**************************************************************************************/
int computeIlluminance(float realVoltage)
{
//Get luminosity
int luminosity = analogRead(LIGHT_SENSOR_ANALOG_PIN);
//Calculating the voltage in the input of the ADC
double voltage = realVoltage * ((double)luminosity / 1024.0);
//Calculating the resistance of the photoresistor in the voltage divider
double resistance = (10.0 * realVoltage) / voltage - 10.0;
//Calculating the intensity of light in lux and return it
int illuminance = 255.84 * pow(resistance, -10/9);
return illuminance;
}
/**************************************************************************************/
/* Allows to get the real Vcc (return value * 100). */
/**************************************************************************************/
int getVoltage()
{
const long InternalReferenceVoltage = 1056L;
ADMUX = (0<<REFS1) | (1<<REFS0) | (0<<ADLAR) | (1<<MUX3) | (1<<MUX2) | (1<<MUX1) | (0<<MUX0);
delay(50); // Let mux settle a little to get a more stable A/D conversion
//Start a conversion
ADCSRA |= _BV( ADSC );
//Wait for it to complete
while (((ADCSRA & (1<<ADSC)) != 0));
//Scale the value
int result = (((InternalReferenceVoltage * 1023L) / ADC) + 5L) / 10L;
return result;
}
/**************************************************************************************/
/* Allows to power ON peripherals. */
/**************************************************************************************/
void powerOnPeripherals()
{
//Power-up
pinMode (POWER_PIN, OUTPUT);
digitalWrite (POWER_PIN, HIGH);
delay(1);
}
/**************************************************************************************/
/* Allows to power OFF peripherals. */
/**************************************************************************************/
void powerOffPeripherals()
{
//Power off
digitalWrite (HUMIDITY_SENSOR_DIGITAL_PIN, LOW);
digitalWrite (POWER_PIN, LOW);
pinMode (HUMIDITY_SENSOR_DIGITAL_PIN, INPUT);
pinMode (POWER_PIN, INPUT);
}
Re: [Sujet officiel] mySensors
@kraku t'as le droit de lire la doc aussi, tout y est sur ce que tu demandes
Envoyé de mon A0001 en utilisant Tapatalk
Envoyé de mon A0001 en utilisant Tapatalk
Mon Blog | Xiaomi Home
Pour contribuer au développement des plugins (don ou achat de matériel) : Paypal
Aides nous à t'aider : les logs, détails du soucis, la doc, recherche sur le forum ...
PS : pas de support par MP, je ne répondrais pas
Pour contribuer au développement des plugins (don ou achat de matériel) : Paypal
Aides nous à t'aider : les logs, détails du soucis, la doc, recherche sur le forum ...
PS : pas de support par MP, je ne répondrais pas
Re: [Sujet officiel] mySensors
c'est pas faute d'avoir lu!
Bon ben je crois que je vais me contenter de lire encore et de la fermer.
Bon ben je crois que je vais me contenter de lire encore et de la fermer.
Re: [Sujet officiel] mySensors
Bon ca semble OK. Encore une fois Lunarok avait déjà répondu dans d'autres posts
J'ai supprimé les install apt :
et refait le lien nodejs vers node :
J'ai supprimé les install apt :
Code : Tout sélectionner
apt-get remove nodejs node
Code : Tout sélectionner
ln -s nodejs node
Re: [Sujet officiel] mySensors
@kraku que mets tu comme sketch dans ton noeud et en quelle version est ta gateway ?
Orange PI plus2e : Jeedom Stable 3.11;
Mysensors: Téléinfo, 4xRelais Tableau elec, Portail garage, 2xSondes, Boite aux lettres, 2xLumière.
Broker MQTT. Pour ESP8266
Xiaomi Home avec detecteurs d'ouverture.
RPI2:Ecran officiel.
Mysensors: Téléinfo, 4xRelais Tableau elec, Portail garage, 2xSondes, Boite aux lettres, 2xLumière.
Broker MQTT. Pour ESP8266
Xiaomi Home avec detecteurs d'ouverture.
RPI2:Ecran officiel.
Re: [Sujet officiel] mySensors
Pour le noeud, j'ai pris le cas le plus simple d'un contact :Al85 a écrit :@kraku que mets tu comme sketch dans ton noeud et en quelle version est ta gateway ?
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
*
* Simple binary switch example
* Connect button or door/window reed switch between
* digitial I/O pin 3 (BUTTON_PIN below) and GND.
* http://www.mysensors.org/build/binary
*/
#include <MySensor.h>
#include <SPI.h>
#include <Bounce2.h>
#define CHILD_ID 3
#define BUTTON_PIN 3 // Arduino Digital I/O pin for button/reed switch
MySensor gw;
Bounce debouncer = Bounce();
int oldValue=-1;
// Change to V_LIGHT if you use S_LIGHT in presentation below
MyMessage msg(CHILD_ID,V_TRIPPED);
void setup()
{
gw.begin();
// Setup the button
pinMode(BUTTON_PIN,INPUT);
// Activate internal pull-up
digitalWrite(BUTTON_PIN,HIGH);
// After setting up the button, setup debouncer
debouncer.attach(BUTTON_PIN);
debouncer.interval(5);
// Register binary input sensor to gw (they will be created as child devices)
// You can use S_DOOR, S_MOTION or S_LIGHT here depending on your usage.
// If S_LIGHT is used, remember to update variable type you send in. See "msg" above.
gw.present(CHILD_ID, S_DOOR);
}
// Check if digital input has changed and send in new value
void loop()
{
debouncer.update();
// Get the update value
int value = debouncer.read();
if (value != oldValue) {
// Send in the new value
gw.send(msg.set(value==HIGH ? 1 : 0));
oldValue = value;
}
}
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 WITH_LEDS_BLINKING in MyConfig.h
* - 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
*
*/
#define NO_PORTB_PINCHANGES
#include <MySigningNone.h>
#include <MyTransportRFM69.h>
#include <MyTransportNRF24.h>
#include <MyHwATMega328.h>
#include <MySigningAtsha204Soft.h>
#include <MySigningAtsha204.h>
#include <SPI.h>
#include <MyParserSerial.h>
#include <MySensor.h>
#include <stdarg.h>
#include <PinChangeInt.h>
#include "GatewayUtil.h"
#define INCLUSION_MODE_TIME 20 // Number of minutes inclusion mode is enabled
#define INCLUSION_MODE_PIN 3 // Digital pin used for inclusion mode button
#define RADIO_ERROR_LED_PIN 4 // Error led pin
#define RADIO_RX_LED_PIN 6 // Receive led pin
#define RADIO_TX_LED_PIN 5 // the PCB, on board LED
// NRFRF24L01 radio driver (set low transmit power by default)
MyTransportNRF24 transport(RF24_CE_PIN, RF24_CS_PIN, RF24_PA_LEVEL_GW);
//MyTransportRFM69 transport;
// Message signing driver (signer needed if MY_SIGNING_FEATURE is turned on in MyConfig.h)
//MySigningNone signer;
//MySigningAtsha204Soft signer;
//MySigningAtsha204 signer;
// Hardware profile
MyHwATMega328 hw;
// Construct MySensors library (signer needed if MY_SIGNING_FEATURE is turned on in MyConfig.h)
// To use LEDs blinking, uncomment WITH_LEDS_BLINKING in MyConfig.h
#ifdef WITH_LEDS_BLINKING
MySensor gw(transport, hw /*, signer*/, RADIO_RX_LED_PIN, RADIO_TX_LED_PIN, RADIO_ERROR_LED_PIN);
#else
MySensor gw(transport, hw /*, signer*/);
#endif
char inputString[MAX_RECEIVE_LENGTH] = ""; // A string to hold incoming commands from serial/ethernet interface
int inputPos = 0;
boolean commandComplete = false; // whether the string is complete
void parseAndSend(char *commandBuffer);
void output(const char *fmt, ... ) {
va_list args;
va_start (args, fmt );
vsnprintf_P(serialBuffer, MAX_SEND_LENGTH, fmt, args);
va_end (args);
Serial.print(serialBuffer);
}
void setup()
{
gw.begin(incomingMessage, 0, true, 0);
setupGateway(INCLUSION_MODE_PIN, INCLUSION_MODE_TIME, output);
// Add interrupt for inclusion button to pin
PCintPort::attachInterrupt(pinInclusion, startInclusionInterrupt, RISING);
// Send startup log message on serial
serial(PSTR("0;0;%d;0;%d;Gateway startup complete.\n"), C_INTERNAL, I_GATEWAY_READY);
}
void loop()
{
gw.process();
checkButtonTriggeredInclusion();
checkInclusionFinished();
if (commandComplete) {
// A command wass issued from serial interface
// We will now try to send it to the actuator
parseAndSend(gw, inputString);
commandComplete = false;
inputPos = 0;
}
}
/*
SerialEvent occurs whenever a new data comes in the
hardware serial RX. This routine is run between each
time loop() runs, so using delay inside loop can delay
response. Multiple bytes of data may be available.
*/
void serialEvent() {
while (Serial.available()) {
// get the new byte:
char inChar = (char)Serial.read();
// if the incoming character is a newline, set a flag
// so the main loop can do something about it:
if (inputPos<MAX_RECEIVE_LENGTH-1 && !commandComplete) {
if (inChar == '\n') {
inputString[inputPos] = 0;
commandComplete = true;
} else {
// add it to the inputString:
inputString[inputPos] = inChar;
inputPos++;
}
} else {
// Incoming message too long. Throw away
inputPos = 0;
}
}
}
Avec installation toute neuve avec les sketch ci dessus :
Pour le noeud :
send: 121-121-0-0 s=255,c=3,t=15,pt=2,l=2,sg=0,st=ok:0
send: 121-121-0-0 s=255,c=0,t=17,pt=0,l=5,sg=0,st=ok:1.5.4
send: 121-121-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=ok:0
sensor started, id=121, parent=0, distance=1
send: 121-121-0-0 s=3,c=0,t=0,pt=0,l=0,sg=0,st=ok:
send: 121-121-0-0 s=3,c=1,t=16,pt=2,l=2,sg=0,st=ok:1
pour le log :
20-02-2016 19:54:38 | info | Jeedom url : http://192.168.0.89:80/core/api/jeeApi. ... 2BSrHCc73U
20-02-2016 19:54:38 | info | gwPort : 0
20-02-2016 19:54:38 | info | gwType : Serial
20-02-2016 19:54:38 | info | gwAddress : /dev/ttyUSB0
20-02-2016 19:54:38 | info | Inclusion : on
20-02-2016 19:54:42 | info | server bound on 8019
20-02-2016 19:54:42 | info | connected to serial gateway at /dev/ttyUSB0
20-02-2016 19:54:42 | info | Save Gateway Status 1
20-02-2016 19:54:42 | info | connected to serial gateway at /dev/ttyUSB0
20-02-2016 19:54:42 | info | Save Gateway Status 1
20-02-2016 19:54:43 | debug | Got response saveSensor: 200
20-02-2016 19:54:44 | debug | Got response saveSensor: 200
20-02-2016 19:55:14 | debug | -> 255;255;3;0;4;121
20-02-2016 19:55:14 | info | Save saveLibVersion : Value-121-1.5.4
20-02-2016 19:55:14 | debug | http://192.168.0.89:80/core/api/jeeApi. ... alue=1.5.4
20-02-2016 19:55:14 | debug | -> 121;255;3;0;6;M
20-02-2016 19:55:16 | debug | Got response saveLibVersion: 200
20-02-2016 19:55:32 | info | Save saveLibVersion : Value-121-1.5.4
20-02-2016 19:55:32 | debug | http://192.168.0.89:80/core/api/jeeApi. ... alue=1.5.4
20-02-2016 19:55:32 | debug | -> 121;255;3;0;6;M
20-02-2016 19:55:34 | debug | Got response saveLibVersion: 200
20-02-2016 19:55:34 | info | Save saveSensor : Value-121-3-0
20-02-2016 19:55:34 | info | Save saveLibVersion : Value-121-
20-02-2016 19:55:34 | debug | http://192.168.0.89:80/core/api/jeeApi. ... 121&value=
20-02-2016 19:55:34 | info | Save Value : Value-1-121-3
20-02-2016 19:55:34 | debug | http://192.168.0.89:80/core/api/jeeApi. ... 16&value=1
20-02-2016 19:55:36 | debug | Got response Value: 200
20-02-2016 19:55:36 | debug | Got response saveSensor: 200
20-02-2016 19:55:36 | debug | Got response saveLibVersion: 200
et toujours : Aucun mySensors détecté, démarrer un node pour ajout
EDiIT : maintenant ça communique bien, le log bouge quand il y a une action sur le noeud mais toujours Aucun mySensors détecté, démarrer un node pour ajout
Dernière édition par kraku le 20 févr. 2016, 20:13, édité 1 fois.
Re: [Sujet officiel] mySensors
Prend un autre sketch celui-ci n'est pas bon.
ou sinon dans le setup joute ca :
après gw.begin();
// Send the sketch version information to the gateway and Controller
gw.sendSketchInfo("Sensor test", "1.1");
ou sinon dans le setup joute ca :
après gw.begin();
// Send the sketch version information to the gateway and Controller
gw.sendSketchInfo("Sensor test", "1.1");
Orange PI plus2e : Jeedom Stable 3.11;
Mysensors: Téléinfo, 4xRelais Tableau elec, Portail garage, 2xSondes, Boite aux lettres, 2xLumière.
Broker MQTT. Pour ESP8266
Xiaomi Home avec detecteurs d'ouverture.
RPI2:Ecran officiel.
Mysensors: Téléinfo, 4xRelais Tableau elec, Portail garage, 2xSondes, Boite aux lettres, 2xLumière.
Broker MQTT. Pour ESP8266
Xiaomi Home avec detecteurs d'ouverture.
RPI2:Ecran officiel.
Re: [Sujet officiel] mySensors
Stop.
Ce fil est celui du support du plugin.
Y a un forum entier mysensors donc vos problèmes de noeuds etc... n'ont pas leur place ici
Au passage c'est a nouveau la fête et aucune recherche ou documentation avant de placer un "ça marche pas" comme on irait demander des conseils sur sa vie conjugale a la voyante
Rien qu'aujourd'hui ce sketch a été évoque 2 fois sur deux fils différents, bravo l'étalage. Alors qu'une recherche sur le forum aurait ramener une demi douzaine de fil avec ce soucis exact évoque et la raison, mais bon comme quoi c'est un mal dépendu car la réponse est aussi dans la doc pour celui qui veut comprendre comment ça marche mysensors
Bref, je demanderais a @kouaw de supprimer les posts a venir sur ce fil qui ne concerne pas un problème avec le plugin. Et pour les problèmes avec le plugin, pour rappel il faut lire le premier post avant de publier et vérifier si la réponse n'a pas déjà été donner
Je dois préparer le support de mysensors 1.6 et ça me démoralisé d'avance vu qu'on parle multi gateway le temps que ça va me demander a l'ajouter sera sûrement inférieur a répéter les mêmes reponses
Envoyé de mon A0001 en utilisant Tapatalk
Ce fil est celui du support du plugin.
Y a un forum entier mysensors donc vos problèmes de noeuds etc... n'ont pas leur place ici
Au passage c'est a nouveau la fête et aucune recherche ou documentation avant de placer un "ça marche pas" comme on irait demander des conseils sur sa vie conjugale a la voyante
Rien qu'aujourd'hui ce sketch a été évoque 2 fois sur deux fils différents, bravo l'étalage. Alors qu'une recherche sur le forum aurait ramener une demi douzaine de fil avec ce soucis exact évoque et la raison, mais bon comme quoi c'est un mal dépendu car la réponse est aussi dans la doc pour celui qui veut comprendre comment ça marche mysensors
Bref, je demanderais a @kouaw de supprimer les posts a venir sur ce fil qui ne concerne pas un problème avec le plugin. Et pour les problèmes avec le plugin, pour rappel il faut lire le premier post avant de publier et vérifier si la réponse n'a pas déjà été donner
Je dois préparer le support de mysensors 1.6 et ça me démoralisé d'avance vu qu'on parle multi gateway le temps que ça va me demander a l'ajouter sera sûrement inférieur a répéter les mêmes reponses
Envoyé de mon A0001 en utilisant Tapatalk
Mon Blog | Xiaomi Home
Pour contribuer au développement des plugins (don ou achat de matériel) : Paypal
Aides nous à t'aider : les logs, détails du soucis, la doc, recherche sur le forum ...
PS : pas de support par MP, je ne répondrais pas
Pour contribuer au développement des plugins (don ou achat de matériel) : Paypal
Aides nous à t'aider : les logs, détails du soucis, la doc, recherche sur le forum ...
PS : pas de support par MP, je ne répondrais pas
Re: [Sujet officiel] mySensors
Un vrai grand et énorme merci! ça fonctionneAl85 a écrit :Prend un autre sketch celui-ci n'est pas bon.
ou sinon dans le setup joute ca :
après gw.begin();
// Send the sketch version information to the gateway and Controller
gw.sendSketchInfo("Sensor test", "1.1");
Qui est en ligne ?
Utilisateurs parcourant ce forum : Aucun utilisateur inscrit et 5 invités