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
SweebeeS

Sweebee

@Sweebee
About
Posts
94
Topics
18
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • pimatic-mysensors controller plugin
    SweebeeS Sweebee

    @rollercontainer the plug-in works fine with 2.0. You dont have to change the protocol value in the plug-in.

    pimatic controller node id nrf24l01+ mysensors rasp

  • [contest] 3D printed battery powered Wall Remote Control
    SweebeeS Sweebee

    Hi downloaded your sketch and i want to use it in the 2.0 mysensors library, but i got problems getting it work at the point of sleep:

    void WallRemote_Sleep() {
      //Custom Function that puts ATMega and NRF24L01 into sleep mode.
      //This was necessary because PinChange Interrupts have been used.
      sensor_node.RF24::powerDown();  //Power Down NRF24
      Serial.flush(); // although there should be nothing in the Serial cue, Let serial prints finish (debug, log etc)
      LowPower.powerDown(SLEEP_FOREVER, ADC_OFF, BOD_OFF); //power everything down, wake up only by (PinChange) interrupts
    }
    

    How to call rf24 power down without sensor_node in front of it?

    And i get:

    WallRemote4x.ino: In function 'void WallRemote_Sleep()':
    WallRemote4x:120: error: 'LowPower' was not declared in this scope
    WallRemote4x:120: error: 'ADC_OFF' was not declared in this scope
    WallRemote4x:120: error: 'BOD_OFF' was not declared in this scope
    'LowPower' was not declared in this scope
    

    After including LowPower:

    Users/Wiebe/Documents/Arduino/libraries/LowPower/LowPower.h:4:6: error: multiple definition of 'enum period_t'
     enum period_t
          ^
    In file included from /Users/Wiebe/Documents/Arduino/libraries/MySensors/core/MyHwATMega328.cpp:22:0,
                     from /Users/Wiebe/Documents/Arduino/libraries/MySensors/MySensor.h:69,
                     from WallRemote4x.ino:20:
    /Users/Wiebe/Documents/Arduino/libraries/MySensors/core/MyHwATMega328.h:78:6: error: previous definition here
     enum period_t
          ^
    
    Enclosures / 3D Printing hardware pcb contest 3d print

  • 42v LED dimmer
    SweebeeS Sweebee

    The example you posted uses a irlz44n. According the data sheet it can handle 55v, so that should work. To power the arduino you can look for a stepdown module.

    Hardware

  • 2.0 beta, compatible with 1.5?
    SweebeeS Sweebee

    Btw, i'm testing with a sensor on 2.0 and its logging messages from other sensors like:

    read and drop: 1-1-0 s=1,c=1,t=16,pt=2,l=2,sg=0:1
    

    With repeater enabled:

    read and forward: 5-5-0 s=1,c=1,t=16,pt=2,l=2,sg=0
    

    In mysensors 1.5 I don't get this? It only repeats if the sensor asks for it or something like that. Now every repeater repeats the signal? Like a mesh netwerk or something?

    Development

  • 2.0 beta, compatible with 1.5?
    SweebeeS Sweebee

    The sketches you have don't work. You have to modify some stuff.

    But the nodes that are already in your network and your gateway are working fine with 2.0 nodes.

    Development

  • ESP NodeMcu in bootloop
    SweebeeS Sweebee

    @gerritv I tested with some esp examples, like the http server. They work fine.
    Edit: yes 2.0 is working, thanks :)

    Development

  • ESP NodeMcu in bootloop
    SweebeeS Sweebee

    Ive tested my ESP and it works fine with sample sketches, but with the ESP gateway it keeps booting:

    ?�F�x��D�H!�ȩLR�@H��0;255;3;0;9;Starting gateway (RNNGE-, 2.0.0-beta)
    0;255;3;0;9;Radio init successful.
    scandone
    state: 0 -> 2 (b0)
    state: 2 -> 3 (0)
    state: 3 -> 5 (10)
    add 0
    aid 5
    cnt 
    
    connected with Nieuwenhuis, channel 1
    dhcp client start...
    .ip:192.168.1.41,mask:255.255.255.0,gw:192.168.1.1
    .IP: 192.168.1.41
    ����
    �@��0;255;3;0;9;Starting gateway (RNNGE-, 2.0.0-beta)
    0;255;3;0;9;Radio init successful.
    scandone
    state: 0 -> 2 (b0)
    state: 2 -> 3 (0)
    state: 3 -> 5 (10)
    add 0
    aid 5
    cnt 
    
    connected with Nieuwenhuis, channel 1
    dhcp client start...
    .ip:192.168.1.41,mask:255.255.255.0,gw:192.168.1.1
    .IP: 192.168.1.41
    H!�ȩL��@H��0;255;3;0;9;Starting gateway (RNNGE-, 2.0.0-beta)
    0;255;3;0;9;Radio init successful.
    scandone
    state: 0 -> 2 (b0)
    state: 2 -> 3 (0)
    state: 3 -> 5 (10)
    add 0
    aid 5
    cnt 
    
    connected with Nieuwenhuis, channel 1
    dhcp client start...
    .ip:192.168.1.41,mask:255.255.255.0,gw:192.168.1.1
    .IP: 192.168.1.41
    
    Development

  • Pimatic doesnt receive any signal
    SweebeeS Sweebee

    First check where your usb device is.

    Open the terminal and type:

    ls -l /dev/ttyU*
    

    You should see something like:

    crw-rw---- 1 root dialout 188, 0 Apr  6 18:36 /dev/ttyUSB0
    crw-rw---- 1 root dialout 188, 1 Apr  6 07:00 /dev/ttyUSB1
    

    In my case it is /dev/ttyUSB1 (other one is my homeduino).

    add this to the plugins:

    {
          "plugin": "mysensors",
          "driver": "serialport",
          "protocols": "1.5.1",
          "driverOptions": {
            "serialDevice": "/dev/ttyUSB1",
            "baudrate": 115200
          }
        },
    

    Then start pimatic and see if you can find the connected message:

    Connected to MySensors Gateway
    
    Troubleshooting

  • pimatic-mysensors controller plugin
    SweebeeS Sweebee

    @fahrettine How does your sketch look? Does pimatic receive anything in de log?

    pimatic controller node id nrf24l01+ mysensors rasp

  • Gateway keeps presenting old sensors to controller
    SweebeeS Sweebee

    I had a dimmer on node id 6. but I removed this one and created a pir on node id 6.

    Now when the pir starts up, the gateway presents the dimmer and the pir. Is this normal?

    I integrated auto discovery in pimatic for mysensors but this way its not very neat.

    Controllers

  • Sensor doesn't ask for nodeid
    SweebeeS Sweebee

    This one:

    https://i.imgur.com/jKQLQgZ.png

    Troubleshooting

  • Sensor doesn't ask for nodeid
    SweebeeS Sweebee

    Already got it.

    Used the normal clear eprom. and nog ClearEepromConfig. Somehow the normal one doesn't erase everything?

    Troubleshooting

  • Sensor doesn't ask for nodeid
    SweebeeS Sweebee

    My sensor doesn't ask for a id from the gateway?

    send: 0-0-0-0 s=255,c=0,t=17,pt=0,l=5,sg=0,st=ok:1.5.4
    send: 0-0-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=ok:0
    sensor started, id=0, parent=0, distance=0
    send: 0-0-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,st=ok:1.0
    send: 0-0-0-0 s=255,c=3,t=1,pt=0,l=0,sg=0,st=ok:
    

    I cleared the eprom and have set gw.begin();

    Troubleshooting

  • New nrf24l01+ smd
    SweebeeS Sweebee

    @Maciej-Kulawik removed the pull-up and they are all working fine :) Don't know why i have added it, in one of my oldest sketches i havent enabled it.

    Hardware

  • New nrf24l01+ smd
    SweebeeS Sweebee

    @Maciej-Kulawik in my calculations it is 6uA. The pirs use around 15-20 uA in sleep.

    Hardware

  • New nrf24l01+ smd
    SweebeeS Sweebee

    I removed the left capacitor since it's not needed in 3.3v hack. And I moved the right one because otherwise it didn't fit into the case.

    My sketch:

    #include <MySensor.h>
    #include <SPI.h>
    #include <readVcc.h>
    
    // ********** CONFIG **********************************
    
        #define NODE_ID AUTO          // ID of node
        #define CHILD_ID 1            // ID of sensor
        #define PIR_PIN 3             // Pin connected to the PIR
        
        #define MIN_V 2000            // empty voltage (0%)
        #define MAX_V 3200            // full voltage (100%)
    
    // ****************************************************
    
    MyMessage msg(CHILD_ID, V_TRIPPED);
    MySensor node;
    
    int oldBatteryPcnt;
    int sentValue;
    int forceSend = 0;
    
    void setup()
    {
      node.begin(NULL, NODE_ID, false);
      node.sendSketchInfo("PIR Sensor", "1.2");
      node.present(CHILD_ID, S_MOTION);
      pinMode(PIR_PIN, INPUT);
      digitalWrite(PIR_PIN, HIGH);
    }
    
    void loop()
    {
      
      // Get PIR
      int value = digitalRead(PIR_PIN); // Get value of PIR
      if (value != sentValue) { // If status of PIR has changed
        resend(msg.set(value), 5); // Send PIR status to gateway
        sentValue = value;
      }
    
      // Send batterylevel
      sendBattery(); 
    
      // Sleep until something happens with the sensor
      node.sleep(PIR_PIN-2, CHANGE); 
    }
    
    // FUNCTIONS
    
    void sendBattery() // Send battery percentage to GW
    {
      forceSend++;
      int batteryPcnt = min(map(readVcc(), MIN_V, MAX_V, 0, 100), 100); // Get VCC and convert to percentage      
      if (batteryPcnt != oldBatteryPcnt || forceSend >= 20) { // If battery percentage has changed
        node.sendBatteryLevel(batteryPcnt); // Send battery percentage to gateway
        oldBatteryPcnt = batteryPcnt; 
        forceSend = 0;
      }
    }
    
    void resend(MyMessage &msg, int repeats) // Resend messages if not received by GW
    {
      int repeat = 0;
      int repeatDelay = 0;
      boolean ack = false;
    
      while ((ack == false) and (repeat < repeats)) {
        if (node.send(msg)) {
          ack = true;
        } else {
          ack = false;
          repeatDelay += 100;
        } 
        repeat++;
        delay(repeatDelay);
      }
    }
    
    Hardware

  • New nrf24l01+ smd
    SweebeeS Sweebee

    @Yveaux the pirs work fine if you only have interrupts with CHANGE. I don't use a sleep timer. If you wake it up every minute or so its unreliable yes. but only with interrupts from the pir it works fine. I have 10 pirs like this. Oldest one is from march 2015 and still running.

    Hardware

  • New nrf24l01+ smd
    SweebeeS Sweebee

    ordered the pro mini shields and I'm not disappointed :) As small as you can get:




    Hardware

  • Start with RFM69 radio module and Arduino Pro Micro as gateway
    SweebeeS Sweebee

    I can't even get the RFM69HW working on my nano's (with shifter & regulator). On 3.3v pro mini's they worked fine. So i just use an arduino pro mini with ftdi adapter. Cheaper than the monteino's.

    My Project

  • Motion Sensor triggering on its own
    SweebeeS Sweebee

    I'm also having this issue at 3V. It gets triggered if there is a (little) voltage drop. All my pirs only wake with an interrupt and no timer, then it works fine. But with a sleep timer it won't work the normal way.

    At 5V everything works fine.

    Maybe @fifipil909 's solution works.

    Troubleshooting
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular