ESPEasyRV Electronical Upgrade of a Motorhome

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
Wiki
Normal user
Posts: 275
Joined: 23 Apr 2018, 17:55

Re: ESPEasyRV Electronical Upgrade of a Motorhome

#51 Post by Wiki » 17 Jun 2020, 11:58

Yep, agreed.

Code: Select all

pi@raspberrypi:~ $ man woman
Kein Handbucheintrag für woman vorhanden
pi@raspberrypi:~ $

Wiki
Normal user
Posts: 275
Joined: 23 Apr 2018, 17:55

Re: ESPEasyRV Electronical Upgrade of a Motorhome

#52 Post by Wiki » 17 Jun 2020, 16:42

So, second stage of the journey reached. Everything still fine, I am happy.

From now on I will be some days in vacation and will leave my soldering equipment untouched. Otherwise my government would put me boxing gloves on my hands.

Code: Select all

pi@raspberrypi:~ $ man woman
Kein Handbucheintrag für woman vorhanden
pi@raspberrypi:~ $

TD-er
Core team member
Posts: 2868
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESPEasyRV Electronical Upgrade of a Motorhome

#53 Post by TD-er » 17 Jun 2020, 21:21

Wiki wrote:
17 Jun 2020, 16:42
[...]
From now on I will be some days in vacation and will leave my soldering equipment untouched. Otherwise my government would put me boxing gloves on my hands.
You mean, you will be doing a test drive :)

Wiki
Normal user
Posts: 275
Joined: 23 Apr 2018, 17:55

Re: ESPEasyRV Electronical Upgrade of a Motorhome

#54 Post by Wiki » 17 Jun 2020, 22:26

Yep, its not easy to stay calm......

Please do not add any related changes into ESPEasy during the next ten days, could be harmful for me...

Code: Select all

pi@raspberrypi:~ $ man woman
Kein Handbucheintrag für woman vorhanden
pi@raspberrypi:~ $

Wiki
Normal user
Posts: 275
Joined: 23 Apr 2018, 17:55

Re: ESPEasyRV Electronical Upgrade of a Motorhome

#55 Post by Wiki » 18 Jun 2020, 03:27

And just for them, who like to play with data and vviews, as an example here a link to the tracking data with the possibility to use the interactive functions of the gpx viewer I decided to use. The link will be available only for 80 days(!):

https://www.bernhard-gaul.de/gpxviewer/ ... 443430.gpx

Code: Select all

pi@raspberrypi:~ $ man woman
Kein Handbucheintrag für woman vorhanden
pi@raspberrypi:~ $

Wiki
Normal user
Posts: 275
Joined: 23 Apr 2018, 17:55

Re: ESPEasyRV Electronical Upgrade of a Motorhome

#56 Post by Wiki » 26 Jun 2020, 01:38

Back home. Everything worked as expected (better: as hoped), real life test done.

During the trip I noticed, that I can get the actual data from the GPS plugin without any relation to task interval or events. So to display my actual speed, I've modified the rules a little bit:

Code: Select all

On GPS#travelled Do
  TimerSet,1,5  //with a Distance Travelled Interval of 50m set in the plugins values indicates that speed<10m/s, so switch to time related speed info  
  let 1,[Strecke#Strecke]+%eventvalue%
  TaskValueSet 2,1,%v1%
  TaskValueSet 2,2,[GPS#lat]
  TaskValueSet 2,3,[GPS#long]
  TaskValueSet 2,4,[GPS#alt]
  TaskRun 2
  let 1,[GPS#spd]*3.6
  SendTo 28,'Di,page2.t7.txt="[int#1]km/h"'
  SendTo 28,'Di,page2.t1.txt="Long:[GPS#long]°"'
  SendTo 28,'Di,page2.t2.txt="Lat:[GPS#lat]°"'
  let 1,[GPS#alt]
  SendTo 28,'Di,page2.t3.txt="Höhe:[int#1]m"'
  SendTo 28,'Di,page2.t4.txt="Speed:[GPS#spd]m/s"'
  let 1,[Strecke#Strecke]/1000
  SendTo 28,'Di,page2.t5.txt="Trip:%v1%km"'
EndOn

Code: Select all

On Rules#Timer=1 Do
  let 1,[GPS#spd]*3.6
  SendTo 28,'Di,page2.t7.txt="[int#1]km/h"'
  SendTo 28,'Di,page2.t4.txt="Speed:[GPS#spd]m/s"'
  TimerSet,1,2  //interval for displaying speed independant from GPS#travelled event
EndOn
Well, I think, I have to think about this once more. But for now its working.

The Cache Controller is working pretty good, up to now no data loss, recorded everything as desired. Up to now I have recorded around 1400km, still in flash. One outstanding function: data still kept in cache survive a warm boot.

Code: Select all

pi@raspberrypi:~ $ man woman
Kein Handbucheintrag für woman vorhanden
pi@raspberrypi:~ $

TD-er
Core team member
Posts: 2868
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESPEasyRV Electronical Upgrade of a Motorhome

#57 Post by TD-er » 26 Jun 2020, 10:15

That feature of not losing data even when crashing was one of the main features the cache controller needed to have, as it was meant for logging data with very irregular sample intervals.
Combined with the cache controller being developed when we had the worst stability of ESPEasy, it was a logical step to take.

Glad to see it worked well.

Please do realize the cache controller cannot use all available flash.
On an 1M SPIFFS partition you can roughly use 700 k of space. From my node running the cache controller for about 18 months now:

SPIFFS Size: 934 kB (235 kB free)

When starting on a fresh file system you can store more, but it will get worse if the files become fragmented.
So make sure you delete them using the red button (which keeps the last file)

Wiki
Normal user
Posts: 275
Joined: 23 Apr 2018, 17:55

Re: ESPEasyRV Electronical Upgrade of a Motorhome

#58 Post by Wiki » 26 Jun 2020, 14:42

Because of the limitation of SPIFFS I took the 4M2M image. Should give some more space, right?

The data I am collecting have at least no relevance, at this time just for looking, where I have been. So I will run the cache controller until the point it gives up :)). Afterwards I will report - or at the moment something unexpected happens. Think, its a good test.

Code: Select all

pi@raspberrypi:~ $ man woman
Kein Handbucheintrag für woman vorhanden
pi@raspberrypi:~ $

TD-er
Core team member
Posts: 2868
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESPEasyRV Electronical Upgrade of a Motorhome

#59 Post by TD-er » 26 Jun 2020, 22:29

Yep, larger SPIFFS means more space to store data.
The limitation why you cannot use all space has to to with how the SPIFFS file system operates.

You always need to have 2 full pages free.
A page consists of 32 blocks of 256 bytes and all blocks in the same page must be marked as "not used" or "no longer used" in a file to be able to erase it.
The same criteria must be met for creating a new file. For this you need a page which has all 32 blocks not marked to be used in any file.

So I guess it is safe to say that with double the amount of space you can store double the amount of data. (not 100% sure about it, because you will have more files so higher chance multiple files will use blocks in the same page)

If the space runs out, it will delete the oldest file (and call the garbage collector) until it is able to create a new file.

Wiki
Normal user
Posts: 275
Joined: 23 Apr 2018, 17:55

Re: ESPEasyRV Electronical Upgrade of a Motorhome

#60 Post by Wiki » 27 Jun 2020, 02:40

Here the current state of the devices storage:
Storage.JPG
Storage.JPG (47.57 KiB) Viewed 789 times
Firmware:
Firmware.JPG
Firmware.JPG (43.43 KiB) Viewed 789 times
And a snippet of the file browser:
FileBrowser.JPG
FileBrowser.JPG (135.54 KiB) Viewed 789 times
Just for documentation purpose....

Interesting is the number of flash writes.

Code: Select all

pi@raspberrypi:~ $ man woman
Kein Handbucheintrag für woman vorhanden
pi@raspberrypi:~ $

TD-er
Core team member
Posts: 2868
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESPEasyRV Electronical Upgrade of a Motorhome

#61 Post by TD-er » 27 Jun 2020, 12:07

The cache controller writes are not counted to the flash writes as it would otherwise easily hit the 100 writes a day and lock the option to change settings or write to the cache controller.

But the number of boots is rather high.
Even if we take into account it could reboot a few times a second, then it has not been built long enough ago to get to that boot count.

Wiki
Normal user
Posts: 275
Joined: 23 Apr 2018, 17:55

Re: ESPEasyRV Electronical Upgrade of a Motorhome

#62 Post by Wiki » 27 Jun 2020, 12:53

I've setup the cache controller in a second device of my RV. It wass booted exactly at the same moment as the one from which I posted the storage info before (its the one with GPS attached). Both are flashed with ESP_Easy_mega_20200608_custom_ESP8266_4M2M.bin, both are Wemos D1 mini. Before activating the cache controller the infopage of the second device showed flash writes 0 daily/0 (boot) Directly after starting the cache controller it shows:
Murphy_test.JPG
Murphy_test.JPG (18.95 KiB) Viewed 764 times
The one device with the GPS attached sends the data to the cache controller depending on gps#travelled. The RV is parked, so there will be no changes. The second one I activated actually will send every 60 secs BMP280 data to the cache controller.
I will have a look at it and report.....

Code: Select all

pi@raspberrypi:~ $ man woman
Kein Handbucheintrag für woman vorhanden
pi@raspberrypi:~ $

TD-er
Core team member
Posts: 2868
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESPEasyRV Electronical Upgrade of a Motorhome

#63 Post by TD-er » 27 Jun 2020, 13:03

I guess the check for plausible RTC values can be improved.

Wiki
Normal user
Posts: 275
Joined: 23 Apr 2018, 17:55

Re: ESPEasyRV Electronical Upgrade of a Motorhome

#64 Post by Wiki » 27 Jun 2020, 13:40

I'll place it on github.

Code: Select all

pi@raspberrypi:~ $ man woman
Kein Handbucheintrag für woman vorhanden
pi@raspberrypi:~ $

TD-er
Core team member
Posts: 2868
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESPEasyRV Electronical Upgrade of a Motorhome

#65 Post by TD-er » 02 Aug 2020, 16:54

Wiki, can you have a look at the reply I made here: https://github.com/letscontrolit/ESPEas ... -667682261

Apparently I have introduced a bug which kind of crippled the dump.csv I gave you.
And since your builds are from after this bug has been introduced, I guess it could help you make more use of the data with the correct interpretation of the columns.

Wiki
Normal user
Posts: 275
Joined: 23 Apr 2018, 17:55

Re: ESPEasyRV Electronical Upgrade of a Motorhome

#66 Post by Wiki » 03 Aug 2020, 12:10

I've tried out dump4.htm. Works perfectly.

I didn't notice before that there is a dump.htm in the repository, so I used the htm code you have posted here in this thread. It worked for me, even if the headers have been kind of mixed up. Now the exported csv table is formatted perfect.

Code: Select all

pi@raspberrypi:~ $ man woman
Kein Handbucheintrag für woman vorhanden
pi@raspberrypi:~ $

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests