Skip to content

Development

Discuss Arduino programming, library tips, share example sketches and post your general programming questions.
1.5k Topics 13.5k Posts

Subcategories


  • 56 578
    56 Topics
    578 Posts
    HJ_SKH
    Hi2All! Surprising is here. After about 24hours I refresh HA and suddenly my motion sensor was integrated. There is also second entity > battery : 0 , have to look deeper into that for understanding. Need to change little in the sketch, because don't want every short time 'no movement' so only when there is motion and maybe once a hour indication sensor is alive. Meantime I found 3 other good threats: https://forum.mysensors.org/topic/11200/finally-progress-evidence-based-radio-testing-method-and-capacitors https://forum.mysensors.org/topic/1664/which-are-the-best-nrf24l01-modules/27 https://forum.mysensors.org/topic/9550/build-a-reliable-power-supply-chain Very usefull for me also finally progress because of lacking time in the past. Great jobs are done here! Thanks for this all of you guys or girls!
  • Expanding the size of an existing array?

    14
    0 Votes
    14 Posts
    582 Views
    electrikE
    I think - am not sure - because you only include mysensors.h, which is only a header file without cpp files.
  • Error ! nowhere to send

    3
    0 Votes
    3 Posts
    170 Views
    mntlvrM
    @tekka Had tried that before , so I was looking for the solution not by changing IDE but why did it fail, So I loaded Windows 10 Pro Workstation on a new drive booted from that drive and setup windows. Once windows was all configured I then installed exact same IDE and library as before and what do you know it worked just fine. Conclusion it was the OS that stopped Arduino IDE 1.8.4 not the IDE or the MySenors Library, and yes it took more time to trouble but now I know why and I don't have to guess. I have found that Windows 10 is very protective of it's self and once system becomes corrupt in the smallest of ways you can bet before long you will see in other applications things starting to "not work" like they use to when you first installed the OS. If I had the time or desire I would switch over to Linux but I am to heavily invested in Windows with my machines and software for now and have been using Windows ever since Windows 3.0 Hope this might help others that might be having similar problems for the MySensors library's to fail when they should not be failing.So check out every avenue before blaming MySensors or the IDE Thanks for reading my post Bob
  • IR Sensor only reading every other button press

    7
    0 Votes
    7 Posts
    301 Views
    skywatchS
    @kiesel You are welcome! - We are all here to learn! :) As to my code, here is the thread with the problems I had and how I fixed them.... https://forum.mysensors.org/topic/10936/vs838-ir-receiver-led-anyone-got-it-working-with-mys?_=1582743282787 I am still tinkering around the edges and I expect a final version to be about a week away. It is mostly getting it all the way I want it now! ;)
  • Battery: pro mini @ 1mhz vs booster

    30
    0 Votes
    30 Posts
    976 Views
    NeverDieN
    @kiesel said in Battery: pro mini @ 1mhz vs booster: @zboblamont How do I know whether a booster introduces noise? I think so far I have been lucky with my three nodes because they work as expected. Or I don't know what to look for... If you wanted to play it safe (aka defensive programming), you could use your booster to charge a capacitor that's large enough to provide interim power, turn off the booster prior to doing your radio communications, and then turn the booster on again when you're done with tx/rx. That would effectively remove your booster from the equation as an interference source. Also, some boosters have a pass-through, so you can use your regular battery voltage for as long as it's high enough, and then when it no longer is, enable your booster, if that's what you want to do. Here's an example of one: https://www.openhardware.io/view/285/33v-Boost-Converter-with-Pass-Through For instance, CR2032's can have quite a voltage dip after volunteering some current, so this would be one way to keep wringing a useful voltage out of such a battery after its voltage may have temporarily dropped too low. Some of the ARM MCU chips include boost converters that can boost from as little as 0.5v....
  • no matching function for call to 'present(int, mysensors_data_t)'

    2
    0 Votes
    2 Posts
    142 Views
    mfalkviddM
    @maos present wants S_SOMETHING, not V_SOMETHING.
  • Handling NACKs in the gateway

    gateway
    9
    0 Votes
    9 Posts
    405 Views
    electrikE
    Exactly. Better to ask then waste many hours 😏
  • script to convert serial to mqtt?

    9
    0 Votes
    9 Posts
    317 Views
    K
    @Gerard-van-Seventer I am using appdaemon for my automation and I wouldn't want to install node red just for the conversion. Or are there automations that node red can that appdaemon can't?
  • Small RS485 network - questions.

    4
    0 Votes
    4 Posts
    192 Views
    F
    Actually I have to disagree with @rejoe2 about: Will my network work without controller (only gateway + nodes)? With an Ethernet gateway it is entirely possible. One more thing. If you are interested in building RS485 network, maybe you should have a look at my project. Earlier today I created a post about it on this forum. Here it is :)
  • multiple buttons on one analog pin arduino

    5
    0 Votes
    5 Posts
    3k Views
    T
    Hello first of all, excuse me for my english, i'm french. I try to use the sketch with the 10 relays, but nothing works on the buttons. I tried with several resistance values using "analogread" to read the real values, but when I enter the values in the table nothing happens at the relay levels. P.S: the relays work with jeedom. can you give me the procedure to follow to properly "configure" the sketch? cordially
  • Wireless nRF24L01+ sniffer for MySensors

    omg sniffer wireshark nrf24l01+
    108
    5 Votes
    108 Posts
    74k Views
    A
    @Yveaux Thanks very much for all your help. I hooked up the IRQ pin to the Arduino pin 2 as you suggested and it’s working fine now.
  • Drawbacks to using a pro mini as a serial gateway?

    6
    0 Votes
    6 Posts
    264 Views
    electrikE
    No just the Rx, TX and power should be enough.
  • Need some help!

    2
    0 Votes
    2 Posts
    138 Views
    skywatchS
    @amasterp1322 You will need to provide much more data I'm affraid. Where in the world is 'the project'? What type of sensors have you chosen or do you need help with this too? What are you measuring the moisture of and to what level of accuracy do the measurements need to be? What kind of distance is there between the sensors, relay, power source? Does everything have to be water resistant or waterproof? Is this an indoor or outdoor project? How are the sensors going to send data? What are the sensors sending the data to? What relay is involved and how was it specified? What is the relay activating and will you be following the electrical codes for your country/area? I suspect this is a greenhouse watering system, but you haven't actually defined the project so maybe you can give it some more thought to help us help you.
  • send() after receive()

    sleep smartsleep
    7
    1 Votes
    7 Posts
    324 Views
    H
    From what I understood, the solution from @tmandel was meant to revoke sleep based on incoming message. I needed to delay sleep due to messages waiting in the outgoing queue. At the end, I just got my fork of MySensors and added additional extern callback to MySensorsCore.cpp/_sleep just after the pre-sleep wait(MY_SMART_SLEEP_WAIT_DURATION_MS). The callback is then implemented in my source, where I check whether the oubound queue is empty. If not, MY_SLEEP_NOT_POSSIBLE is returned and the queue is flushed immediately in the next loop(). It may be crude but... hey, it keeps my flowers watered. Many thanks for the advice and the direction provided!
  • Debug log date time format

    3
    0 Votes
    3 Posts
    137 Views
    M
    @electrik Thank you
  • Arduino pro mini, rfm69 with 2 Reed switches on interrupts?

    8
    0 Votes
    8 Posts
    303 Views
    S
    Just a thought. I would personally go for one child ID/sensor. "There is uncollected mail" indicator. Set it to true when small door is tripped, and set to false when big door in open.
  • 2 Arduinos talk to each other over RS485

    4
    0 Votes
    4 Posts
    203 Views
    K
    https://github.com/MajenkoLibraries/ICSC Examples are there too. ( MySensors uses this code for 485 transport layer too ) Or another very simple example: https://circuitdigest.com/microcontroller-projects/rs485-serial-communication-between-arduino-uno-and-arduino-nano
  • Which battery measurement to use?

    7
    0 Votes
    7 Posts
    683 Views
    S
    power consumption wise resistor-less method and running directly from LiFePo4(rechargeable 2.8-3.6V) or LiSoCl(3.6v non rechargeable) battery is best. Unless you remove regulator and USB/rs232 chip it's all wasting your time. @mfalkvidd said in Which battery measurement to use?: But if you get a "good" booster, the battery life will be more limited by the self-discharge of the battery than by the power usage of the node. Same goes for the non-boosted variant. Depending on battery chemistry, LiSoCl will last 15 years. with carefully designed MyS node you can get 10 years on single AA LiSoCL battery. Something like power meter pulse counter transmitting once every kWh.
  • how to post a new sensor sketch?

    5
    0 Votes
    5 Posts
    2k Views
    Michiel van der WulpM
    I gave some remarks on the code, which were processed. If there is a feeling that adding the HeatIndex complicates the example, maybe this example should be a separate file, named "DhtHeatIndexSensor"?
  • Watchdog not watchdogging?

    28
    0 Votes
    28 Posts
    4k Views
    J
    I've manualy removed the call for watchdog reset from function void doYield(void) and I can see my user watchdog timer working again... This will probably affect some deep sleep and waking processes - that I do not care about in my cases... I used RadioHead library before, which is much more library in sense of composable part and I was very happy with it's long term stability... Now I'm trying MySensors and it's quite unstable comparing to RadioHead... If it had software signing, I'd definitely use RadioHead... Let's see if enabling user WDT will fix the unstabilities...
  • MySensors on MSP430 + NRF24L01

    2
    4 Votes
    2 Posts
    821 Views
    H
    WOW, nice work

20

Online

11.8k

Users

11.2k

Topics

113.2k

Posts