Navigation

    • Register
    • Login
    • Search
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. Tinimini
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Tinimini

    @Tinimini

    2
    Reputation
    15
    Posts
    348
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Tinimini Follow

    Best posts made by Tinimini

    • RE: Sensor not sleeping properly when Gateway is down?

      Okay, that seems to explain this. I changed the sleeping time to 20 seconds and sure enough, after about 10 seconds the current draw dropped down to ~7uA. So looks like I'm good now.

      So what did I learn from this? Well... I better start reading the source code for MySensors 🙂 Either that, or write my own lib so I know what is going on 🙂

      Thanks for the help!

      posted in Development
      Tinimini
      Tinimini
    • RE: Sensor not sleeping properly when Gateway is down?

      Oh yeah... Read the docs.. Yes, I probably should do that too 🙂 Thanks!

      posted in Development
      Tinimini
      Tinimini

    Latest posts made by Tinimini

    • RE: Can ethernet gateway also publish everything to MQTT?

      @electrik Looks like the discovery does work with MQTT gateway. Thanks a bunch, I got it working now

      posted in Development
      Tinimini
      Tinimini
    • RE: Can ethernet gateway also publish everything to MQTT?

      Ah, okay I have to try this out. I just decided to not do a MQTT gateway as the controller page said that no controller supports discovery with MQTT gateways

      posted in Development
      Tinimini
      Tinimini
    • Can ethernet gateway also publish everything to MQTT?

      I have a Raspberry Pi Zero W which has an ethernet gateway running on it. I went with the ethernet gateway as it said on the MQTT gateway page that no controller supports auto discovery of nodes when using an MQTT gateway. I'm using Home Assistant as my controller and this setup seems to work just fine. But now I would also like to get all events from my nodes published on my MQTT broker as I would like to gather everything in there also so I can use node red or something like that to further react to those events.
      So the question is, is it possible to make the ethernet gateway also kinda double up as an mqtt gateway?

      I could use MQTT gateway but I would really like to have the automatic discovery of the nodes working.

      posted in Development
      Tinimini
      Tinimini
    • RE: Running MySensors on ATTiny85

      @Yveaux size, mostly. And the fact that I have them 🙂

      posted in Hardware
      Tinimini
      Tinimini
    • Running MySensors on ATTiny85

      Is anybody working on ATTiny85 support for MySensors? I found some old thread about this, but it seems that it was quite old and somewhat abandoned. Would this even be feasible anymore?

      posted in Hardware
      Tinimini
      Tinimini
    • RE: Sensor not sleeping properly when Gateway is down?

      Oh yeah... Read the docs.. Yes, I probably should do that too 🙂 Thanks!

      posted in Development
      Tinimini
      Tinimini
    • RE: Sensor not sleeping properly when Gateway is down?

      Okay, that seems to explain this. I changed the sleeping time to 20 seconds and sure enough, after about 10 seconds the current draw dropped down to ~7uA. So looks like I'm good now.

      So what did I learn from this? Well... I better start reading the source code for MySensors 🙂 Either that, or write my own lib so I know what is going on 🙂

      Thanks for the help!

      posted in Development
      Tinimini
      Tinimini
    • Sensor not sleeping properly when Gateway is down?

      I'm starting a new thread about this as previously I hijacked someone else's old thread.

      I'm currently playing around with MySensors and the first sensor I'm trying to build using it is a door sensor. It's battery powered and it's working just fine (using about 6uA while sleeping, so batteries should last a good while). But when I don't have my Gateway (a Raspberry Pi Zero W with MQTT Gateway) online, the power consumption seems to stay pretty high (3mA or so). So it seems that the sensor is not sleeping properly, but instead tries to reconnect to the Gateway all the time?

      This is my sketch:

      // Enable debug prints to serial monitor
      //#define MY_DEBUG
      
      // Set how long to wait for transport ready in milliseconds
      #define MY_TRANSPORT_WAIT_READY_MS 3000
      
      // Enable and select radio type attached
      #define MY_RADIO_NRF24
      
      // Set this nodes id. Needs to be unique between nodes (value = 1-254)
      #define MY_NODE_ID 102
      
      #include <SPI.h>
      #include <MySensors.h>
      
      #define CHILD_ID   3
      #define DOOR_PIN   3     // Arduino Digital I/O pin for button/reed switch
      #define SLEEP_TIME 3000 // Sleep time between heartbeats (seconds * 1000 ms)
      
      int oldValue = -1;
      
      MyMessage msg(CHILD_ID, V_TRIPPED);
      
      void setup() {
        pinMode(DOOR_PIN, INPUT);
      }
      
      void presentation() {
        present(CHILD_ID, S_DOOR);
      }
      
      void loop() {
        int value = digitalRead(DOOR_PIN);
      
        if (value != oldValue) {
           send(msg.set(value == HIGH ? 1 : 0));
           oldValue = value;
        }
      
        wait(10);
      
        Serial.println("Going to sleep now...");
        smartSleep(digitalPinToInterrupt(DOOR_PIN), CHANGE, SLEEP_TIME);
      }
      

      I tried enabling debug and this is what I get in the loop:

      30812 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=1,M2=1
      30818 !MCO:SLP:TNR
      Going to sleep now...
      

      And yes, I know it's not very efficient to only sleep for 3 seconds, that's there only for testing this thing out.

      posted in Development
      Tinimini
      Tinimini
    • RE: Booting sensors without Gateway connection?

      Yes, you're right. Considering how I kind of hijacked this thread anyway 🙂 I will run some more tests and start a new thread if I can't find a solution

      posted in Development
      Tinimini
      Tinimini
    • RE: Booting sensors without Gateway connection?

      Oh, that's very simple. It's there because I'm testing this and trying to make it work. It will be more like 15 minutes to half an hour in reality.
      Unfortunately still haven't been able to get this to work, and as I'm just starting with my home automation stuff, the gateway will probably be offline quite a lot while I'm developing things. And that means that the battery powered sensors are going to suck their batteries dry in no time... I probably have to add an on/off switch to the sensors or something. Just so I can turn them off when I know they can't be used.

      posted in Development
      Tinimini
      Tinimini