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

Noob Question about Log Files #17

Closed einencool closed 4 years ago

einencool commented 4 years ago

Hello and Sorry for the question, but i can't get the Log Files to work and I didn't know where I make the mistakes. But Linux is not my very known System...

I got the homebridge and this plugin working fine. But I always get a error message when the Log file would be created or saved. I hope it's only a permission Problem, but I didn't know how to fix it.

Here is my Config: { "accessory": "mqtt-power-consumption-log-tasmota", "switchType": "outlet", "name": "Dose 105", "url": "mqtt://127.0.0.1", "username": "", "password": "", "topics": { "statusGet": "stat/Dose105/POWER", "statusSet": "cmnd/Dose105/power", "stateGet": "tele/Dose105/STATE", "energyGet": "tele/Dose105/SENSOR" }, "onValue": "ON", "offValue": "OFF", "outletInUseBy": "current", "outletInUseCurrent": "0.01", "activityTopic": "tele/Dose105/LWT", "activityParameter": "Online", "startCmd": "cmnd/Dose105/TelePeriod", "startParameter": "10", "pathToSave": "/var/homebridge/", "savePeriod": "15", "timeOffset": "-60", "manufacturer": "Gosund SP111", "model": "Sonoff", "serialNumberMAC": "Dose105" },

and in the "EVE App" I can see all the Parameters, but this is the Error Log every 15 min:

[2020-2-1 19:30:00] [Dose 105] Problem with save periodically [Error: EACCES: permission denied, open 'falseDose105_period_15.csv'] { errno: -13, code: 'EACCES', syscall: 'open', path: 'falseDose105_period_15.csv' }

I tried different paths for the log file, but the message is still the same: "pathToSave": "/home/pi/homebridge/", "pathToSave": "/home/homebridge/", "pathToSave": "/var/homebridge/",

and can anybody help me how to config the homebridge so that I can see the graph in the Eve App for Power consumption. Sorry for my stupid question, but I can't get it to work, so I would like to ask the Pro's for help :-)

Greets and thanks in advance Chris

einencool commented 4 years ago

My mistake, I read about it that it has to be "pathToSave", but with "patchToSave" it works. No I only need to know how to set up the FakeGatoHistory Service...