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. General Discussion
  3. Adding and removing children... on the fly

Adding and removing children... on the fly

Scheduled Pinned Locked Moved General Discussion
3 Posts 2 Posters 891 Views 2 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.
  • alowhumA Offline
    alowhumA Offline
    alowhum
    Plugin Developer
    wrote on last edited by
    #1

    I would like to create a node that can learn and replay 433Mhz signals of cheap power sockets.

    • I would like for the user be able to teach that node new codes at any time, and then have the new code show up as a new switch in the controller.
    • I would like for the user to be able to remove a code, and then also have the switch 'disappear' in the controller.

    Adding

    • Is it possible to call the present function at any time? Do controllers support this? Or would it freak them out? If so, is there a way around that? I was thinking perhaps I can force the Arduino to reboot at that point, and present a higher sketch version with the additional child (from eeprom data).

    Removing

    • From my limited experience with Domoticz, it won't remove a switch from the interface even though the MySensors device has disappeared, so it probably won't so anything when one shrink either (right?). But perhaps it can be set to a timeout state somehow, so that it is visually indicated as obsolete?
    • Alternatively, perhaps removal shouldn't matter. If the node itself remembers which one has been 'removed', then it can overwrite that child if a user decides to add a code again. In the controller interface the ghost switch will then come back to life. A snag here is that the switch might still have an old name ("bedroom light") while the switch now controls the lights in another room.

    Curious to hear any thoughts. Has anyone tried these things before? Searching on the forum ("variable children count", etc) I didn't find anything.

    mfalkviddM 1 Reply Last reply
    0
    • alowhumA alowhum

      I would like to create a node that can learn and replay 433Mhz signals of cheap power sockets.

      • I would like for the user be able to teach that node new codes at any time, and then have the new code show up as a new switch in the controller.
      • I would like for the user to be able to remove a code, and then also have the switch 'disappear' in the controller.

      Adding

      • Is it possible to call the present function at any time? Do controllers support this? Or would it freak them out? If so, is there a way around that? I was thinking perhaps I can force the Arduino to reboot at that point, and present a higher sketch version with the additional child (from eeprom data).

      Removing

      • From my limited experience with Domoticz, it won't remove a switch from the interface even though the MySensors device has disappeared, so it probably won't so anything when one shrink either (right?). But perhaps it can be set to a timeout state somehow, so that it is visually indicated as obsolete?
      • Alternatively, perhaps removal shouldn't matter. If the node itself remembers which one has been 'removed', then it can overwrite that child if a user decides to add a code again. In the controller interface the ghost switch will then come back to life. A snag here is that the switch might still have an old name ("bedroom light") while the switch now controls the lights in another room.

      Curious to hear any thoughts. Has anyone tried these things before? Searching on the forum ("variable children count", etc) I didn't find anything.

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

      @alowhum calling present at any time should work. The controller wouldn’t know if the node rebooted or presented without rebooting so no extra support is needed.

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

        There is no need to change sketch version. That field is for information only.

        I don't think controllers support removing anything automatically. Maybe if they have an external api. I'm unable to find anything like that in the Domoticz api: http://www.domoticz.com/wiki/Domoticz_API/JSON_URL's

        But since it is possible to delete stuff from the Domoticz web UI, maybe you can just check what a delete request looks like?

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


        16

        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