Skip to content

How to make a fixed relationship between device index and the real device? #15

Description

@Pepito-design

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:

only ones ( learning phase )
remove all sensors from bus
for each temp sensor
     output sensor position on engine
     connect that sensor to the bus
     map sensor name / position / id  to the device address we have got
     save on EEProm , SD card or LittleFS

For the normal use afterwards:

load the saved data ( name / position /index to device address mapping )
use the saved data, report missing and new devices ( request new learn procedure in that case )

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 ....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions