[Bug] SmartSleep with Payload forwarding not working?
See original GitHub issueHello,
I have the following setup:
Node A = A node with temperature + humidity Sensor Node B = A Node with a display
Now I want to forward temperature and humidity from Node A to Node B with the “Forward payload” feature which is btw. REALLY REALLY NEAT!!! very good feature.
Node B is sleeping most of the time with smartsleep … but due to smart sleep misses the forwarded payloads. Is there maybe a bug with smartsleep?
I have enabled smart sleep on Node B:
As I see this correctly the controller might forward the values despite Node B not beeing “online”??
This function is not called when I use smartsleep
void receive(const MyMessage &message) { printmsg(message); }
If I comment it out it is working as expected.
PS: I am running 2.2.0-beta on my gateway and Node B
I am using Built on
2017-05-08T08:27:47+0530
/**
* 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.
*
**/
#define MY_NODE_ID 50
// Enable debug prints to serial monitor
#define MY_DEBUG
// Enable and select radio type attached
#define MY_RADIO_NRF24
//#define MY_RADIO_NRF5_ESB
//#define MY_RADIO_RFM69
//#define MY_RADIO_RFM95
#define MY_RF24_CE_PIN 8
#define MY_RF24_CS_PIN 9
#define MY_SMART_SLEEP_WAIT_DURATION_MS 500
#include <MySensors.h>
MyMessage msg_temp(0, V_TEMP);
MyMessage msg_hum(1, V_HUM);
void before()
{
}
void setup()
{
//send(msg_temp.set(0));
//send(msg_hum.set(0));
}
void presentation()
{
// Send the sketch version information to the gateway and Controller
sendSketchInfo("Dummy show", "1.0");
present(0, S_TEMP);
present(1, S_HUM);
}
void loop()
{
smartSleep(4000);
}
void receive(const MyMessage &message)
{
printmsg(message);
}
PS: This is my current project:
I tried this too but the list stays empty:
https://forum.mycontroller.org/topic/128/send-payload-but-nack/7
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
I would recommend to get one from waveshare as they already got the required electronic parts (mostly capacitors):
https://www.ebay.de/sch/i.html?_from=R40&_sacat=0&_nkw=waveshare e-ink&rt=nc&LH_PrefLoc=2&_trksid=p2045573.m1684
Found the mistake I guess:
After the first cycle
will evaluate to “true” and break the loop so only one message gets send.