question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] SmartSleep with Payload forwarding not working?

See original GitHub issue

Hello,

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:

image

As I see this correctly the controller might forward the values despite Node B not beeing “online”??

image

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 image

/**
 * 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:

img_20171001_010015

I tried this too but the list stays empty:

https://forum.mycontroller.org/topic/128/send-payload-but-nack/7

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
cimba007commented, Oct 9, 2017

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

1reaction
cimba007commented, Oct 8, 2017

Found the mistake I guess:

After the first cycle

System.currentTimeMillis() <= (startTime + sleepWaitDuration

will evaluate to “true” and break the loop so only one message gets send.

+                //Check still do we have duration on receiver side
 +                if (sleepWaitDuration != null && (System.currentTimeMillis() <= (startTime + sleepWaitDuration))) {
 +                    break;
 +                }
Read more comments on GitHub >

github_iconTop Results From Across the Web

InfluxDB and Grafana · Issue #451 - GitHub
I am forwarding all sensor readings to influxdb and have separate Grafana dashboards. But not in the mycontroller dashboards directly though ...
Read more >
MBP keeps crashing on wake from sleep - Apple Community
2015 MBP running 10.10.5. Recently and increasingly often my MBP doesn't wake properly from sleep overnight (seems OK for shorter periods ...
Read more >
Corus - Rossa Kim
A smart sleep system that helps cohabitating couples become more synchronized in their sleep routines. Brief : Design a digital sleep solution for...
Read more >
MySensors - MqttCogs WordPress Plugin
The MySensors library has a built in function called smartSleep. When you call this function the following happens: The Node sends a message...
Read more >
Troubleshooting - MySensors Forum
Help! Everything just falls apart.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found