Navigation

    • Register
    • Login
    • Search
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. MLs
    3. Posts
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by MLs

    • RE: Another simple (No SMT) relay actuator

      @dpressle

      And my settings are seen in previous posts.
      But this does not lead to anything so I finish this now.

      posted in My Project
      MLs
      MLs
    • RE: Another simple (No SMT) relay actuator

      @dpressle

      I can burn Mysbootloader yes.
      But the Atmega circuit does not start.
      The problem I think is that Mysbootloader does not use the internal clock

      And because you said you had a bootloader for OTA and internal clock, 8MHz I wanted you to send it to me.

      Then there would have been no problem, I think.

      posted in My Project
      MLs
      MLs
    • RE: Another simple (No SMT) relay actuator

      @MLs said in Another simple (No SMT) relay actuator:

      @dpressle

      @MLs said in Another simple (No SMT) relay actuator:

      @dpressle

      Feeling a bit confused how do you know that a bootloader uses the internal clock?
      Because I used another bootloader after installing your card, I did not get the Atmega circuit to run. But if I used this bootloader, I started the Atmega circuit and everything worked.

      Https://forum.mysensors.org/topic/3018/tutorial-how-to-burn-1mhz-8mhz-bootloader-using-arduino-ide-1-6-5-r5

      But what makes the internal clock in used?
      I use a UNO when I'm burning bootloader and do not know if you can change fuses and clock option.

      If you use a bootloader that uses an external clock, you will not get the Atmega circuit to run. If I understand everything right.

      No if I'm burning 8MHz Mysbootloader, the Atmega circuit does not start.

      But instead, I use this bootloader (ATmega328 on a 8 MHz internal clock) and I get the Atmega circuit to run, but without OTA.

      Https://forum.mysensors.org/topic/3018/tutorial-how-to-burn-1mhz-8mhz-bootloader-using-arduino-ide-1-6-5-r5

      Therefore, I asked you how to know how a bootloader uses an external clock or internal clock.

      posted in My Project
      MLs
      MLs
    • RE: Another simple (No SMT) relay actuator

      @dpressle

      @MLs said in Another simple (No SMT) relay actuator:

      @dpressle

      Feeling a bit confused how do you know that a bootloader uses the internal clock?
      Because I used another bootloader after installing your card, I did not get the Atmega circuit to run. But if I used this bootloader, I started the Atmega circuit and everything worked.

      Https://forum.mysensors.org/topic/3018/tutorial-how-to-burn-1mhz-8mhz-bootloader-using-arduino-ide-1-6-5-r5

      But what makes the internal clock in used?
      I use a UNO when I'm burning bootloader and do not know if you can change fuses and clock option.

      If you use a bootloader that uses an external clock, you will not get the Atmega circuit to run. If I understand everything right.

      No if I'm burning 8MHz Mysbootloader, the Atmega circuit does not start.

      But instead, I use this bootloader (ATmega328 on a 8 MHz internal clock) and I get the Atmega circuit to run, but without OTA.

      Https://forum.mysensors.org/topic/3018/tutorial-how-to-burn-1mhz-8mhz-bootloader-using-arduino-ide-1-6-5-r5

      posted in My Project
      MLs
      MLs
    • RE: Another simple (No SMT) relay actuator

      @dpressle

      The problem is not to burn bootloader. The problem I think is that the Mysbootloader does not use internal clock.

      Therefore, I asked you how to know how a bootloader uses an external clock or internal clock.
      And because you had a bootloader for OTA and internal clock, 8MHz I wanted you to send it to me.

      posted in My Project
      MLs
      MLs
    • RE: Another simple (No SMT) relay actuator

      @dpressle

      0_1492986735738_Mysbootloader.png

      ##############################################################
      
      MYSBL13.name=ATmega328 with MYSBootloader
      
      MYSBL13.upload.tool=avrdude
      MYSBL13.upload.protocol=arduino
      
      MYSBL13.bootloader.tool=avrdude
      MYSBL13.bootloader.unlock_bits=0x3F
      MYSBL13.bootloader.lock_bits=0x0F
      
      MYSBL13.build.mcu=atmega328p
      MYSBL13.build.board=AVR_PRO
      MYSBL13.build.core=arduino
      MYSBL13.build.variant=standard
      
      ## Arduino with MYSBootloader 1.3pre
      ## -------------------------------------------------
      MYSBL13.menu.cpu.16MHzatmega328=ATmega328 16MHz (XTAL, BOD1V8)
      MYSBL13.menu.cpu.16MHzatmega328.upload.maximum_size=30720
      MYSBL13.menu.cpu.16MHzatmega328.upload.maximum_data_size=2048
      MYSBL13.menu.cpu.16MHzatmega328.upload.speed=115200
      MYSBL13.menu.cpu.16MHzatmega328.bootloader.low_fuses=0xFF
      MYSBL13.menu.cpu.16MHzatmega328.bootloader.high_fuses=0xDA
      MYSBL13.menu.cpu.16MHzatmega328.bootloader.extended_fuses=0x06
      MYSBL13.menu.cpu.16MHzatmega328.bootloader.file=MYSBootloader/MYSBL13pre_atmega328_16Mhz.hex
      MYSBL13.menu.cpu.16MHzatmega328.build.mcu=atmega328p
      MYSBL13.menu.cpu.16MHzatmega328.build.f_cpu=16000000L
      
      MYSBL13.menu.cpu.8MHzatmega328=ATmega328 8MHz (RC, BOD1V8)
      MYSBL13.menu.cpu.8MHzatmega328.upload.maximum_size=30720
      MYSBL13.menu.cpu.8MHzatmega328.upload.maximum_data_size=2048
      MYSBL13.menu.cpu.8MHzatmega328.upload.speed=38400
      MYSBL13.menu.cpu.8MHzatmega328.bootloader.low_fuses=0xE2
      MYSBL13.menu.cpu.8MHzatmega328.bootloader.high_fuses=0xDA
      MYSBL13.menu.cpu.8MHzatmega328.bootloader.extended_fuses=0x06
      MYSBL13.menu.cpu.8MHzatmega328.bootloader.file=MYSBootloader/MYSBL13pre_atmega328_8Mhz.hex
      MYSBL13.menu.cpu.8MHzatmega328.build.mcu=atmega328p
      MYSBL13.menu.cpu.8MHzatmega328.build.f_cpu=8000000L
      
      ############# DO NOT WORK INTERNAL CLOCK #####################
      
      MYSBL13.menu.cpu.8MHzinternalclockatmega328=ATmega328 8MHz internal clock (RC, BOD1V8)
      MYSBL13.menu.cpu.8MHzinternalclockatmega328.upload.maximum_size=30720
      MYSBL13.menu.cpu.8MHzinternalclockatmega328.upload.maximum_data_size=2048
      MYSBL13.menu.cpu.8MHzinternalclockatmega328.upload.speed=38400
      MYSBL13.menu.cpu.8MHzinternalclockatmega328.upload.tool=arduino:avrdude
      MYSBL13.menu.cpu.8MHzinternalclockatmega328.upload.protocol=arduino
      MYSBL13.menu.cpu.8MHzinternalclockatmega328.bootloader.low_fuses=0xE2
      MYSBL13.menu.cpu.8MHzinternalclockatmega328.bootloader.high_fuses=0xDA
      MYSBL13.menu.cpu.8MHzinternalclockatmega328.bootloader.extended_fuses=0xfe
      MYSBL13.menu.cpu.8MHzinternalclockatmega328.bootloader.file=breadboard/MYSBL13pre_atmega328_8Mhz.hex
      MYSBL13.menu.cpu.8MHzinternalclockatmega328.bootloader.unlock_bits=0x3F
      MYSBL13.menu.cpu.8MHzinternalclockatmega328.bootloader.lock_bits=0x0F
      MYSBL13.menu.cpu.8MHzinternalclockatmega328.bootloader.tool=arduino:avrdude
      
      MYSBL13.menu.cpu.8MHzinternalclockatmega328.build.mcu=atmega328p
      MYSBL13.menu.cpu.8MHzinternalclockatmega328.build.f_cpu=8000000L
      MYSBL13.menu.cpu.8MHzinternalclockatmega328.build.core=arduino:arduino
      MYSBL13.menu.cpu.8MHzinternalclockatmega328.build.variant=arduino:standard
      MYSBL13.menu.cpu.1MHzatmega328=ATmega328 1MHz (RC/8, BOD1V8)
      MYSBL13.menu.cpu.1MHzatmega328.upload.maximum_size=30720
      MYSBL13.menu.cpu.1MHzatmega328.upload.maximum_data_size=2048
      MYSBL13.menu.cpu.1MHzatmega328.upload.speed=9600
      MYSBL13.menu.cpu.1MHzatmega328.bootloader.low_fuses=0x62
      MYSBL13.menu.cpu.1MHzatmega328.bootloader.high_fuses=0xDA
      MYSBL13.menu.cpu.1MHzatmega328.bootloader.extended_fuses=0x06
      MYSBL13.menu.cpu.1MHzatmega328.bootloader.file=MYSBootloader/MYSBL13pre_atmega328_1Mhz.hex
      MYSBL13.menu.cpu.1MHzatmega328.build.mcu=atmega328p
      MYSBL13.menu.cpu.1MHzatmega328.build.f_cpu=1000000L
      
      ##############################################################```
      posted in My Project
      MLs
      MLs
    • RE: Another simple (No SMT) relay actuator

      @dpressle

      I do not get Atmel to run with Mysbootloader 8MHz.
      Seems like it does not use the internal clock
      Also tried to put your text into the board.txt file without any difference.
      But if I use the bottloader ATmega328 on a breadboard (8 MHz internal clock it work.

      posted in My Project
      MLs
      MLs
    • RE: Another simple (No SMT) relay actuator

      @dpressle
      Ok first, I have to say that I have no problem getting your project to work. It connects directly to HA. What I get a little confused about is that according to the link I linked to it says.

      Be sure to select "ATmega328 on a breadboard (8 MHz internal clock)" when burning the bootloader.(If you select the wrong item and configure the microcontroller to use an external clock, it won't work unless you connect one.)

      And as I interpret your post, you can take whatever bootloader you want (8 MHz).
      And if I understand you right now, all settings iis n the board.txt file?

      //Mattias

      posted in My Project
      MLs
      MLs
    • RE: Another simple (No SMT) relay actuator

      @dpressle

      Feeling a bit confused how do you know that a bootloader uses the internal clock?
      Because I used another bootloader after installing your card, I did not get the Atmega circuit to run. But if I used this bootloader, I started the Atmega circuit and everything worked.

      Https://forum.mysensors.org/topic/3018/tutorial-how-to-burn-1mhz-8mhz-bootloader-using-arduino-ide-1-6-5-r5

      But what makes the internal clock in used?
      I use a UNO when I'm burning bootloader and do not know if you can change fuses and clock option.

      posted in My Project
      MLs
      MLs
    • RE: My sensors 2.1.1

      @livinlowe

      It depends a little on what you want to do, but at first it is enough. However, if you want to use MySensor's example using external libraries, you will also need to download this link.
      Https://github.com/mysensors/MySensorsArduinoExamples/archive/master.zip

      For example, DHT 22, which measures temperature and humidity.

      //Mattias

      posted in Development
      MLs
      MLs
    • RE: Another simple (No SMT) relay actuator

      @dpressle

      Does the bootloader use the internal 8 MHz clock?

      //Mattias

      posted in My Project
      MLs
      MLs
    • RE: Another simple (No SMT) relay actuator

      @dpressle

      Can you email it to me or maybe add it to your project.

      //Mattias

      posted in My Project
      MLs
      MLs
    • RE: Another simple (No SMT) relay actuator

      @dpressle

      Ok tanks

      Do you have a bootloader with OTA enable

      //Mattias

      posted in My Project
      MLs
      MLs
    • RE: My sensors 2.1.1

      What version do you have of IDE? In newer versions, you install the MySensors library in IDE

      0_1492874853707_IDE.png

      //Mattias

      posted in Development
      MLs
      MLs
    • RE: MYSBootloader 1.3

      Something new about OTA and MySensors 2.1.1 with atmega328P-PU 28 DIP 8MHz internal clock?

      //Mattias

      posted in Development
      MLs
      MLs
    • RE: Another simple (No SMT) relay actuator

      Where can you find the code?

      posted in My Project
      MLs
      MLs
    • RE: Can't ping Ethernet Gateway ENC28J60 + Arduino Nano Clone

      @cadet

      I'm no expert but I would have looked at the data sheet and measured up to make sure that the hardware are not defective in any way.

      http://ww1.microchip.com/downloads/en/DeviceDoc/39662c.pdf

      Or the radio.

      //Mattias

      posted in Troubleshooting
      MLs
      MLs
    • RE: Can't ping Ethernet Gateway ENC28J60 + Arduino Nano Clone

      @cadet

      There I can say is that the circuit ENC28J60 works with MySensors lib 2.1.1
      Try to connect your components to breadboard.

      posted in Troubleshooting
      MLs
      MLs
    • RE: Can't ping Ethernet Gateway ENC28J60 + Arduino Nano Clone

      @cadet

      Ok, you have linked NRF24 radio right?

      https://www.mysensors.org/build/ethernet_gateway#enc28j60-ethernet-module

      Also verified that the shield is properly attached?
      //Mattias

      posted in Troubleshooting
      MLs
      MLs
    • RE: Can't ping Ethernet Gateway ENC28J60 + Arduino Nano Clone

      @cadet

      Yes, I put together this some years ago. But now i uses W5100 instead.

      0_1488720717990_ENC.JPG

      //Mattias

      posted in Troubleshooting
      MLs
      MLs
    • RE: Can't ping Ethernet Gateway ENC28J60 + Arduino Nano Clone

      @cadet

      You need to 'change the IP addresses

      /**
       * 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
       * Contribution by a-lurker and Anticimex,
       * Contribution by Norbert Truchsess <norbert.truchsess@t-online.de>
       * Contribution by Tomas Hozza <thozza@gmail.com>
       *
       *
       * DESCRIPTION
       * The EthernetGateway sends data received from sensors to the ethernet link.
       * The gateway also accepts input on ethernet interface, which is then sent out to the radio network.
       *
       * The GW code is designed for Arduino 328p / 16MHz.  ATmega168 does not have enough memory to run this program.
       *
       * LED purposes:
       * - To use the feature, uncomment WITH_LEDS_BLINKING in MyConfig.h
       * - RX (green) - blink fast on radio message recieved. In inclusion mode will blink fast only on presentation recieved
       * - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly
       * - ERR (red) - fast blink on error during transmission error or recieve crc error
       *
       * See http://www.mysensors.org/build/ethernet_gateway for wiring instructions.
       *
       */
      
      // Enable debug prints to serial monitor
      #define MY_DEBUG 
      
      // Enable and select radio type attached
      #define MY_RADIO_NRF24
      //#define MY_RADIO_RFM69
      
      // When ENC28J60 is connected we have to move CE/CSN pins for NRF radio
      #define MY_RF24_CE_PIN 5
      #define MY_RF24_CS_PIN 6
      
      // Enable gateway ethernet module type 
      #define MY_GATEWAY_ENC28J60
      
      // Gateway IP address
      #define MY_IP_ADDRESS 192,168,0,178 
      
      // The port to keep open on node server mode / or port to contact in client mode
      #define MY_PORT 5003   
      
      // Controller ip address. Enables client mode (default is "server" mode). 
      // Also enable this if MY_USE_UDP is used and you want sensor data sent somewhere. 
      #define MY_CONTROLLER_IP_ADDRESS 192, 168, 0, 201   
      
      // The MAC address can be anything you want but should be unique on your network.
      // Newer boards have a MAC address printed on the underside of the PCB, which you can (optionally) use.
      // Note that most of the Ardunio examples use  "DEAD BEEF FEED" for the MAC address.
      #define MY_MAC_ADDRESS 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xFE
      
      // Flash leds on rx/tx/err
      //#define MY_LEDS_BLINKING_FEATURE
      // Set blinking period
      #define MY_DEFAULT_LED_BLINK_PERIOD 300
      
      // 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  3 
      
      #define MY_DEFAULT_ERR_LED_PIN 7  // Error led pin
      #define MY_DEFAULT_RX_LED_PIN  8  // Receive led pin
      #define MY_DEFAULT_TX_LED_PIN  9  // the PCB, on board LED
      
      #include <SPI.h>
      #include <UIPEthernet.h>
      #include <MySensors.h>
      
      
      void setup()
      {
      }
      
      void loop() {
      }
      

      //Mattias

      posted in Troubleshooting
      MLs
      MLs
    • RE: Encryption, Signing and OTA is there any how-to?

      @Anticimex

      Ofcourse

      //Mattias

      posted in General Discussion
      MLs
      MLs
    • RE: Encryption, Signing and OTA is there any how-to?

      @Anticimex

      Personally, I think it is I who do not understand really. and then is afraid to start by destroying the hardware

      //Mattias

      posted in General Discussion
      MLs
      MLs
    • RE: Encryption, Signing and OTA is there any how-to?

      @meddie

      Hello, I have also begun to look at the hardware lock with ATSHA204.

      When you generate the key, you do so with SecurityPersonalizer.ino

      https://forum.mysensors.org/topic/6019/sensebender-gateway-and-atsha204

      //Mattias

      posted in General Discussion
      MLs
      MLs
    • RE: Problems with temperature sensor

      @tomasandersson

      Hi I also use DS18B20 but I have not any problems with the controller mixes the DS18B20. But all DS18B20 has a unique address, which you can read out and use.

      https://www.hacktronics.com/Tutorials/arduino-1-wire-address-finder.html

      //Mattias

      posted in Domoticz
      MLs
      MLs
    • RE: DHT and LDR separately working, but together not, what's wrong?

      @DannyM

      //Mattias

      I use a 10k resistor to LDR.

      posted in Troubleshooting
      MLs
      MLs
    • RE: DHT and LDR separately working, but together not, what's wrong?

      @DannyM

      Yes you can use LDR and a DHT11 together.

       * 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 measue light level using a LM393 photo-resistor 
       * http://www.mysensors.org/build/light
       */
      
      // Enable debug prints to serial monitor
      #define MY_DEBUG 
      
      // NodId
      #define MY_NODE_ID 99
      
      // Enable and select radio type attached
      #define MY_RADIO_NRF24
      //#define MY_RADIO_RFM69
      
      //Including nescessary libraries
      #include <SPI.h>
      #include <MySensors.h> 
      #include <DHT.h>  
      
      // Set this offset if the sensor has a permanent small offset to the real temperatures
      #define SENSOR_TEMP_OFFSET 0
      
      // Sleep time between sensor updates (in milliseconds)
      // Must be >1000ms for DHT22 and >2000ms for DHT11
      static const uint64_t UPDATE_INTERVAL = 60000;
      
      // Force sending an update of the temperature after n sensor reads, so a controller showing the
      // timestamp of the last update doesn't show something like 3 hours in the unlikely case, that
      // the value didn't change since;
      // i.e. the sensor would force sending an update every UPDATE_INTERVAL*FORCE_UPDATE_N_READS [ms]
      static const uint8_t FORCE_UPDATE_N_READS = 10;
      
      //Defining child ID
      #define CHILD_ID_LIGHT 0
      #define CHILD_ID_HUM 1
      #define CHILD_ID_TEMP 2
      
      //Defining Pin
      #define DHT_DATA_PIN 3
      #define LDR_PIN A0
      
      //Defining values to store sensor information
      float lastTemp;
      float lastHum;
      uint8_t nNoUpdatesTemp;
      uint8_t nNoUpdatesHum;
      bool metric = true;
      int lastLightLevel;
      
      //Defining sleep and wait times
      unsigned long SLEEP_TIME = 30000; // Sleep time between reads (in milliseconds)(30 seconds)
      #define MESSAGEWAIT 500
      
      MyMessage LightMsg(CHILD_ID_LIGHT, V_LIGHT_LEVEL);
      MyMessage msgHum(CHILD_ID_HUM, V_HUM);
      MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
      DHT dht;
      
      void presentation()  {
        // Send the sketch version information to the gateway and Controller
        sendSketchInfo("Temp Fukt Ljus", "1.0"); // 2017 02 05
      //  wait(MESSAGEWAIT);
      
        // Register all sensors to gateway (they will be created as child devices)
        present(CHILD_ID_LIGHT, S_LIGHT_LEVEL);
      //  wait(MESSAGEWAIT);
        present(CHILD_ID_HUM, S_HUM);
      //  wait(MESSAGEWAIT);
        present(CHILD_ID_TEMP, S_TEMP);
        
          metric = getControllerConfig().isMetric;
      
      }
      
      void setup() 
      {
        dht.setup(DHT_DATA_PIN); // set data pin of DHT sensor
        if (UPDATE_INTERVAL <= dht.getMinimumSamplingPeriod()) {
          Serial.println("Warning: UPDATE_INTERVAL is smaller than supported by the sensor!");
        }
        // Sleep for the time of the minimum sampling period to give the sensor time to power up
        // (otherwise, timeout errors might occure for the first reading)
        sleep(dht.getMinimumSamplingPeriod());
      }
      
      void loop() {
        // Force reading sensor, so it works also after sleep()
        dht.readSensor(true);
      
        // Get temperature from DHT library
        float temperature = dht.getTemperature();
        if (isnan(temperature)) {
          Serial.println("Failed reading temperature from DHT!");
        } else if (temperature != lastTemp || nNoUpdatesTemp == FORCE_UPDATE_N_READS) {
          // Only send temperature if it changed since the last measurement or if we didn't send an update for n times
          lastTemp = temperature;
          if (!metric) {
            temperature = dht.toFahrenheit(temperature);
          }
          // Reset no updates counter
          nNoUpdatesTemp = 0;
          temperature += SENSOR_TEMP_OFFSET;
          send(msgTemp.set(temperature, 1));
      
          #ifdef MY_DEBUG
          Serial.print("T: ");
          Serial.println(temperature);
          #endif
        } else {
          // Increase no update counter if the temperature stayed the same
          nNoUpdatesTemp++;
        }
      
        // Get humidity from DHT library
        float humidity = dht.getHumidity();
        if (isnan(humidity)) {
          Serial.println("Failed reading humidity from DHT");
        } else if (humidity != lastHum || nNoUpdatesHum == FORCE_UPDATE_N_READS) {
          // Only send humidity if it changed since the last measurement or if we didn't send an update for n times
          lastHum = humidity;
          // Reset no updates counter
          nNoUpdatesHum = 0;
          send(msgHum.set(humidity, 1));
      
          #ifdef MY_DEBUG
          Serial.print("H: ");
          Serial.println(humidity);
          #endif
        } else {
          // Increase no update counter if the humidity stayed the same
          nNoUpdatesHum++;
        }
      
        
        int lightLevel = (1023-analogRead(LDR_PIN))/10.23; 
        Serial.println(lightLevel);
        if (lightLevel != lastLightLevel) {
            send(LightMsg.set(lightLevel));
            lastLightLevel = lightLevel;
        }
        sleep(SLEEP_TIME);
      }
      

      LDR pin A0

      DHT pin 3

      And i use pro mini.

      //Mattias

      posted in Troubleshooting
      MLs
      MLs
    • RE: πŸ’¬ Sensebender Gateway

      @hek

      Now, I also got the computer to recognize the card. Thanks for all help.

      The problem was that even when I used save as, the computer renaming the file as a .txt file "mysensors-samd.inf.txt" and not a "mysensors-samd.inf"

      Again, thanks for all the help.

      //Mattias

      posted in OpenHardware.io
      MLs
      MLs
    • RE: πŸ’¬ Sensebender Gateway

      @hek

      I'll try it tomorrow is not so strange that it did not work for me then.

      //Mattias

      posted in OpenHardware.io
      MLs
      MLs
    • RE: πŸ’¬ Sensebender Gateway

      @hek

      https://github.com/mysensors/ArduinoHwSAMD/tree/master/driver

      I click on the link below the folder drivers

      0_1486482224917_NamnlΓΆs.png

      //Mattias

      posted in OpenHardware.io
      MLs
      MLs
    • RE: πŸ’¬ Sensebender Gateway

      @MLs

      When I downloaded the drivers so I make the following step.
      Right-click at the file and save target as.

      //Mattias

      posted in OpenHardware.io
      MLs
      MLs
    • RE: πŸ’¬ Sensebender Gateway

      @scalz

      Thanks for a super instruction but it is the file itself that the computer says from. It says that the folder contains the no driver

      And the driver in the folder I chose I downloaded here

      https://github.com/mysensors/ArduinoHwSAMD/blob/master/driver/mysensors-samd.inf

      // Mattias

      posted in OpenHardware.io
      MLs
      MLs
    • RE: πŸ’¬ Sensebender Gateway

      @scalz

      Heh've tried both in the device manager and manually. Device Manager, I get an error message.

      0_1486469926862_Enhetshanteraren.png

      And manually, nothing happens.

      0_1486469936775_Manuelt.png

      //Mattias

      posted in OpenHardware.io
      MLs
      MLs
    • RE: πŸ’¬ Sensebender Gateway

      @tbowmo

      I tried to update the drivers in Device Manager / sense bender GW but it failed to install the computer said.

      Therefore, I asked one who wrote that he was using Windows 7

      //Mattias

      posted in OpenHardware.io
      MLs
      MLs
    • RE: πŸ’¬ Sensebender Gateway

      @Disca

      Where did you find the drivers for sensebender GW for Windows 7?

      //Mattias

      posted in OpenHardware.io
      MLs
      MLs
    • RE: πŸ’¬ Sensebender Gateway

      @tbowmo

      Now, I think it feels like hardware failure more than software errors. Will try tomorrow on my second computer with Windows 7 and see if there is any difference.

      //Mattias

      posted in OpenHardware.io
      MLs
      MLs
    • RE: πŸ’¬ Sensebender Gateway

      @Disca

      No, I have not installed or selected com port.
      Device Manager COM4
      As I understood it so Windows 10 would fix everything, right?

      //Mattias

      posted in OpenHardware.io
      MLs
      MLs
    • RE: πŸ’¬ Sensebender Gateway

      @tbowmo

      Hi i get same error whit Sensebender Ga

      Arduino:1.8.0 (Windows 10), Kort:"Sensebender Gateway"
      
      Build options changed, rebuilding all
      Sketch uses 46720 bytes (17%) of program storage space. Maximum is 262144 bytes.
      No device found on COM4
      An error occurred while uploading the sketch
      Invalid version found: 1.04
      Invalid version found: 1.04
      
      This report would have more information with
      "Show verbose output during compilation"
      option enabled in File -> Preferences.```
      

      No device found on COM4
      But serial monitor works fine with COM4

      //Mattias

      posted in OpenHardware.io
      MLs
      MLs
    • RE: πŸ’¬ Sensebender Gateway

      @MLs

      I found the problem myself. Had just installed Micro

      posted in OpenHardware.io
      MLs
      MLs
    • RE: πŸ’¬ Sensebender Gateway

      @tbowmo

      Yes, I have installed MYSensors boards but find only micro

      0_1486308954042_Boards.png

      So therefore, I tried another card.

      //Mattias

      posted in OpenHardware.io
      MLs
      MLs
    • RE: πŸ’¬ Sensebender Gateway

      @tbowmo

      When I try to upload sketch

      Arduino:1.8.0 (Windows 10), Kort:"Arduino/Genuino Zero (Native USB Port)"
      
      Sketch uses 46488 bytes (17%) of program storage space. Maximum is 262144 bytes.
      No device found on COM4
      An error occurred while uploading the sketch
      Invalid version found: 1.04
      Invalid version found: 1.04
      
      This report would have more information with
      "Show verbose output during compilation"
      option enabled in File -> Preferences.
      

      When I use the serial monitor

      0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGS--,VER=2.1.0
      0;255;3;0;9;TSF:LRT:OK
      0;255;3;0;9;TSM:INIT
      0;255;3;0;9;TSF:WUR:MS=0
      0;255;3;0;9;TSM:INIT:TSP OK
      0;255;3;0;9;TSM:INIT:GW MODE
      0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
      0;255;3;0;9;MCO:REG:NOT NEEDED
      0;255;3;0;14;Gateway startup complete.
      0;255;0;0;18;2.1.0
      0;255;3;0;9;MCO:BGN:STP
      0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
      0;255;3;0;9;TSF:MSG:READ,27-27-0,s=0,c=1,t=1,pt=7,l=5,sg=0:45.6
      27;0;1;0;1;45.6
      0;255;3;0;9;TSF:MSG:READ,23-23-0,s=1,c=1,t=0,pt=7,l=5,sg=0:8.4
      23;1;1;0;0;8.4
      0;255;3;0;9;TSF:MSG:READ,23-23-0,s=1,c=1,t=0,pt=7,l=5,sg=0:8.3
      23;1;1;0;0;8.3
      0;255;3;0;9;TSF:MSG:READ,23-23-0,s=0,c=1,t=1,pt=7,l=5,sg=0:51.8
      23;0;1;0;1;51.8
      0;255;3;0;9;TSF:MSG:READ,22-22-0,s=1,c=1,t=0,pt=7,l=5,sg=0:3.4
      22;1;1;0;0;3.4
      0;255;3;0;9;TSF:MSG:READ,23-23-0,s=0,c=1,t=1,pt=7,l=5,sg=0:52.0
      23;0;1;0;1;52.0
      0;255;3;0;9;TSF:MSG:READ,22-22-0,s=1,c=1,t=0,pt=7,l=5,sg=0:3.5
      22;1;1;0;0;3.5
      0;255;3;0;9;TSF:MSG:READ,23-23-0,s=1,c=1,t=0,pt=7,l=5,sg=0:8.2
      23;1;1;0;0;8.2
      0;255;3;0;9;TSF:MSG:READ,23-23-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      0;255;3;0;9;TSF:MSG:BC
      0;255;3;0;9;TSF:MSG:FPAR REQ,ID=23
      0;255;3;0;9;TSF:PNG:SEND,TO=0
      0;255;3;0;9;TSF:CKU:OK
      0;255;3;0;9;TSF:MSG:GWL OK
      0;255;3;0;9;!TSF:MSG:SEND,0-0-23-23,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
      0;255;3;0;9;TSF:MSG:READ,23-23-0,s=0,c=1,t=1,pt=7,l=5,sg=0:52.4
      23;0;1;0;1;52.4
      0;255;3;0;9;TSF:MSG:READ,22-22-0,s=1,c=1,t=0,pt=7,l=5,sg=0:3.4
      22;1;1;0;0;3.4
      0;255;3;0;9;TSF:MSG:READ,23-23-0,s=1,c=1,t=0,pt=7,l=5,sg=0:8.1
      23;1;1;0;0;8.1
      
      

      I USE IDE 1.80

      0_1486306348742_InstΓ€llningar.png

      Which card should I choose to get upload sketch on GW

      //Mattias

      posted in OpenHardware.io
      MLs
      MLs
    • RE: πŸ’¬ Sensebender Gateway

      @tbowmo

      (for info, a new Mysensors SAMD board definition file have been released (1.0.4))

      Where?

      posted in OpenHardware.io
      MLs
      MLs
    • RE: πŸ’¬ Sensebender Gateway

      Hey it should look like this?

      But you see the gap between the W5100 and Sensebende Gateway.

      0_1486208943376_Sensebender GW 006.JPG

      0_1486208957253_Sensebender GW 007.JPG

      0_1486208970805_Sensebender GW 008.JPG

      0_1486208982183_Sensebender GW 009.JPG

      Sorry for a very poor camera

      //Mattias

      posted in OpenHardware.io
      MLs
      MLs
    • Sensebender Gateway and ATSHA204

      Hey now Sense Bender Gateway arrived and I was going to start using ATSHA204- But am a bit worried to lock something in the circuit so that I destroy it. So a few questions I have after I read https://forum.mysensors.org/topic/1021/security-introducing-signing-support-to-mysensors/2

      What locks must be locked to make it work with ATSHA204. I also resolve ATSHA204 I played a little bit with. And I have run SecurityPersonalizer.ino then after that I locked configuration. Then, I generated a key without a lock to replace the key if I want to. And if I have understood everything correctly so it will be good so? Then you come to put the key in other ATSHA204 should then edit the file SecurityPersonalizer.ino and paste the key you got from the first ATSHA204?

      PF8F
      UseFlag00 | UpdateCount00 | UseFlag01 | UpdateCount01 | FF | 00 | FF | 00
      UseFlag02 | UpdateCounC2 42 | AF 8F
      UseFlag00 | UpdateCount00 | UseFlag01 | UpdateCount01 | FF | 00 | FF | 00
      UseFlag02 | UpdateCount02 | UseFlag03 | Upd
      UseFlag00 | UpdateCount00 | UseFlag01 | UpdateCount01 | FF | 00 | FF | 00
      UseFlag02 | UpdateCount02 | UseFlag03 | UpdateCount03 | FF | 00 | FF | 00
      UseFlag04 | UpdateCount04 | UseFlag05 | UpdateCount05 | FF | 00 | FF | 00
      UseFlag06 | UpdateCount06 | UseFlag07 | β€˜β€¦Γ‘β€’
      ½Õ¹ÑÁ7 | FF | 00 | FF | 00
      LastKPersonalization sketch for MySensors usage.
      -------------------------------------------
      Device revision: 00000004
      Device serial: {0x01,0x23,0x3F,0x99,0xAA,0x5B,0xA5,0xCE,0xEE}
      01233F99AA5BA5CEEE
      Skipping configuration write and lock (configuration already locked).
      Chip configuration:
      EEPROM DATA:
      SOFT_HMAC_KEY | FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
      SOFT_SERIAL | FFFFFFFFFFFFFFFFFF
      AES_KEY | FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
      ATSHA204A DATA:
      SN[0:1] | SN[2:3] | 01 23 | 3F 99
      Revnum | 00 04 05 00
      SN[4:7] | AA 5B A5 CE
      SN[8] | Reserved13 | I2CEnable | Reserved15 | EE | 55 | 00 | 00
      I2CAddress | TempOffset | OTPmode | SelectorMode | C8 | 00 | 55 | 00
      SlotConfig00 | SlotConfig01 | 8F 80 | 80 A1
      SlotConfig02 | SlotConfig03 | 82 E0 | A3 60
      SlotConfig04 | SlotConfig05 | 94 40 | A0 85
      SlotConfig06 | SlotConfig07 | 86 40 | 87 07
      SlotConfig08 | SlotConfig09 | 0F 00 | 89 F2
      SlotConfig0A | SlotConfig0B | 8A 7A | 0B 8B
      SlotConfig0C | SlotConfig0D | 0C 4C | DD 4D
      SlotConfig0E | SlotConfig0F | C2 42 | AF 8F
      UseFlag00 | UpdateCount00 | UseFlag01 | UpdateCount01 | FF | 00 | FF | 00
      UseFlag02 | UpdateCount02 | UseFlag03 | UpdateCount03 | FF | 00 | FF | 00
      UseFlag04 | UpdateCount04 | UseFlag05 | UpdateCount05 | FF | 00 | FF | 00
      UseFlag06 | UpdateCount06 | UseFlag07 | UpdateCount07 | FF | 00 | FF | 00
      LastKeyUse[0:3] | FF FF FF FF
      LastKeyUse[4:7] | FF FF FF FF
      LastKeyUse[8:B] | FF FF FF FF
      LastKeyUse[C:F] | FF FF FF FF
      UserExtra | Selector | LockValue | LockConfig | 00 | 00 | 55 | 00
      Take note of this key, it will never be the shown again:
      #define MY_HMAC_KEY
      0x25,0x8B,0x49,0xD7,0x2E,0x43,0x2F,0x3A,0x61,0xF5,0x4A,0xB9,0x9F,0x93,0x05,0x32,\
      0x55,0xB9,0xF6,0xF2,0x9A,0x4C,0xD7,0x4E,0x52,0x12,0xAC,0x58,0x03,0xAE,0xCD,0x6F
      Writing key to slot 0...
      Data not locked. Define LOCK_DATA to lock for real.
      --------------------------------
      Personalization is now complete.
      Configuration is LOCKED
      Data is UNLOCKED```
      

      My goal with my network are able to both have ATSHA204 nodes and ordinary nodes without ATSHA204. As the temperature and the like nodes.

      Or is it better to use ATSHA204 on all nodes?

      //Mattias

      posted in Troubleshooting
      MLs
      MLs
    • RE: How to scan rf remote

      https://www.google.se/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=rf+433+sniffer+arduino

      //Mattias

      posted in Development
      MLs
      MLs
    • RE: Can't ping Ethernet Gateway ENC28J60 + Arduino Nano Clone

      Hello I upload ENC28J60 Ethernet sample file from MySensors and it worked with MySensors Lib 2.1.1. And I used the Arduino Pro Mini, nRF24L01 Radio and ENC28J60 Ethernet. Do you use Arduino Pro Mini, you must disable debugging.

      //Mattias

      posted in Troubleshooting
      MLs
      MLs
    • RE: Domoticz now supports the MySensors MQTT Gateway

      Thanks for the link but has already read it and also other pages with solutions to problems regarding MQTT.
      Now I will not use MQTT but still want to identify the problem I have.

      //Mattias

      posted in Domoticz
      MLs
      MLs
    • RE: Domoticz now supports the MySensors MQTT Gateway

      Yes, i have lan to because I have several GW.

      0_1485098286725_Domoticz_Hardware.png

      And I turn them off when I do not try to solve the problem to reduce the log in Domoticz.
      I'll try a MQTT debugging software.

      But I think my problem lies in the software at RPI 2 B. Thus, communication between MQTT and Domoticz.

      //Mattias

      posted in Domoticz
      MLs
      MLs
    • RE: Domoticz now supports the MySensors MQTT Gateway

      Hey, I've been trying for a few weeks now to get Domoticz to talk to MQTT GW. Without success. It connects to the RPI 2 B directly. If you look in the log for mosquitto it will connect there. Sometimes I get socket error and disconnects. But no connection to Domoticz.

      What are I doing wrong? Have reinstalled the software at RPI 2 B many times without any difference.

      Log mosquitto

      Insert Code Here
      ```1484960555: New connection from 192.168.0.178 on port 1883.
      1484960555: New client connected from 192.168.0.178 as mysensors-1 (c1, k15).
      1484960921: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
      1484961568: Client mysensors-1 has exceeded timeout, disconnecting.
      1484961568: Socket error on client mysensors-1, disconnecting.
      1484962722: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
      1484964523: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
      1484966324: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
      1484968125: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
      1484969926: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
      1484971727: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
      1484973528: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
      1484975329: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
      1484977130: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
      1484978931: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
      1484980732: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
      1484982533: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
      1484984334: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
      1484986135: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
      1484987936: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
      1484989737: Saving in-memory database to /var/lib/mosquitto/mosquitto.db.
      1484990881: New connection from 192.168.0.178 on port 1883.
      1484990881: New client connected from 192.168.0.178 as mysensors-1 (c1, k15).
      1484990917: Socket error on client mysensors-1, disconnecting.
      

      And W5100 GW log

      Insert Code Here
      0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.0
      0;255;3;0;9;TSM:INIT
      0;255;3;0;9;TSF:WUR:MS=0
      0;255;3;0;9;TSM:INIT:TSP OK
      0;255;3;0;9;TSM:INIT:GW MODE
      0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
      0;255;3;0;9;MCO:REG:NOT NEEDED
      IP: 192.168.0.178
      0;255;3;0;9;MCO:BGN:STP
      0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
      IP: 192.168.0.178
      0;255;3;0;9;Attempting MQTT connection...
      0;255;3;0;9;MQTT connected
      0;255;3;0;9;Sending message on topic: domoticz/in/MyMQTT/0/255/0/0/18
      0;255;3;0;9;TSF:MSG:READ,21-21-0,s=1,c=1,t=0,pt=7,l=5,sg=0:14.0
      0;255;3;0;9;Sending message on topic: domoticz/in/MyMQTT/21/1/1/0/0
      0;255;3;0;9;TSF:MSG:READ,21-21-0,s=0,c=1,t=1,pt=7,l=5,sg=0:40.0
      0;255;3;0;9;Sending message on topic: domoticz/in/MyMQTT/21/0/1/0/1
      
      And Domoticz Log
      
      

      Domoticz Log

      2017-01-21 09:38:08.641 (MySensors Lan) Temp + Humidity (TempHumSrum)
      2017-01-21 09:47:34.718 (MySensors Lan) Temp + Humidity (TempHumSrum)
      2017-01-21 09:49:40.736 (MySensors Lan) Temp + Humidity (TempHumSrum)
      2017-01-21 09:59:06.819 (MySensors Lan) Temp + Humidity (TempHumSrum)
      2017-01-21 10:01:12.836 (MySensors Lan) Temp + Humidity (TempHumSrum)
      2017-01-21 10:10:39.914 (MySensors Lan) Temp + Humidity (TempHumSrum)
      2017-01-21 10:12:45.932 (MySensors Lan) Temp + Humidity (TempHumSrum)
      2017-01-21 10:22:12.010 (MySensors Lan) Temp + Humidity (TempHumSrum)
      2017-01-21 10:24:18.028 (MySensors Lan) Temp + Humidity (TempHumSrum)
      2017-01-21 10:33:44.106 (MySensors Lan) Temp + Humidity (TempHumSrum)
      2017-01-21 10:35:50.124 (MySensors Lan) Temp + Humidity (TempHumSrum)
      2017-01-21 10:41:40.606 MQTT: Connecting to 192.168.0.178:1883
      2017-01-21 10:43:47.836 Error: MQTT: Failed to start, return code: 14 (Check IP/Port)```
      

      //Mattias

      posted in Domoticz
      MLs
      MLs
    • RE: DHT sketch version 2.1.0 no data i IDE seiel [SOLVED]

      @MLs Since not gateway talked to the controller so the node is not passed on to DHT. But the problem with Domoticz and MQTT I still have. Can not get the Domoticz to redeem from MQTT.

      //Mattias

      posted in Troubleshooting
      MLs
      MLs
    • RE: MQTT from RasPi MySensors GW to remote Domoticz

      @ikkeT Hey, you got it to working?
      Have also tried for a while now but no visible in Domoticz.

      //Mattias

      posted in Domoticz
      MLs
      MLs
    • RE: DHT sketch version 2.1.0 no data i IDE seiel [SOLVED]

      The node is 2 years old and had MySensors lib 1.0 or 1.4 in the past so it works. But try to put up a new system of Domoticz and MQTT but Domoticz not read data from mosquitto.

      Domoticz log
      0_1483886586338_Domoticz_Log.png

      Mosquitto Log
      0_1483886659486_Mosquitto_Log.png

      Broker Log (UNO And W5100)
      0_1483886712359_UNO_W5100_Log.png

      posted in Troubleshooting
      MLs
      MLs
    • DHT sketch version 2.1.0 no data i IDE seiel [SOLVED]

      0_1483741354865_No Data.png

      And if i use DHT example sketch then I get data temp / hum

      Mattias

      posted in Troubleshooting
      MLs
      MLs
    • RE: πŸ’¬ Air Humidity Sensor - DHT

      DHT sketch version 2.1.0 no data i IDE seiel

      And if i use DHT example sketch then I get data temp / hum

      Did not have permission to post in the forum

      posted in Announcements
      MLs
      MLs
    • RE: Radio setup give: "check wires"

      @axillent

      As I wrote earlier, it is linked and I have also measured the cables to minimize errors.

      posted in Troubleshooting
      MLs
      MLs
    • RE: Radio setup give: "check wires"

      @axillent

      Possible, but now I wanted to read it out of the hardware to be sure.

      posted in Troubleshooting
      MLs
      MLs
    • RE: Radio setup give: "check wires"

      @axillent

      I bought them through the store available here at Mysensors

      posted in Troubleshooting
      MLs
      MLs
    • RE: Radio setup give: "check wires"

      @axillent

      Four Dallas temp sensor.

      But what I am interested in is the model I have (nRF24L01 + / nRF24L01) and not to send / receive data.

      posted in Troubleshooting
      MLs
      MLs
    • RE: Radio setup give: "check wires"

      @olaeke

      I can not get it to work.

      The pins I use on nRF24L01 + / nRF24L01

      Arduino NRF24L01 Radio Ethernet module
      GND GND
      3.3V VCC
      13 SCK
      12 MISO
      11 MOSI
      6 CSN
      5 CE

      And what I get is this

      STATUS = 0x00 RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=0 TX_FULL=0
      RX_ADDR_P0-1 = 0x0000000000 0x0000000000
      RX_ADDR_P2-5 = 0x00 0x00 0x00 0x00
      TX_ADDR = 0x0000000000
      RX_PW_P0-6 = 0x00 0x00 0x00 0x00 0x00 0x00
      EN_AA = 0x00
      EN_RXADDR = 0x00
      RF_CH = 0x00
      RF_SETUP = 0x00
      CONFIG = 0x00
      DYNPD/FEATURE = 0x00 0x00
      Data Rate = 1MBPS
      Model = nRF24L01
      CRC Length = Disabled
      PA Power = PA_MIN

      What am I doing wrong?

      posted in Troubleshooting
      MLs
      MLs