Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. Alberto77
    3. Best
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Best posts made by Alberto77

    • RE: [Solved] Beginner receive() question

      @electrik: I found the solution. It was my misunderstanding of your advice. As you mentioned to add the \n then I thought it is the \n in the configuration of the Serial-Ouput Node, see here:
      3a3201bc-7912-4c51-b9ec-79b26b6d56e4-image.png

      In the Output section you can "Add Character to output message". Apparently this is not equivalent to adding \n into the
      payload itself. Now my paload looks like this:
      8e653082-b111-4e8c-a24c-074f56117b8f-image.png

      and the Node is receiving it, great 🙂
      Thank you very much for your help @electrik

      posted in Node-RED
      Alberto77
      Alberto77
    • RE: MySensors GW MQTT messages do not access the MQTT broker

      Thanks for your feedback frits.
      This is what I found searching this forum and already replied to my own post, but it takes some time the post to become visible.

      With best regards
      Alberto

      posted in Troubleshooting
      Alberto77
      Alberto77
    • [Solved] Beginner receive() question

      Currently I implemented some nodes sending data to a Serial-Gatway connected to a RasPi.
      I'm running Node-Red on this RasPi and and the data area stoet into InfluxDB. Everything is working fine.

      So now I'm trying to send some data from Node-Red to an example node.
      First I verified that the node is working fine, when sending data to the Gateway.

      For sending the data I'm using following flow:
      823c93f3-a495-472e-a244-6526af6c0bc7-image.png
      It sends the number 275 to my Node_ID 29. The type is V_VAR1.
      The Node-Red Debug shows, what is sent:
      53c9fa50-0ccd-472d-b0ad-b8b4638ab13b-image.png

      The loop in the node is a state machine, where I added a wait() just to slow it down while testing.
      The cases are empty functions so nothing happens there.

      void loop() 
      {
         Serial.println("Runinng Main Loop");
         wait(3000); 
      
        // Main-Lopp for state-machine
        switch (Current_State)
        {
           case CHECK_LEVEL:        Check_Water_Level(); break;  
           case FILL_WATER:         Check_Water_Level(); break; //same function for both cases. 
           case PUMP_ON:            Pumping(); break;   
           case SUSPEND:            Suspend(); break; 
           case REMOTE_CONTROL:     Remote_Control(); break;
           case SLEEP_MODE:         Start_Sleep_Mode(); break;
        } 
      }
      

      The receive function includes only some print commands to show me when the data was received:

      void receive(const MyMessage &message)
      {
      
        Serial.println( "Message received:  ");
        Serial.println( message.type);
        Serial.println( message.getUInt());
      }
      

      Unfortunately nothing happens, when I'm injecting the data in Node-Red.
      I scanned the forum but didn't find the right postings helping me to understand, what my error is.

      Thanks in advance for any advice.

      posted in Node-RED
      Alberto77
      Alberto77
    • RE: Pro mini: Did not receive a node id from controller.

      @frits: if the MQTT GW do not support the dynamic ID assignement, then what happened to my other sensors (those based on the Nano) 🤔 They got the Node_IDs from the GW. All the sensors are on the same GW.

      posted in Troubleshooting
      Alberto77
      Alberto77
    • RE: Pro mini: Did not receive a node id from controller.

      @frits : This is my first GW, but during my early experiments I run it as an Ethernet GW, then I reconfigured to MQTT.
      Currently I don't have a controller running but I'm using Node-Red + Influx-DB + Grafana.

      So probably during these first experiments, while in Ethernet mode, the Node_IDs were distributed.
      I will erase the EEPROMs by the next opportunity and will check the behaviour of my Nano sensors after re-boot.

      Thanks for your explanation frits, it helped me to learn more about MySensors.👍

      posted in Troubleshooting
      Alberto77
      Alberto77