Open Pepito-design opened 4 months ago
Hi,
Yes what you describe is the next step.
We need a mechanism to describe the expected sensors named list, for etch sensor/item minimum elements are :
Storing in this list "sensor index" si not required, and not usefull because this index can change (adding/replacing sensor ...) Using DeviceAddressString or Human-readable-name in place of index.
We need to implement a "learning procedure" & "editing procedure" by using :
I have write the base functions, in prevision for this functionality :
uint8_t getSensorsCount();
bool validateAddressesRange(DeviceAddress addressesRangeToValidate[], uint8_t numberOfAddresses, bool exclusiveListSet = true);
bool validateAddressesRange(String addressesStrings[], uint8_t numberOfAddresses, bool exclusiveListSet = true);
void mapIndexPositionOfDeviceAddressRange(DeviceAddress addressesRangeToValidate[], uint8_t numberOfAddresses, int8_t mapedPositions[]);
The mapIndexPositionOfDeviceAddressRange()
function was written for this purpose.
I have no time for now to write the missing functions to implement a learning & a modification procedure.
But it can't be difficult, the base is done.
See file examples/AdditionalFunctions/AdditionalFunctions.ino
it is a draft to test all functions, and show usage of it.
-
Do to want to monitor a car ? a electric generator ?
Hi, thanks, you understand my requirement exactly :-) Thanks Concerning your question, motorbike and electric generator, 2 projects with ESP32 S3. I agree, a learning phase per serial monitor is a good step. Based on that .... everybody can do his own stuff, LCD, WEB, BlueTooth or whatever. House automation may have similar requirements. Thanks again for your excellent solution. :-)
Hi, great work and it works fine ( ESP32 S3 ). I have a bunch of temp sensors on specific places around a engine ( oil, water on different places ). I want to give each sensor a specific (fixed) name ( e.g. oil ) to index mapping ..... should be valid after reboot / power of-on. So I have to save the mapping in EEProm, SD card or LittleFS. But ... index is not always the same for each sensor. So currently it mixed up a little bit.
Question is, what is the easiest way to make that happen? Need some kind of first time learn procedure I think. Thinking about the following:
For the normal use afterwards:
At the moment I'm struggling with that, think I'm not alone ...... :-)
How to make it simple with given functionality ...... at the moment I'm thinking too complex I think ....