Ewe Link/ Sonoff data logging.

CDA

Member
I have a Snonoff switch with temperature sensor, I would like to create a graph from it, or at the very least a list with times and temps. Any ideas on how I might be able to do this with MD?
 

Dm114

Well-known member
I have a Snonoff switch with temperature sensor, I would like to create a graph from it, or at the very least a list with times and temps. Any ideas on how I might be able to do this with MD?
Making graphs with MD is not (not yet 🤔) possible.
The only (very limited) thing you could do is, like 45 years ago, using appropriate characters to "draw" in a dialog box or Floating text... 😀
 

hsurB

Well-known member
Making graphs with MD is not (not yet 🤔) possible.
The only (very limited) thing you could do is, like 45 years ago, using appropriate characters to "draw" in a dialog box or Floating text... 😀

The other thing that came to my mind is using write to file action to create .csv file with data and later open it manually in excel on phone/pc to create graphs. Although I believe that after doing that you need to store next data in other file and repeat - create new file each time you add graphs (reconvert the file to other format).

I am not sure how the rest would work (sharing data for macrodroid)
 

Dm114

Well-known member
The other thing that came to my mind is using write to file action to create .csv file with data and later open it manually in excel on phone/pc to create graphs. Although I believe that after doing that you need to store next data in other file and repeat - create new file each time you add graphs (reconvert the file to other format).

I am not sure how the rest would work (sharing data for macrodroid)
Of course your suggestion is one of the easiest way but, as far as I understood, @CDA wanted to only use MD.

According to managing such a file update, for other purposes, I append every record by date-time. When I want to include this file to Excel, I delete this file after inclusion. So my macros keep on appending records to this file (or create it when empty or doesn't exist anymore).
 
Last edited:

CDA

Member
Yes I was hoping to be able to pull data from the Sonoff device and log it in MD, even if MD can't create the graph if it could log time and temp I can export that and create my own graph easily enough.
 

hsurB

Well-known member
Could you tell us a little bit more about this device? How does it work? Does it connect with any app/your router? Could you check if producent has any api that could be used?
 

CDA

Member
Sonoff devices connect to the ewelink app. I can control it through sequematic, but it doesn't send the temp/humidty, only the on/off status. I don't know any more than that I am afraid.
 

hsurB

Well-known member
Seems that it could be controlled using api.
You would use http request actions to get a state of your device. Answer would be saved in a variable. Later you would use text manipulation to get only info you are interested in and get rid of the rest

 

hsurB

Well-known member
Few weeks ago I was where you are now when I was trying to control my philips hue devices with macrodroid so I know the feeling.
There are some tutorials on youtube showing it step by step.
It looks scary because all of that data they show but you usually just copy it all and change a word or two.
Also that would probably require having their bridge device connected to router
 

CDA

Member
Yeah I don't have a bridge or anything, the devices connect directly to the router (one of the main reasons I chose Sonoff was that they didn't require a hub of any kind)
 

hsurB

Well-known member
Can ewe link app show notifications with details like the temperature or doest it maybe have any kind of homescreen widget?
 

CDA

Member
Sadly the homescreen widget just shows it as a switch, no details. I don't think it can send suitable notifications but I'll give it a try. I would probably need to set a notification for every possible temp though.
 

hsurB

Well-known member
Macrodroid can clear notifications and save their text into variables so they shouldn't be disturbing
 
  • Like
Reactions: CDA
Top