Here is bigger part of the quote:
Quote:
{
"abilityId": 6,
"accessMode": "ro",
"code": "phase_a",
"description": "1,A相电压,电流及功率\n2,大端模式,HEX格式,共8个字节\n3,单位精度:电压,2字节,单位0.1V。电流,3字节,单位 0.001A 。A相有功功率,3字节,单位0.0001kW\n4,报文格式\n举例:08 80 00 03 E8 00 27 10 表示A相217.6V,A相电流1.000A,A相功率10.000KW\n5,通信逻辑:\n1)用户进面板,主动查询。用户进入面板,面板马上下发0x08到电表,电表上报数据到云平台,面板拿到数据,然后展示。 注:最新WIFI支持。 \n2)电表基于一定周期上报数据。建议:在WIFI模式时,15秒上报一次。NB模式时,1个小时上报一次。
1. Phase A voltage, current and power
2, big-endian mode, HEX format, 8 bytes in total
3. Unit accuracy: voltage, 2 bytes, unit 0.1V. Current, 3 bytes, unit 0.001A. Phase A active power, 3 bytes, unit 0.0001kW
4, message format
Example: 08 80 00 03 E8 00 27 10 means phase A 217.6V, phase A current 1.000A, phase A power 10.000KW
5, Communication logic:
1) Users enter the panel and actively query. When the user enters the panel, the panel immediately sends 0x08 to the meter. The meter reports the data to the cloud platform. The panel obtains the data and then displays it. Note: The latest WIFI support.
2) The meter reports data based on a certain period. Suggestion: In WIFI mode, report once every 15 seconds. In NB mode, it is reported once every hour.
",
It's in description of dpID 6 data, which is sent from MCU to WiFi module. I don't see how can WiFI module use it to alter reporting period. For now, it seems unclear or not implemented for me.
The best I can recommend is the already mentioned tuyaMcu_sendQueryState command. It seemed to work in the past, at least for some of TuyaMCU devices.
kymlalu wrote:
EDIT: Yes offset for all three ( U,I, P ) would be nice - if it make sense. Because now with data every hour it doesn't i guess ). But also more data how "accurate" measuring is will be also helpfull.
Sure, no problem, I've added it, should be in release soon:
https://github.com/openshwprojects/OpenBK7231...mmit/e663cf5d30ddac60deec04ab8c54da2301d876fa
Syntax now:
linkTuyaMCUOutputToChannel [dpId] [varType] [channelID] [bDPCache-Optional] [mult-optional] [bInverse-Optional] [delta-Optional] [delta2-Optional] [delta3-Optional]
I'll add a self test for it in a moment.
PS: First delta is for voltage, second for current, third for power. Deltas are unscaled, as in Tuyamcu values. So, when TuyaMCU sends 2305 (as for 230.5), then you set delta to 10, and get 2305+10 = 2315 (231.5V)