Tasmota device ("Hichi" infraread head) brings error

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
imautohuttraeger
Posts: 172
Joined: Saturday 14 March 2020 13:40
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.1
Location: Germany
Contact:

Tasmota device ("Hichi" infraread head) brings error

Post by imautohuttraeger »

I have an infraread reading head on my electric meter ("Hichi" with Tasmota). Transfering the data via MQTT to Domotics works, but for at least one of the figures I get this error:

Error: Invalid Number sValue: '%' for device idx: '%'
Error: GetJSonDevices: exception occurred : 'stoull'

For those of you who are savvy with Tasmota: This is the code of the customized script that runs there and it displays correct data in the Tasmota web interface:

>D
>B
=>sensor53 r
>M 1
+1,3,s,0,9600,,1
1,77070100010800FF@100000000,Zählerstand Import ,kWh,1_8_0,8
1,77070100010801FF@1000,Zählerstand Import T1 ,kWh,1_8_1,8
;1,77070100010802FF@100000000,Energie Bezug T2,kWh,1_8_2,8
1,77070100020800FF@100000000,Zählerstand Export,kWh,2_8_0,8
1,77070100100700FF@1,Summe Verbrauch 🔌,W,16_7_0,16
1,77070100240700FF@1,akt. Verbrauch L1,W,36_7_0,16
1,77070100380700FF@1,akt. Verbrauch L2,W,56_7_0,16
1,770701004C0700FF@1,akt. Verbrauch L3,W,76_7_0,16
#

But even the non-customized Script from the Tasmota wiki shows the same error:
https://tasmota.github.io/docs/Smart-Me ... d3-obissml

Any hints are highly welcome
User avatar
waltervl
Posts: 6676
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: Tasmota device ("Hichi" infraread head) brings error

Post by waltervl »

Please supply the MQTT message payloads that give issues.
You can do that with for example MQTT Explorer https://wiki.domoticz.com/MQTT#Debugging_MQTT

Edit The "stoull" error when showing a graph is related to incorrect values in your database. Search the forum for this error.
Edit: 2 see for example viewtopic.php?p=331228&hilit=stoull#p331228
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
imautohuttraeger
Posts: 172
Joined: Saturday 14 March 2020 13:40
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.1
Location: Germany
Contact:

Re: Tasmota device ("Hichi" infraread head) brings error

Post by imautohuttraeger »

In MQTT ExplorerI have found two entries for this tasmota device:

Code: Select all

{"ip":"192.168.1.112","dn":"Hichi_Stromzaehler","fn":["@@4ecwdbR{ *```@`f@@|@` d0x",null,null,null,null,null,null,null],"hn":"Hichi-Lesekopf-6802","mac":"F4CFA2DF5A92","md":"Sonoff Basic","ty":0,"if":0,"ofln":"Offline","onln":"Online","state":["OFF","ON","TOGGLE","HOLD"],"sw":"13.2.0","t":"Hichi_Lesekopf","ft":"%prefix%/%topic%/","tp":["cmnd","stat","tele"],"rl":[1,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":1,"117":0},"lk":0,"lt_st":0,"bat":0,"dslp":0,"sho":[],"sht":[],"ver":1}
and

Code: Select all

{"sn":{"Time":"2026-02-09T22:00:54","SML":{"1_8_0":10409.59198526,"1_8_1":0.10408596,"1_8_2":0.00000995,"2_8_0":5620.10674508,"2_8_0":5620.10674508,"16_7_0":15,"36_7_0":-51,"56_7_0":-29,"76_7_0":95,"96_1_0":"090145425a0100241cd8"}},"ver":1}
Anything strange here form an expert point of view?
User avatar
waltervl
Posts: 6676
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: Tasmota device ("Hichi" infraread head) brings error

Post by waltervl »

I dont know. How do you import the data into Domoticz? As this seems a payload that is not designed for Domoticz's default MQTT interface. https://wiki.domoticz.com/MQTT#MQTT_to_Domoticz

Do you use MQTTMapper plugin? Or the MQTT AD gateway?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
imautohuttraeger
Posts: 172
Joined: Saturday 14 March 2020 13:40
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.1
Location: Germany
Contact:

Re: Tasmota device ("Hichi" infraread head) brings error

Post by imautohuttraeger »

For Tasmota devices I use the "configure domoticz" section of the web interface. There I type in the IDX of the virtual domoticz devices. See screenshot (but the caption is not corresponding to the values here because it is not a switch device. It is about power in Watt and meter counts of import and export in kWh
Attachments
xyzScreenshot 2026-02-10 150238.png
xyzScreenshot 2026-02-10 150238.png (69.33 KiB) Viewed 52 times
User avatar
waltervl
Posts: 6676
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: Tasmota device ("Hichi" infraread head) brings error

Post by waltervl »

I have no idea how this works.
Domoticz MQTT expects something like below in MQTT Domoticz/in topic (when using default MQTT settings. Read the Domoticz Wiki for more info.

Code: Select all

{  "command": "udevice",  "idx" : 7,  "nvalue" : 0,  "svalue" : "90;2975.00" }
or short:
{  "idx" : 7,  "nvalue" : 0,  "svalue" : "90;2975.00" }
You perhaps have to change something on the Tasmota side?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
waltervl
Posts: 6676
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: Tasmota device ("Hichi" infraread head) brings error

Post by waltervl »

In the following Topic you want to use the MQTT mapper plugin to map values from tasmota into Domoticz. viewtopic.php?p=307270#p307270

So check that.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
imautohuttraeger
Posts: 172
Joined: Saturday 14 March 2020 13:40
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.1
Location: Germany
Contact:

Re: Tasmota device ("Hichi" infraread head) brings error

Post by imautohuttraeger »

waltervl wrote: Tuesday 10 February 2026 16:16 In the following Topic you want to use the MQTT mapper plugin to map values from tasmota into Domoticz. viewtopic.php?p=307270#p307270

So check that.
You are right. It was my intention to user MQTT Mapper but I have to admit that I haven't done it because I have too much concerns that editing the mqttMapper.json file for each device is too sophisticated and time intensiv for me ... However maybe I should finally start now ...
imautohuttraeger
Posts: 172
Joined: Saturday 14 March 2020 13:40
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.1
Location: Germany
Contact:

Re: Tasmota device ("Hichi" infraread head) brings error

Post by imautohuttraeger »

waltervl wrote: Tuesday 10 February 2026 13:23 Please supply the MQTT message payloads that give issues.
You can do that with for example MQTT Explorer https://wiki.domoticz.com/MQTT#Debugging_MQTT

Edit The "stoull" error when showing a graph is related to incorrect values in your database. Search the forum for this error.
Edit: 2 see for example viewtopic.php?p=331228&hilit=stoull#p331228
Thx, this really seems to be a hint that goes into the right direction. I could now verify that opening the log graph causes an error. But not the "stoull" but this:

Error: Invalid Number sValue: '%' for device idx: '%'

It occurres with several different energy devices, no matter from which manufacturer or OS (Tasmota, Shelly). But not each one. Very strange ...

EDIT: Meanwhile I have recognizes, that the error can be forced by opening a graph log. But not only. Both errors are coming even without interaction, but only from time to time.
Last edited by imautohuttraeger on Wednesday 11 February 2026 12:50, edited 2 times in total.
imautohuttraeger
Posts: 172
Joined: Saturday 14 March 2020 13:40
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.1
Location: Germany
Contact:

Re: Tasmota device ("Hichi" infraread head) brings error

Post by imautohuttraeger »

I have checked the databsae according to the troubleshooting page
https://wiki.domoticz.com/Troubleshooti ... k_database

The list of tables does not show "Preferences"

Code: Select all

pi@Raspberry:~/domoticz $ sudo sqlite3 domoticz.db  'SELECT name as Tablename ,SUM("pgsize")/4096 Size FROM "dbstat" WHERE name IN (SELECT name FROM "sqlite_master" WHERE type == "table" ) GROUP BY name HAVING Size > 10 ORDER BY size DESC;'
lost_and_found|7391
Temperature_Calendar|1132
Meter_Calendar|923
LightingLog|776
Meter|594
Floorplans|390
Percentage_Calendar|272
MultiMeter_Calendar|225
Temperature|181
EventMaster|79
Wind_Calendar|70
Percentage|65
Rain_Calendar|56
UV_Calendar|37
SceneLog|20
DeviceStatus|19
Rain|16
UV|15
KWHStats|13
Wind|12
pi@Raspberry:~/domoticz $
And the integrity check and foreign key check are showing no errors:

Code: Select all

pi@Raspberry:~/domoticz $ sudo sqlite3 domoticz.db "PRAGMA integrity_check(10000)"
ok
pi@Raspberry:~/domoticz $ sudo sqlite3 domoticz.db "PRAGMA foreign_key_check"
pi@Raspberry:~/domoticz $ 
However I have proceeded the repair process anyhow, but of course with no result.

Is there anything else I can do?
User avatar
waltervl
Posts: 6676
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: Tasmota device ("Hichi" infraread head) brings error

Post by waltervl »

It is not a error in the database, there is an incorrect value for reporting in the database.

viewtopic.php?p=331228&hilit=stoull#p331228
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest