Skip to content
  • Door chime

    My Project
    2
    0 Votes
    2 Posts
    2k Views
    OldSurferDudeO
    @Paul-Scarbro There are multitude of solution, but since we are in MySensors Land, let's do a MySensors solution. You'll quickly see that doing that adds a lot of overhead. We'll use an Arduino Nano or RF Nano if you're going to go whole hog. It can be run from 3.3V or 5V DC, not AC. The reed switch would be connected to an input of the Nano and one of the outputs would drive a relay. The relay would drive the chime. Your C++ program would be something like: #define inputButton 2; // connect reed switch here #define outputRelay 4; // connect relay to this pin see MySensors Relay example #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 setup() { pinmode(inputButton,INPUT); pinmode(outputRelay,OUTPUT); // put your setup code here, to run once: } void loop() { // put your main code here, to run repeatedly: if (digitalRead(inputButton) == 0) { digitalWrite(outputRelay,RELAY_ON); wait(2000); // wait 2 seconds digitalWrite(outputRelay,RELAY_OFF); // now wait for door to close while(digitalRead(inputButton) == 0) ; //does nothing until reed switch opens } } There are some subtleties that I may have glossed over, but this is the gist. By looking at the MySensors Relay example, you'll see how to integrate this into a MySensors environment. That's where you'd want to get the RF Nano. I've made the assumption you're familiar with the Arduino IDE and you've looked into the MySensors environment.
  • MQTT-Help me understand about the MQTT Gateway.

    Development
    11
    0 Votes
    11 Posts
    2k Views
    OldSurferDudeO
    @dpcons MQTT sounds intimidating and looks imitimidating when you see all of the options available. Here's the scenario: You want to send a message. That's the -m option followed by a space and the message between " " the location, topic, is a tree, -t option, separated by forward slash / eg. MyRootTopic/MyTopicsSub/MyTopicSubSub It's as easy as that if your broker, the MQTT service (program) is on the same computer as the sending program. Usually it's not. Specifiy the location, the host, of the broker with the -h option followed by the host name or IP address The retain option, -r is important but explaining it is beyone the scope of this message Receiving, subscribing, to a topic is just the same, but you wouldn't have the -m message If you subscribe from the command line, the subscribe function waits indefinitely for messages published to the subscribed topic (unless you use the -C option) ^C to terminate the command. A tamotized device with the MQTT configured will create a number of topics on the broker. Home Assistant will see this automatically, if you have the Tasmota and MQTT Integrations installed. The MySensors MQTT gateway takes care of MQTT communication for a MySensors device. Again the MySensors and MQTT integrations. I use both. -OSD
  • PJON on RS485

    Feature Requests
    4
    0 Votes
    4 Posts
    1k Views
    ZenBlizzardZ
    25/25 Програма ChatGPT сказала: It seems like you're exploring the use of PJON with RS485. While RS485 is natively supported in MySensors, using PJON for collision handling can offer some interesting advantages, especially in environments where communication reliability is critical. PJON's collision management may be useful in bus systems like RS485, but it's worth considering whether the added complexity is necessary.
  • ESP32 Wired (no WiFi)

    Feature Requests
    4
    0 Votes
    4 Posts
    1k Views
    ZenBlizzardZ
    It seems that using an Ethernet PHY (like LAN8720) with the ESP32 in a MySensors setup requires a bit of extra configuration, including initializing the PHY using the ETH.h library and disabling the default Wi-Fi initialization. Interestingly, this setup allows for dual IP addresses, with one for the Ethernet connection and another for Wi-Fi, which can be useful in certain applications.
  • NODs stop responding, but ping works.

    Troubleshooting
    1
    0 Votes
    1 Posts
    580 Views
    No one has replied
  • Meet in Malmö, Summer 2016?

    General Discussion
    95
    2 Votes
    95 Posts
    160k Views
    T
    Maybe next summer the 10 years after party? I would still like to meet all of you guys in real person
  • Getting system time from the controller

    Troubleshooting
    13
    0 Votes
    13 Posts
    2k Views
    dpconsD
    @mfalkvidd Thanks, I'll try that.
  • Adding Listen only device to my system.

    Development
    5
    0 Votes
    5 Posts
    1k Views
    dpconsD
    @mfalkvidd Thanks for the info!
  • Compiling Sensor code using BME280 and ESP8266

    Troubleshooting
    3
    0 Votes
    3 Posts
    1k Views
    dpconsD
    Thanks for looking. What arduino ide version are you using and what version of mysensors?
  • 0 Votes
    23 Posts
    10k Views
    MasMatM
    Old topic, I know. Did anything ever come of this? I'm also thinking it would be easy & cheap to get the espnow working as a transport layer. I found this: https://www.mysensors.org/apidocs-beta/classESPNOW.html But it goes above my head and abilities when it comes to code.
  • 0 Votes
    1 Posts
    2k Views
    No one has replied
  • Nb of possible nodes in a mysensors networks with domoticz

    My Project
    18
    0 Votes
    18 Posts
    8k Views
    S
    @OldSurferDude yeah, 10 virgin nodes powered up at the same time is a bad idea I seem to remember reading somwewhere here warning aginst that. If yu have node ID trust issues with Mysensors you should move your address to different locaion as 0x00 is used by Mysensors... just sayin..;)
  • Human presence sensors....

    General Discussion
    13
    0 Votes
    13 Posts
    2k Views
    T
    @CodeGarage What I want is a lion powered Sensor if possible. And that in a case I can stick to the door frame. As I cannot screw or drill into the doorframe. But I have no idea how much current that draws.
  • Sending offset to node

    Development
    3
    0 Votes
    3 Posts
    1k Views
    B
    Thanks for the idea, i will look into it soon, will let know how it goes..
  • Combination of networks

    General Discussion
    4
    0 Votes
    4 Posts
    1k Views
    C
    Take a look on this article https://www.mysensors.org/build/rs485
  • Running out of nodeId's

    General Discussion mysensors
    10
    3 Votes
    10 Posts
    2k Views
    nagelcN
    @GLAB You can set the frequencies using the settings in MyConfig.h, which is in the MySensors folder. If you put any of the defines from MyConfig.h into your sketch, they will override the MyConfig.h setting for that sketch only. If you are using the RF24 radio, there are different channels which correspond to a given frequency. The default is channel 76. There is a list of typical channels in MyConfig.h. If you want to change the channel for all the sketches, change it in MyConfig.h. If you want to change it just for the sketch, add a define to the sketch. For example: #define MY_RF24_CHANNEL (84) The problem with changing the channel in a sketch is that the gateway has to be on the same channel to receive from the node. So, normally it makes sense to change in MyConfig.h because you usually want the gateway and all the nodes on the same channel. Other radio's like the RFM69 list the frequency instead of using a channel. They can be overridden in the sketch as well. You can find the defines that are needed in MyConfig.h
  • BMP280 SPI Adafruit

    My Project
    3
    1 Votes
    3 Posts
    4k Views
    M
    Hallo! Ich habe gerade meinen Aduino Nano mit einem GY-BME/P-280 verbunden über SPI verbunden. Im Sketch habe ich nur die PINS geändert und zwar auf: #define BMP_SCK 13 #define BMP_MISO 12 #define BMP_MOSI 11 #define BMP_CS 10 Ich bekomme aber bei der Ausgabe am seriellen Monitor nur "Hyroglyphen" zB 5��,�lh����}����'�O8��m�h,� Mit einem anderen Sketch funktioniert der Sensor einwandfrei. Auch mit einem anderen Nano dasselbe Ergebnis. Hat jemand eine Idee was das Problem sein könnte? Zusatzfrage da ich in C++ nicht so firm bin: Könnte es sein, dass MY_DEBUG oder MY_RADIO_NRF24 das problem verursacht. Was machen diese Definitionen eigentlich? Grüße
  • 💬 Components

    Announcements
    7
    0 Votes
    7 Posts
    4k Views
    OldSurferDudeO
    @GLAB said in 💬 Components: nrf24l01+ I have run the RF24 libraries in 230kbs and that worked for me. I cannot confirm MySensors, but I would assume "yes" OSD
  • 0 Votes
    1 Posts
    836 Views
    No one has replied
  • Saving last known good state, but not in EEPROM

    Development
    6
    0 Votes
    6 Posts
    1k Views
    S
    @OldSurferDude jus request counter states from controller on each reset, worked fine with Domoticz... or save in eeprom but increase location every write, on power up/reset search eeprom for largest value stored and carry on from that location, one long integer will fit 256 times in atmega328(p) eeprom, is that long enough for you ;) ?

19

Online

12.1k

Users

11.2k

Topics

113.4k

Posts