Help needed in customization built

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Calade
New user
Posts: 6
Joined: 14 Jan 2024, 19:39

Help needed in customization built

#1 Post by Calade » 29 Jan 2024, 21:49

Hello,

I have successfully tried ESPEasy with a PZEM Energy interface and a simple display with mega_20231225 release.
I need to make a custom-built with PZEM mains interface, rotary encoder, DS3231 clock and other interface for a Wemos D1, which are not part of the standard Energy built, if I'm not mistaken.
I succeed in installing the package of VS Code with PlatformIO, Git, Python, Arduino ESP8266 as well as some other extensions ; don't know if all is necessary ?
I followed this : https://espeasy.readthedocs.io/en/lates ... ormIO.html and the video on Youtube of a guy named Gijs Noorlander ;) Unfortunately, he hasn't published the next steps... So I tried by myself to compile some standard packages, the normal_ESP8266_1M and 4M : no error message, and it seems the BIN file size has the same as those supplied in the GIT package !

My concern is now regarding the customization ; I understood that I must copy the custom-sample.h file as custom.h, then uncomment all the plugin lines that I need, and eventually set the Wi-Fi credentials, network settings aso.

There are some things unclear to me :
1) The statement at the beginning : define USE_CUSTOM_H as a build flags. ie : export PLATFORMIO_BUILD_FLAGS="'-DUSE_CUSTOM_H'" ; what does this mean, how to apply this requirement, please ?
2) In my search and readings, there is also noticed : "Uncomment #define USE_CUSTOM_H in file ESPEasy_common.h. Needed or not ?
3) Anything else I missed or misunderstood ?

Thanks for your support !

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

Re: Help needed in customization built

#2 Post by TD-er » 29 Jan 2024, 21:52

Not "custom.h", but "Custom.h" (if you're on a file system which differentiates with captialization in filenames)

Or you can just edit the Python file in tools/pio/pre_custom_esp82xx.py

Then rebuild the appropriate custom env.

User avatar
Ath
Normal user
Posts: 3519
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Help needed in customization built

#3 Post by Ath » 29 Jan 2024, 22:31

Calade wrote: 29 Jan 2024, 21:49 There are some things unclear to me :
1) The statement at the beginning : define USE_CUSTOM_H as a build flags. ie : export PLATFORMIO_BUILD_FLAGS="'-DUSE_CUSTOM_H'" ; what does this mean, how to apply this requirement, please ?
2) In my search and readings, there is also noticed : "Uncomment #define USE_CUSTOM_H in file ESPEasy_common.h. Needed or not ?
That's not part of the PlatformIO-related documentation, but for Arduino IDE, and that's not actively supported any longer.

A quick, but quite short (on my TODO list to improve...) Custom build guide is available on that PlatformIO page in this chapter
/Ton (PayPal.me)

Calade
New user
Posts: 6
Joined: 14 Jan 2024, 19:39

Re: Help needed in customization built

#4 Post by Calade » 30 Jan 2024, 21:03

Hi,
Seems I succeed ! Quite...
2024-01-30 19_45_50-CUSTOM.jpg
2024-01-30 19_45_50-CUSTOM.jpg (39.36 KiB) Viewed 702 times
My own build with various plugins has been compiled in 1mn and loaded in the WEMOS D1, based on the custom_274_ESP8266_4M1M, with selected plugins in the Custom.h (with capital "C" !) with two restrictions :

1) I have been unable to find the plugins related to RTC such as DS3231, just a setting "FEATURE_EXT_RTC 1"? Is it missing or must be called differently ?

2) The WEMOS D1 connects as usual as AP, then on my Wifi with DHCP, but I am unable to switch it to fixed IP as usual by filling the info + Submit ? It remains on DHCP whatever... Other changes such as unit name, NTP or others are OK.

Any ideas why these settings are not validated ?
Thanks for your support,

User avatar
Ath
Normal user
Posts: 3519
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Help needed in customization built

#5 Post by Ath » 30 Jan 2024, 22:41

Calade wrote: 30 Jan 2024, 21:03 Seems I succeed ! Quite...
Great :D

Calade wrote: 30 Jan 2024, 21:03 1) I have been unable to find the plugins related to RTC such as DS3231, just a setting "FEATURE_EXT_RTC 1"? Is it missing or must be called differently ?
The External RTCs are enabled by default for the Custom builds, and the documentation shows how to configure them. These chips are connected via I2C, so that has to be configured appropriately. After that hurdle is taken it should all 'just work'. Usually, just having NTP enabled (do not configure an NTP server, it will get the time from the pool) will ensure the time is always accurate, as long the units can access the internet.
Calade wrote: 30 Jan 2024, 21:03 2) The WEMOS D1 connects as usual as AP, then on my Wifi with DHCP, but I am unable to switch it to fixed IP as usual by filling the info + Submit ? It remains on DHCP whatever... Other changes such as unit name, NTP or others are OK.
I'm using all my units with fixed IP configuration. It is mandatory you configure all 4 fields (with IPv4-data, no hostnames. The subnetmask is usually 255.255.255.0) for that to work. The settings should be saved, just like any other setting, if that's not working, then please give more details with exactly what you entered but isn't working.
After configuring the fixed IP settings, the unit should be rebooted to apply those settings.
/Ton (PayPal.me)

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

Re: Help needed in customization built

#6 Post by TD-er » 31 Jan 2024, 09:59

You do need to select the external time source from the tools->Advanced page. (in the Time Source section)

If the RTC chip is found and system time is set, you should see the time stored in the RTC chip being displayed as a note below the external time source selector.

Calade
New user
Posts: 6
Joined: 14 Jan 2024, 19:39

Re: Help needed in customization built

#7 Post by Calade » 01 Feb 2024, 18:18

Yes ! That works as described...
I have been fooled by some old blogs where the RTC was part of Devices listed, and by the fact the corresponding plugins were removed from the repository.
Made the required steps and the RTC chip is updated.

Thanks as usual for the support ! :D

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

Re: Help needed in customization built

#8 Post by TD-er » 01 Feb 2024, 19:37

You're welcome
Thanks for getting back on it.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 34 guests