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
U

user2684

@user2684
Contest Winner
About
Posts
418
Topics
27
Shares
0
Groups
1
Followers
4
Following
0

Posts

Recent Best Controversial

  • Battery-powered irrigation controller
    U user2684

    Hi @ciaocibai, no big changes to the code, maybe just MY_SMART_SLEEP_WAIT_DURATION_MS set to 1000 to ensure the valve is not impacting receiving/transmitting when triggering. All the rest is the same, just using the latest version of NodeManager. Ah, I also added a push button for turning irrigation on/off directly from the device.
    Difficult to say regarding battery usage: since I've placed it far away I had to do some changes in the radio management piece which is draining battery considerably. With this setup 3 AA batteries last for around 2 months which is nothing but I believe this is mainly due to the radio settings.
    Just for reference this is the latest version of the code:

    
    
    /**********************************
     * MySensors node configuration
     */
    
    // General settings
    #define SKETCH_NAME "Irrigation"
    #define SKETCH_VERSION "3.2"
    //#define MY_DEBUG
    #define MY_NODE_ID 6
    
    // RFM69 radio settings
    #define MY_RADIO_RFM69
    #define MY_IS_RFM69HW
    #define MY_RFM69_NEW_DRIVER
    #define MY_RFM69_ATC_MODE_DISABLED
    #define MY_RFM69_TX_POWER_DBM (10)
    #define MY_RFM69_MAX_POWER_LEVEL_DBM (10)
    
    // Advanced settings
    #define MY_BAUD_RATE 9600
    #define MY_SMART_SLEEP_WAIT_DURATION_MS 1000
    #define MY_SPLASH_SCREEN_DISABLED
    #define MY_SIGNAL_REPORT_ENABLED
    
    /***********************************
     * NodeManager configuration
     */
    
    #define NODEMANAGER_DEBUG ON
    #define NODEMANAGER_INTERRUPTS ON
    #define NODEMANAGER_SLEEP ON
    #define NODEMANAGER_RECEIVE ON
    #define NODEMANAGER_DEBUG_VERBOSE OFF
    #define NODEMANAGER_POWER_MANAGER OFF
    #define NODEMANAGER_CONDITIONAL_REPORT OFF
    #define NODEMANAGER_EEPROM OFF
    #define NODEMANAGER_TIME OFF
    #define NODEMANAGER_RTC OFF
    #define NODEMANAGER_SD OFF
    #define NODEMANAGER_HOOKING ON
    #define NODEMANAGER_OTA_CONFIGURATION OFF
    #define NODEMANAGER_SERIAL_INPUT OFF
    
    // import NodeManager library (a nodeManager object will be then made available)
    #include <MySensors_NodeManager.h>
    
    /***********************************
     * Add your sensors
     */
    
    //PowerManager power(5,6);
     
    #include <sensors/SensorBattery.h>
    SensorBattery battery;
    
    #include <sensors/SensorSignal.h>
    SensorSignal signal;
    
    #include <sensors/SensorInterrupt.h>
    SensorInterrupt button(3);
    
    #include <sensors/SensorLatchingRelay2Pins.h>
    SensorLatchingRelay2Pins valve(5,6);
    
    /***********************************
     * Main Sketch
     */
    
    void toggleValve(Sensor* sensor) {
      valve.toggleStatus();
    }
    
    // before
    void before() {
    	
      /***********************************
       * Configure your sensors
       */
    
      // battery sensor
      battery.setMinVoltage(3.2);
      battery.setMaxVoltage(4.6);
      battery.setBatteryInternalVcc(false);
      battery.setBatteryPin(A0);
      battery.setBatteryVoltsPerBit(0.00459433);
      battery.setReportIntervalMinutes(30);
    
      //signal sensor
      signal.setReportIntervalMinutes(30);
    
      // button
      button.setInterruptHook(&toggleValve);
      button.setInterruptMode(FALLING);
      button.setInvertValueToReport(true);
      nodeManager.setInterruptDebounce(1000);
    
      // valve
      valve.setSafeguard(120);
      valve.setWaitAfterSet(2000);
      valve.setLegacyMode(true);
      valve.children.get(1)->setChildId(4);
    
      // node configuration
      nodeManager.setSleepBetweenSendSleepOrWait(true);
      nodeManager.setSleepSeconds(60*5);
       
      // call NodeManager before routine
      nodeManager.before();
    }
    
    // presentation
    void presentation() {
      // call NodeManager presentation routine
      nodeManager.presentation();
    }
    
    // setup
    void setup() {
      // call NodeManager setup routine
      nodeManager.setup();
    }
    
    // loop
    void loop() {
      // call NodeManager loop routine
      nodeManager.loop();
    }
    
    #if NODEMANAGER_RECEIVE == ON
    // receive
    void receive(const MyMessage &message) {
      // call NodeManager receive routine
      nodeManager.receive(message);
    }
    #endif
    
    #if NODEMANAGER_TIME == ON
    // receiveTime
    void receiveTime(unsigned long ts) {
      // call NodeManager receiveTime routine
      nodeManager.receiveTime(ts);
    }
    #endif
    
    My Project

  • Battery-powered irrigation controller
    U user2684

    @Andreas-Menzel I personally tend to replace the batteries early enough. I also have at the controller level a couple of safety checks with are ensuring 1) the "close" message is acknowledged by the sensor and if not resend it again 2) a humidity sensor in the ground checking if it is still irrigating after e.g. 2-3 hours the valve is supposed to be closed.
    I've noticed if the battery is almost over and unable to close the valve once, it will likely succeed when retrying. Then of course batteries have to be changed.
    Over the years I've refined this old project over and over mainly making the capacitor bigger since the valve would otherwise drain so much current to dramatically shorten the battery's life. But this is still border line for the capability of a battery powered sensor I believe.

    My Project

  • 💬 eGeoffrey
    U user2684

    @3more Looks like you email address was not marked as verified, I unblock it manually so you should be good to go now. Keep on eye on the spam folder in case something came or will go in there. Thanks!

    OpenHardware.io

  • 💬 eGeoffrey
    U user2684

    @3more thanks for letting me know, let me double check it and I'll let you know

    OpenHardware.io

  • Nrf5x on NodeManager
    U user2684

    @Francisco_Elias if understood correctly you are experiencing troubles in making a door sensor working attached to a pin different than 3 right? If this is the case, it is an expected behaviour, since interrupt pins on arduino pro mini are 2 and 3, those are the only two in which NodeManager configure the interrupts, even if there are boards supporting more interrupt pins. Let me know if this is a too strict limitation or feel free to open an issue directly on Github (https://github.com/mysensors/NodeManager/issues).
    Thanks!

    NodeManager

  • Nrf5x on NodeManager
    U user2684

    @Francisco_Elias said in Nrf5x on NodeManager:

    The only thing I'm still trying to make it working is the Door sensor. Using Nodemanger is not working for me.

    In case you want to give a try to the development version of NodeManager (https://github.com/mysensors/NodeManager/tree/development) there have been a few enhancements to support this board. Thanks

    NodeManager

  • Compilation error
    U user2684

    Hi, yes a few things have changed in the latest versions of the MySensors library and the current version of NodeManager is not compiling correctly. Give a try to the development version (https://github.com/mysensors/NodeManager/tree/development) in which the fix has been applied and let me know. Thanks!

    NodeManager

  • Nodemanage + EasyPCB Sleep
    U user2684

    @MatiasV Probably you would also need to wait a bit before reading after powering on the sensor. You can try adding a delay (in millis) as third argument to setPowerPins() of PowerManager so before the reading would take place, the Power Manager will wait a bit after power on and before giving control back to the sensor.

    NodeManager

  • Nodemanage + EasyPCB Sleep
    U user2684

    @ElCheekytico my bad sorry I was referring to a PNP2222a or similar and for some reason I wrote down MCP1702. Yes, this is the approach I'm using as well, just pass the vcc pin which is activating the transistor hence powering on the sensor. You should use also some resistors, for sure to drive the base, potentially on the collector/emitter depending on the transistor you are using

    NodeManager

  • Nodemanage + EasyPCB Sleep
    U user2684

    @ElCheekytico from the NodeManager's side, yes preferred option is to use PowerManager and connect vcc and gnd pins of the sensors to the configured two pins so that NodeManager can turn them on and off all sensors in between sleeping cycles. For these situations I usually solder a MCP1702 or similar on the prototyping area of the EasyPCB and connect sensors from there so to keep it small and self-contained.

    NodeManager

  • Modular sketch to be configured with JSON (idea)
    U user2684

    @monte, I've implemented in PR https://github.com/mysensors/NodeManager/pull/517 something going in the direction you pointed out. Before explaining just a simple assumption first: NodeManager is intended to run on a number of different boards, most of them with limited memory so this capability has to take this constraint into consideration (hence no json parsing, reuse of existing communication mechanism, capability disabled by default, etc.)

    Apart from this, I found a sort of compromise to enable/disable sensors, even remotely and optionally persisting the status across a reboot. All the implementation details are within the PR (down below, the PR also include other enhancements) feel free to provide comments here or on Github. Hope it could be useful to avoid reimplementing the entire logic from scratch

    Development json nrf52 fota

  • Compatibility issue between MySensors 2.3.2 and NodeManager 1.8
    U user2684

    For those using NodeManager just keep in mind there is a compatibility issue between MySensors 2.3.2 and NodeManager 1.8 which causes the compiler to thrown an error. This has been fixed in the development branch of NodeManager (https://github.com/mysensors/NodeManager/tree/development).

    If you will face this problem, either use MySensors v2.3.1 or switch to the development version of NodeManager.

    By the way, development of the new release is going fast and I hope should be finalized in the next couple of months.
    Thanks

    NodeManager

  • NodeManager: plugin for a rapid development of battery-powered sensors
    U user2684

    @justfra realizing only now the issue you reported was not ESP32 related but due to a compatibility issues between MySensors v2.3.2 and NodeManager just fixed in the development version with https://github.com/mysensors/NodeManager/pull/508. Either try the latest development version of NodeManager or use MySensors v2.3.1. Thanks

    NodeManager

  • Nrf5x on NodeManager
    U user2684

    @Puneit-Thukral I run some tests a while ago and had no issues but never had the chance to have something running seriously and continuously to really troubleshoot NodeManager's behaviour with this board. If anybody is willing to volunteer and run some in depth testing, of course let me know here or privately. Thanks!

    NodeManager

  • Modular sketch to be configured with JSON (idea)
    U user2684

    @monte said in Modular sketch to be configured with JSON (idea):

    Imagine you have base firmwares for most sensor types, or it can be generated with NodeManager.

    I don't see specific technical limitations to have this working. On the NodeManager side would be:

    • Include in the sketch all the sensors you want, which is already there
    • Have a logic to configure sensors remotely, which is mostly there through SensorConfiguration (https://github.com/mysensors/NodeManager/blob/master/sensors/SensorConfiguration.h). If then the configuration is through individual messages or json, it makes little difference. There might be some configuration settings missing since not all are available OTA
    • Implement a logic for configuring only specific sensors. Shouldn't be that difficult, probably best is to have a enable/disable switch for each sensor (https://github.com/mysensors/NodeManager/issues/500), having all the sensors disabled by default and then dynamically enabling them

    Bottomline not something to put in place in a few minutes but all the building blocks are there. I do not have at this time spare cycle to spend unfortunately but feel free to start looking at it if you like.

    Development json nrf52 fota

  • Modular sketch to be configured with JSON (idea)
    U user2684

    @monte first of all I like the idea of having a multi-purpose sensor which can embody different "personalities" on the fly. NodeManager came in exactly for the purpose of providing a simple to configure, modular firmware with a set of predefined sensor ready to use.

    BUT this is defined at compilation time not at runtime as you are suggesting. Reason is simple: since there are 60+ ready-to-use sensors in NodeManager, accommodating everything especially in a small arduino is not feasible, also considering the dependencies some sensors bring in. I see usually up to 3-4 sensors can fit the flash, no more. But I expect in different environments the situation could be different or at least for a subset of those.

    All of this to say I believe NodeManager is a good starting point for what you are intended to do since you already have modular code for a good number of sensors, hooks for the different phases of the lifecycle and a way for communicating with the node through a "service" channel if you need to send something and act upon it. So feel free to fork the project (preferred way) or start from there.
    All of NodeManager's details can be found on https://github.com/mysensors/NodeManager
    Thanks

    Development json nrf52 fota

  • NodeManager sensors with multiple interrupt pins
    U user2684

    @j54n1n at this time NodeManager can only handle interrupts through the designated pins and only one type of interrupt per pin. But feel free to submit a feature request on https://github.com/mysensors/NodeManager/issues and, if you have, any piece of code which may help in the implementation. Thanks

    NodeManager

  • 💬 eGeoffrey
    U user2684

    For anyone interested in it, I've recently published an eGeoffrey app for Android. It is available on Google Play, just search for eGeoffrey and you find it. Of course you would need the so called egeoffrey-gateway accessible to have the app connecting to it and working correctly

    OpenHardware.io

  • Sonoff gateway: sketch uploads fine but doesn't run
    U user2684

    @kimot thanks you've definitely given to me the right direction to look into.

    Looks like my chip info is different and is the following:

    esptool.py v2.6
    Serial port COM7
    Connecting....
    Detecting chip type... ESP8266
    Chip is ESP8266EX
    Features: WiFi
    MAC: ec:fa:bc:86:da:e2
    Uploading stub...
    Running stub...
    Stub running...
    Manufacturer: 5e
    Device: 4014
    Detected flash size: 1MB
    Hard resetting via RTS pin...
    

    I see that manufacturer 5e is given problems to many people so I've followed the advice I found here https://forum.micropython.org/viewtopic.php?t=3777 to actually solve the issue, specifically flashing with the -fm dout flag (e.g. esptool.py --port COM5 write_flash -fs 1MB -fm dout 0x0 file.bin) and now it works!

    Many thanks!

    Troubleshooting

  • Sonoff gateway: sketch uploads fine but doesn't run
    U user2684

    Pretty weird behaviour here. I have two sonoff bought a couple of years ago acting as mqtt gateways with this sketch https://www.mysensors.org/build/sonoff running perfectly fine.

    I've recently bought another couple and despite uploading the same sketch it just does not work (the two of them). Sketch and wiring is the same of those working, arduino IDE's settings the same, the output when flashing is the same without errors, the PCB layout is identical (the new model has just 3 screws for the case instead of one but doesn't matter).

    After flashing just nothing happens (no serial output, no relay switching when pressing the button, no connection to the mqtt broker). I'd say it is a broken unit but doesn't make sense having two out of two broken and still able to be flashed (I'd have received a timeout error if the chip was completely broken). Tried flashing already multiple times without luck.

    Anybody seen a similar behaviour? Any special protection added to the ESP8266 chip in recent models I need to take rid of?

    Thanks!

    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