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!
  • Node to Node

    point to point pingpong nodes
    2
    0 Votes
    2 Posts
    893 Views
    F
    @Jason-Brunk I am not sure but maybe you can use incoming message to listen to the NRF network. Read more about how to use incoming message here https://forum.mysensors.org/topic/4195/how-to-find-out-if-message-was-successfully-delivered
  • send message to sensor on GW

    5
    0 Votes
    5 Posts
    2k Views
    dpressleD
    @martinhjelmare Thanks, i will try dev branch
  • RFM69 softSPI

    8
    0 Votes
    8 Posts
    1k Views
    tbowmoT
    @zaba_pv We are working on a new GW device, that will work with RFM69 and W5100, should be available later this year (waiting for our manufacturing partner)
  • How v2 Gateway with local sensors to delay messages?

    3
    0 Votes
    3 Posts
    1k Views
    TriXwooDT
    Yes I got that from the examples. But my question is: on the gateway itself, which has to do something to talk to the other nodes (?). If I add a sensor to the gateway itself, then what do I do? Can I use sleep()? will the gateway function properly? Ok I tried wait(), for some reason wait() did not worked before, (got only one message) now it works...
  • Quick question about how gateways and nodes report

    3
    0 Votes
    3 Posts
    915 Views
    linus72982L
    @hek Thanks -- one other quick question: am I right in assuming a child sensors will only ever send "set" message types and will only be routed "req" types? For example, I'll never see a message like this: 3; 3; 3; 0; 9; etc right? Nodes would send that sort of message, but never a child: 3; 255; 3; 0; 9; etc yes? I'm assuming this because most nodes just report a setting or get set to something, they don't have any intelligence beyond that, that all exists on the child's node.
  • 0 Votes
    18 Posts
    6k Views
    m26872M
    @TheoL said: The question is, why is the LD33V stabilizing the circuit. I'd like to know why, so that I can learn from this. A little late and OT, but I think this makes sense. I'm often in favour of wasting some power as a simple way to gain some PSRR.
  • Ethernetgateway with ENC28J60?

    3
    0 Votes
    3 Posts
    1k Views
    hekH
    The ENC gateway (and library) has been moved here: https://github.com/mysensors/MySensorsArduinoExamples/tree/master/examples/GatewayENC28J60
  • Serial gateway, which example to follow??

    19
    0 Votes
    19 Posts
    7k Views
    skatunS
    @tekka Thats correct, i am only running locally attached sensor:) I was luckily enough to run sth like 35 cables to my gateway, I might add radio in the future to reach down to my basement.
  • Determine connected sensors after gateway restart

    2
    0 Votes
    2 Posts
    903 Views
    tbowmoT
    @linus72982 The GW doesn't keep track of which nodes that is connected. It only acts as a GW between your sensor network and your controller.. The presentation messages that you see in your controller, is coming directly from the node itself. Your controller should cache the node presentations. As it's the controllers job to assign node-id's they won't change if the GW is rebooted.
  • Quick question on BinarySwitchSleepSensor example

    3
    0 Votes
    3 Posts
    994 Views
    mfalkviddM
    Yes, that is confusing. In 2.0 the examples have been updated to use digitalPinToInterrupt instead, see https://github.com/mysensors/MySensors/commit/3433d2da7885066777bc177f073df87313b9947c
  • Serial is dropping characters

    19
    0 Votes
    19 Posts
    6k Views
    AnticimexA
    @AndErn said: I feel it is a waste of any more time as NO ONE has yet shown me how to make the example work WITH 2.) Bear in mind I WROTE ABOVE it worked OK with 1.5 AND the basic Arduino Serial. Then stick to 1.5 and stop wasting the rest of us incompetent programmers (who have more or less than 40 years of experience) time with your ranting.
  • Testing with two nRF24 networks

    5
    0 Votes
    5 Posts
    2k Views
    AndErnA
    @Yveaux said: @AndErn Nope, pipe has nothing to do with channel number. A different channel number means a different frequency. Channel pipes are all on the same frequency. OK, thanks, I didn't realize that. In my RF24 setup I am defining the Channel to use in all nodes the Channel so it should be OK then. I will seek out how to define the Channel for MySensors and stay well away from RF24.
  • MySensors, Domoticz and RGBW LED Strip

    5
    0 Votes
    5 Posts
    2k Views
    Nca78N
    @Tore-André-Rosander said: WHat kind of child do i need to use the selector switch in domoticz? Anything that allows multiple levels, I think S_DIMMER is the most logical choice.
  • 2.0 Gateway with 1.5 sensors

    9
    0 Votes
    9 Posts
    3k Views
    M
    It is a while now I'm using my 2.0 GW (because I wanted to manage sensors connected directly to it) with 1.5 sensors node and everything is running fine.
  • Relay skech API 2.0 Port?

    2
    0 Votes
    2 Posts
    920 Views
    Boots33B
    @ThomasDr The updated relay sketch is included as an example with the MySensors V2 install I have copied it and pasted it below /** * The MySensors Arduino library handles the wireless radio link and protocol * between your home built sensors/actuators and HA controller of choice. * The sensors forms a self healing radio network with optional repeaters. Each * repeater and gateway builds a routing tables in EEPROM which keeps track of the * network topology allowing messages to be routed to nodes. * * Created by Henrik Ekblad <henrik.ekblad@mysensors.org> * Copyright (C) 2013-2015 Sensnology AB * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors * * Documentation: http://www.mysensors.org * Support Forum: http://forum.mysensors.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. * ******************************* * * REVISION HISTORY * Version 1.0 - Henrik Ekblad * * DESCRIPTION * Example sketch showing how to control physical relays. * This example will remember relay state after power failure. * http://www.mysensors.org/build/relay */ // Enable debug prints to serial monitor #define MY_DEBUG // Enable and select radio type attached #define MY_RADIO_NRF24 //#define MY_RADIO_RFM69 // Enable repeater functionality for this node #define MY_REPEATER_FEATURE #include <SPI.h> #include <MySensors.h> #define RELAY_1 3 // Arduino Digital I/O pin number for first relay (second on pin+1 etc) #define NUMBER_OF_RELAYS 1 // Total number of attached relays #define RELAY_ON 1 // GPIO value to write to turn on attached relay #define RELAY_OFF 0 // GPIO value to write to turn off attached relay void before() { for (int sensor=1, pin=RELAY_1; sensor<=NUMBER_OF_RELAYS;sensor++, pin++) { // Then set relay pins in output mode pinMode(pin, OUTPUT); // Set relay to last known state (using eeprom storage) digitalWrite(pin, loadState(sensor)?RELAY_ON:RELAY_OFF); } } void setup() { } void presentation() { // Send the sketch version information to the gateway and Controller sendSketchInfo("Relay", "1.0"); for (int sensor=1, pin=RELAY_1; sensor<=NUMBER_OF_RELAYS;sensor++, pin++) { // Register all sensors to gw (they will be created as child devices) present(sensor, S_LIGHT); } } void loop() { } void receive(const MyMessage &message) { // We only expect one type of message from controller. But we better check anyway. if (message.type==V_LIGHT) { // Change relay state digitalWrite(message.sensor-1+RELAY_1, message.getBool()?RELAY_ON:RELAY_OFF); // Store state in eeprom saveState(message.sensor, message.getBool()); // Write some debug info Serial.print("Incoming change for sensor:"); Serial.print(message.sensor); Serial.print(", New status: "); Serial.println(message.getBool()); } }
  • MySensors Hardwired

    5
    0 Votes
    5 Posts
    956 Views
    CrankyCoderC
    ah, good point on the gateways. Ill have to test it out with the mqtt-client-gateway For RS485. Do you happen to have any examples as how it's setup from a hardware perspective if you have say 3 nodes? Do you connect node -> gateway x3 or do you go node -> node -> node-> gateway?
  • DallasTemperatureSensor code mia

    3
    0 Votes
    3 Posts
    746 Views
    G
    Great stuff - thanks very much. You might just want to update the link here as well: https://www.mysensors.org/build/temp There is a link to Git
  • Reuse old alarm system

    6
    0 Votes
    6 Posts
    2k Views
    D
    @Skye-Turner Ok thanks, was hoping there was still a system board there; was hoping it would be as easy as this for you. As for ideas, you could use an Arduino Uno, Nano, or Mega and have all your sensors connect via external pull-up resistors to deliver a good clean signal. You can just use the example ReedSwitch sketch and just modify it for how ever many binary/reed switches you want to have. Also now that MySensors is on V2.0, you can use whatever method you choose to communicate to HA (NRF/RFM, Ethernet (Gateway and NODE on same Arduino), etc. I think even Wifi with the ESP8266 is an option. How do you intend on communicating your sensors with HA? Do you have an existing MySensors network?
  • combine working 4 relay with buttons with HC-SR501 motion sensor

    1
    0 Votes
    1 Posts
    754 Views
    No one has replied
  • [SOLVED] Gateway without radio not working on current development branch

    21
    0 Votes
    21 Posts
    5k Views
    chrlyraC
    great news. I will try the version 2.0 this week.

20

Online

11.7k

Users

11.2k

Topics

113.0k

Posts