GithubHelp home page GithubHelp logo

Comments (4)

ronniesa avatar ronniesa commented on May 31, 2024

This is normal and it can happen the reason is that we do not receive the downstream message in time from iot hub so we need to abandon, at the next upstream message we try to deliver the message again.

For a customer that needs to send down the current time for time sync we implemented a feature that the decoder can send the downstream message as an answer so basically you do all the logic iside the decoder so is faster and you don't relay on queues or server or network.
For an additional customer we implemented that you can even send it to a Class C device from within the decoder. This was implemented for a usecase where a pump (ClassC) needs to be turn on based on a ClassA sensor value.

So the following patterns can be implemented:

  • deviceA upstream messsage is decoded and a downstream message is sent to the same deviceA from within the decoder
  • deviceA upstream messsage is decoded and a downstream message is sent to a differenc deviceC from within the decoder

We don't have yet a doc but the implementation is all there. The decoder DecodePayloadResult https://github.com/Azure/iotedge-lorawan-starterkit/blob/master/Samples/DecoderSample/Classes/DecodePayloadResult.cs has a new optional property LoRaCloudToDeviceMessage where you can assigne a LoRaCloudToDeviceMessage to it https://github.com/Azure/iotedge-lorawan-starterkit/blob/master/Samples/DecoderSample/Classes/LoRaCloudToDeviceMessage.cs if you omit the LoRaCloudToDeviceMessage.DevEUI it will send back to the same ClassA device if you specify a DevEUI it will try to send it to that device as ClassC

Pay super attention at how long it takes for the operation to prepare the downstream message in case you call a server or do something more complex that will not be local only that is fast enough to stay below 1 second. It dosen't have a queue so if it cannot deliver it in the current window then the message is lost.

Let us know if you need help in trying this feature

from iotedge-lorawan-starterkit.

gerfen avatar gerfen commented on May 31, 2024

@ronniesa Thanks for the info. I will need to think this through. I'd like to keep this issue open for a bit while I ponder the possibilities.

from iotedge-lorawan-starterkit.

ronniesa avatar ronniesa commented on May 31, 2024

@gerfen is this issue still active or can we close it?

from iotedge-lorawan-starterkit.

gerfen avatar gerfen commented on May 31, 2024

I'm still working on how best to deal with the issue for the devices I'm working with. I'll close for now and will reopen or add a new issue when I can get back to experimenting with the devices.

from iotedge-lorawan-starterkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.