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!
  • Radio in standby but not the processor ?

    9
    0 Votes
    9 Posts
    1k Views
    D
    Hello, Thank you very much for your explanation. The solution is to call the functions : transportDisable() to put the radio in sleep mode transportReInitialise() to wake up the radio I made the following test : void loop() { delay(90); transportDisable(); delay(60); transportReInitialise(); sleep(30); } and verified the power consumption with an oscilloscope. I save 16mA, that is coherent with the rfm69 datasheet. [image: 1541715935851-img_20181108_232445-resized.jpg]
  • How to add another relay

    hello 1.0 for int sensor1 sorry for the question
    4
    0 Votes
    4 Posts
    834 Views
    A
    Thank you very much.
  • BH1750 library issue with using sleep

    6
    0 Votes
    6 Posts
    825 Views
    RayneR
    @mfalkvidd Thanks for the advice and I went and downloaded the Mysensors 2.3.1 beta with @tekka 's latest patch. However I will have to report back later how that went after updating the gateway and nodes with the new version. I'm suffering from a human bug right for the past couple of days. Gotta get over this. I have a good feeling this will resolve any issues with sleeping the radios. Thanks again to @mfalkvidd and @tekka for this should anyone find themselves in this particular situation.
  • Virtual switches that never go off and controllers

    5
    0 Votes
    5 Posts
    789 Views
    mfalkviddM
    @superkris there are probably other ways, but I would use millis.
  • Serial Data Sensor is there an example sketch? I need help!

    4
    0 Votes
    4 Posts
    1k Views
    mfalkviddM
    @fosi Nice work. Each message needs to have a different child id. Do something similar to this: MyMessage msgBmeIAQ(CHILD_ID_AQ, V_VAR1); MyMessage msgBmeGas(CHILD_ID_GAS, V_VAR2); MyMessage msgBmeIAQA(CHILD_ID_AQA, V_VAR3); and define them as different numbers.
  • Multi Button Relay Sketch

    69
    0 Votes
    69 Posts
    25k Views
    T
    @korttoma Hello Sir, many thanks for such an elegant piece of code for controlling multiple relays. I would greatly appreciate if you provide me some tips or updated code on using your code for a "Bi stable" Button setup, i.e. using conventional home switches (ON or OFF states) for controlling relays. Thanks T
  • OTALog() issue/questions

    4
    0 Votes
    4 Posts
    851 Views
    O
    I was unable to insert a wait() call anywhere where it would work reliably. I am going to abandon this path and create a log node that simply exists to receive "normal" messages and post them to an MQTT topic so a client on my ethernet network can listen and log them to a file/syslog/etc.
  • LAN connected MQTT nodes

    8
    0 Votes
    8 Posts
    1k Views
    8
    @carywin Yes I know. I had my own "firmware" for few years but I want to use something mainstream that will be easier to maintain (by someone else :) ).
  • ESP8266 to act as a gateway between two PCs to transfer the data

    2
    0 Votes
    2 Posts
    800 Views
    mfalkviddM
    Hi @kishor, welcome to the forum! These threads might be of interest: https://forum.mysensors.org/post/92175 https://forum.mysensors.org/post/93564 https://forum.mysensors.org/post/93113 https://forum.mysensors.org/post/90990 https://forum.mysensors.org/post/92610
  • How to stop execution of code if message is received during wait()...?

    2
    0 Votes
    2 Posts
    547 Views
    mfalkviddM
    @arrawx set a global variable in receive(). In loop, look at the variable and call SetCurrentState2Hardware(). In SetCurrentState2Hardware, after each wait(), check the variable and call return immediately if the value is different from the expected value. Calling wait() from inside receive will cause the current message being overwritten when the next message arrives.
  • Debug messages over Wi-Fi

    7
    4 Votes
    7 Posts
    2k Views
    electrikE
    Hello I've tried to use this with an ESP32 (I modified some defines for the architecture, to make it compatible). In MyHwESP32.h I've changed #define MY_SERIALDEVICE Serial to #ifndef MY_SERIALDEVICE #define MY_SERIALDEVICE Serial #endif I think this why it doesn't work for you @ricorico94 with version 2.3 of MySensors. It worked sometimes, but usually Putty responds "Network error: Connection refused" Any ideas?
  • Longer text in V_TEXT, any workarounds?

    5
    0 Votes
    5 Posts
    1k Views
    D
    If anyone is trying the same, I did it as @mfalkvidd recommended, with several child IDs Then I basically reset the message if data comes on on first childId, and only append it if data comes on any other sensor, something like if (message.sensor == messageCHILD1){ strcpy(newMessage, " "); // we put some spaces in front strcat(newMessage, message.getString()); }else{ if(curMessage!=""){ // append existing message to newMessage strcpy(newMessage, curMessage); } //append rest strcat(newMessage, message.getString()); } Note: the code also works with just two sensors, first for reset, and second that only appends data, but I decided to go with four child IDs, in case there is something I am not seeing at the moment. Thanks everyone for ideas
  • BMP/E atmospheric pressure

    3
    0 Votes
    3 Posts
    1k Views
    YveauxY
    @mfalkvidd it was changed from bmp058 (which is end of life I think) directly to bme280, so it went from pressure only to environmental (including humidity). I personally have good experience with bme280, but is roughly double the price of the bmp180. I have to look if libraries support both bmp180 and bme280; if so we could combine support for both sensors on this page/sketch.
  • This topic is deleted!

    1
    1
    0 Votes
    1 Posts
    6 Views
    No one has replied
  • Water Flow Sensor with SonOff

    3
    0 Votes
    3 Posts
    929 Views
    bjacobseB
    Did you try the below forum? http://support.iteadstudio.com/support/discussions
  • Strenght measurements during exercises

    3
    0 Votes
    3 Posts
    606 Views
    nagelcN
    Look up isokinetic physical therapy machines. They use stain gauges or load cells depending on the foce you want to measure. Expensive, but if you are studying strength of a joint through a range of motion, it might be what you want. Might be able to use one at a PT or university sports dept.
  • Feasibility / Brainstorm for idea of Mobile outdoor Mysensors Network

    4
    1 Votes
    4 Posts
    1k Views
    breimannB
    @thucar thankyou for your thoughts on this idea... I'll need to do some further research on many of your suggestions. Thanks again.
  • Irrigation Controller ... how to achieve controll from smartphone?

    7
    0 Votes
    7 Posts
    1k Views
    G
    @adiculiniute Of course commercial controllers from Rain Bird, Orbit, and others are only $90-150 that will do exactly what you are asking about. A dedicated device will always have fewer points of failure. You can build this as others are suggesting but it will take an investment of time and money, not the easiest solution. I love building projects but usually stick to those that have functional benefits I can’t get with inexpensive commercial products. Your priorities may be different of course. Tim
  • Info: gateway, node and repeater

    5
    1
    1 Votes
    5 Posts
    956 Views
    mfalkviddM
    @nicolas-philippart yes, rs485 is also supported. https://www.mysensors.org/apidocs/group__RadioSettingGrpPub.html
  • Getting involved

    7
    0 Votes
    7 Posts
    998 Views
    AnticimexA
    We don't have a unit testing framework in place, and we don't have a hardware setup for a system testing setup. What we do currently is to let the buildserver attempt to build a number of sketches design to enable certain features in the library for all board types to validate that the features at least compile and don't produce warnings for the boards we support. Any sketch placed in the tests folder mentioned above will be automatically picked up and evaluated for all boards by the build server.

11

Online

11.7k

Users

11.2k

Topics

113.0k

Posts