Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
J

JeeLet

@JeeLet
About
Posts
114
Topics
9
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • is there a solution for a relay with button that also works offline?
    J JeeLet

    Hello to you

    MY_TRANSPORT_WAIT_READY_MS

    "MY_TRANSPORT_WAIT_READY_MS. Very useful. You can tell a node to try connecting to the gateway for X seconds, but if it fails, it should just carry on. I usually set this to 10000 so that it will try connecting to the network for ten seconds, and then just continue starting the node. The default is 0, meaning that if a node can't connect to the gateway it will never reach the loop() portion of your code!" API 2.0

    Feature Requests

  • French Version
    J JeeLet

    French version of mycontroller has just arrived :)

    https://forum.mycontroller.org/topic/68/french/12

    version 2 continues its evolution, quietly but surely

    MyController ? super light and super fast.

    https://v2.mycontroller.org/docs/overview/architecture/

    MyController.org

  • Domoticz/Mysensors
    J JeeLet

    Yes errors on the commands given through domoticz
    only one in three and taken into account

    terminal copy serial

    Changement entrant pour le capteur:3, New status: 0
    Changement entrant pour le capteur:3, New status: 1
    Changement entrant pour le capteur:3, New status: 0
    Changement entrant pour le capteur:3, New status: 0
    Changement entrant pour le capteur:3, New status: 0
    Changement entrant pour le capteur:3, New status: 1
    Changement entrant pour le capteur:3, New status: 0
    Changement entrant pour le capteur:3, New status: 0
    

    ...and the local push button commands are not taken into account

    in the loop something that dies its tail ??

       // Inform controller if state change from input
        if (debouncer.update()) 
        {
            bool newState = !digitalRead(CONTROL_INPUT_PIN);
            if (newState != currentState)
            {
                currentState = newState;
                if (currentState != controllerState)
                {
                    send(msg.set(currentState));
                }
            }
        }
    

    merci Boum

    Domoticz

  • Anyone here tried either LoRa Meshtastic or LoRaWan for grid-down emergency communications?
    J JeeLet

    https://commotionwireless.net/docs/get-started/

    text alternatif

    General Discussion

  • is there a solution for a relay with button that also works offline?
    J JeeLet

    Your question raises many problems, but a simple solution may be possible :)

    In the creation of a home automation system there are two basic philosophies.

    • a centralized "intelligence" that contains the parameters and algorithms to give orders/actions to the Nodes
    • or a distributed "intelligence", each Node with its own algorithm receives the list of things to do.

    for your problem how to have a "degraded mode" in case of scratch.

    some reading ... links :

    the keyword, the thread: Sending data

    https://forum.mysensors.org/topic/7841/relay-actuator-send-periodic-status-as-heart-beat

    https://forum.mysensors.org/topic/6948/synchronising-light-switch/2

    Feature Requests

  • What could be the possible reasons for MySensors sensors not working with MyController on Raspberry Pi, and how can one troubleshoot and resolve the issue?
    J JeeLet

    Hello

    what type of architecture do you use ?

    (an example)
    bus....... = Nodes <--- ? ---> Gateway <--- Usb ---> Controller
    material = Atmega ..............arduinoUno.................Raspy4
    software = MyS2.3.............MyS2.3 ....................Ubuntu/MyC2.x

    ?= RF RFM RS

    NodeManager

  • Mysensors et dual Bus
    J JeeLet

    view
    Thank you for the link
    I'll head in that direction
    feedback after testing

    Jeedom

  • ACK -aka ECHO beeing missed by Serial Gateway with RF24 radios. V2.3.2
    J JeeLet

    Waiting

    "Waiting using the Arduino delay() command is not a good idea. " ... https://www.mysensors.org/download/sensor_api_20

    utili:
    https://forum.mysensors.org/topic/10386/what-is-the-good-wait-time
    https://forum.mysensors.org/topic/9099/does-gateway-loop-required-wait-or-delay

    Bug Reports

  • CAN bus transport implementation
    J JeeLet

    The original idea was: how to check the status of the CAN bus.

    . is there any dialogue ?
    . are there any messages?

    of course this can be done with MySensors.

    But to get as close as possible to the communication channel (the CAN bus) I thought it was easy to do.

    this is by reading the post of bricoleau here
    text french
    that the idea came to me.

    • on the arduino have a blinking led to say that the CAN bus is out of order (but we forget, it loads the program unnecessarily)

    and also because you suggested it to me
    yes we have to beat the iron when it is hot, and my time available for the computer will soon be reduced (purchase and work of a house)

    I appreciate very much your explanatory note, thank you

    I activated the 16Mhz in the sketch, and put it back in the library

      #define MY_NODE_ID 57          /*Node en ID static*/
    
      #define MY_CAN
      #define CAN_CLOCK MCP_16MHZ
    
    Development

  • 💬 Real Time Clock Module, LCD Display and Controller Time
    J JeeLet

    good evening

    again a new sketch for the "void receiveTime" function
    (without RTC clock)

    • start synchronization with the controller and regularly for the drift of the arduino.
    • display time and date on an OLED screen
    • error message when a loss of communication with the controller occurs

    a video "https://www.casimages.com/v/RSWTNb-vokoscreen-2022-05-24-19-33-49.mp4.html"

    /*
     * LIBRAIRIE:
     *  MySensors v2    : https://github.com/mysensors/MySensors
     *  TimeLib.h       : https://github.com/PaulStoffregen/Time
     *  SSD1306Ascii.h  : https://github.com/greiman/SSD1306Ascii
     *
     * MATERIEL:
     *    Arduino Uno
     *    -Afficheur OLED 0,96" I2C TF052 / circuit SSD1306.
     *    bus TTLModule RS485
     * 
     * REVISION HISTORY
     *  base de Henrik Ekblad 2013-2015 et autres :)
     *  ajout bus RS485 et OLED
     * 
     * DESCRIPTION
     *  demander Date et Heure au  contrôleur et l'affiche sur ecran OLED 
     *  Request date and time from the controller and display it on OLED screen 
     *  
     *  Connectique i2c:
    *   Arduino :  A4   A5
    *   OLED    :  SDA  SCL
     *  
     */
    //-- The sketch uses 11932 bytes (36%) ----global variables use 839 bytes (40%)-----------
    //-
    //------------ 2022 ----------------------- Fonctionnelle avec MyC et MyS------------------- 
    
      //#define MY_DEBUG                  /*Enable debug prints to serial monitor*/
      #define MY_TRANSPORT_WAIT_READY_MS 3000  /*Timeout (ms) pour mis en Com.(0 pour aucun)*/
      #define MY_NODE_ID 22          /*Node en ID static*/
    
    /* ----- Module RS485 ----*/
      #define MY_RS485                  /*Apl du transport RS485 (protocol?)*/
      #define MY_RS485_DE_PIN 2         /*Cmd DE pin*/
      #define MY_RS485_BAUD_RATE 9600   /*Set RS485 baud rate to use*/
    //#define MY_RS485_HWSERIAL Serial1 /*pour port Serial autre*/
      
      #include "SSD1306Ascii.h"
      #include "SSD1306AsciiAvrI2c.h"
      
      #include <MySensors.h>  
      #include <TimeLib.h> 
    
      #define CHILD_ID 22       /* MyS numero du Node*/
    
      #define I2C_ADDRESS 0x3C                        /*i2c adresse*/
      
      #define RST_PIN -1  // Define proper RST_PIN if required.(oled)
       
      SSD1306AsciiAvrI2c oled;  //type de com oled
    
    //----- MyS ------
        bool timeReceived = false;  
        bool stateCom = false;
        unsigned long lastUpdate=0, lastRequest=0 , lastmillis = 0;
        unsigned long newTime = 0, oldTime = 0, ComTime = 6000;
    
    //---------------- SETUP ----------------------------
    
      void setup()  {  
    
    //--- OLED ----
      #if RST_PIN >= 0
        oled.begin(&Adafruit128x32, I2C_ADDRESS, RST_PIN);
      #else // RST_PIN >= 0
        oled.begin(&Adafruit128x32, I2C_ADDRESS);
      #endif // RST_PIN >= 0
    
        oled.setFont(Adafruit5x7);         /*font Oled*/
        // oled.setFont(font8x8);             //bien 
        // oled.setFont(Verdana12);           //grand
        // oled.setFont(fixed_bold10x15);     //tres grand   
        // oled.setFont(Arial_bold_14);       //grand sympa 
        oled.clear();
        }
    
    //--------------MySensors-------------
    
      void presentation()  {
        sendSketchInfo("Clock", "2.0");
        }
    
    //------------------ LOOP -----------------------
      void loop() {     
      
    // ---- MyS time --------  
      unsigned long now = millis();
      
       if (now-lastRequest > (ComTime)) {    
                    
          timeReceived = false;
          requestTime(receiveTime);   // Request time from controller. 
          lastRequest = now;
          }
        
    //----- Tempo Display Oled ----------
      if (now-lastUpdate > 10000) {  //10secondes
        lastUpdate = now;
       // Serial.print(" test lastmillis------------ display : "); 
       // Serial.println(timeReceived);
        updateDisplay();
        lastmillis = millis();
    
    
    //----- Stat Com ---
        if (timeReceived == 1) {   //En Com Controller stateCom
          ComTime = 480UL*1000UL;    // 480=8 minutes cycles for Control presence controller 
            }
        else  {           // Erreur Com Controller
          stateCom = false;
          ComTime = 60UL*1000UL;    // secondes for attempted reconnection to the controller 
         // Serial.println(" ----*** Erreur Com Controller *** ---- ");
          }
         }
       } //---Loop
    
     // -------------------- MyS --------------------------------
      void receiveTime(unsigned long controllerTime)   {   
       if (receiveTime) stateCom = true ; else stateCom = false;
        newTime = controllerTime;
        timeReceived = true;
        setTime(controllerTime); // apl pour TimeLib.h
        }
        
    //------------Gestion de l'affichage OLED---------------
      void updateDisplay() {
    
        oled.set1X();           //ligne Message
        oled.setCursor(2, 0);
        printStatDay () ;       // affiche jour de la semaine/poster day of the week
        //oled.print(day());
       
        oled.set2X();           //ligne Heures
        oled.setCursor(18,1);
        oled.print(hour());
        printDigits(minute());
        printDigits(second());
         
        oled.set1X();           // ligne jour mois Année / day month year
        oled.setCursor(35,3);
        oled.print(day());
        printDigitsDay(month());
        printDigitsDay(year());
       }
    
    //-------- Day displaying-------
      void printDigitsDay(int digitday) { //function for Day displaying "0" and separator "/" for day/month/year values
        oled.print("/");
          if(digitday < 10)
            oled.print('0');
            oled.print(digitday);
        }
    
    //-------- Time displaying-------
      void printDigits(int digits) {  //function for Time displaying "0" and separator ":" for hour:minute:sec values
        oled.print(":");
          if(digits < 10)
            oled.print('0');
            oled.print(digits);
        }
    
    //------ conversion date en texte (fonction weekday) et statu Com Controller -----------  
      void printStatDay () {   //function for display Day texte
    
        oled.invertDisplay(!(stateCom)); // inverse N/B Oled sur erreur Com
        if(stateCom == true) { oled.print("com  "); }    //com okai
        if(stateCom == false){ oled.print("Error"); }    //com Error
          // oled.print(stateCom);
            oled.print("  ");
          
       
        if(weekday() == 1) { oled.print("dimanche"); }  //Sunday
        if(weekday() == 2) { oled.print("lundi"); }     //Monday
        if(weekday() == 3) { oled.print("mardi"); }     //Tuesday
        if(weekday() == 4) { oled.print("mercredi"); }  //Wednesday
        if(weekday() == 5) { oled.print("jeudi"); }     //Thursday
        if(weekday() == 6) { oled.print("vendredi"); }  //Friday
        if(weekday() == 7) { oled.print("samedi"); }    //Saturday
    
         oled.print(" ");
         oled.print(day());
       }
    
    //-------------------FIN PGM --------------------------
    
    //------------------- INFO -------------------
    

    why open a new post, there is still some space here :)

    Announcements

  • Wait() in setup question.
    J JeeLet

    maybe this can be useful : https://forum.mysensors.org/topic/6948/synchronising-light-switch

    I use it with version 1requestState or 2 requestTime() on some sketches
    (I modified the structure, moved some parts to functions to make it more readable )

    Development

  • 💬 Building a wired RS485 sensor network
    J JeeLet

    a line of the examples given in the sketches for the use of RS485 can be a source of problem
    (it's my case, I use Pin2 or3 for a long time :( )

    ...
    // Define this to enables DE-pin management on defined pin
    #define MY_RS485_DE_PIN 2
    (2 or 3 is an interrupt pin for a Uno)
    ...

    avoided interrupt pins.

    the pin 10 is a good thing :)

    Announcements
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular