Outboard Hour meter data to domoticz

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
planedo79
Normal user
Posts: 23
Joined: 10 Apr 2020, 12:22

Outboard Hour meter data to domoticz

#1 Post by planedo79 » 16 Apr 2020, 19:31

Hi. I'm building an hour meter.

More specifically, my intention would be to get the Outboard Operating Hours stored in domoticz. Simply put, the Wemos D1 MCU would turn on when the engine is started. The operating hours would be recorded on the Wemos D1 Board as "uptime". When the boat enters the port, there would be a WiFi network to which the wemos would connect and send on-site data to the domoticz.

Is it possible for Wemos to record the time it is on and even if it is not connected to the WiFi network?

I've done a few tests where the transfer wemos off wifi network reaching the area, and then bring it back. Wemos is variously connected to Wifi and most of the time is not. Does anyone have information on similar projects, and if so whether it would give tips of where to could find?

at the level of thought, this could also be refined to record e.g. fuel consumption, battery voltage, etc.

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

Re: Outboard Hour meter data to domoticz

#2 Post by TD-er » 16 Apr 2020, 21:02

If you use a GPS, then it is possible to receive the time as that is an integral part of the GPS protocol.
ESPEasy does sync with the GPS time if it is available.
You can store the data in the "cache controller", but right now there is not yet an easy way of flushing that data to a controller if you are in reach of the network again.

If you like, I do have a .htm file which you can store on the SPIFFS filesystem to read the stored .bin files on the node (generated by the cache controller) and convert those to a CSV file.

planedo79
Normal user
Posts: 23
Joined: 10 Apr 2020, 12:22

Re: Outboard Hour meter data to domoticz

#3 Post by planedo79 » 18 Apr 2020, 10:23

Hi, thanks for the information. I did not realize GPS could be one solution here. As I am newbie and very minimal kwowledge of coding I am not sure if I can pull this through.. I am interested by your offer to send some files. From where could I find good instructons to learn more about this SPIFFS filesystem, and how to read it? I really need instructions for dummies... would this probably require a separate gps module in addition?

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Outboard Hour meter data to domoticz

#4 Post by grovkillen » 18 Apr 2020, 13:12

SPIFFS sounds harder than it really is. The flash memory of the ESP is generally 1MB or 4MB. This is ones or zeros. The "operating system" is stored as binary data on the flash. But for none static files we need a file system to store these files. This file system is called SPIFFS. For our normal builds for the 1MB units we allow for roughly 0.5MB (512kB). For the 4MB units we have 3MB SPIFFS and still allow for 1MB binary storage.

So to guide you. If you know HTML you can simply upload a file called index.htm and if you browse to your unit this file will be used instead of the regular page (sub pages still work though). Delete the file and you're back to normal.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

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

Re: Outboard Hour meter data to domoticz

#5 Post by TD-er » 18 Apr 2020, 13:28

Well the SPIFFS is a filesystem we use on the ESP nodes.
You can access it via the web interface: Tools => File Browser

There you can see the files stored on the file system, like the settings files.

For the way to retrieve the files stored using the (experimental) cache controller, I think it is best if I make proper documentation for it so I don't have to type it again when someone asks for it later.
So that will have to wait for now.
You can first try to get the GPS working, and the other parts to see if it is even feasible to get the things done you plan to use.
If that's ready I will also have the docs ready to store the data in binary files and read them back later.

Ulisses_proj
New user
Posts: 3
Joined: 18 Apr 2020, 15:30

Re: Outboard Hour meter data to domoticz

#6 Post by Ulisses_proj » 18 Apr 2020, 15:42

TD-er wrote: 18 Apr 2020, 13:28 Well the SPIFFS is a filesystem we use on the ESP nodes.
You can access it via the web interface: Tools => File Browser

There you can see the files stored on the file system, like the settings files.

For the way to retrieve the files stored using the (experimental) cache controller, I think it is best if I make proper documentation for it so I don't have to type it again when someone asks for it later.
So that will have to wait for now.
You can first try to get the GPS working, and the other parts to see if it is even feasible to get the things done you plan to use.
If that's ready I will also have the docs ready to store the data in binary files and read them back later.
I understand that the feature is under development and you are working on the documentation, but could you give a quick hint on how to read the data from the binary file that the cache controller dumps? I have so far been unsuccessful in reading the data and am getting desperate.

Would be greatly appreciated.

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

Re: Outboard Hour meter data to domoticz

#7 Post by TD-er » 18 Apr 2020, 15:55

I already replied on the other topic.
I will include the file in the repo, but for now you can already start experiment with it.

Post Reply

Who is online

Users browsing this forum: No registered users and 24 guests