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!
  • RFM69 Project

    2
    0 Votes
    2 Posts
    783 Views
    scalzS
    Hi! the receiver could be the gateway, or search for node to node communication in the forum if this is what you need. And if you need hw infos related to your boards, I think the designer is Koresh, in MySensors Openhardware section https://www.openhardware.io/view/102/Wall-Switch-Insertable-Node
  • Will a NRF24L01+PA+LNA help with my signal problems

    17
    0 Votes
    17 Posts
    2k Views
    TmasterT
    Hi to @Greymarvel .Well i already seen this movie before. I bought diferent nrf24 nodes,amplifed ,not amplified,with or without capacitors. In fact i had worst redults with amp nodes. I just change to rfm69hw and w . No more low power/high power...etc. now i got my 4000m2 terrain covered (around 80m long). I didn't check max range but i never had lost a packet again. I was a very good increment on my network stability. That fake nrf24 chips are crazy and unstable and yes,all ebay cheap nodes are fake second i know.
  • NodeMCU PIN reference

    21
    0 Votes
    21 Posts
    4k Views
    AffordableTechA
    @strixx :point_right: BEFORE YOU USE analogRead() You need to be aware that the MySensors core Ver 2.2 has code to support sensors reporting the chip VCC voltage. As I recall, this code is enabled by default and all readings of the analog port will return 65,535, -1 or hex FFFF, depending on the type of variable you read the value into regardless of what voltage is applied to the analog pin. MySensors has changed the 8266 configuration to read the chip VCC and ignore the analog input and I gather the MySensors coders decided to return 65,535 as an indicator. You will need to do a search for "ESP analog read" or similar, to find the correct syntax of the special command to change the 8266 mode to re-enable reading of the analog input pin. Note: this analog mode command must be placed at the top of your script before any other functions. :point_right: DIFFERENT NodeMCU BOARDS Please be aware the analog pin 'hardware' varies with different NodeMCU devices and you need to understand how the MySensors restricts how you can use this pin. First, I have encountered three different 'NodeMcu Ver 1' boards. Traditionally the analog pin expects a range 0V to 1V max. Some docs state going over 1V can destroy the pin, others state it can tolerate 0V to 3.3V but the anagloRead() for voltages of 0V to 1V are as expected, but 1V to 3.3v returns the same value. On the earlier boards I received, the analog pin of the PCB was wired direct to the 8266 chip (in the metal can) and not connected to anything else. About a year ago, the boards I received had additional circuitry to protect the analog pin from excess voltage. More recently I have received a batch of 20 boards which returned values lower than expected? Suspecting a board problem, I traced the circuit and confirmed there is a voltage divider which scales an input of 0V to 3.3V to become 0V to 1V at the actual 8266 chip. I.e. these boards requiire a 0V to 3.3V input on the analog pin. If you code reads values about one third of what you expeted, you may have a 0V to 3.3V board. :point_right: VALUES NOT CONSISTENT As a final tip, I have noticed that no two NodeMCU's return the same value from the analog port. I.e. five 'identical' boards from the same batch will return slightly different values, unlike the Arduino devices, which I find all return accurate readings. My assumption is, this is due to the 8266 using a different analog to digital conversion method, and the errors are 'possibly' due to some capacitive effect. The differences or minimal, can can be confusing and may need special attention if you are checking for a 'specific' value. Hint: always code analogRead comparisons to look for different 'ranges' of values, rather than "if analogRead(A0) == 350", because the value you get today could be different tomorrow or next week. This is good practice because the value read will vary slightly as your project's supply voltage changes due to changes in load (e.g. several LEDs turned on vs off), or even if your battery or even mains voltage is unstable. Hope this saves someone banging their head against a brick wall for hours like I did.:face_with_head_bandage: Paul
  • Is a bootloader worth the limitations?

    6
    0 Votes
    6 Posts
    1k Views
    bjacobseB
    As I recall the "normal" bootloader have not configured the WDT (I guess it's too difficult for a newbire to understand and handle WDT) Optiboot have WDT configured and you can set it Remember to call this at for each less than 8sec, else you will get reboot via watchdog I recommend not to set the wdt time too short, as you then won't be able to upload a sketch, as the Arduino then will reset during sketch-upload (But this isn't a problem when using ISP) wdt_enable(WDTO_8S); https://github.com/Optiboot/optiboot/wiki/HowOptibootWorks
  • Battery nodes and communication failure

    2
    0 Votes
    2 Posts
    636 Views
    luizrrochaL
    Hi, it looks like this constant is used only during the first initialization of the node, when the parent_id and the node_id are being written to the node's eeprom, not during normal operation. I tested a method from another suggestion on this forum, to ask the controller for the last value sent by the node, since if you ask for data it do times out and you could then assume that the gateway was offline or some other network error occurred, but this technique did not work all the time. I have power outages here that disable the gateway and then the nodes eat up their batteries trying to resend the same message over and over and I would love to find a way to stop this from happening too.
  • PCB Design Guru Wanted

    graphics pcb eagle
    1
    1 Votes
    1 Posts
    711 Views
    No one has replied
  • Ethernet Gateway using NRF 2401+ radio and W5100 stopped working

    3
    0 Votes
    3 Posts
    688 Views
    mntlvrM
    Thanks But as you can see I have the radio working by just choosing different lines of code to use, but I can not get W5100 to send and transmit and provide Ethernet connection so I can ping address. It seems no matter what combination of lines of code I choose it will not activate the W5100 board, but it was working and now does not. I even swapped W5100 board but same thing. I know I can not load the enable pin 4 because then the TSP fails. Bob
  • ESP8266 WiFi gateway and signing

    6
    0 Votes
    6 Posts
    1k Views
    AnticimexA
    @bilbolodz Yes, then you lack the checksum and you should get a init-error from the security backend.
  • Mysensors mqtt gateway (noob question).

    2
    0 Votes
    2 Posts
    662 Views
    bgunnarbB
    @capibara Yes, you are getting there! The topic prefix is just as you say defined by the #define statement. The rest of the topic is defined as described in the API definition (Serial protocol) so: /node-id/sensorchild-id/command/ack/type/ The content of the message is the payload. Example: this is copied from my GW: ib9sensors-out/21/2/1/0/4 1014 => So the sensor id is 21/ the child is 2/ this is a "set" message/ no-ack/ payload type is V_PRESSURE. The content of the message is 1014 which is just the atmospheric pressure here today. I recommend using an MQTT client test tool like MQTT.fx It helps a lot when debugging. I am not the right guy to answer how to re-define the topic structure. I guess you will have to do some serious work on the MQTT GW software.
  • Checking for current gateway connection state on Node?

    8
    0 Votes
    8 Posts
    2k Views
    P
    @phil2020 try this in your sketch: #define MY_TRANSPORT_WAIT_READY_MS (200ul) Its the "timeout" for waiting connection to gateway. Default 0 -> wait infinitely(?).
  • Reliable communication.

    14
    0 Votes
    14 Posts
    2k Views
    zboblamontZ
    @xydix The lower power you can use the better, particularly where battery powered. You can see the size differences between the W and the CW on the lowpowerlab link below, but note that W and HW are pin compatible, CW and HCW are not... link text
  • Multiple Sketch

    2
    0 Votes
    2 Posts
    668 Views
    mfalkviddM
    @arduino_89_89 see https://forum.mysensors.org/topic/2597/combining-mysensors-examples for instructions on how to combine examples.
  • More relay and push botton

    relay remotexy
    16
    0 Votes
    16 Posts
    2k Views
    G
    ahhhhh! no, I start from 0 with an example found on the web, the @korttoma sketch is too complicated for me :P
  • RS485 to Ethernet Gateway

    2
    0 Votes
    2 Posts
    1k Views
    mfalkviddM
    @kduino the debug output will probably provide useful information.
  • 4MHz bootloaders

    11
    0 Votes
    11 Posts
    2k Views
    T
    @boylucky Thank you a lot, you described the changes nicely. Only one question -> you use atmega328_1a_4MHz.hex file. Where does this file came from? Did you just copy and rename one of the .hex files? What need to be change in this hex file or how to make one?
  • How connect arduino mega on Serial3 like USB

    1
    0 Votes
    1 Posts
    661 Views
    No one has replied
  • This topic is deleted!

    4
    4
    0 Votes
    4 Posts
    102 Views
  • Does Gateway loop() required Wait or delay?

    5
    0 Votes
    5 Posts
    1k Views
    JohnRobJ
    For those who read this post: Since my original post I found the wait(time) command is a MySensors macro that essentially is a "wait millis()" function.
  • SSL support for MQTT on ESP8266

    13
    2 Votes
    13 Posts
    12k Views
    monteM
    @soloam look at this https://forum.mysensors.org/topic/8863/esp8266-mqtt-gateway-ssl-connection/1
  • Horrible Gateway reboot

    4
    0 Votes
    4 Posts
    727 Views
    sundberg84S
    @proyectos-integrasoft as said above i think we need more information, but just out of my head it feels like when the radio is engaged with a incoming message it will begin to draw some power. This sounds like the power source isnt good enough. Can you try to power it from a USB adapter for example and try?

13

Online

11.7k

Users

11.2k

Topics

113.0k

Posts