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
N

ncollins

@ncollins
About
Posts
119
Topics
3
Shares
0
Groups
0
Followers
1
Following
3

Posts

Recent Best Controversial

  • GUIDE - NRF5 / NRF51 / NRF52 for beginners
    N ncollins

    @NeverDie Oh I've been running around 20 NRF52805 nodes for the past ~2 years https://forum.mysensors.org/post/108893. They've been working very well for me.

    edit:
    PRs to get working with mysensors
    https://github.com/sandeepmistry/arduino-nRF5/pull/442
    https://github.com/mysensors/ArduinoHwNRF5/pull/12

    Development

  • OH3 - MySensors Binding
    N ncollins

    @mbedarff good question. Seems @CyborgAndy is keeping the addon alive? If so, @CyborgAndy are you publishing your changes to a public branch/fork?

    OpenHAB

  • Tell Me How To choose the right solar lights
    N ncollins

    What are you trying to do? Remotely control store-bought solar lights?

    Hardware

  • nRF5 action!
    N ncollins

    @Jon-Raymond Well, not seeing a lot of activity in the repo.

    I took a very long shot at adding support https://github.com/nikolac/arduino-nRF5/tree/nrf52805-s112-support.

    I was able to flash the softdevice, but I haven't tested or even uploaded a working sketch (sloppy). Feel free to mess around and test. If it works for you, I do the same for S113.

    Biggest question I have is around figuring out the proper values for the "linker scripts" https://github.com/nikolac/arduino-nRF5/blob/nrf52805-s112-support/cores/nRF5/SDK/components/softdevice/s112/toolchain/armgcc/armgcc_s112_nrf52805_xxaa.ld

    My Project

  • nRF5 action!
    N ncollins

    @Jon-Raymond the nRF52805 should support the S112 and S113 soft device, but I removed it from the menu because I never tested it and didn't intend to immediately use it.

    Digging through sandeepmistry/arduino-nrf5, it looks like S112 and S113 aren't included in the SDK. It might be easy enough to just drop in two new folders, then update boards.txt.

    e0a17f79-2edd-4750-a4c5-21ff33c8a1a0-image.png

    6fba7886-f4c1-4b5b-aaa9-9e699ab7ff4e-image.png

    (Just an example of how I would add a soft device option to the dropdown, these would have to match up with whatever is in the sdk)

    I would recommend opening an issue/question on https://github.com/sandeepmistry/arduino-nRF5, specifically asking the best way to add a new softdevice to the library. If it's straightforward, I can work with you to get those changes incorporated and, hopefully, included in the merge request.

    My Project

  • nRF5 action!
    N ncollins

    @Jon-Raymond I pushed my latest changes, posted a question to the merge about next steps.

    My Project

  • nRF5 action!
    N ncollins

    @Jon-Raymond I kinda got hung up on the last conversation in the merge request and haven't looked at it since. Let me push the changes I have to address the other comments, then try to figure out how to best handle that last bit.

    My Project

  • openhab binding mysensors
    N ncollins

    @MDS I looked into this a bit after seeing the same double message in the log. You have ACK setup for these nodes? In the mysensors binding code, it looks like the bridge sends a message then waits for an ACK, and resends if it doesn't get the ACK within a specific amount of time. Unfortunately, it looks like it waits 0ms for the first ACK (doesn't wait) and automatically retransmits = guaranteed duplicate sent. It hasn't really caused any problems for me.

    As for the dropped messages, do you have a delay set up on your bridge config [sendDelay=200]? 1416af8a-28bf-42e8-8c20-9718545523c3-image.png

    Can you post your arduino code?

    OpenHAB

  • [Answered] Any recommended load-and-go VM or Docker images for mysensors?
    N ncollins

    No docker expert here, but I think docker-compose is intended to provide the functionality of logically grouping containers/dependencies, as apposed to combining products in a single container.

    It could definitely be helpful to maintain a few home automation compose "templates." For example, my template would be: OpenHAB, InfluxDB, Grafana, mosquitto.

    Controllers

  • OH3 - MySensors Binding
    N ncollins

    @haloway13 I really don't have an understanding of how it works. I'm not sure how OpenHAB knows when to convert a value from a sensor reading?

    • When you set the platform level metric/imperial setting, is that establishing the assumption that all sensor values are metric/imperial?
    • If the metadata override for a Number:Temperature doesn't match the platform setting, is openhab smart enough to do the conversion?
    • When updating the metadata, does that convert the current value or only updates after setting the metadata?

    In my limited experiments, changing the metadata just seems to change the label suffix to ˚C or ˚F

    OpenHAB

  • OH3 - MySensors Binding
    N ncollins

    @haloway13 oooof, I found that to be confusing too.

    If your platform settings Settings -> Regional Settings [advanced] -> Metric / Imperial are set,

    and you define your items as Number:Temperature, they should "magically" display in the correct format and auto converted, but I've had a lot of trouble with that.

    There are also settings to have the gateway confirm "isMetric" and have you node respond in the appropriate unit.

    Lastly, in your item definition, you can "Add Metadata" -> State Description, and set a display format that supposedly converts value, but I'm not sure I understand exactly when it's suppose to override platform settings.

    Screen Shot 2021-03-12 at 5.51.47 PM.png Screen Shot 2021-03-12 at 5.52.00 PM.png

    More info here: https://community.openhab.org/t/solved-the-right-place-to-do-temperature-conversion/91233

    OpenHAB

  • OH3 - MySensors Binding
    N ncollins

    @haloway13 Yes!! Impressive perseverance.

    Somehow I've become emotionally invested in your outcome, so this is extremely satisfying. Great work.

    OpenHAB

  • OH3 - MySensors Binding
    N ncollins

    @haloway13 I mean, last suggestion is restarting your openhab instance. If that doesn't work, please post your openhab log.

    OpenHAB

  • GUIDE - NRF5 / NRF51 / NRF52 for beginners
    N ncollins

    @electrik I believe NRF52832 and 51822 are the only supported NRF modules at this time. Some people have experimented and modified dependent libraries to get NRF52840 to work with MySensors but I'm not sure it's completely working and definitely wouldn't start there.

    Personally, I like using the Ebyte NRF24 PA+LNA modules for my gateways and repeaters and use the NRF5 modules for end nodes.

    I'm not even sure you can use NRF5 as a radio for a gateway, if so it might only work as a serial gateway.

    As for additional items, I bought a jlink clone after having trouble unlocking ebyte modules with a STLink. Then my jlink clone caused issues (old firmware, not updatable) so I ended up buying a real JLink-edu.

    Other things worth noting: there are a surprising number of hardware bugs with the NRF chips that mostly result in higher power consumption. General advice would be to stay away from NRF51822. EBYTE modules have been consistently reliable, high quality.

    Development

  • OH3 - MySensors Binding
    N ncollins

    @haloway13 Can you post your sketch?

    Your humidity sensor and your temperature sensor Thing configurations both point to Child Id = 0. I think your humidity sensor should be Child Id = 1.

    OpenHAB

  • OH3 - MySensors Binding
    N ncollins

    @haloway13 can you send a screenshot of your item?Screen Shot 2021-03-08 at 9.09.23 AM.png

    OpenHAB

  • OH3 - MySensors Binding
    N ncollins

    @haloway13 progress!

    Check the channels tab of your temperature sensor thing:
    Screen Shot 2021-03-07 at 8.13.28 AM.png

    "Add link to item" then follow the directions to create a new item
    Screen Shot 2021-03-07 at 8.15.31 AM.png

    OpenHAB

  • OH3 - MySensors Binding
    N ncollins

    @haloway13 Here are all of my settings in my sandbox environment.

    A couple things to note, NO MQTT BINDING INSTALLED, no special MQTT thing configured, my mqtt install is not password protected.

    Screen Shot 2021-03-05 at 12.49.22 PM.png Screen Shot 2021-03-05 at 12.53.23 PM.png Screen Shot 2021-03-05 at 12.54.34 PM.png Screen Shot 2021-03-05 at 12.55.27 PM.png Screen Shot 2021-03-05 at 12.55.50 PM.png Screen Shot 2021-03-05 at 1.01.14 PM.png
    Screen Shot 2021-03-05 at 1.03.05 PM.png

    My Gateway code:

    
    // 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_GATEWAY_MQTT_CLIENT
    #define MY_GATEWAY_ESP8266
    
    #define MY_BAUD_RATE 9600
    
    #define MY_MQTT_CLIENT_ID "MYSGW01"
    
    // Set this node's subscribe and publish topic prefix
    #define MY_MQTT_PUBLISH_TOPIC_PREFIX "tele/mysgw01-out"
    #define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX  "cmnd/mysgw01-in"
    
    // Set MQTT client id
    
    
    // Enable these if your MQTT broker requires username/password
    //#define MY_MQTT_USER "username"
    //#define MY_MQTT_PASSWORD "password"
    
    // Set WIFI SSID and password
    #define MY_WIFI_SSID "--------"
    #define MY_WIFI_PASSWORD "*********"
    
    // Set the hostname for the WiFi Client. This is the hostname
    // passed to the DHCP server if not static.
    #define MY_HOSTNAME MY_MQTT_CLIENT_ID 
    
    // Enable MY_IP_ADDRESS here if you want a static ip address (no DHCP)
    //#define MY_IP_ADDRESS 192,168,178,87
    
    // If using static ip you can define Gateway and Subnet address as well
    //#define MY_IP_GATEWAY_ADDRESS 192,168,178,1
    //#define MY_IP_SUBNET_ADDRESS 255,255,255,0
    
    // MQTT broker ip address.
    #define MY_CONTROLLER_IP_ADDRESS 192, 168, 1, 62
    
    //MQTT broker if using URL instead of ip address.
    // #define MY_CONTROLLER_URL_ADDRESS "test.mosquitto.org"
    
    // The MQTT broker port to to open
    #define MY_PORT 1883
    
    // Enable inclusion mode
    //#define MY_INCLUSION_MODE_FEATURE
    // Enable Inclusion mode button on gateway
    //#define MY_INCLUSION_BUTTON_FEATURE
    // Set inclusion mode duration (in seconds)
    //#define MY_INCLUSION_MODE_DURATION 60
    // Digital pin used for inclusion mode button
    //#define MY_INCLUSION_MODE_BUTTON_PIN D1
    
    // Set blinking period
    //#define MY_DEFAULT_LED_BLINK_PERIOD 300
    
    // Flash leds on rx/tx/err
    //#define MY_DEFAULT_ERR_LED_PIN 16  // Error led pin
    //#define MY_DEFAULT_RX_LED_PIN  16  // Receive led pin
    //#define MY_DEFAULT_TX_LED_PIN  2  // the PCB, on board LED
    #include <ArduinoOTA.h>
    #include <MySensors.h>
    
    void setup()
    {
    
      pinMode(LED_BUILTIN, OUTPUT);
    	// Setup locally attached sensors
     ArduinoOTA.setHostname(MY_HOSTNAME);
      ArduinoOTA.onStart([]() {
        Serial.println("ArduinoOTA start");
      });
      ArduinoOTA.onEnd([]() {
        Serial.println("\nArduinoOTA end");
      });
      ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) {
        Serial.printf("OTA Progress: %u%%\r", (progress / (total / 100)));
      });
      ArduinoOTA.onError([](ota_error_t error) {
        Serial.printf("Error[%u]: ", error);
        if (error == OTA_AUTH_ERROR) {
          Serial.println("Auth Failed");
        } else if (error == OTA_BEGIN_ERROR) {
          Serial.println("Begin Failed");
        } else if (error == OTA_CONNECT_ERROR) {
          Serial.println("Connect Failed");
        } else if (error == OTA_RECEIVE_ERROR) {
          Serial.println("Receive Failed");
        } else if (error == OTA_END_ERROR) {
          Serial.println("End Failed");
        }
      });
      ArduinoOTA.begin();
    }
    
    void presentation()
    {
      
    	// Present locally attached sensors here
      sendSketchInfo("MYSGW01-TEST Gateway","1.0");
      present(0, S_BINARY);
    }
    
    void loop()
    {
    	// Send locally attached sensors data here
       ArduinoOTA.handle();
    }
    
    void receive(const MyMessage &message)
    {
        // We only expect one type of message from controller. But we better check anyway.
        if (message.type==V_STATUS) {
            // Change relay state
            digitalWrite(LED_BUILTIN, message.getBool() ? LOW:HIGH);
            // 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());
        }
    }
    
    OpenHAB

  • OH3 - MySensors Binding
    N ncollins

    @haloway13 yeah, when you did the initial mqtt setup, did you protect it with a password? If not, make sure you clear out the username and password from the OpenHAB broker settings. (I’m not sure if it will fail if you provide credentials to an instance that is not password protected)

    OpenHAB

  • OH3 - MySensors Binding
    N ncollins

    also, is your MQTT broker password protected? if not, remove the username and password from your system broker configuration.

    OpenHAB
  • Login

  • Don't have an account? Register

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