Logging Data to an SD card
Moderators: grovkillen, Stuntteam, TD-er
Logging Data to an SD card
Hi @all,
today I want to show you my latest developement with / for ESPEasy ... You may have noticed that I have done a new plugin for the SPI adapter MAX6675 / MAX31855. After I finished the plugin I thought it could be nice to add a SD card interface since it uses also the SPI interface.
After some grabbing in my components I found an adapter from CATALEX. See the pictures in the attachement. It´s connected with 5V, GND and SPI.
It needs some SPI additions in ESPEasy (which I hope will be merged ... ) to get the SD card working.
But after 3-4h of testing it´s working
Now you may ask why we need a SD card controller if we can send the data wireless ... Well there are situations where logging to the network is not the best option.
Think about time limited loggings or loggings at places where you don´t have access to your network.
Anyway I think this could be a great addition to ESPEasy. If someone is interested in this plugin I can add it to the Playground.
Find attached some pictures and a sample file.
today I want to show you my latest developement with / for ESPEasy ... You may have noticed that I have done a new plugin for the SPI adapter MAX6675 / MAX31855. After I finished the plugin I thought it could be nice to add a SD card interface since it uses also the SPI interface.
After some grabbing in my components I found an adapter from CATALEX. See the pictures in the attachement. It´s connected with 5V, GND and SPI.
It needs some SPI additions in ESPEasy (which I hope will be merged ... ) to get the SD card working.
But after 3-4h of testing it´s working
Now you may ask why we need a SD card controller if we can send the data wireless ... Well there are situations where logging to the network is not the best option.
Think about time limited loggings or loggings at places where you don´t have access to your network.
Anyway I think this could be a great addition to ESPEasy. If someone is interested in this plugin I can add it to the Playground.
Find attached some pictures and a sample file.
- Attachments
-
- DATA.zip
- Sample Data File ...
- (696 Bytes) Downloaded 442 times
-
- Data computation is very easy with EXCEL and some filtering ...
- Capture.PNG (133.08 KiB) Viewed 19120 times
-
- I used a Thermocouple via SPI, SI7021 I2C Sensor and the SD Card and there are still pins left :-D
- IMG-20161003-WA0016.jpg (175.88 KiB) Viewed 19120 times
-
- CATALEX Adapter.jpg (14.79 KiB) Viewed 19120 times
regards
Dominik
Dominik
Re: Logging Data to an SD card
Hi Dominik,
this is something I was also thinking about. I would be very interested in your code. I ordered a SD-card interface some days ago. As soon as it arrives I will go testing
Stefan
this is something I was also thinking about. I would be very interested in your code. I ordered a SD-card interface some days ago. As soon as it arrives I will go testing
Stefan
Re: Logging Data to an SD card
Hi Stefan,
I can add the code as soon as I have finished it.
What you see here in the post was the first working example
So I need to implement some settings and then you can give it a try.
Oh and you need the R134 from GIT because it includes the basic SPI configuration / Init.
I can add the code as soon as I have finished it.
What you see here in the post was the first working example
So I need to implement some settings and then you can give it a try.
Oh and you need the R134 from GIT because it includes the basic SPI configuration / Init.
regards
Dominik
Dominik
Re: Logging Data to an SD card
Work in progress
I just want to show you the settings page for the SD Carc Controller Plugin.
Now there are some file handling and IF conditions left to be coded
If you have any missing additions please let me know ...
I just want to show you the settings page for the SD Carc Controller Plugin.
Now there are some file handling and IF conditions left to be coded
If you have any missing additions please let me know ...
- Attachments
-
- Settings on Config page
- Settings.PNG (14.87 KiB) Viewed 18875 times
regards
Dominik
Dominik
Re: Logging Data to an SD card
Very very very cool, well done. Will for sure use it.
-----------
IOTPLAY. Tinkerer, my projects are @ http://GitHub.com/IoTPlay, and blog https://iotplay.org. Using RPi, Node-Red, ESP8266 to prove Industry 4.0 concepts.
IOTPLAY. Tinkerer, my projects are @ http://GitHub.com/IoTPlay, and blog https://iotplay.org. Using RPi, Node-Red, ESP8266 to prove Industry 4.0 concepts.
Re: Logging Data to an SD card
cool!
maybe file save or sendto....
maybe file save or sendto....
Re: Logging Data to an SD card
great ideamaybe file save or sendto....
But first let me finish the "normal" SD Card writing. I think it will be done this weekend.
And then I thought it could be cool to have a very small kind of file browser.
With a limited set of options:
* single file delete
* File download
* File View
* create / delete Directory
* maybe file move
But I have to think about that first. Have no idea at the moment where to place such peace of candy .. sorry code
regards
Dominik
Dominik
Re: Logging Data to an SD card
Hi @all,
I have just finished the Controller. It was more work then i expected before
Anyway it´s done and now I will do some tests this night.
Can upload it tomorrow here as code or I place a pull request in the ESPEasy repo.
I have just finished the Controller. It was more work then i expected before
Anyway it´s done and now I will do some tests this night.
Can upload it tomorrow here as code or I place a pull request in the ESPEasy repo.
regards
Dominik
Dominik
Re: Logging Data to an SD card
+1 !
-----------
IOTPLAY. Tinkerer, my projects are @ http://GitHub.com/IoTPlay, and blog https://iotplay.org. Using RPi, Node-Red, ESP8266 to prove Industry 4.0 concepts.
IOTPLAY. Tinkerer, my projects are @ http://GitHub.com/IoTPlay, and blog https://iotplay.org. Using RPi, Node-Red, ESP8266 to prove Industry 4.0 concepts.
Re: Logging Data to an SD card
Hi !
I added a pull request for the new controller.
https://github.com/ESP8266nu/ESPEasy/pull/83
Let´s see if it is ok for the devs
I added a pull request for the new controller.
https://github.com/ESP8266nu/ESPEasy/pull/83
Let´s see if it is ok for the devs
regards
Dominik
Dominik
Re: Logging Data to an SD card
So if I understand correctly from the code, you may either send data to some server or write them to SD card but not both at the same time? I guess there is a reason why it has not been possible to implement is as an output plugin (like _P012_LCD.ino or _P023_OLED.ino). It would be interesting if you could share it since I was playing with the idea of SD plugin myself.
Re: Logging Data to an SD card
Correct. This is a controller plugin. So you can use it like MQTT or FHEM. Nut as per default ESPEasy can handle only one controller at a time.So if I understand correctly from the code, you may either send data to some server or write them to SD card but not both at the same time?
It would be possible to use this as an output plugin. But the problem is that you have to check all the configured sensors when you wan´t to write a value to the SD card.I guess there is a reason why it has not been possible to implement is as an output plugin
And you can´t use the default sensor delays in an output - because they won´t get triggered.
Take a look at the github pull request. If the devs find it ok - maybe you can donwload it directly in R137 ...It would be interesting if you could share it since I was playing with the idea of SD plugin myself.
regards
Dominik
Dominik
Re: Logging Data to an SD card
Sorry for misuderstanding, what I meant here was that I wanted to know the reason why not use the output plugin way. I did look into the diffs when you anounced the pull request. It seems that the best way would be to allow multiple output plugins, but this would probably mean rewriting quite a lot of the code, or to integrate the SD output in another way.moelski wrote:Take a look at the github pull request. If the devs find it ok - maybe you can donwload it directly in R137 ...It would be interesting if you could share it since I was playing with the idea of SD plugin myself.
We will see what martinus thinks soon anyway...
Regards,
Pavel
Re: Logging Data to an SD card
I told you why ...what I meant here was that I wanted to know the reason why not use the output plugin way
But the problem is that you have to check all the configured sensors when you wan´t to write a value to the SD card.
And you can´t use the default sensor delays in an output - because they won´t get triggered.
regards
Dominik
Dominik
Re: Logging Data to an SD card
... for me nearly perfect in a standalone network without openhab!
I use the wemos mini with sdboard...
perhaps a possibility to reading the files?
Thanks al lot
I use the wemos mini with sdboard...
perhaps a possibility to reading the files?
Thanks al lot
Re: Logging Data to an SD card
Hi !
For which reason?
Where do you want to read a file? In ESPEasy?perhaps a possibility to reading the files?
For which reason?
regards
Dominik
Dominik
Re: Logging Data to an SD card
no, the best way for me, file download from ESPEasy somewaymoelski wrote: Where do you want to read a file? In ESPEasy?
For which reason?
why? - because i can't remove my sd-card - its in a case...
Thanks
Re: Logging Data to an SD card
Hi,
this logging feature is exactly what I need - thanks a lot. But where I can find it ? It has not been added to the latest releases and I was not able to find it in the playground.
May I ask a kind soul for guidance ?
TIA
Joshi
this logging feature is exactly what I need - thanks a lot. But where I can find it ? It has not been added to the latest releases and I was not able to find it in the playground.
May I ask a kind soul for guidance ?
TIA
Joshi
Re: Logging Data to an SD card
+1
Regards
Regards
Re: Logging Data to an SD card
Reading a file to upgrade the firmware without a wifi connection would be a nice feature, for a remote datalogger. Maybe update settings via "restore" from file as well.moelski wrote:Hi !
Where do you want to read a file? In ESPEasy?perhaps a possibility to reading the files?
For which reason?
If using as a remote data logger you could also disable the wifi and save power, unless you are war-walking.....
Who is online
Users browsing this forum: No registered users and 0 guests