MacWyznawca / homebridge-mqtt-power-consumption-log-tasmota

Plugin to HomeBridge optimized for work with Itead Sonoff POW hardware with firmware Sonoff-Tasmota via MQTT with log data to file. Partially emulate Elgato Eve Energy. Measure used power and write data to log text files.
MIT License
13 stars 12 forks source link

No Value and no log files #8

Open rikray02 opened 5 years ago

rikray02 commented 5 years ago

Hello,

I have Sonoff S31 with Tasmota 6.4.1. image

The plugin work well in Homebridge but we don't have any csv log files and i don't have any values in Home 3 apps.

JSON.CONFIG

    "accessory": "mqtt-power-consumption-log-tasmota",      
    "name": "Lampe_SS",     
    "url": "mqtt://10.0.1.15",
    "username": "",
    "password": "",     
    "topics":   {
                "statusGet": "stat/Lampe_SS/POWER",
                "statusSet": "cmnd/Lampe_SS/power",
                "energyGet": "tele/Lampe_SS/ENERGY",
                "stateGet": "tele/Lampe_SS/STATE"
                },
    "onValue": "ON",
    "offValue": "OFF",      
    "outletInUseBy": "current",
    "outletInUseCurrent": "0.01",       
    "totalPowerResetBy": "month",       
    "activityTopic": "tele/Lampe_SS/LWT",
    "activityParameter": "Online",      
    "startCmd": "cmnd/Lampe_SS/TelePeriod",
    "startParameter": "15",     
    "patchToSave":"/Users/richardraymond/Desktop/stats/",
    "savePeriod": "15",     
    "timeOffset": "-60",        
    "manufacturer": "ITEAD",
    "model": "Sonoff TH",
    "serialNumberMAC": "5C:CF:7F:7D:29:44"

HOME 3 apps

image

WWW console 17:48:11 MQT: stat/Lampe_SS/RESULT = {"POWER":"ON"} 17:48:11 MQT: stat/Lampe_SS/POWER = ON 17:48:26 MQT: tele/Lampe_SS/STATE = {"Time":"2019-02-03T17:48:26","Uptime":"2T12:01:38","Vcc":3.499,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER":"ON","Wifi":{"AP":1,"SSId":"Airport_Maison","BSSId":"70:73:CB:BD:43:57","Channel":11,"RSSI":56}} 17:48:26 MQT: tele/Lampe_SS/SENSOR = {"Time":"2019-02-03T17:48:26","ENERGY":{"TotalStartTime":"2019-01-31T05:49:31","Total":0.787,"Yesterday":0.225,"Today":0.486,"Period":0,"Power":27,"ApparentPower":28,"ReactivePower":6,"Factor":0.98,"Voltage":121,"Current":0.230}} 17:48:26 MQT: stat/Lampe_SS/RESULT = {"POWER":"ON"} 17:48:26 MQT: stat/Lampe_SS/POWER = ON

Any suggest why i have no CSV log files and no data in Home 3 apps?

Richard

Fearraiser commented 5 years ago

Maybe in new Tasmota firmwares names of topics changes? Looks like: Old topic: tele/Lampe_SS/ENERGY New one: tele/Lampe_SS/SENSOR

BluP62 commented 5 years ago

I tried "energyGet": "tele/sonoff/SENSOR" on a POWR2 with Tasmota 6.4.1.8 -> still the same issue. No values are returned or files are writen.

I've checked on my iPhone with MQTTool and the topic to read the Energy from the POWR2 is really "tele/sonoff/SENSOR"

rikray02 commented 5 years ago

Same thing for me with ENERGY or SENSOR. No values are returned. I tried with old Tasmota (5.11.0 and 5.14.0) firmware and S31 won't start. Probably it's too older for this new S31 module.

lyance commented 5 years ago

Can you try the changes I submitted in Pull Request #9 ? It seems to be working fine for me (but I'm using the Elgato Eve App to display power consumption usage so no guarantees if it will work with your app)

FYI: Use tele/sonoff/SENSOR for energyGet. I hope it helps.

rikray02 commented 5 years ago

Hi Lyance,

I tried your Pull Request #9 and now, all works fine. Thank you very well for your help. For your information, i use HOME #3 app by Matthias Hochgatterer. It's an HomeKit app over steroid. It's a very powerful app that replace HomeKit. The automation is very more powerful than HomeKit.

Thanks again for your help. Rik

rikray02 commented 5 years ago

I use Home 3 -not Home #3

BluP62 commented 5 years ago

@lyance Also worked for me! Great job. Thanks for the quick fix!

netRunner0 commented 5 years ago

6.5.0 Tasmota works? Works!

How to change the “Accessory inactive”?

netRunner0 commented 5 years ago

IMG_0018

Spanishu commented 4 years ago

I have a similar problem. I am running Blitzwolf Outlets with the following configuration

Screenshot 2019-12-31 at 13 16 55

I have the following config in HomeBridge { "accessory": "mqtt-power-consumption-log-tasmota", "name": "Blitzwolf2", "url": "mqtt://localhost:1883", "username": "user", "password": "password", "topics": { "statusGet": "stat/Blitzwolf2/POWER", "statusSet": "cmnd/Blitzwolf2/power", "energyGet": "tele/Blitzwolf2/SENSOR", "stateGet": "tele/Blitzwolf2/STATE" }, "onValue": "ON", "offValue": "OFF", "outletInUseBy": "current", "outletInUseCurrent": "0.01", "totalPowerResetBy": "month", "activityTopic": "tele/Blitzwolf2/LWT", "activityParameter": "Online", "startCmd": "cmnd/Blitzwolf2/TelePeriod", "startParameter": "15", "patchToSave": "/home/homebridge/.homebridge/", "savePeriod": "15", "timeOffset": "-60", "manufacturer": "Blitzwolf2" }

I am not getting any input into the Logfile however as you can see the plug is recording the energy readings.

Further On the Eve App. I have only been able to find the Eve App from Eve Systems. There is no power readings either.

Please let me know if there is anything that I am doing wrong.