Device Log

Please. I need a log including device, time, User and status. Three days log is too short. How can I get a longer log?

Do you have something you can run Home Assistant on? You could connect the Sonoff integration: it will log everything but you’ll get loads of non-Sonoff Home Assistant stuff. As you probably don’t have a Raspberry Pi etc. free to install Home Assistant on can you leave on a normal computer with a virtual machine running Home Assistant OS? That would get you round the limitation as long as the Sonoff Integration works with the device you want (it does most).

Thank you for your response. Since I dont have the knowledge I will try to get familiar with Home Assistant and how to set it up. What about API Ewelink? Would it be easier to try develol a script that gets the log?

There is an openAPI for local eWeLink Cube stuff but I don’t know about their servers in the cloud.

Sounds way more complicated than just downloading Home Assistant, creating a virtual machine (? In virtual box) running Home Assistant OS, installing the Sonoff integration (may be on HACS (home assistant community store) and looking at the logs though. You would not needs to learn anything about Home Assistant as you don’t actually intend to do anything with it.

Thank you! I succeded in installing home assistant and creating the virtual machine. What I need to get the log from is a 4 channel switch connected to ewelink. Can I integrate that to home assistant?

I think so. There are 3 revisions of the 4 channel switch I think.

this is the wiki page of the new add on

I haven’t transitioned yet from the integration to the add on. I would be very surprised if it didn’t connect to something as simple as a 4 channel switch. My Revision 1 is in Home Assistant using the old integration.

If you want logs lasting longer than the default it will need changing (I think the Home Assistant default is 10days).

Can I configure it? Because I need the user name that activated the switch and it is allways reportind ‘supervisor’. More than 10 days, loke 20 days, would be much better.

Yes, but it’s in the configuration.yaml file and it isn’t a bit they’ve made easy to set yet

Which is very easy to edit but you need the File Editor add-on in order to edit any files.

Thank you! I could not get a log with the user name because the ewelink api does not publish that data. Only choice is to control devices through telegram bot and get the log from telegram group. Will ewelink in the future extend the length of the log in the app? 3 days is too short.

Not in the eWeLink log. Whilst the computer is on it will log all the data the Home Assistant Virtual Machine gets from Sonoff/eWeLink.

I’ve just checked. Go to the “History” tab in Home Assistant and select your device. I can see the temperature from a TH-Elite on the 1st of this month because my computer was on then. Even if it weren’t the case you could just create a Boolean Helper (or number helper etc) for each switch etc. and automatically turn it on and off as per eWeLink/Sonoff, but I don’t think you need to do this. Just leave it running and it will get in the Home Assistant logs. That is at least what the old Sonoff Integration does. Just name your device something unique in the eWeLink App so it is easy to find.