Espnow.add_peer list

If doesn't fit into any other category ....
Post Reply
User avatar
Electroguard
Posts: 1094
Joined: Mon Feb 08, 2021 6:22 pm
Has thanked: 373 times
Been thanked: 392 times

Espnow.add_peer list

Post by Electroguard »

Eventually I plan to have a centrally maintained name=MAC list (perhaps using a word.param list) which all espnow devices retrieve at startup, or which can be pushed out to them all.
As well as simplifying maintenance, it would also be very useful for cross-referencing the returned onEspNowError MAC to a more user-friendly name string.
Plus it would allow the program to make appropriate automated responses.

So, is there any way to interact with the espnow.add_peer list ?
More specifically, to view all, and delete all ?

Code: [Local Link Removed for Guests]

 gate1tx$="80:65:99:C8:A0:64"   '29     replacement for existing gate1tx
 gate1rx$="88:65:99:C8:9D:64"   '27     orig ok in attic
 gate2tx$="30:30:F9:72:05:2C"    '72     2 do     
 gate2rx$="EC:DA:3B:67:8B:90"   '74     2 do      
 speaker$="24:62:AB:F9:F5:B0"    '42
  'wemos16$="A0:20:A6:1A:F9:F6"
  'wemos20$="5C:CF:7F:FC:F7:9F"
  'usb$="84:FC:E6:51:45:FC"       '15
  's3$ = "34:85:18:6F:E8:38"  '91
 espnow.add_peer gate1tx$
 espnow.add_peer gate2tx$
 espnow.add_peer gate1rx$
 espnow.add_peer gate2rx$
 espnow.add_peer speaker$
User avatar
cicciocb
Site Admin
Posts: 3240
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 646 times
Been thanked: 2282 times
Contact:

Re: Espnow.add_peer list

Post by cicciocb »

No,
you must manually handle add_peer and del_peer
Post Reply