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
CravecodeC

Cravecode

@Cravecode
About
Posts
27
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Does HA ignore repeat sensor values?
    CravecodeC Cravecode

    @martinhjelmare, sorry to bring up an old topic. I'm on a version of HA that includes your PR (v.: 0.54.0), however, my motion sensors only update their last_updated property when the motion sensor's state changes. I can see in HA'a log that it is receiving the expected repeated state (1;1;1;0;16;0) every X minutes, but the entity doesn't update the last_updated timestamp unless the motion sensor's state changes. Is there a way I can force the last_updated timestamp for each msg?

    Some context: I'm attempting to write automation rules to create alerts for sensors that have not checked-in within X minutes.

    Home Assistant

  • PIR Sensor false trigger every 10 minutes, same time node comes out of sleep.
    CravecodeC Cravecode

    @NeverDie said in PIR Sensor false trigger every 10 minutes, same time node comes out of sleep.:

    IIRC, bypassing its LDO may help?

    I've actually already done that, to reduce power consumption.

    I'm running some tests now. It really looks like the 2.2.x version of the MySensors library helps. On my test piece, it has not had a false trigger in over an hour.

    Troubleshooting

  • PIR Sensor false trigger every 10 minutes, same time node comes out of sleep.
    CravecodeC Cravecode

    @NeverDie I'm using the HC-SR501. Google turns up lots of related info for the HC-SR501 and false triggers. I'll see what others are doing too.

    Troubleshooting

  • PIR Sensor false trigger every 10 minutes, same time node comes out of sleep.
    CravecodeC Cravecode

    @wallyllama I'm not cutting the power to the PIR sensor. Just putting the Arduino and radio to sleep.

    Troubleshooting

  • Using 2.2.x MySensors library in Sloeber (Eclipse Arduino IDE). Build errors. (Solved)
    CravecodeC Cravecode

    I wanted to use the 2.2.x development branch in my project. So, I swapped out the code that Sloeber adds when you add the MySensors 2.1.1 release version with the latest code from the Github repo.

    Context: This is for a PIR motion sensor using the NRF24L01+ radio.

    I.e.: Replace: /Applications/sloeber 4.app/Contents/Eclipse/arduinoPlugin/libraries/MySensors/2.1.1 with the contents of git clone https://github.com/mysensors/MySensors.git 2.1.1

    I tried building my project (a PIR node), and got several build errors.

    Example build errors:

    'int16_t' does not name a type MyTransportHAL.h /MotionSensorBattery/libraries/MySensors/hal/transport line 118 C/C++ Problem
    'int16_t' does not name a type MyTransportHAL.h /MotionSensorBattery/libraries/MySensors/hal/transport line 123 C/C++ Problem
    'int16_t' does not name a type MyTransportHAL.h /MotionSensorBattery/libraries/MySensors/hal/transport line 128 C/C++ Problem
    'int16_t' does not name a type MyTransportHAL.h /MotionSensorBattery/libraries/MySensors/hal/transport line 133 C/C++ Problem
    'int16_t' does not name a type MyTransportHAL.h /MotionSensorBattery/libraries/MySensors/hal/transport line 138 C/C++ Problem
    'int16_t' does not name a type MyTransportHAL.h /MotionSensorBattery/libraries/MySensors/hal/transport line 143 C/C++ Problem
    'uint8_t' does not name a type MyTransportHAL.h /MotionSensorBattery/libraries/MySensors/hal/transport line 68 C/C++ Problem
    'uint8_t' does not name a type MyTransportHAL.h /MotionSensorBattery/libraries/MySensors/hal/transport line 72 C/C++ Problem
    'uint8_t' does not name a type MyTransportHAL.h /MotionSensorBattery/libraries/MySensors/hal/transport line 81 C/C++ Problem
    'uint8_t' does not name a type MyTransportHAL.h /MotionSensorBattery/libraries/MySensors/hal/transport line 97 C/C++ Problem
    Function 'NRF5_ESB_getNodeID' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 65 Semantic Error
    Function 'NRF5_ESB_getReceivingRSSI' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 137 Semantic Error
    Function 'NRF5_ESB_getSendingRSSI' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 132 Semantic Error
    Function 'NRF5_ESB_initialize' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 54 Semantic Error
    Function 'NRF5_ESB_isDataAvailable' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 86 Semantic Error
    Function 'NRF5_ESB_powerDown' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 112 Semantic Error
    Function 'NRF5_ESB_powerUp' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 117 Semantic Error
    Function 'NRF5_ESB_readMessage' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 97 Semantic Error
    Function 'NRF5_ESB_sanityCheck' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 91 Semantic Error
    Function 'NRF5_ESB_sendMessage' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 80 Semantic Error
    Function 'NRF5_ESB_setNodeAddress' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 59 Semantic Error
    Function 'NRF5_ESB_sleep' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 122 Semantic Error
    Function 'NRF5_ESB_standBy' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 127 Semantic Error
    Function 'NRF5_ESB_startListening' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 60 Semantic Error
    Function 'NRF5_getTxPowerLevel' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 157 Semantic Error
    Function 'NRF5_getTxPowerPercent' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 152 Semantic Error
    Function 'NRF5_setTxPowerPercent' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 162 Semantic Error
    make: *** [libraries/MySensors/hal/transport/MyTransportRF24.cpp.o] Error 1 MotionSensorBattery C/C++ Problem

    To fix this, I simply excluded the ./hal directory from the build. Everything appears to work fine now.

    I.e.: expand libraries > expand MySensors > right click the ./hal directory > Properties > select C/C++ Build > tick Exclude resource from build.

    Can anyone shed some light on the work being done in the ./hal directory? Am I messing something up by excluding this from my build?

    Development

  • PIR Sensor false trigger every 10 minutes, same time node comes out of sleep.
    CravecodeC Cravecode

    I tried the 2.2.x development branch of the MySensors library per @Yveaux's suggestion. The development branch appears to have fixed my issue!

    Troubleshooting

  • PIR Sensor false trigger every 10 minutes, same time node comes out of sleep.
    CravecodeC Cravecode

    Thanks for the replies!
    I'll checkout the 2.2.x dev branch. I tried various sizes for capacitors with no luck.

    Troubleshooting

  • PIR Sensor false trigger every 10 minutes, same time node comes out of sleep.
    CravecodeC Cravecode

    I'm running the following: (PIR Node, MySensors Library v2.1.1) > (ESP8266 Gateway, MySensors Library v2.1.1) < (Home Assistant, 0.50.2).

    The PIR node is currently on a breadboard powered by my test bench power supply to rule out as many factors as possible.

    In my Home Assistant logbook, I can see the PIR is triggered every 10 minutes, all day long. At the end of my loop(){...}, I have the following code:

    unsigned long SLEEP_TIME = 600000; // (10 minutes), Sleep time between reports (in milliseconds)
    #define DIGITAL_INPUT_SENSOR 3  // The digital input you attached your motion sensor. 
    
    /* ... */
    
    void loop()
    {
    
     // Read digital motion value
      bool tripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH;
    
      Serial.println(tripped);
      send(msg.set(tripped?"1":"0"));  // Send tripped value to gw
    
      wait(500);
    
    /**
    defined by Arduino: 
      CHANGE = 1
    **/ 
      sleep(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR), CHANGE, SLEEP_TIME);
    }
    

    I have verified that I do not get the false triggers if i disconnect the PIR sensor from the Arduino's pin 3. So, I know it's the actual PIR reacting to the Arduino coming out of sleep.

    Could this be noise on the power rail from the Arduino or the NRF24L01+? If so, what are my options? I currently have a 4.7uf cap bridged across the NRF24L01's power connections. I will try adding a wait(500); before I actually read pin 3's value.

    FYI: I don't have a scope to test power noise :(

    Troubleshooting

  • Does HA ignore repeat sensor values?
    CravecodeC Cravecode

    @martinhjelmare I see you PR was merged a while ago. It looks like the force_update property defaults to TRUE. Is this now the default behavior for all MySensors sensors?

    Sorry if this seems obvious, I just want to double check.
    Thanks for your work and time!

    Home Assistant

  • ESP8266 Gateway restarts when data is received from node [Solved]
    CravecodeC Cravecode

    @CurlyWurly,

    My situation involves 2 devices:

    • Device 1 - Gateway (ESP8266 + NRF24L01)
    • Device 2 - Temp sensor (NRF24L01 + DHT11)

    FYI: I have a 4.7uF capacitor across the GND and VCC pins of the NRF24L01 on both devices.

    This may sound silly, but make sure your ESP8266 is booted into the correct mode:
    GPIO 0 = High
    GPIO 2 = High
    GPIO 15 = Low

    Troubleshooting

  • ESP8266 Gateway restarts when data is received from node [Solved]
    CravecodeC Cravecode

    @scalz,
    I'm using the DHT11

    Troubleshooting

  • Does HA ignore repeat sensor values?
    CravecodeC Cravecode

    I'm trying to diagnose some repeater issues. I have a temperature sensor sending data every 10 seconds. Home Assistant will go several minutes before it will show a last updated timestamp for my temperature sensor. I can verify in Netcat that the gateway is getting the values every 10 seconds. By chance, I noticed in the debug output, Home Assistant only fires the Event state_changed when the value actually changes. I guess this makes sense.
    Is this normal behavior for HA? Can this be disabled so every sensor message is logged?

    Home Assistant

  • nodeMCU, MY_GATEWAY_ESP8266 and Temp Sensor
    CravecodeC Cravecode

    @mysensors-6043,
    The normal setup involves 3 pieces:

    1. The sensor (aka node) emitting data via RF using something like a NRF24L01
    2. A gateway that receives the sensor data via the RF module (NRF24L01) and sends it to a controller over ethernet or wifi.
    3. A controller to manage connected nodes and present data to the user.

    It seems like you're combining the sensor and gateway into one device. If this is the case, I think you can comment out the #define MY_RADIO_RFM69 line as there is no radio connected. I don't know how this plays into the registration process of a sensor. There is no ID getting associated to the sensor because this is a gateway.

    Maybe someone else can chime in who knows whether it's okay to combine the gateway and sensor into one device. If so, how is registration and ID assignment handled?

    @mysensors-6043,
    Post a updated version of your sketch.

    Troubleshooting

  • nodeMCU, MY_GATEWAY_ESP8266 and Temp Sensor
    CravecodeC Cravecode

    @mysensors-6043,
    The sketch you posted looks like you combined the sensors with the NodeMCU, is this true? Is this NodeMCU acting as a gateway as well?

    Troubleshooting

  • nodeMCU, MY_GATEWAY_ESP8266 and Temp Sensor
    CravecodeC Cravecode

    @mysensors-6043,
    Have you been able to confirm that you get temperature readings on the sensor? I would try to simplify your sketch to rule things out.

    Here's what I'd do, in the following order:

    • Remove all MySensors related code and just get the sensor reading to the serial monitor.
    • I see you're looping over several temperature sensors on the node, simplify this, only read one for starters.
    • Verify your gateway is on the network by using telnet or netcat. I.e.: nc xxx.xxx.xxx.xxx 5003
    • Try just getting your node to "present" to the gateway. Reading the sensor debug via the serial monitor and watch the gateway via netcat.
    Troubleshooting

  • "Node 1 is unknown" requires a restart. 2nd child element never presents
    CravecodeC Cravecode

    I'll create a pull request to update the Air Humidity Sensor example (DhtTemperatureAndHumiditySensor.ino) and reference this post.

    Home Assistant

  • "Node 1 is unknown" requires a restart. 2nd child element never presents
    CravecodeC Cravecode

    @martinhjelmare,
    Updated my sketch, thanks again!

    Home Assistant

  • "Node 1 is unknown" requires a restart. 2nd child element never presents
    CravecodeC Cravecode

    @martinhjelmare Thanks!!
    I added a 500ms delay between each sensor's present call. I also added a 1000ms delay before the sensor sleeps. That seems to have fixed the issue.

    I also confirmed that both delays, between children presentation and before sleep were required.

    Home Assistant

  • "Node 1 is unknown" requires a restart. 2nd child element never presents
    CravecodeC Cravecode

    @martinhjelmare

        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
            Hello, and welcome to Home Assistant!
    
            We'll hope that we can make all your dreams come true.
    
            Here are some resources to get started:
    
             - Configuring Home Assistant:
               https://home-assistant.io/getting-started/configuration/
    
             - Available components:
               https://home-assistant.io/components/
    
             - Troubleshooting your configuration:
               https://home-assistant.io/getting-started/troubleshooting-configuration/
    
             - Getting help:
               https://home-assistant.io/help/
    
            This message is generated by the introduction component. You can
            disable it in configuration.yaml.
    
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=introduction>
    INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=recorder>
    WARNING:mysensors.mysensors:File does not exist or is not readable: /Users/cravecode/.homeassistant/mysensors/esp8266-gateway.json
    WARNING:mysensors.mysensors:Trying backup file: /Users/cravecode/.homeassistant/mysensors/esp8266-gateway.json.bak
    WARNING:mysensors.mysensors:File does not exist or is not readable: /Users/cravecode/.homeassistant/mysensors/esp8266-gateway.json.bak
    WARNING:mysensors.mysensors:Failed to load sensors from file: /Users/cravecode/.homeassistant/mysensors/esp8266-gateway.json
    INFO:mysensors.mysensors:Trying to connect to ('192.168.3.103', 5003)
    INFO:mysensors.mysensors:Connected to ('192.168.3.103', 5003)
    DEBUG:mysensors.mysensors:Received 0;255;3;0;14;Gateway startup complete.
    
    DEBUG:mysensors.mysensors:Received 1;1;1;0;0;71.6
    
    WARNING:mysensors.mysensors:Node 1 is unknown
    INFO:mysensors.mysensors:Requesting new presentation for node 1
    DEBUG:mysensors.mysensors:Sending 1;255;3;0;19;
    
    DEBUG:mysensors.mysensors:Received 1;0;1;0;1;53.0
    
    WARNING:mysensors.mysensors:Node 1 is unknown
    INFO:mysensors.mysensors:Requesting new presentation for node 1
    DEBUG:mysensors.mysensors:Sending 1;255;3;0;19;
    
    DEBUG:mysensors.mysensors:Received 1;1;1;0;0;71.6
    
    WARNING:mysensors.mysensors:Node 1 is unknown
    INFO:mysensors.mysensors:Requesting new presentation for node 1
    DEBUG:mysensors.mysensors:Sending 1;255;3;0;19;
    
    DEBUG:mysensors.mysensors:Received 1;0;1;0;1;53.0
    
    WARNING:mysensors.mysensors:Node 1 is unknown
    INFO:mysensors.mysensors:Requesting new presentation for node 1
    DEBUG:mysensors.mysensors:Sending 1;255;3;0;19;
    
    DEBUG:mysensors.mysensors:Received 1;1;1;0;0;71.6
    
    WARNING:mysensors.mysensors:Node 1 is unknown
    INFO:mysensors.mysensors:Requesting new presentation for node 1
    DEBUG:mysensors.mysensors:Sending 1;255;3;0;19;
    
    DEBUG:mysensors.mysensors:Received 1;0;1;0;1;53.0
    
    WARNING:mysensors.mysensors:Node 1 is unknown
    INFO:mysensors.mysensors:Requesting new presentation for node 1
    DEBUG:mysensors.mysensors:Sending 1;255;3;0;19;
    
    DEBUG:mysensors.mysensors:Received 1;255;0;0;17;2.0.1-beta
    
    >>>>> @martinhjelmare, Below is where I restart the sensor to get it to present.
    
    DEBUG:homeassistant.components.mysensors:Update sensor_update: node 1
    INFO:homeassistant.components.mysensors:No sketch_name: node 1
    INFO:homeassistant.components.mysensors:No sketch_name: node 1
    INFO:homeassistant.components.mysensors:No sketch_name: node 1
    INFO:homeassistant.components.mysensors:No sketch_name: node 1
    DEBUG:mysensors.mysensors:Received 1;255;3;0;6;0
    
    DEBUG:mysensors.mysensors:Sending 1;255;3;0;6;I
    
    DEBUG:mysensors.mysensors:Received 1;255;3;0;11;TemperatureAndHumidity
    
    DEBUG:homeassistant.components.mysensors:Update sensor_update: node 1
    DEBUG:mysensors.mysensors:Received 1;255;3;0;12;1.4
    
    DEBUG:homeassistant.components.mysensors:Update sensor_update: node 1
    DEBUG:mysensors.mysensors:Received 1;0;0;0;7;
    
    DEBUG:homeassistant.components.mysensors:Update sensor_update: node 1
    DEBUG:mysensors.mysensors:Received 1;1;1;0;0;71.6
    
    WARNING:mysensors.mysensors:Child 1 is unknown
    INFO:mysensors.mysensors:Requesting new presentation for node 1
    DEBUG:mysensors.mysensors:Sending 1;255;3;0;19;
    
    DEBUG:mysensors.mysensors:Received 1;0;1;0;1;53.0
    
    DEBUG:homeassistant.components.mysensors:Update sensor_update: node 1
    INFO:homeassistant.components.mysensors:Adding new devices: <Entity TemperatureAndHumidity 1 0: None>
    DEBUG:homeassistant.components.mysensors:TemperatureAndHumidity 1 0: value_type 1, value = 53.0
    DEBUG:mysensors.mysensors:Received 1;1;1;0;0;71.6
    
    WARNING:mysensors.mysensors:Child 1 is unknown
    INFO:mysensors.mysensors:Requesting new presentation for node 1
    DEBUG:mysensors.mysensors:Sending 1;255;3;0;19;
    
    DEBUG:mysensors.mysensors:Received 1;0;1;0;1;52.0
    
    DEBUG:homeassistant.components.mysensors:Update sensor_update: node 1
    DEBUG:homeassistant.components.mysensors:TemperatureAndHumidity 1 0: value_type 1, value = 52.0
    DEBUG:mysensors.mysensors:Received 1;1;1;0;0;71.6
    
    WARNING:mysensors.mysensors:Child 1 is unknown
    INFO:mysensors.mysensors:Requesting new presentation for node 1
    DEBUG:mysensors.mysensors:Sending 1;255;3;0;19;
    
    DEBUG:mysensors.mysensors:Received 1;0;1;0;1;53.0
    
    DEBUG:homeassistant.components.mysensors:Update sensor_update: node 1
    DEBUG:homeassistant.components.mysensors:TemperatureAndHumidity 1 0: value_type 1, value = 53.0
    DEBUG:mysensors.mysensors:Received 1;1;1;0;0;71.6
    
    Home Assistant
  • Login

  • Don't have an account? Register

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