File tree 2 files changed +6
-2
lines changed
tasmota/berry/lorawan/decoders/vendors/dragino
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,9 @@ class LwDecoLHT52
32
32
33
33
data.insert ( "Hum_Internal" , (( Bytes[ 2 ]<< 8 ) | Bytes[ 3 ])/ 10.0 )
34
34
data.insert ( "Ext_SensorType" , Bytes[ 6 ])
35
- data.insert ( "Systimestamp" ,( Bytes[ 7 ] << 24 ) | ( Bytes[ 8 ] << 16 ) | ( Bytes[ 9 ] << 8 ) | Bytes[ 10 ])
35
+ # data.insert("Systimestamp",(Bytes[7] << 24) | (Bytes[8] << 16) | (Bytes[9] << 8) | Bytes[10])
36
+ var epoch = ( Bytes[ 7 ] << 24 ) | ( Bytes[ 8 ] << 16 ) | ( Bytes[ 9 ] << 8 ) | Bytes[ 10 ]
37
+ data.insert ( "Systimestamp" ,tasmota.time_str ( epoch))
36
38
37
39
## STATUS DATA ##
38
40
elif 5 == FPort && Bytes.size () == 7
Original file line number Diff line number Diff line change @@ -73,7 +73,9 @@ class LwDecoLHT65
73
73
data.insert ( "Exit_count" , ( Bytes[ 7 ] << 24 ) | ( Bytes[ 8 ] << 16 ) | ( Bytes[ 9 ] << 8 ) | Bytes[ 10 ])
74
74
elif 9 == Ext
75
75
data.insert ( "Work_mode" , 'DS18B20 & timestamp' )
76
- data.insert ( "Systimestamp" , ( Bytes[ 7 ] << 24 ) | ( Bytes[ 8 ] << 16 ) | ( Bytes[ 9 ] << 8 ) | Bytes[ 10 ])
76
+ # data.insert("Systimestamp", (Bytes[7] << 24) | (Bytes[8] << 16) | (Bytes[9] << 8) | Bytes[10])
77
+ var epoch = ( Bytes[ 7 ] << 24 ) | ( Bytes[ 8 ] << 16 ) | ( Bytes[ 9 ] << 8 ) | Bytes[ 10 ]
78
+ data.insert ( "Systimestamp" ,tasmota.time_str ( epoch))
77
79
elif 15 == Ext
78
80
data.insert ( "Work_mode" ,'DS18B20ID' )
79
81
data.insert ( "ID" ,f"{Bytes[2]:%02X}" + f"{Bytes[3]:%02X}" + f"{Bytes[4]:%02X}" + f"{Bytes[5]:%02X}" + f"{Bytes[6]:%02X}" + f"{Bytes[8]:%02X}" + f"{Bytes[9]:%02X}" + f"{Bytes[10]:%02X}" )
You can’t perform that action at this time.
0 commit comments