Replies: 27 comments 33 replies
-
Using Berry for decoding was exactly my plan when providing un-decoded MQTT messages.
Example for MerryIoT DW10:
and with
Example for Dragino LDS02
and with
In this case a relation between
|
Beta Was this translation helpful? Give feedback.
-
Thanks for your response. You recommended:
One Berry Script OK - let's be more realistic, and still optomistc. Tasmota ends up with support for 100 device decoders. Still - that is a pretty big Berry script file. My I idea was:
LoRaWanName => Decoder Script Would have to give all 4 the same name.
, when users would probably want to use names like:
It is pretty 'cheap' (code-wise) to add a new command/field Decide Decoder based on I am not sure The most relevant I can find is: The DevEUI (Device EUI) in LoRaWAN is a 64-bit unique identifier assigned to a device, and it does not directly reveal the manufacturer name. The first part of the DevEUI, the first 24 bits, is an OUI (Organizationally Unique Identifier) allocated by the IEEE Registration Authority, which identifies the organization that assigned the device identifier. You can use this OUI to find the organization that assigned the DevEUI, but it might not be the manufacturer. So ... As a data point, my two Dragino devices (and your LDS02) have these
Dragino MAY use the last byte of I notice that your decoder code only looks at the high 3 bytes of
|
Beta Was this translation helpful? Give feedback.
-
I was assuming the LoRaWANDecoder name would be saved in the FileSystem (LikeAppKey). In this
|
Beta Was this translation helpful? Give feedback.
-
Q: BTW using your changes does the Dragino LHT52 join seamlessly? I rewrote the EU868 part to also use different frequencies for RX1/RX2 but my (just received) EU868 LHT52 refuses to listen to my Join response. Joining the MerryIoT does work fine though. A: Yes - both my LHT52 & LHT65 join seamlessly. I just add the AppKey, press the reset button on the LHT decice, and wait a little while. Went through that process many times in my testing. BTW - there is a small comment in my code ... It does NOT actually change freq for RX1. (This is a In AU915, RX1 has to follow Freq/DR rules, but RX2 must be on a fixed/well-known Freq/DR. Kinda a 'fall back' in case RX1 is not received I guess. Anyway - my code relies on RX2 to get the packet to the end device. The TO DO should be addressed, and I might re-visit that after the next release. |
Beta Was this translation helpful? Give feedback.
-
FYI: lastest Dev Build works great with Thanks. Working on PR to add the Berry files & Documentation. |
Beta Was this translation helpful? Give feedback.
-
I'll add support for Currently this won't work as the decoder is initiated by the I need to dive into berry how to pick-up the message from the rules/berry engine. |
Beta Was this translation helpful? Give feedback.
-
I'm stil terribly struggling with the LHT52 failing to join :-( I've connected the LHT52 serially and am able to see the Join process:
The darn thing says JOINED (in my case on 868.1MHZ and DR3) and then continues the initial join process instead of sending a JOIN complete message. To me it looks like the LHT52 is not performing the correct procedure.... |
Beta Was this translation helpful? Give feedback.
-
I did not need to set a fixed freq on the LHT52 for the JOIN process. Do you have a commercial gateway (I am using Dragino LPS8v2, with Chirpstack Network Server). This REALLY helped me as I could see what a 'good' JOIN looked like AND the subsequent up/down packets that quickly followed to see what requests/answers were going back & forth. I note in EU868:
I assume you are using that. Also - I use the CFList in the JOIN-ACCEPT to tell the end device to use a fixed freq. None of the above directly answers your question. I do remember my JOIN-ACCEPTs were not working initially - but that is when I relalised that in AU915:
BTW - I do not even have the USB-C breakout thing to allow me to send AT commands to the LHT52. |
Beta Was this translation helpful? Give feedback.
-
Thx for the info. I hed deduced the same and implemented different RX1/RX2 for EU868 in latest dev release. The problem with Dragino on EU868 is that they send a join request on DR3 followed by next message being on any frequency with DR0. Alas that won't work with Tasmota SX12xx hardware. Now that I configured it to stay on a single frequency and DR it works fine.
Using a LPS8v2 for debugging sounds like a great idea. I might order one for future development and debugging. |
Beta Was this translation helpful? Give feedback.
-
"send a join request on DR3 followed by next message being on any frequency with DR0" But - if the CFlist (that only allows one freq) is included with the JOIN-ACCEPT, then the LHT52 should not use any freq on the next Uplink except the one allowed in the CFlist. That how my AU915 LHT52 works. |
Beta Was this translation helpful? Give feedback.
-
BTW I just updated your berry
|
Beta Was this translation helpful? Give feedback.
-
EU868 CFList Reading this doc: https://lora-alliance.org/wp-content/uploads/2020/11/lorawan_regional_parameters_v1.0.3reva_0.pdf 2.2.4 EU863-870 JoinAccept CFList I see the problem. The EU868 CFlist can only ADD to the 3 default channels ... not replace them. AU915 is different.
That implies Tasmota in EU will miss 66% of all uplinks - unless (as you do) hand-configure the end device to use one channel. Bummer |
Beta Was this translation helpful? Give feedback.
-
Latest dev release adds GUI support to lorawan decoders. |
Beta Was this translation helpful? Give feedback.
-
Here is the other idea that I have not proposed ... and not sure if I should: It is great that Tasmota supports LoRaWAN as the 'basestation' that can RX sensor measurements. The Holy Grail would be if Tasmota sensors could be 'clients' of LoRaWAN. Yep - I get it ... 'too hard'. Also would need hardware that supported BOTH LoRa and the sensors we care about. Impractical. But .... my LilyGoT3S3 came preinstalled with Meshtastic - which of course I immediately overwrote with Tasmota. But I did a bit of googleing on Meshtastic.
What if:
Suspect it would be a lot of work - but opens up the idea of using remote Tasmota devices/sensors (relays, temperature, ...) e.g. on a large farm, without the need for line-of-sight WiFi links. |
Beta Was this translation helpful? Give feedback.
-
And to top it off: Same decoding as Zigbee devices (notice last seen for sensor and battery). Lot less lines for many devices |
Beta Was this translation helpful? Give feedback.
-
Just got back from overseas ... tried latest nightly dev build :-) |
Beta Was this translation helpful? Give feedback.
-
Question: With the new-improved Decoder design, there seems no way to get the raw, unencrypted data payload. If Decoder is present we get the encrypted payload, and the decoded sensor data (e.g.)
If decoder is NOT present, we only get the encrypted payload (e.g.)
Is there a way to get/see the unencrypted data payload? |
Beta Was this translation helpful? Give feedback.
-
Success with SO147 0
I did NOT make any code changes |
Beta Was this translation helpful? Give feedback.
-
Question:
how do I set the decoder back to an empty string ("")?
|
Beta Was this translation helpful? Give feedback.
-
I have written a Berry driver to allow node configuration with the WebUI. Could easily be added to LwDecoder.be Make a PR? or Not? |
Beta Was this translation helpful? Give feedback.
-
I’m currently out of PC access but if you manage to add this to lwdecoder would be nice. I suggest to use 16 tabs as I did with the timers page. It looks like tabs but if you dive in deeper you’ll notice it’s much easier. Lokking forwa d to your pr. |
Beta Was this translation helpful? Give feedback.
-
Just realised that RSSI is not included in LwDecoded MQTT messages SetOption118 OFF
SetOption118 ON
As it is (generally) important to monitor BOTH sensor values & RSSI, how do I get both reported to MQTT (without toggling option 118)? e.g. using my LPS8V2 Dragino gateway I get these MQTT messages:
|
Beta Was this translation helpful? Give feedback.
-
Indeed .. I can modify the Decoder file to include RSSI. Thanks. But - will wait for Theo in case he has other ideas. |
Beta Was this translation helpful? Give feedback.
-
Guys, I have run into a problem integrating the MQTT decoded data into HomeAssistant. I think the solution is to change the format of the Decoded MQTT to include a unique identifer for every LoRaWAN sensor (= DevEUI) Today
The problem is that platforms like HomeAssistant (HA) need to have one-topic-per-sensor. I have a Dragino LPS8v2 gateway that poses a similar problem. I solved that with a 'demultiplexer` which does this:
ExampleOriginal MQTT message:
New MQTT messsage:
Comment
Suggested fixes to MQTT messagesTopic: Unchanged. e.g.
I don't like this much as it requires a Demultiplexer = messy, and could be a breaking change Maybe a better option is a new SetOption to toggle the decoded MQTT message format (Old/New), or to enable an additional new message:
This is better as no demultiplexer needed: Topic is unique per sensor Comments? |
Beta Was this translation helpful? Give feedback.
-
Not really: SO83 OFF
SO81 ON
to
but using the name (D20-LS) is asking for things to break if the user changes the name. PS: I see I also need to update the Deice Decoder files (I only upgraded LwDecode.be to do this quick test) but that will not change my comments. Is there a mechanism for Berry to get the devEUI? If so .... I will have a go at getting the change I need into |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Sorry guys... I worked on @UBWH code without partecipate on this thread... my fault.... |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
For Discussion - LoRaWAN Decoders
Looking for feedback on the idea to add LoRaWAN Decoder to Tasmota.
LoRaWAN 101
The basic elements are:
Items
2
,3
, and4
are often combined in a single appliance. eg Dragino LPS8v2Tasmota
LoRaWAN Bridge
covers items2
,3
, and the Decryption part of4
above.If implemented, the AS decodes the sensor raw binary payloads - and every manufacturer/device is different! To facilitate this, there are public databases of decoder scripts that can be copied into the AS for each device type that it needs to decode. Here is a widely used decoder script database
Here is the JavaScript decoder for my Dragino LHT52.
A Decoder takes a byte-array Payload like:
[10,21,1,253,127,255,1,104,25,209,194]
and turns it intoAdding Application Server Decode Functionality to Tasmota
Today, Tasmota can only pass on a decrypted byte-array via MQTT to (e.g.)
HomeAssistant
or other platforms. That means every consumer of that byte-array has to build their own decoder in (e.g.)HomeAssistant
I have a working AS decoder implemented in Berry running today.
lorawan_decode.be
that:tele/xxxx/SENSOR
MQTT messages, looking for theLwReceived
packets sent by theTasmota LoRaWAN bridge
.file system
, if they existLHT52.be
):So now, I get two MQTT messages for every LoRaWAN sensor transmission:
... and ...
User Procedure
LHT52.be
), or write a new oneload("lorawan_decode.be")
LoRaWanDecoder<x> LHT52
Items for Discussion
LoRaWanDecoder<x> LHT52
(LikeLoRaWanAppKey<x>
). Then the MQTT LwReceived message would include e.g.{...,"Decoder":"LHT52"}
Beta Was this translation helpful? Give feedback.
All reactions