Hi all,
I try downlink order from Cayenne dashboard to lorawan node (arduino nano + rfm95 ) but I don’t really anderstand the steps to follow.
(yes I’ve read Cayenne docs
(uplink is ok: by exemple i receive temperature in Cayenne dasboard)
1- With lpp.addDigitalOutput in my sketch I can see a “digital output” widget in Cayenne dashboard.
lpp.addDigitalOutput(4, 1); // channel 4, set digital output high
2- When i click on this widget I can observe a payload in my TTN console (04 00 64 FF or 04 00 00 FF ) with th information : port 99 scheduled confirmed.
(and after “downlink scheduled” I can see “downlink sent” by the gateway )
So it’s ok : 04 <=> channel 4 and 64 <=> my digital output is “ON” but …
3- Question : how to retrieve and use this information in my sketch.ino to flash a led or operate a relay by example ?
the beginner I am failing to find tutorial
( myDevices | Simplify Sensor Deployments is not clear enough for me )
I would assume that using lpp.addDigitalOutput(4, 1); will automatically set pin 4 to whatever the dashboard is, but unfortunately I broke the USB port on my gateway so I can’t test it (mine had the same fate as @rsiegel’s) There maybe be a function that you have to call periodically similar to cayenne.loop() with the MQTT connection method.
@jburhenn I looked on the github page for some examples and wasn’t able to find any or wasn’t looking in the right place, do you have any that you can share?
Yeah, we don’t currently have an example for receiving the LPP payload. Probably because it depends on the LoRa library used. @Fufu, what LoRa library are you using to send data?
Depending on what library it is you may need to add some code in loop() to receive data from the server, or you may need to register a callback to handle data.
It looks like you are already getting the LMIC.frame data for the downlink message inside the EV_TXCOMPLETE case statement. Is that not working? If not it might be an issue with the arduino-lmic library.
Sorry jburhenn : I had not seen your answer before that day … and to be honest I was busy in the kitchen garden in recent weeks !
I’ll go back to LPP Cayenne as soon as possible