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. Development
  3. Longer text in V_TEXT, any workarounds?

Longer text in V_TEXT, any workarounds?

Scheduled Pinned Locked Moved Development
5 Posts 3 Posters 1.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.
  • D Offline
    D Offline
    dakipro
    wrote on last edited by
    #1

    Hi,
    I am building a LED matrix display for displaying some messages from controller. I searched and found some discussion few years ago about its limitation and possible workarounds in sending few messages from gateway and the nodes. Was there any progress on this, or has anyone come with some workaround?
    I am using openhab and node-red over mqtt if that helps.
    I was considering making small custom logic in node-red that would split the messages and send them with few seconds delay, and then on the node to combine them in a single text, something like:
    Message1: |CS| This is some 24 message th
    Message2: at is being split over multipl
    Message3: e messages

    So if node gets message starting with "|CS|" it will delete message from the screen, if not it will just append the message to it

    But what if some message gets lost? Or any better suggestions?

    C: OpenHAB2 with node-red on linux laptop
    GW: Arduino Nano - W5100 Ethernet, Nrf24l01+ 2,4Ghz mqtt
    GW: Arduino Mega, RFLink 433Mhz

    H 1 Reply Last reply
    0
    • D dakipro

      Hi,
      I am building a LED matrix display for displaying some messages from controller. I searched and found some discussion few years ago about its limitation and possible workarounds in sending few messages from gateway and the nodes. Was there any progress on this, or has anyone come with some workaround?
      I am using openhab and node-red over mqtt if that helps.
      I was considering making small custom logic in node-red that would split the messages and send them with few seconds delay, and then on the node to combine them in a single text, something like:
      Message1: |CS| This is some 24 message th
      Message2: at is being split over multipl
      Message3: e messages

      So if node gets message starting with "|CS|" it will delete message from the screen, if not it will just append the message to it

      But what if some message gets lost? Or any better suggestions?

      H Offline
      H Offline
      hard-shovel
      wrote on last edited by
      #2

      @dakipro I whould send a line number for each part of the text and some sort of EOL character to indicate the end.

      [CS] this is some 24 message th
      [02] at is being split over multipl
      [03] e messages [EOL]

      So if message [03] arrived without [02] you could request a resend.

      1 Reply Last reply
      0
      • mfalkviddM Offline
        mfalkviddM Offline
        mfalkvidd
        Mod
        wrote on last edited by
        #3

        How about using multiple V_TEXT child IDs? Then there would be no need to check the start of the text, and handling lost messages would be much easier.

        1 Reply Last reply
        1
        • D Offline
          D Offline
          dakipro
          wrote on last edited by
          #4

          Thanks! Btw, does anyone have a example of resending of missed messages from OpenHab via Mqtt?
          Or retrieving any data at all, I just never managed to get any data from openhab from the node. F.eks., asking what is the time and such thing, do I need to have a rule for each "question" and then reply in response, or as a new call or what?

          C: OpenHAB2 with node-red on linux laptop
          GW: Arduino Nano - W5100 Ethernet, Nrf24l01+ 2,4Ghz mqtt
          GW: Arduino Mega, RFLink 433Mhz

          1 Reply Last reply
          0
          • D Offline
            D Offline
            dakipro
            wrote on last edited by
            #5

            If anyone is trying the same, I did it as @mfalkvidd recommended, with several child IDs
            Then I basically reset the message if data comes on on first childId, and only append it if data comes on any other sensor, something like

            if (message.sensor == messageCHILD1){
              strcpy(newMessage, "       ");                 // we put some spaces in front
              strcat(newMessage, message.getString());    
            }else{
              if(curMessage!=""){
                // append existing message to newMessage
                 strcpy(newMessage, curMessage);   
               }
              //append rest
              strcat(newMessage, message.getString());
            }
            			
            

            Note: the code also works with just two sensors, first for reset, and second that only appends data, but I decided to go with four child IDs, in case there is something I am not seeing at the moment.

            Thanks everyone for ideas

            C: OpenHAB2 with node-red on linux laptop
            GW: Arduino Nano - W5100 Ethernet, Nrf24l01+ 2,4Ghz mqtt
            GW: Arduino Mega, RFLink 433Mhz

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


            19

            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