Closed apachler closed 3 years ago
Hi Andreas,
thanks for your feedback!
I suggest to adjust app.py so that is passes he fPort as a parameter additionally to the PayloadData in the dict_from_payload function of the decoder. By doing so, we would make dict_from_payload logic agnostic of the invocation context or AWS IoT Core for LoRaWAN, so it could be reused by customers in other contexts.
Does it make sense for you? If you agree, I would make an according adjustment in app.py
Hi Andrei,
yes, that sounds good to me ;)
If you are done with your adjustments I am going to complete the NAS UM3080 payload decoder and create a pull request for it ...
Thanks!
Hi Andreas, take a look at the implementation in branch feature/transform_binary_payload/fport:
app.py is also updated accordingly.
If that works for you, I will merge it into master.
Sure, that will work quite well 👍
Done!
Issue
I am trying to implement a new decoder for a device that sends different messages on different ports. Because the actual implementation of lambda_handler in app.py does not pass the fPort to the decoder, it is impossible to differentiate between these messages.
Device
NAS Pulse Reader UM3080 specification
Request
What would be the best approach to make the fPort available for the decoder?
Any other ideas?
Just wanted to discuss how it should be implemented. I am going to do the whole refactoring for all decoders once the desired approach is defined.
Thanks!