Send raw message
-
Send raw message
With
Send raw message
feature we can send any type of message to node/sensors.
Navigate toAction board -> Send raw message
.- Select a gateway
- Enter
Node EUI
andSensor id
- Select
Type
andSub type
- Select
Acknowledge
type Payload
is optional
-
@jkandasa Is There a way to send a row message to a sleeping Node that only wake up temporaly occasionally (Battery-Powered Node).
A sort of trigger that send message when receive data from that node... (like MYSController do)Thanks in advance
-
@Tetnobic Yes, with SNAPSHOT version it supports for sleeping node. Kindly have a look on https://github.com/mycontroller-org/mycontroller/issues/208
-
@jkandasa Perfect ! Nice Job !
-
@jkandasa The support of sensor sleeping mode works but...
In my sensor code, I use the smartSleep method when sleeping.
So my sensor wake up, send heartbeat and go back to sleep and sometimes during this loop mycontroller is not fast enought to send the payload...In default mysensors/myconfig.h, the smart sleep wait duration is set to 500ms
#ifndef MY_SMART_SLEEP_WAIT_DURATION_MS
#define MY_SMART_SLEEP_WAIT_DURATION_MS (500ul)
#endifDo you think I need to increase this duration ? perhaps 1000ms or more ?
Thanks in advance
-
@Tetnobic Yes, I think you have to increase the sleep wait time. Test with 2 seconds (2000ms)
-
@jkandasa
Finally I found another solution :
I used a raspberry pi gateway in ethernet type (so connected mycontroller with ip:port to this gateway)
Now I use a raspberry pi gateway in serial type (so connected mycontroller on /dev/ttyMySensorsGateway) and it works with default MY_SMART_SLEEP_WAIT_DURATION_MS
I think mycontroller is more reactive with serial gateway -
I think mycontroller is more reactive with serial gateway
AFAIK, Mysensors serial gateway is working as real-time. Other gateways has small delay(as it is working with polling mechanism)
-
I tried to send a raw message to a node and it's child sensor. The node never received the message.
The receiving node has the following sketch
//========= Receiving Message from GW======
void receive(const MyMessage &message)
{
Serial.print("received msg type");
Serial.println(message.type);
Serial.print("Incoming change for sensor:");
Serial.println(message.sensor);
}
Nothing showed on Serial Screen. Can someone point me to the right direction? I'm miss-understood something? -
@andyphan Are you receiving other messages from that node? recheck the node id once again