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
WieselW

Wiesel

@Wiesel
About
Posts
3
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Change valuename send to Controller
    WieselW Wiesel

    Hi gohan.
    Oh, I thought it was a mysensors thing. That there's anywhere a declaration for the value name.
    I'm new in house automation and still have a lot to learn.
    I will ask in FHEM Forum. Thank you.

    Development

  • Change valuename send to Controller
    WieselW Wiesel

    Hey everybody,

    I built a soil moisture sensors with the YL-39 and YL-69. I'm using FHEM as Controller. The name of the value from sensors is present as "level". I would like to rename it to "moisture level".
    Can someone explain how I can change the valuename ?

    /*
     * 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.
     */
    
     // Enable debug prints to serial monitor
    #define MY_DEBUG
    
    // Enable and select radio type attached
    #define MY_RADIO_NRF24
    //#define MY_RADIO_RFM69
    
    #include <MySensors.h>
    #define CHILD_ID 0
    
    MyMessage msg(CHILD_ID, V_LEVEL);
    unsigned long SLEEP_TIME = 10000; // Sleep time between reads (in milliseconds)
    
    int lastSoilValue;
    
    // YL-39 + YL-69 humidity sensor
    byte humidity_sensor_pin = A1;
    byte humidity_sensor_vcc = 6;
    
    void presentation()
    {
      sendSketchInfo("Soil Moisture Sensor", "1.0");
      present(CHILD_ID, S_MOISTURE);
    }
    
    void setup() {
      // Init the humidity sensor board
      pinMode(humidity_sensor_vcc, OUTPUT);
      digitalWrite(humidity_sensor_vcc, LOW);
    }
    int read_humidity_sensor() {
      digitalWrite(humidity_sensor_vcc, HIGH);
      delay(500);
      int value = analogRead(humidity_sensor_pin);
      digitalWrite(humidity_sensor_vcc, LOW);
      return 1023 - value;
      }
    
    void loop() { 
      int soilValue = read_humidity_sensor();
      Serial.print("Soil Moisture Level (0-1023): ");
      Serial.println(soilValue);
      
      //send back the values
      if (soilValue != lastSoilValue) {
      send(msg.set(soilValue, 0));
      lastSoilValue = soilValue;
      }
      
      // delay until next measurement (msec)
      sleep(SLEEP_TIME);
    }
    
    Development

  • 💬 Dimmable LED Actuator
    WieselW Wiesel

    Hi,
    I'm new in MySensors and build this Dimmer - LED with and without the rotary encoder which works fine.
    Now I would like to decouple the rotary encoder as a battery powered "standalone" sensor which is (in best case) connected directly to the LED-Dimmer. Furthermore the decoupled rotary encoder should be always in sleep mode until the rotary encoder awake the arduino.
    Is that possible ? I'm just stuck to seperate the code for the rotary encoder from the led-dimmer code.
    Thank you in advance.

    Announcements
  • Login

  • Don't have an account? Register

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