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. Battery powered IR sender

Battery powered IR sender

Scheduled Pinned Locked Moved Development
slightgw.sleepinfraredblaster
6 Posts 3 Posters 2.7k Views 1 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.
  • KytrixK Offline
    KytrixK Offline
    Kytrix
    wrote on last edited by
    #1

    Hi all !

    First message here !
    I'm very enjoing play with mysensors to build my own Home Automation devices !

    I have a question about creating a node powered on battery and sending IR codes !

    That means, I would like my sensor sleep for a while, and they get the status of the message.
    I don't need in this case a fast responce (few seconds is ok here).

    So First, I take the sample of the Relay, add a gw.sleep(10000) after process...
    but it doesn't work : after the sleep, the message was not received. (If I change state from my controller)
    I also try to reduce to 1s, but it's the same :/
    after gw.process, I try to call
    digitalWrite(RELAY_1, gw.loadState(1)?RELAY_ON:RELAY_OFF);
    same here : the state was not received :/

    Someone has a idea to do this ?
    (I mean receive a message from Gateway and sleep to keep battery) ?

    Kytrix.

    1 Reply Last reply
    0
    • hekH Offline
      hekH Offline
      hek
      Admin
      wrote on last edited by hek
      #2

      When you sleep the node, it won't receive or process any radio-commands.

      And relays is pretty power hungry so it won't last long if you're battery powering it.

      1 Reply Last reply
      0
      • KytrixK Offline
        KytrixK Offline
        Kytrix
        wrote on last edited by
        #3

        Yes I know that for sleep mode,
        I also choose the relay sample to test purpose, I will not put a relay !
        Instead of switching a relay on or off, I want to send an IR code.

        Because I'm running on batterys, I do not want my node to always call gw.process() ! It will drain the battery quite full !

        That's why I was trying to do :

        void loop(){
        gw.process();
        gw.sleep(10000); //10s sleep
        }

        and what I was expecting :
        if a message was send from my controlelr (jeedom) during the sleep time,
        the gw.process() will retrive this missing message ... but it doesn't.

        How to do such function ? (save battery and receive message, even asynchronously)

        Thanks.
        Kytrix.

        1 Reply Last reply
        0
        • hekH Offline
          hekH Offline
          hek
          Admin
          wrote on last edited by
          #4

          The MySensors.sleep also sleep radio. So it won't pick up any transmits during this period.

          Actuators (like this is) must be awake all the time to receive messages/commands.

          1 Reply Last reply
          0
          • korttomaK Offline
            korttomaK Offline
            korttoma
            Hero Member
            wrote on last edited by korttoma
            #5

            One way of making a sleeping sensor that can receive messages is to make is so that the sensor initialize the sending of the control command.

            In other words the sensor wakes up sends a message to the controller that I'm available now so if you have something send it otherwise I will go back to sleep.

            Like hek indicated I'm sure it would be allot easier to make the sensor to be always on and I'm not sure how to do this but I thought it would be worth mentioning.

            • Tomas
            1 Reply Last reply
            0
            • KytrixK Offline
              KytrixK Offline
              Kytrix
              wrote on last edited by
              #6

              Ok, I was thinking that I could ask the state of the message S_LIGHT at every wake up,
              and if it changes, do my IR sending ...
              But it seems to not work.
              I guess for this, the problem is on the controller side, after send the command, without acknowledge , it give up and let the state of the button unchanged.

              Always on means power supply, This sensor must also get temperature, so I don't want to put it anywhere ...

              anyway thanks for you help :)

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


              8

              Online

              11.7k

              Users

              11.2k

              Topics

              113.0k

              Posts


              Copyright 2019 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