Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
FarmerEdF

FarmerEd

@FarmerEd
About
Posts
11
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Mysensors and BSFrance Lora32u4 ii
    FarmerEdF FarmerEd

    I realize this topic is old, but not sure if it was ever resolved. I'm trying out one of these boards at the moment, this was the only topic I seen about the board and I encountered the same issues as above.

    This is how I got it to communicate in the end and I thought I'd leave it here in case anyone else is looking at the same.

    #define MY_RADIO_RFM95
    #define MY_RFM95_RST_PIN 4
    #define MY_RFM95_CS_PIN 8
    #define MY_RFM95_IRQ_PIN 7
    #define MY_RFM95_IRQ_NUM digitalPinToInterrupt(7)
    #define MY_RFM95_MODEM_CONFIGRUATION RFM95_BW125CR45SF128
    #define MY_RFM95_FREQUENCY (RFM95_868MHZ)

    Soft SPI isn't necessary, but the only issue in the code above was the missing digitalPinToInterrupt.
    #define MY_RFM95_IRQ_NUM digitalPinToInterrupt(7)
    I presume the following should work also:
    #define MY_RFM95_IRQ_NUM digitalPinToInterrupt(MY_RFM95_IRQ_PIN)

    Hardware

  • My Sensors with Heltec V2
    FarmerEdF FarmerEd

    @mrussi
    Not sure if you still need this info, but I'll leave it here in case anyone else needs it. I couldn't find this either so i had to look at the heltec pinout diagram and compared to the ESP32 Library

    /*
     * 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-2018 Sensnology AB
     * Full contributor list: https://github.com/mysensors/MySensors/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 - tekka
     *
     * DESCRIPTION
     * The ESP32 gateway sends data received from sensors to the WiFi link.
     * The gateway also accepts input on ethernet interface, which is then sent out to the radio network.
     *
     * Make sure to fill in your ssid and WiFi password below.
     */
    
    // Enable debug prints to serial monitor
    #define MY_DEBUG
    
    // Enables and select radio type (if attached)
    //#define MY_RADIO_RF24
    //#define MY_RADIO_RFM69
    #define MY_RADIO_RFM95
    #define MY_DEBUG_VERBOSE_RFM95
    #define MY_RFM95_RST_PIN 14
    #define MY_RFM95_CS_PIN 18
    #define MY_RFM95_IRQ_PIN 26
    #define MY_RFM95_IRQ_NUM MY_RFM95_IRQ_PIN
    #define MY_SOFT_SPI_MOSI_PIN 27
    #define MY_SOFT_SPI_SCK_PIN 5
    #define MY_RFM95_FREQUENCY (RFM95_868MHZ)
    #define MY_RFM95_MODEM_CONFIGRUATION RFM95_BW125CR45SF128
    
    #define MY_GATEWAY_ESP32
    
    #define MY_WIFI_SSID "WiFi_SSID"
    #define MY_WIFI_PASSWORD "password"
    
    // Set the hostname for the WiFi Client. This is the hostname
    // it will pass to the DHCP server if not static.
    #define MY_HOSTNAME "ESP32_GW_LoRa"
    
    // Enable MY_IP_ADDRESS here if you want a static ip address (no DHCP)
    //#define MY_IP_ADDRESS 192,168,1,100
    
    // If using static ip you can define Gateway and Subnet address as well
    //#define MY_IP_GATEWAY_ADDRESS 192,168,1,1
    //#define MY_IP_SUBNET_ADDRESS 255,255,255,0
    
    // The port to keep open on node server mode
    #define MY_PORT 5003
    
    // How many clients should be able to connect to this gateway (default 1)
    #define MY_GATEWAY_MAX_CLIENTS 2
    
    #include <MySensors.h>
    
    void setup()
    {
    	// Setup locally attached sensors
    }
    
    void presentation()
    {
    	// Present locally attached sensors here
    }
    
    void loop()
    {
    	// Send locally attached sensors data here
    }
    
    General Discussion

  • mysensors regularly disconnect from HA
    FarmerEdF FarmerEd

    @keithellis , I had similar issues with my setup although I didn't investigate it in any kind of detail like suggested above, my solution was simply changing the WiFi network. I was having intermittent connectivity issues with a number of ESP8266/ESP32 devices on my mixed 2.4Ghz/5Ghz Mesh network, so I switched back on my routers WiFi in 2.4ghz mode only and named its SSID "WiFi-IOT" and connected all of these ESP based IOT devices to it and I've had no dropouts since.

    I have 4 MySensors gateways connected to Home Assistant, 2 by WiFi using an ESP8266 and an ESP32, the other 2 are Pi Zeros with 4G Hats connected by a VPN, since surprisingly I never had connectivity issues with the 2 remote devices and always the 2 WiFi ones literally next to the router I could only suspect the WiFi network. It may not be your issue but worth considering just the same. I think I will probably convert mine to serial gateways when I get the time.

    Home Assistant

  • Adafruit RFM69 Bonnet not working
    FarmerEdF FarmerEd

    @FlyingSaucrDude

    What great timing (for me anyway), only this week I purchased the Adafruit RFM95 Bonnet version, and this thread is the only thing returned in a quick search. Your solution works for RFM95 also.

    I didn't need to comment out the code that prevented toggling the CS_PIN, but I'm using the development version as the main branch dose not seem to build on Pi OS Bullseye.

    ./configure --my-transport=rfm95 --my-rfm95-frequency=868 --my-gateway=ethernet --my-port=5003 --my-rfm95-cs-pin=26 --my-rfm95-irq-pin=15 --extra-cxxflags="-DMY_RFM95_RST_PIN=22" --spi-spidev-device=/dev/spidev0.1 --spi-driver=SPIDEV
    

    Thanks to your post I got this working in a few min of trying, would have taken me much longer otherwise, so thank you for posting to an ancient thread.

    Troubleshooting
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular