-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sonoff POW: tele ENERGY wrong JSON format #1621
Comments
Strange mine look OK:
What's the output of your |
Very strange - to write this issue I previously downgraded to v5.10.0 using web interface to my single Sonoff POW. I now manually upgraded again to v5.11.1 using the webinterface to answer your question - and now, believe it or not, it's solved =:-] I noticed this issue due to my FHEM expandJSON module, which always complained the MQTT payload: Before I updated all my Sonoff (>10) with GroupTopic and "upgrade" - so I will close this issue. I will try to repeat this situation and if it occurs again we can reopen issue. |
it happened again - and unfortuanely - it might occuring more or less randomly: 18:59:50 MQT: home/tele/tasmota/SonoffPOW/SENSOR = {"Time":"2018-01-17T18:59:50","ENERGY":{"Total":1.956,"Yesterday":0.054,"Today":0.049,"Period":0,"Power":9,"Factor":0.43,"Voltage":231,"Current":0.089}} (retained) Have a look at 19:03:58 - it's ok The code above is copied from web interface console but it's the same on MQTT payload and on syslog |
I retrieved my logs and it's true: The last char } for SENSOR JSON is missing every time the MARGINS event happened before! |
I wonder if you are running into maxmessagesize limits
are the ones that fail longer than the ones that succeed?
|
It's a reproducable bug! I will investigate. |
5.11.1c * Make command color parameter input less strict to ease Hass support * Add ColorTemperature to light status message * Change PubSubClient.h define MQTT_MAX_PACKET_SIZE from 512 to 1000 for Hass support * Make define MESSZ dependent on PubSubClient.h define MQTT_MAX_PACKET_SIZE * Fix logging line length around 400 characters * Change module name Wemos D1 mini into Generic (#1220) * Revert HTML change from width=100% to style=width:100% supporting HTML5 (#1358) * Add experimental (still Hass python exceptions) Home Assistant Discovery for switch and light to be enabled by command SetOption19 1 (#1534) * Updated French Translation (#1561) * Fix DS18B20 temperature JSON decimal dot (#1561) * Add Spanish language file (#1589) * Update Italian Language file (#1594) * Consolidate WIFI_MANAGER_SEC into WIFI_CONFIG_SEC (#1616) * Fix Energy JSON message (#1621)
I don't see it mentioned in the comments, but the threshold topic is still 'ENERGY'. The POW tele format changed to 'SENSOR' with 'ENERGY' in the payload in 5.11. Shouldn't they be consistent? |
I've got the same issue. Out of 12 flashed POWs, only the three that have not been updated to 5.11.1 are showing energy consumption. I guess they're going back to 5.10 for now... |
5.12.0 20180209 * Change library PubSubClient.h define MQTT_MAX_PACKET_SIZE from 512 to 1000 for Home Assistant support * Change relation of define MESSZ being dependent on PubSubClient.h define MQTT_MAX_PACKET_SIZE * Change command color parameter input checks to less strict for Home Assistant support * Change command Ina219Mode into command Sensor13 * Change commands HlwPCal, HlwUCal and HlwICal to PowerCal, VoltageCal and CurrentCal to be used for both Pow and S31 calibration * Change commands HlwPSet, HlwUSet and HlwISet to PowerSet, VoltageSet and CurrentSet to be used for both Pow and S31 calibration * Change uptime from hour to second resulting in a display of 123T13:45:21 where 123 is days * Change module name Wemos D1 mini into Generic (#1220) * Change HTML from width=100% to style=width:100% supporting HTML5 (#1358) * Change OSWATCH_RESET_TIME (Blocked loop) from 30 to 120 seconds to allow slow networks (#1556) * Change WIFI_MANAGER_SEC into WIFI_CONFIG_SEC (#1616) * Change function pointers code to save code space and memory (#1683) * Change webserver argument processing gaining 5k code space (#1705) * Change weblog memory usage (#1730, #1793, #1819) * Update TasmotaSerial library to 1.1.0 * Update language files Italian (#1594), Dutch (#1723) and Spanish (#1722) * Fix Non-English JSON temperature unit attachement * Fix Arilux RF induced exception by moving interrupt handler to iram on non ESP8266/Arduino lib v2.3.0 * Fix truncated command names and wrong response for DomoticzSwitchIdx (#1571) * Fix %-sign issue as printf escape character in Humidity and Sonoff SC (#1579) * Fix DS18B20 temperature JSON decimal dot (#1561) * Fix Energy JSON message (#1621) * Fix IRSend parameter translation (#1636) * Fix TSL2561 device detection (#1644, #1825) * Fix BME680 teleperiod resistance measuring (#1647) * Fix Energy Monitoring Energy Today and Energy Total reading after restart (#1648) * Fix IRReceive Data value (#1663) * Fix Energy Monitoring Energy Period roll-over (#1688) * Fix compiler warnings (#1774) * Fix command PWM response if no PWM channel is configured (#1783) * Add locale Decimal Separator to Web sensor page * Add ColorTemperature to light status message * Add command PowerOnState option 5 which inverts PulseTime and allows for delayed always on after power on * Add OtaMagic two step Web server OTA upgrade using filename-minimal image if OTA free space is too small * Add support for PMS5003 and PMS7003 particle concentration sensor * Add command SetOption21 1 to allow Energy Monitoring when power is off on Sonoff Pow and Sonoff S31 (#1420) * Add Chinese language file (#1551) * Add French language file (#1561) * Add Spanish language file (#1589) * Add HTTP Allow Cross Origin removed from ESP8266/Arduino lib v2.4.0 (#1572) * Add Home Assistant MQTT Discovery for switch and light to be enabled by command SetOption19 1 (#1534) or define HOME_ASSISTANT_DISCOVERY_ENABLE in user_config.h (#1685) * Add command State to retrieve device state information (same data as teleperiod state and status 11 in slightly different JSON format) * Add optional login to Webserver AP mode (#1587, #1635) * Add command Sensor15 2 to start MHZ19(B) Zero Point Calibration (#1643) * Add support for Sonoff S31 Smart Socket with Power Consumption Detection (#1626) * Add command SetOption20 to allow update of Dimmer/Color/Ct without turning power on (#1719, #1741) * Add NTP sync time slot based on chip id (#1773) * Add cursor pointer to web button (#1836)
5.12.0 appears to shows incorrect ‘current‘ consumption, power (watts) is correct, current too high! |
@chimeranzl - can not confirmed: 5.10.0
5.11.1i
5.12.0
All are the same - try calibrate all three voltage, current and power before measurements |
I get Current reading from the JSON string ENERGY.Current from the topic SENSOR as someone else mentioned above, for me the firmware 5.12.0 does not publish to ENERGY topic anymore unless I manually request it by sending a message to STATUS. See if the current reads correctly from the SENSOR topic for you? |
Yes, topic SENSOR is the telemetry topic (periodically send by TelePeriod) for Pow and Current value for topic SENSOR is also valid: Firmware info
MQTT SENSOR topic Pow ON
MQTT SENSOR topic Pow OFF
Anyway again and again: Calibrate all three values of Pow before going on... |
The above is what Im getting. It is most certainly is NOT consuming 8.6 amps - it is not even rated that high, the device (pool pump) that is plugged into it is on and consuming 851 watts which is correct, at 234 volts and 8.678 amps would imply the pump is drawing 2,030 watts which it is not. EDIT: as per this #964 it maybe hardware related, i will swap it out for another, test and report back... |
you have a power factor of .42 so i think the current would be about right.
pete
…On 4 Mar 2018 10:40 pm, "chimeranzl" ***@***.***> wrote:
openhab/sonoff/poolpump/STATE {"Time":"2018-03-04T23:15:06","Uptime":"2T19:50:17","Vcc":3.476,"POWER":"ON","Wifi":{"AP":1,"SSId":"iotbam","RSSI":52,"APMac":"06:18:D6:C2:05:0B"}}
openhab/sonoff/poolpump/SENSOR {"Time":"2018-03-04T23:15:06","ENERGY":{"Total":27.679,"Yesterday":9.391,"Today":8.577,"Period":5,"Power":851,"Factor":0.42,"Voltage":234,"Current":8.678}}
The above is what Im getting. It is most certainly is NOT consuming 8.6
amps - it is not even rated that high, the device (pool pump) that is
plugged into it is on and consuming 851 watts which is correct, at 234
volts and 8.678 amps would imply the pump is drawing 2,030 watts which it
is not.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1621 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ARhhvik2Zxjd_wxLOtjxpExKzYfrTndwks5tbG0-gaJpZM4RhH4a>
.
|
.42 x 2030 = 852.6 Watts
…On 4 Mar 2018 10:53 pm, "Pete Marshall" ***@***.***> wrote:
you have a power factor of .42 so i think the current would be about right.
pete
On 4 Mar 2018 10:40 pm, "chimeranzl" ***@***.***> wrote:
> openhab/sonoff/poolpump/STATE {"Time":"2018-03-04T23:15:06","Uptime":"2T19:50:17","Vcc":3.476,"POWER":"ON","Wifi":{"AP":1,"SSId":"iotbam","RSSI":52,"APMac":"06:18:D6:C2:05:0B"}}
> openhab/sonoff/poolpump/SENSOR {"Time":"2018-03-04T23:15:06","ENERGY":{"Total":27.679,"Yesterday":9.391,"Today":8.577,"Period":5,"Power":851,"Factor":0.42,"Voltage":234,"Current":8.678}}
>
> The above is what Im getting. It is most certainly is NOT consuming 8.6
> amps - it is not even rated that high, the device (pool pump) that is
> plugged into it is on and consuming 851 watts which is correct, at 234
> volts and 8.678 amps would imply the pump is drawing 2,030 watts which it
> is not.
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#1621 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ARhhvik2Zxjd_wxLOtjxpExKzYfrTndwks5tbG0-gaJpZM4RhH4a>
> .
>
|
The sonoff powers a controller that has an analog timer on it, and power off to the pool pump. The analog/rotary timer is set to turn on the pump between 8am and 6pm (only use sonoff for power monitoring, not on/off ability) When the timer is off, the pump is obviously off, but the current reading does not change - it stays at 8.6 amps. How can that be? |
The pump is an inductive load the current is out of phase with the
voltage.If you look at yours it has a power factor of 0.42 . The pump is
only producing 860 watts but the current needed to this will be much great
see previous calculation. It looks to me as the power metering is spot on.
Google power factor it will explain better.
Regards Peter
…On 4 Mar 2018 11:07 pm, "chimeranzl" ***@***.***> wrote:
The sonoff powers a controller that has an analog timer on it, and power
off to the pool pump. The analog/rotary timer is set to turn on the pump
between 8am and 6pm (only use sonoff for power monitoring, not on/off
ability) When the timer is off, the pump is obviously off, but the current
reading does not change - it stays at 8.6 amps. How can that be?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1621 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ARhhvgZcgX4rwDsjxiDjNX5i2Qv9anZ3ks5tbHOVgaJpZM4RhH4a>
.
|
Not sure how it can be still showing 860 watts with the pump off.
Thanks Pete
…On 5 Mar 2018 6:10 a.m., "Pete Marshall" ***@***.***> wrote:
The pump is an inductive load the current is out of phase with the
voltage.If you look at yours it has a power factor of 0.42 . The pump is
only producing 860 watts but the current needed to this will be much great
see previous calculation. It looks to me as the power metering is spot on.
Google power factor it will explain better.
Regards Peter
On 4 Mar 2018 11:07 pm, "chimeranzl" ***@***.***> wrote:
> The sonoff powers a controller that has an analog timer on it, and power
> off to the pool pump. The analog/rotary timer is set to turn on the pump
> between 8am and 6pm (only use sonoff for power monitoring, not on/off
> ability) When the timer is off, the pump is obviously off, but the current
> reading does not change - it stays at 8.6 amps. How can that be?
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#1621 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ARhhvgZcgX4rwDsjxiDjNX5i2Qv9anZ3ks5tbHOVgaJpZM4RhH4a>
> .
>
|
for me I capitulate - nothing about my suggestion to calibrate to rule out e.g. absolutly wrong calculation base... |
5.11.1c * Make command color parameter input less strict to ease Hass support * Add ColorTemperature to light status message * Change PubSubClient.h define MQTT_MAX_PACKET_SIZE from 512 to 1000 for Hass support * Make define MESSZ dependent on PubSubClient.h define MQTT_MAX_PACKET_SIZE * Fix logging line length around 400 characters * Change module name Wemos D1 mini into Generic (arendst#1220) * Revert HTML change from width=100% to style=width:100% supporting HTML5 (arendst#1358) * Add experimental (still Hass python exceptions) Home Assistant Discovery for switch and light to be enabled by command SetOption19 1 (arendst#1534) * Updated French Translation (arendst#1561) * Fix DS18B20 temperature JSON decimal dot (arendst#1561) * Add Spanish language file (arendst#1589) * Update Italian Language file (arendst#1594) * Consolidate WIFI_MANAGER_SEC into WIFI_CONFIG_SEC (arendst#1616) * Fix Energy JSON message (arendst#1621)
v5.11.1 MQTT prefix "tele" JSON result for ENERGY is wrong:
Example for v5.11.1 tele ENERGY Json:
{"Time":"2018-01-17T10:49:50","ENERGY":{"Total":1.944,"Yesterday":0.054,"Today":0.037,"Power":10,"Factor":0.43,"Voltage":229,"Current":0.096}
The final close "}" is missing
In v5.10.0 it was correct (due to missing new "ENERGY" object within JSON Object)
{"Time":"2018-01-17T11:27:12","Total":1.945,"Yesterday":0.054,"Today":0.038,"Period":0,"Power":2,"Factor":0.09,"Voltage":231,"Current":0.077}
it might be that the change in 5.11.0
"Change Sonoff Pow Energy MQTT data message and consolidate Status 8 into Status 10"
is incompleted :-)
The text was updated successfully, but these errors were encountered: