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. OpenHAB
  4. Using presentation() to secure GW communication

Using presentation() to secure GW communication

Scheduled Pinned Locked Moved OpenHAB
6 Posts 2 Posters 1.9k 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.
  • E Offline
    E Offline
    etxmsol
    wrote on last edited by
    #1

    Hi,
    in order to achieve the self-healing of the network after the GW restart, I call in my nodes the presentation() every time I'm about to send a message. This works perfectly and serves its purpose! One drawback is the openhab2.log file on my BeagleBone is flooded with:
    2017-10-01 20:28:11.352 [WARN ] [rs.internal.gateway.MySensorsGateway] - Presented child is alredy present in gateway
    Hundreds of kilobytes a day. Is there a way to stop this logging?

    mfalkviddM 1 Reply Last reply
    0
    • E etxmsol

      Hi,
      in order to achieve the self-healing of the network after the GW restart, I call in my nodes the presentation() every time I'm about to send a message. This works perfectly and serves its purpose! One drawback is the openhab2.log file on my BeagleBone is flooded with:
      2017-10-01 20:28:11.352 [WARN ] [rs.internal.gateway.MySensorsGateway] - Presented child is alredy present in gateway
      Hundreds of kilobytes a day. Is there a way to stop this logging?

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

      @etxmsol I guess you could keep a table of which nodes you have presented in RAM on the GW, and not call the node again if it already has been called?

      Could you take a step back and describe why the presentation needs to be done? Maybe this should be handled on another level (maybe at controller, or in the mySensors library)?

      1 Reply Last reply
      0
      • E Offline
        E Offline
        etxmsol
        wrote on last edited by
        #3

        thanks for your reply. I was not clear on my purpose, my bad. I want a truly self healing network. I have a serial GW, connected to OpenHab2 running on a BeagleBone Black. I use the provided MySensorsSerialGW, connected over FTDI adapter to the USB on the BeagleBone. When on some reason, either GW or the BeagleBone. or both get restarted, the GW loses all information about the connected nodes. This is of course normal, the GW is a simple arduino nano program. The nodes (Arduino Mega), on the other hand are unaware. They send updates, but fail. To solve this issue, I figured out I could call the presentation() function (which is normally only called before Arduino's setup()) every time before sending a message (update status). Just to be sure, the node is registered with the GW. Another solution would be to restart the node, but this is not self healing. In the rare case when the GW was actually restarted, calling presentation() re-does registration. But in all other cases it leads to the warning message as described. I was wondering if I could suppress this message.

        mfalkviddM 1 Reply Last reply
        0
        • E etxmsol

          thanks for your reply. I was not clear on my purpose, my bad. I want a truly self healing network. I have a serial GW, connected to OpenHab2 running on a BeagleBone Black. I use the provided MySensorsSerialGW, connected over FTDI adapter to the USB on the BeagleBone. When on some reason, either GW or the BeagleBone. or both get restarted, the GW loses all information about the connected nodes. This is of course normal, the GW is a simple arduino nano program. The nodes (Arduino Mega), on the other hand are unaware. They send updates, but fail. To solve this issue, I figured out I could call the presentation() function (which is normally only called before Arduino's setup()) every time before sending a message (update status). Just to be sure, the node is registered with the GW. Another solution would be to restart the node, but this is not self healing. In the rare case when the GW was actually restarted, calling presentation() re-does registration. But in all other cases it leads to the warning message as described. I was wondering if I could suppress this message.

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

          @etxmsol thanks for explaining

          The gateway is stateless, so restarting it should not affect anything, except that it will miss messages sent while restarting of course.

          Could this be an OpenHab2 issue?

          I use Domoticz, and I've never had to make nodes re-present themselves after restarting my raspberry pi, nor after restarting the gateway.

          1 Reply Last reply
          1
          • E Offline
            E Offline
            etxmsol
            wrote on last edited by etxmsol
            #5

            yeah, it should be on the OpenHab side then. I've found an option in the OpenHab service (Karaf) to configure the level of the logging. The message comes actually from the MySensors binding (a part of MySensors infrastructure on the OpenHab side):
            23:08:57.306 [WARN ] [rs.internal.gateway.MySensorsGateway] - Presented child is alredy present in gateway
            The message type is WARN. I can change the logging level in OpenHab to ERROR. Then the warnings are no more. On the downside, I'll see no warnings at all, even the ones I need to see.
            Probably the warning comes from the OpenHab to the binding. Still basically it should be possible to disable this specific warning in the MySensors binding somehow (binding config page?).

            also, could you as a moderator move this topic to either Development or Controllers? It looks the discussion is quite specific

            mfalkviddM 1 Reply Last reply
            0
            • E etxmsol

              yeah, it should be on the OpenHab side then. I've found an option in the OpenHab service (Karaf) to configure the level of the logging. The message comes actually from the MySensors binding (a part of MySensors infrastructure on the OpenHab side):
              23:08:57.306 [WARN ] [rs.internal.gateway.MySensorsGateway] - Presented child is alredy present in gateway
              The message type is WARN. I can change the logging level in OpenHab to ERROR. Then the warnings are no more. On the downside, I'll see no warnings at all, even the ones I need to see.
              Probably the warning comes from the OpenHab to the binding. Still basically it should be possible to disable this specific warning in the MySensors binding somehow (binding config page?).

              also, could you as a moderator move this topic to either Development or Controllers? It looks the discussion is quite specific

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

              @etxmsol moved to OpenHab. Thanks.

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


              15

              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