Sonoff POW - no longer reports power?

After upgrading Sonoff (with Tasmota firmware) to 5.12.0, POW no longer reports power (or IP address) Turning on/off via MQTT still works ok, just getting anything back doesn’t work. When rebooting Sonoff, I get this in the logs:

2018-03-02 15:17:13.526 [ERROR] [.mqtt.internal.MqttMessageSubscriber] - Error processing MQTT message.
org.openhab.core.transform.TransformationException: Invalid path '$.IPaddress' in '{"WebServerMode":"Admin","Hostname":"poolpump","IPAddress":""}'
        at org.openhab.core.transform.TransformationHelper$TransformationServiceDelegate.transform( [222:org.openhab.core.compat1x:2.2.0]
        at org.openhab.binding.mqtt.internal.MqttMessageSubscriber.processMessage( [216:org.openhab.binding.mqtt:1.11.0]
        at []
        at org.eclipse.paho.client.mqttv3.internal.CommsCallback.deliverMessage( []
        at org.eclipse.paho.client.mqttv3.internal.CommsCallback.handleMessage( []
        at []
        at [?:?]

JSON transform is installed.

Items file:

Switch          poolPumpSwitch                  "Pool Pump [%s]"                     <switch>           (gPool)                                   { mqtt=">[mqttbroker:openhab/sonoff/poolpump/cmnd/POWER:command:*:default], <[mqttbroker:openhab/sonoff/poolpump/POWER:state:default]" }
String          poolPumpIPAddress               "Pool Pump IP [%s]"                  <network>          (gPool)                                   { mqtt="<[mqttbroker:openhab/sonoff/poolpump/INFO2:state:JSONPATH($.IPaddress)]" }
String          poolPumpControllerState         "Pump/Filter [%s]"                   <settings>         (gPool)                                   { mqtt="<[mqttbroker:openhab/sonoff/poolpump/LWT:state:default]" }
Number			poolPumpWATTS			        "Pump Watts [%.1f W]"			     <energy>			(gPool)			                          { mqtt="<[mqttbroker:openhab/sonoff/poolpump/ENERGY:state:JSONPATH($.Power)]" }
Number			poolPumpAMPS				    "Pump Amps [%.1f A]"			     <energy>			(gPool)				                      { mqtt="<[mqttbroker:openhab/sonoff/poolpump/ENERGY:state:JSONPATH($.Current)]" }

MQTT messages come in as follows - I think this is different than the earlier firmware.

openhab/sonoff/poolpump/STATE {"Time":"2018-03-02T03:22:23","Uptime":"0T00:05:15","Vcc":3.476,"POWER":"OFF","Wifi":{"AP":1,"SSId":"iotbam","RSSI":40,"APMac":"06:18:D6:C2:05:0B"}}
openhab/sonoff/poolpump/SENSOR {"Time":"2018-03-02T03:22:23","ENERGY":{"Total":3.626,"Yesterday":0.803,"Today":2.823,"Period":0,"Power":0,"Factor":0.00,"Voltage":0,"Current":0.000}}

So I tried updating items file to have ‘SENSOR’ in the MQTT line, eg:


But it still doesn’t work.

Any ideas?

EDIT: Argh, just as I typed/pasted this - I noticed the slight difference in IP address item - previously it was “IPaddress”, in the new firmware it is “IPAddress” (capital ‘A’) - this has sorted the IP address reported, but the power/current still doesn’t work. Help?

Hello chimera,

your MQTT Topic should be openhab/sonoff/poolpump/SENSOR and your JSONPATH Needs to be ($.ENERGY.Power)

That means for your Power item:

and for your Current item:

Try to find the solution for the switch state… (if you don’t get it, tell me and I Show you the solution… :wink: )

1 Like

Of course… thanks!!