arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
22.11k stars 4.79k forks source link

Tasmota confuses comma and period. #20497

Closed HofeBY closed 9 months ago

HofeBY commented 9 months ago

PROBLEM DESCRIPTION

In my understanding of mathematics it is like this, that numbers are before and fractions are after the decimal point. For us, the point is only good for identifying the 1000 stamps. At least that's how I see it and so does my calculator.

I have included an example of the errors in the picture and the corresponding configuration files. The error point instead of comma when transmitting the sensor values is also visible in the log of the mqtty transmission. Image TM13.3.0.2.main-http.jpg

In my case, the mqtty values are incorrectly transmitted to IOBroker, but then corrected there and with a comma displayed. There is also a picture of this in-IOBroker.jpg.

As soon as you read sensor values into a variable, the point is also used instead of the comma. This can also be seen with appropriate output on the http interface. Now I write the values from variables into a local CSV file on my SML meter reader every day at the beginning of the day, which would be best structured so that columns are written with semicolons and numerical values with commas. Then you can easily read such a CSV file into Excel/OpenOffice Calc etc. But here too, the wrong period must first be replaced with a comma.

I use a self-compiled developer version of "arendst" with "Script", so that it also runs on new and older ESP8285/8266. It would then be logical in a corrected version that you would have to adapt the variable definition in the script.

It wouldn't be bad for simple data processing if this could be corrected.

Thank you for your attention and perhaps for correcting this error. Otherwise, great project and thanks to the developers

HofeBY


- [ ] Set `weblog` to 4 and then, when you experience your issue, provide the output of the Console log:
```lua
  Console output here:
00:00:00.003 HDW: ESP32-D0WDQ6 v1.0 
00:00:00.125 UFS: FlashFS mounted with 288 kB free
00:00:00.162 CFG: Loaded from File, Anzahl 1091
00:00:00.172 QPC: Count 1
00:00:00.178 I2C: Bus1 using GPIO22(SCL) and GPIO21(SDA)
00:00:00.179 SCR: ufilesystem found
00:00:00.266 SCR: nv=34, tv=4, vns=152, vmem=710, smem=8192
00:00:00.268 I2C: DS3231 found at 0x68
00:00:00.273 RTC: UTC 2024-01-14T23:35:31Z, DST 2024-03-31T02:00:00, STD 2024-10-27T03:00:00
00:35:31.001 RTC: Synced by DS3231
00:35:31.006 PCF: Address 0x20 reserved for MCP230xx
00:35:31.016 TFS: File 'pca9557.dat' not found
00:35:31.017 PCA: Invalid template
00:35:31.018 TYA: Active=0
00:35:31.024 ROT: Mode 1
00:35:31.034 BRY: GC from 3692 to 3492 bytes, objects freed 4/20 (in 0 ms) - slots from 36/61 to 28/61
00:35:31.152 CFG: No '*.autoconf' file found
00:35:31.158 BRY: GC from 6071 to 4478 bytes, objects freed 6/40 (in 1 ms) - slots from 68/91 to 40/91
00:35:31.159 BRY: Berry initialized, RAM used 4478 bytes
00:35:31.176 BRY: No 'preinit.be'
00:35:31.179 SRC: Restart
00:35:31.184 Projekt tasmota - 23ESP32 Version 13.3.0.2(tasmota32)-2_0_14(2024.01.04 15:56:10)
00:35:31.189 ETH: No ETH MDC and/or ETH MDIO GPIO defined
00:35:31.192 SML: uart used: 2
00:35:31.194 meters: 1 , decode lines: 4, memory used: 1773 bytes
00:35:31.237 I2C: AHT2X found at 0x38
00:35:31.240 SRC: Rule
00:35:31.241 CMD: Grp 0, Cmd 'SENSOR', Idx 53, Len 1, Pld -99, Data 'r'
00:35:31.245 SML: uart used: 2
00:35:31.247 meters: 1 , decode lines: 4, memory used: 1773 bytes
00:35:31.249 RSL: RESULT = {"Time":"2024-01-15T00:35:31","SML":{"CMD":"restart"}}
00:35:31.451 3.00 : AMT681-2024.csv
00:35:31.484 4.00 : _matter_device.json
00:35:31.503 5.00 : _persist.json
00:35:31.530 6.00 : script.txt
00:35:31.623 BRY: No 'autoexec.be'
00:35:31.896 WIF: Prüfe Verbindung…
00:35:31.897 WIF: Verbindungsversuch…
00:35:31.093 WIF: Network (re)scan started...
00:35:32.005 WIF: Prüfe Verbindung…
00:35:32.006 WIF: Verbindungsversuch…
00:35:33.007 WIF: Prüfe Verbindung…
00:35:33.008 WIF: Verbindungsversuch…
00:35:34.007 WIF: Prüfe Verbindung…
00:35:34.008 WIF: Verbindungsversuch…
00:35:35.007 WIF: Prüfe Verbindung…
00:35:35.008 WIF: Verbindungsversuch…
00:35:36.007 WIF: Prüfe Verbindung…
00:35:36.008 WIF: Verbindungsversuch…
00:35:36.816 QPC: Reset
00:35:37.007 WIF: Prüfe Verbindung…
00:35:37.008 WIF: Verbindungsversuch…
00:35:37.009 WIF: Network 0, AP2, SSId NW0, Channel 6, BSSId (cleaned by HofeBY), RSSI -76, Encryption 1
00:35:37.010 WIF: Network 1, AP-, SSId Vodafone-09BC, Channel 6, BSSId (cleaned by HofeBY), RSSI -89, Encryption 1
00:35:38.001 WIF: verbinden mit AP2 NW0 Channel 6 BSSId (cleaned by HofeBY) in Modus 11n als 23ESP32...
00:35:38.084 WIF: IPv4 192.168.(cleaned by HofeBY), mask 255.255.255.0, gateway 192.168.(cleaned by HofeBY)
00:35:39.564 APP: Startvorgänge 209
00:35:40.601 CFG: Saved, Anzahl 1092, Bytes 4096
00:35:40.721 WIF: Prüfe Verbindung…
00:35:40.723 WIF: verbunden
00:35:40.829 mDN: initialisiert '23ESP32.local'
00:35:40.843 HTP: Webserver aktiv bei 23ESP32.local mit IP-Adresse 192.168.(cleaned by HofeBY)
00:35:40.859 KNX: Start
00:35:40.864 NTP: Sync time...
00:35:40.867 WIF: DNS resolved '192.168.(cleaned by HofeBY)' (192.168.(cleaned by HofeBY)) in 0 ms
00:35:41.871 NTP: No reply from 192.168.(cleaned by HofeBY)
00:35:41.888 HTP: Hauptmenü
00:35:41.998 WIF: IPv6 Local (cleaned by HofeBY)
00:35:42.797 MQT: Verbindungsversuch…
00:35:42.799 WIF: DNS resolved '192.168.(cleaned by HofeBY)' (192.168.(cleaned by HofeBY)) in 1 ms
00:35:42.835 MQT: verbunden
00:35:42.839 MQT: tele/23ESP32/LWT = Online (beibehalten)
00:35:42.842 MQT: cmnd/23ESP32/POWER = 
00:35:42.844 MQT: abonniere cmnd/23ESP32/#
00:35:42.845 MQT: abonniere cmnd/tasmotas/#
00:35:42.847 MQT: abonniere cmnd/23ESP32_fb/#
00:35:42.851 MQT: tele/23ESP32/INFO1 = {"Info1":{"Module":"ESP32-DevKit","Version":"13.3.0.2(tasmota32)","FallbackTopic":"cmnd/23ESP32_fb/","GroupTopic":"cmnd/tasmotas/"}}
00:35:42.868 MQT: tele/23ESP32/INFO2 = {"Info2":{"WebServerMode":"Admin","Hostname":"23ESP32","IPAddress":"192.168.(cleaned by HofeBY)","IP6Global":"","IP6Local":"(cleaned by HofeBY)"}}
00:35:42.882 MQT: tele/23ESP32/INFO3 = {"Info3":{"RestartReason":"Software reset CPU","BootCount":210}}
00:35:42.893 TFS: File 'autoexec.bat' not found
00:35:45.190 HTP: Konsolen
00:35:46.000 WIF: IPv6 Global (cleaned by HofeBY)
00:35:46.409 HTP: Konsole
00:35:46.844 BRY: GC from 6271 to 4431 bytes, objects freed 25/51 (in 1 ms) - slots from 93/122 to 54/122
00:35:46.853 MQT: tele/23ESP32/STATE = {"Time":"2024-01-15T00:35:46","Uptime":"0T00:00:15","UptimeSec":15,"Heap":134,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":37,"MqttCount":1,"Berry":{"HeapUsed":4,"Objects":51},"Wifi":{"AP":2,"SSId":"NW0","BSSId":"EE:67:BC:31:62:57","Channel":6,"Mode":"11n","RSSI":52,"Signal":-74,"LinkCount":1,"Downtime":"0T00:00:09"}}
00:35:46.901 MQT: tele/23ESP32/SENSOR = {"Time":"2024-01-15T00:35:46","AMT681":{"Meter_id":"(cleaned by HofeBY)","A1_8_0":4717.2254,"A2_8_0":175764.5647,"A16_7_0":81.0},"AHT2X":{"Temperature":5.9,"Humidity":62.6,"DewPoint":-0.7},"ESP32":{"Temperature":15.0,"HallEffect":56},"Archiv-AMT681":{"AMT681-ZNr":"08154711","AMT681-1_8_0-Y2024":4717.2256,"AMT681-1_8_0-Y2024-M1":4717.2256,"AMT681-1_8_0-Bezug heute seit 0:00Uhr":0.0464,"AMT681-2_8_0-Y2024":175764.5625,"AMT681-2_8_0-Y2024-M1":175764.5625,"AMT681-2_8_0-Lieferung heute seit 0:00Uhr":0.0000},"DS3231":{"Temperature":6.2},"TempUnit":"C"}
00:35:51.847 MQT: tasmota/discovery/78218477E42C/config = {"ip":"192.168.(cleaned by HofeBY)","dn":"23ESP32","fn":["Tasmota",null,null,null,null,null,null,null],"hn":"23ESP32","mac":"78218477E42C","md":"ESP32-DevKit","ty":0,"if":0,"ofln":"Offline","onln":"Online","state":["OFF","ON","TOGGLE","HOLD"],"sw":"13.3.0.2","t":"23ESP32","ft":"%prefix%/%topic%/","tp":["cmnd","stat","tele"],"rl":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"swc":[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],"swn":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"btn":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"so":{"4":0,"11":0,"13":0,"17":0,"20":0,"30":0,"68":0,"73":0,"82":0,"114":0,"117":0},"lk":0,"lt_st":0,"bat":0,"dslp":0,"sho":[],"sht":[],"ver":1} (beibehalten)
00:35:51.880 MQT: tasmota/discovery/78218477E42C/sensors = {"sn":{"Time":"2024-01-15T00:35:51","AMT681":{"Meter_id":"237517-8990090","A1_8_0":4717.2255,"A2_8_0":175764.5647,"A16_7_0":80.8},"AHT2X":{"Temperature":5.9,"Humidity":62.6,"DewPoint":-0.7},"ESP32":{"Temperature":14.4,"HallEffect":55},"Archiv-AMT681":{"AMT681-ZNr":"08154711","AMT681-1_8_0-Y2024":4717.2256,"AMT681-1_8_0-Y2024-M1":4717.2256,"AMT681-1_8_0-Bezug heute seit 0:00Uhr":0.0464,"AMT681-2_8_0-Y2024":175764.5625,"AMT681-2_8_0-Y2024-M1":175764.5625,"AMT681-2_8_0-Lieferung heute seit 0:00Uhr":0.0000},"DS3231":{"Temperature":6.2},"TempUnit":"C"},"ver":1} (beibehalten)
00:35:56.847 BRY: GC from 5321 to 4431 bytes, objects freed 2/51 (in 1 ms) - slots from 54/122 to 54/122
00:35:56.857 MQT: tele/23ESP32/STATE = {"Time":"2024-01-15T00:35:56","Uptime":"0T00:00:25","UptimeSec":25,"Heap":133,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"Berry":{"HeapUsed":4,"Objects":51},"Wifi":{"AP":2,"SSId":"NW0","BSSId":"(cleaned by HofeBY)","Channel":6,"Mode":"11n","RSSI":48,"Signal":-76,"LinkCount":1,"Downtime":"0T00:00:09"}}
00:35:56.909 MQT: tele/23ESP32/SENSOR = {"Time":"2024-01-15T00:35:56","AMT681":{"Meter_id":"(cleaned by HofeBY)","A1_8_0":4717.2257,"A2_8_0":175764.5647,"A16_7_0":74.3},"AHT2X":{"Temperature":5.9,"Humidity":62.6,"DewPoint":-0.7},"ESP32":{"Temperature":14.4,"HallEffect":56},"Archiv-AMT681":{"AMT681-ZNr":"08154711","AMT681-1_8_0-Y2024":4717.2256,"AMT681-1_8_0-Y2024-M1":4717.2256,"AMT681-1_8_0-Bezug heute seit 0:00Uhr":0.0464,"AMT681-2_8_0-Y2024":175764.5625,"AMT681-2_8_0-Y2024-M1":175764.5625,"AMT681-2_8_0-Lieferung heute seit 0:00Uhr":0.0000},"DS3231":{"Temperature":6.2},"TempUnit":"C"}

### SCREENSHOTS
two pictures, csv file, script.txt file in zip file

[TasmotaPointComma.zip](https://github.com/arendst/Tasmota/files/13933533/TasmotaPointComma.zip)
HofeBY commented 9 months ago

TasmotaPointComma.zip