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!
  • How to force ID of a sensor?

    3
    0 Votes
    3 Posts
    2k Views
    E
    Thank's!
  • Serial Gateway not compiling without radio support

    4
    0 Votes
    4 Posts
    1k Views
    A
    Thanks @tekka . Sorry for my delay to answer, I have been busy.
  • Arduino Code for RAW sensor value.

    2
    0 Votes
    2 Posts
    1k Views
    L
    What kind of data? If you want to send light levels the Serial Protocol support V_LIGHT_LEVEL for raw values. Otherwise... well you can send any number you want via a V_LEVEL as long as you know what to do with it on the controller side. Arduino code on how to send data is part of most examples on this page.
  • Battery status in scetch?

    7
    0 Votes
    7 Posts
    3k Views
    scalzS
    @miro i think you're confusing a node id VS a child node id, a device VS a sensor data. typo mistake. for a device you can have only one id. but you can have multiple sensors so multiple child ids in a device. Battery could be one of these sensors. You can't have the battery voltage for a temperature sensor or humidity sensor. that does not mean anything. you're not sensing battery level with the temperature ic/sensor... whereas a battery level for a device makes sense. For more infos i would advise to read the great docs https://www.mysensors.org/download/sensor_api_20 etc.
  • Using whitelisting in both direction with soft signing

    1
    0 Votes
    1 Posts
    546 Views
    No one has replied
  • Best way to store large data in eeprom

    14
    0 Votes
    14 Posts
    4k Views
    mfalkviddM
    @Tetnobic the hw* functions is a way to abstract the underlying hardware. Many MySensors fans use non-avr hardware, for example ESP8266. You can of course choose to optimize for a single platform in your own sketches, but we strive to make the MySensors example sketches available for as many platforms as possible.
  • Changing Node ID at run time

    5
    0 Votes
    5 Posts
    2k Views
    L
    I have this working now, it was a setup issue on my part... #define MY_NODE_ID myNodeId int8_t myNodeId; #define MY_NODE_ID myNodeId void before () { // read I/O pins and set myNodeId myNodeId = 32; Serial.println( myNodeId ); }
  • Help on ESP8266 recieve msg and do somthing?

    2
    0 Votes
    2 Posts
    854 Views
    mfalkviddM
    @leeoz the problem is caused by a bug in MySensors 2.0. The receive function is not called. That had been fixed in the development branch. You can download the development branch from github if you want to use it right away. More info in https://forum.mysensors.org/topic/4419/send-message-to-sensor-on-gw/
  • sleep with timer and level interrupt

    6
    0 Votes
    6 Posts
    3k Views
    eboE
    ok, that make things clear! I will give that a try. Thanks so far.
  • using interrupt - cant back to void loop

    7
    0 Votes
    7 Posts
    1k Views
    YveauxY
    @afick Sorry for my request for the full sketch -- for some reason I only saw your first post. Anyway, @mfalkvidd is right, you should not access the MySensors library (e.g. send messages) from an interrupt handler. That will certainly mess up things. What you could do is set e.g. a flag from the interrupt handler and check in the loop() function if this flag has been set. If so, send a message and clear the flag. E.g. (untested): static volatile bool pirChanged = false; static volatile bool pirTripped; void check_pir() { pirTripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH; pirChanged = true; } void loop() { // .. your old code .. if (pirChanged) { send(msg.set(pirTripped ? "1" : "0")); // Send tripped value to gw pirChanged = false; } }
  • Hello, Can you help me? LDR Sensor

    gateway ldr
    9
    0 Votes
    9 Posts
    3k Views
    blaceyB
    @Nathan-Matos Clearly you are a quick study and have made great progress in a short time. Let us know if you need anything else.
  • Best sensor type and value type for sleep duration...

    2
    0 Votes
    2 Posts
    622 Views
    YveauxY
    @Tetnobic sleep duration is in milliseconds, thus X * 60 * 1000 for your case
  • MySensors node floods 2.4GHz band

    4
    0 Votes
    4 Posts
    1k Views
    scalzS
    Even if it's simple ;), that would be easier for us with more infos.. Source of your GW firmware if you have not changed it. If changed, please post your changes. Source of your node sketch. Same as above. how it's wired with your roomba. you say it worked before, but it stops after couple minutes..?? So it doesn't work completely? Or it worked before, and what have you changed? and the logs Why not adding debug lines in your code to see where it bugs. Or use an external led if you want.
  • Invert the relay in the sketch

    18
    0 Votes
    18 Posts
    4k Views
    blaceyB
    @derksuh Sorry to hear but your sketch looks good. Are you using the MySensors development branch? If not, doing so will probably fix the behavior because there was a bug in the 2.0 release that prevented messages from being sent (i.e. the request()) in the setup() method of a sketch. Once you upgrade to the MySensors development branch, if it still doesn't behave properly, please post the messages logged by the node, with #MY_DEBUG enabled.
  • Newbie Code Question: How is motion sensor tigger controlling code flow?

    4
    0 Votes
    4 Posts
    1k Views
    blaceyB
    @Sensor you could also checkout @mfalkvidd's dimmable LED kitchen light project for autonomous dimming using a local gesture or proximity sensor.
  • Routing table saving vs EEPROM write cycle limitations

    3
    1 Votes
    3 Posts
    1k Views
    andrewA
    Oh, I see. That make sense. Thank you for the reply!
  • MySensors EEPROM save/load Position

    8
    0 Votes
    8 Posts
    2k Views
    tbowmoT
    @Yveaux And on the Sensebender Gateway (and on Sensebender Micro Mk2) the eeprom is 4Kbytes.. Perhaps we should change parameters for SaveState()
  • Gateway using ATmega32U4

    2
    0 Votes
    2 Posts
    1k Views
    karlheinz2000K
    Update: Setup still not running as a RS485 GW :worried: No debug info coming out of serial/USB. I flashed a normal NRF serial GW -> works. I did not define "MY_GATEWAY_SERIAL" -> works as a RS485 node. Any idea why just the RS485 GW feature does not work with 32U4?
  • ESp arduino + domoticz + read light switch status (on / off)

    7
    0 Votes
    7 Posts
    4k Views
    marcin.kasinskiM
    @blacey You are right. I don't use eighter NRF24 or RFM69. I have domoticz server and esp with relay connected only. All I want to do is switch on or off my relay connected to esp pin from domoticz. It works for me. I can see that domoticz sends comands to my ESP. I can see that receive function on esp side is executed every time I click on domoticz side. My only problem is "esp restart issue". I would like to ask domoticz for actual status (is it on or off) in esp setup() function to set my relay connected to esp module. Now you know my requirements. If you think my code works but I do it in not a proper way please correct me. If you know how to ask domoticz for device actual status please help me.
  • [SOLVED] Using interupt - partial

    3
    0 Votes
    3 Posts
    891 Views
    A
    hmmm ok thanks. CASE CLOSED :>

13

Online

11.7k

Users

11.2k

Topics

113.1k

Posts