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
  1. Home
  2. Controllers
  3. Domoticz
  4. [RESOLVED] Send text to node with OLED display

[RESOLVED] Send text to node with OLED display

Scheduled Pinned Locked Moved Domoticz
5 Posts 2 Posters 4.0k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kted
    wrote on last edited by kted
    #1

    Hi.
    I am trying (without success) to send text from the controller to a node with a OLED display.
    The node registers successfully with the controller, gets an IDx of 8, and is enablad
    I am trying to send a text value (a temperature from another node actually) to be displayed, using JSON
    An example command is http://192.168.1.13:8080/json.htm?type=command&param=udevice&idx=8&nvalue=0&svalue=hello
    The text shows in the device list in domoticz, but the receive() function never fires.
    0_1483816451561_Capture1.PNG

    This is my receive() function

    void receive(const MyMessage &message) {
      Serial.print("Sensor: "); Serial.print(message.sensor); Serial.print(", Message: "); Serial.println(message.getString()); 
      if (message.type == V_TEXT) { 
        if (message.sensor == OLED_CHILD) {
          OLEDtemp = message.getString();
        }
      }
    }
    
    

    I also tried passing the value to the node via a LUA script, without results.
    What am I doing wrong?

    mfalkviddM 1 Reply Last reply
    0
    • K kted

      Hi.
      I am trying (without success) to send text from the controller to a node with a OLED display.
      The node registers successfully with the controller, gets an IDx of 8, and is enablad
      I am trying to send a text value (a temperature from another node actually) to be displayed, using JSON
      An example command is http://192.168.1.13:8080/json.htm?type=command&param=udevice&idx=8&nvalue=0&svalue=hello
      The text shows in the device list in domoticz, but the receive() function never fires.
      0_1483816451561_Capture1.PNG

      This is my receive() function

      void receive(const MyMessage &message) {
        Serial.print("Sensor: "); Serial.print(message.sensor); Serial.print(", Message: "); Serial.println(message.getString()); 
        if (message.type == V_TEXT) { 
          if (message.sensor == OLED_CHILD) {
            OLEDtemp = message.getString();
          }
        }
      }
      
      

      I also tried passing the value to the node via a LUA script, without results.
      What am I doing wrong?

      mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by
      #2

      @kted are you using MySensors v 2.0 and the node is also a gateway? If so, upgrade to MySensors 2.1. If I remember correctly 2.0 had a bug that caused receive to not be called on gateways.

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kted
        wrote on last edited by
        #3

        MySensors 2.0, and the node is just an Arduino Pro mini with a NRF24 and an OLED display. No other function is enabled on it.
        I use it to display the solar water heater temperature next to the switch that powers the heater when solar power cannot heat the water enough.
        The sending node is several floors away, and communicates successfully with the gateway, using NRF2401 PA modules.

        In the past I was able to succesfully send messages from node to node, and they were shown on the display, but now the distance is too great, and the receiving node has no external antenna.

        Thanks for the suggestion. I will upgrade the controller and this node to 2.1, and see what happens.
        Will there be a problem if the other nodes (about 8 of them) remain at the 2.0 version for a while, until I upgrade all of them?

        mfalkviddM 1 Reply Last reply
        0
        • K kted

          MySensors 2.0, and the node is just an Arduino Pro mini with a NRF24 and an OLED display. No other function is enabled on it.
          I use it to display the solar water heater temperature next to the switch that powers the heater when solar power cannot heat the water enough.
          The sending node is several floors away, and communicates successfully with the gateway, using NRF2401 PA modules.

          In the past I was able to succesfully send messages from node to node, and they were shown on the display, but now the distance is too great, and the receiving node has no external antenna.

          Thanks for the suggestion. I will upgrade the controller and this node to 2.1, and see what happens.
          Will there be a problem if the other nodes (about 8 of them) remain at the 2.0 version for a while, until I upgrade all of them?

          mfalkviddM Offline
          mfalkviddM Offline
          mfalkvidd
          Mod
          wrote on last edited by
          #4

          @kted you can mix 2.0 and 2.1, no need to upgrade all nodes.
          However, since this is just a regular node and not a gateway, I don't think upgrading will solve the problem.

          Could you capture and post debug log from the node and the gateway when sending the message from Domoticz? It might help figure out what is going wrong.

          You could also try requesting the value of the variable from the node. See https://www.openhardware.io/view/23/In-wall-LCD-SwitchScene-controller-for-MySensors#tabs-source for an example, especially this line:

          request(msg_v_Text, V_TEXT, 0);
          
          1 Reply Last reply
          0
          • K Offline
            K Offline
            kted
            wrote on last edited by
            #5

            Duh!
            Just realized that the node is sleeping while waiting for the message!
            There are no debug messages while waiting, the node just sleeps.
            What threw me off, was that the time and date are received OK, but that was at the beginning of the first loop, while the node was awake.
            I'll try the request() function ASAP.
            Thanks.

            1 Reply Last reply
            1
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            13

            Online

            11.7k

            Users

            11.2k

            Topics

            113.1k

            Posts


            Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
            • Login

            • Don't have an account? Register

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