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!
  • 0 Votes
    1 Posts
    291 Views
    No one has replied
  • sendTxPowerLevel and sendSignalStrength

    7
    1 Votes
    7 Posts
    846 Views
    scalzS
    @berkseo yes, until now it has been implemented for rfm radios only, as nrf24 doesn't provide true rssi value. As usual, features appears along interests. So if you want it for nrf5, maybe post/PR your snippet on github ;) On my side no time for testing this, my mysensors HA isn't 2.4ghz based as I need longer range, and keep 2.4ghz bandwidth in case for others protocol (wifi, ble, zigbee) for limiting issues.
  • Relay - pulse, status update Vera

    4
    0 Votes
    4 Posts
    814 Views
    HomerH
    What I do is use the relays as normal, so it goes on or off, and for control so it's like a pulse, I create a scene where when the switch is turned on, the scene turns it off a couple seconds later automatically. I have a couple relays connected to the panel in my garage. The relay only has to be on briefly so in my case the scene does the work for me and turns it off. I also have a sensor attached to the side of my garage doors which tell me if the door is open it closed, which is how I know what state the door is. I guess I could have played around with the sketch so the relay does all the work but I still wouldn't have a reliable status update as the relay still isn't going to know for sure if the door is open or closed, so I'd still need the secondary sensors on the side of the doors. Not sure if any of this helps, but thought I'd share it anyways!
  • Sending custom value to move DC motor a specific # of degrees

    7
    0 Votes
    7 Posts
    666 Views
    N
    @nagelc said in Sending custom value to move DC motor a specific # of degrees: Yes. This looks good. Dropped it in the parser here: https://www.mysensors.org/build/parser Looks like V_VAR1 is being sent with value 55. I think the code I posted above should get it from the incoming message and assign to target. If not, then I am not sure what is the problem. Perhaps someone that has worked more with V_VAR can respond? Actually I finally got it to work! and yes indeed, it was using your code!!! :) I don't know what I was doing before, but I tried your code previously but didn't work, and the only way to read the value was using : target = message.getString(); for some reason.. But I changed quite a few things in the code, and now when I tried your code again, it actually worked! Dude thank you, you are a hero! I will post the final version once I polish up the code in case anyone else needs to do a similar thing!
  • Can we increase the number of nodes from 254 to 1024 or more?

    7
    0 Votes
    7 Posts
    630 Views
    K
    Do not forgot, that some radios ( RFM69 ) allow only 255 address in one network. No way connect more nodes to all receiving all messages ...
  • What is the good wait() time ?

    wait wait push-button
    15
    0 Votes
    15 Posts
    1k Views
    alowhumA
    @scalz Interesting. But in reality I do see that adding a delay results in fewer NACK issues. What could that be? I also always place my radios in the Nano Wireless Board, which solves pretty much all the issues with power and wiring I had before.
  • RF24:RBR:REG=23,VAL=17

    2
    1
    0 Votes
    2 Posts
    1k Views
    alowhumA
    @nelsonov said in RF24:RBR:REG=23,VAL=17: RF24:RBR:REG=23,VAL=17 I have a similar issue with a node that doesn't really have any wires to check on. https://forum.mysensors.org/topic/10327/rf-nano-nano-nrf24-for-just-3-50-on-aliexpress/29
  • Transport based on single wire PJON protocol

    19
    1 Votes
    19 Posts
    6k Views
    G
    Hi Giovanni, did I understood good, that PJON will be included in next release of MySensors? :)
  • Why watchdog not working with MySensors?

    6
    0 Votes
    6 Posts
    866 Views
    mfalkviddM
    @dmytro-zadvornov thanks for reporting back. Sorry for my mistake. I thought most platforms called yield() inside delay(), and yield() usually resets the watchdog. Example https://github.com/arduino/ArduinoCore-avr/blob/b7c607663fecc232e598f2c0acf419ceb0b7078c/cores/arduino/wiring.c#L106 But since your test shows that the watchdog is tripped, the watchdog is not reset inside delay(). https://github.com/arduino/ArduinoCore-avr/blob/b7c607663fecc232e598f2c0acf419ceb0b7078c/cores/arduino/Arduino.h#L38 shows that avr does not reset watchdog in yield().
  • Ideal Sensor read interval

    10
    0 Votes
    10 Posts
    1k Views
    dzjrD
    Hi @bgunnarb Thank you for the reply, I use a directly fed (RS485) sensor (network), partly because I use a 24VDC power supply for the heater on the rain sensor (the rain evaporates faster) So I don't need to increase the interval to save batteries, but I will definitely take your tip about the smooth curves with you. I want to create a script in the controller for the LUX value for controlling the garden lighting, for example turning on the light at a lux value <300, and turning it off again at a lux value> 500 or something like that. in the sketch I have now made a separate time interval for each sensor, which is actually because I am still searching for the ideal values of the rain sensor.
  • WakeOnLan over nrf24 radio

    2
    0 Votes
    2 Posts
    467 Views
    K
    @tommas And what about setting it in BIOS of your PC? It is normal function for PC.
  • Interrupted sleep

    11
    0 Votes
    11 Posts
    2k Views
    YveauxY
    @รอเร-อ @mfalkvidd @berkseo Resurrecting this old thread; I experimented in this PR https://github.com/mysensors/MySensors/pull/1286 by adding a function to MySensors that will allow requesting the time remaining when returning from sleep. Ofcourse this is 0 when returning on timeout, but will be the (approximate) remaining time in ms when wake up was caused by an interrupt. It should be possible to use it like this: #define SLEEP_TIME_MS (60*1000ul) void loop() { // Variable that keeps track of time remaining in one cycle static uint32_t sleepTimeMs = SLEEP_TIME_MS ; // Sleep for the remaining time in the cycle, or when interrupted uint8_t result = sleep(digitalPinToInterrupt(PIN), RISING, sleepTimeMs); // Request how much of the time in the cycle is remaining sleepTimeMs = getSleepRemaining(); if (sleepTimeMs == 0ul) { // Do something smart when SLEEP_TIME_MS has elapsed // ... // Restart the cycle sleepTimeMs = SLEEP_TIME_MS; } } A working example sketch can be found here: https://github.com/mysensors/MySensorsArduinoExamples/blob/master/examples/MotionSensorBatteryReport/MotionSensorBatteryReport.ino
  • MYSbootloader not rebooting, help

    6
    0 Votes
    6 Posts
    615 Views
    mythbaiM
    @mfalkvidd You're absolutely right! smartsleep() still won't make it reboot though. But I finally made it working. The "OTA wireless programming" tutorial and default sample firmware "Blink" doesn't allow the node to be rebootable. I added MySensors.h into the Blink sketch and defined basic configuration made the node rebootable. Loaded up some other basic MySensor sample node also works as long as I'm not using sleep(). I originally thought the MYSBootloader will not be impacted by the firmware itself. I guess I'm wrong. It seems reboot function is post bootup and will rely on the loaded firmware to intepret the I_REBOOT command which is in the Mysensors library. I'm very new to the arduino programming and Mysensors, so please pardon my ignorance. Anyway, I'm very happy this forum gave me some momentum to move forward!
  • Node with two transport layers: RS485 & Bluetooth?

    4
    0 Votes
    4 Posts
    549 Views
    mfalkviddM
    I have not used ESP32 with MySensors myself, but @freynder has shared https://github.com/freynder/ESP32-MySensors-Gateway which might be a good resource. ESP32 is not very suitable for battery powered nodes, but except that it should work the same way as most other Arduino-compatible boards so most of the normal examples should work. The interface between a node and a gateway is the present and send functions. At https://www.mysensors.org/build you'll find multiple examples with wiring instructions and example code. If you haven't already, start with the getting started guide which will explain how MySensors works.
  • Send secured command to the gateway

    15
    0 Votes
    15 Posts
    1k Views
    alowhumA
    @anticimex said in Send secured command to the gateway: Another hack you could make which is less "hard core" is to adjust the behavior of the weak security flag to never allow "nerfing" security settings for a node. That is, even with the weak flag set, a gw will never allow a node to stop requiring signed messages. @Anticimex That sounds like a good idea for a new official feature to me? Especially if it's just one line that needs to be commented out?
  • relay motion domoticz help

    5
    0 Votes
    5 Posts
    3k Views
    EmeE
    @floris can you post the final sketch you used? I am having the same issue.
  • Mysensors RF command send node

    3
    0 Votes
    3 Posts
    710 Views
    B
    Thank you skywatch for your answer. I am talking about RF 433MHz and i have succesfully decode and resend RF commands by connecting RF transmitter and receiver on arduino like this project here: http://www.libremechanics.com/?q=node/31 How can i combine these sketches to make a mysensor node which will be able to read and send the RF commands?
  • how can i find out the Check code in XY1F remote control?

    3
    0 Votes
    3 Posts
    547 Views
    dbemowskD
    I did some googling and I didn't find anything on the XY1F specifically, but I found information on other Gree remotes. They appear to be an air conditioner manufacturer. Here is a link to a different Gree AC remote: https://www.amazon.com/Replacement-Conditioner-Remote-Control-YB1F2F/dp/B075N92FM4
  • What do "error-blinks" say?

    1
    1 Votes
    1 Posts
    361 Views
    No one has replied
  • 2 Votes
    24 Posts
    8k Views
    B
    @HenryWhite thank you for the excellent sketch. It works like a charm in my HA configuration!

8

Online

11.7k

Users

11.2k

Topics

113.0k

Posts