diff --git a/tasmota/berry/lorawan/decoders/LwDecode.be b/tasmota/berry/lorawan/decoders/LwDecode.be index a460f169b..5153b79e2 100644 --- a/tasmota/berry/lorawan/decoders/LwDecode.be +++ b/tasmota/berry/lorawan/decoders/LwDecode.be @@ -186,6 +186,14 @@ class webPageLoRaWAN : Driver tasmota.cmd('LoRaWanNode'+inode+' '+cmdArg,true) end + var appKey, decoder, name, enabled + var hintAK='32 character Application Key' + var hintDecoder='Decoder file, ending in .be' + var hintAN='Device name for MQTT messages' + var arg='LoRaWanNode' + var enables=string.split(tasmota.cmd(arg,true).find(arg), ',') # [1,!2,!3,!4,5,6] + var maxnode=enables.size() + webserver.content_start("LoRaWAN") #- title of the web page -# webserver.content_send_style() #- send standard Tasmota styles -# webserver.content_send( @@ -207,31 +215,23 @@ class webPageLoRaWAN : Driver "}" "}" "e.classList.add('active');" - "for(i=1;i<=16;i++){" + "for(i=1;i<="+str(maxnode)+";i++){" "document.getElementById('nd'+i).style.display=(i==n)?'block':'none';" "}" "}" "window.onload = function(){selNode("+str(inode)+");};" "") - var arg, appKey, decoder, name, enables, enabled - var hintAK='32 character Application Key' - var hintDecoder='Decoder file, ending in .be' - var hintAN='Device name for MQTT messages' - webserver.content_send( f"