Hi all I'm currently following a tutorial to create a basic temperature web monitor. It uses the Exosite library to set up a connection to the Exosite One Platform over Ethernet, reads the temperature over the one-wire interface, and sends the value to the platform every 120 seconds with the Basic HTTP API from Exosite. The code is mostly self explanatory but one area is slightly confusing me. Is the below code asking for my PC mac address or my SM5100B-D mac address (if it even has one).
//global variables
byte macData[] = { "PUTYOURMACHERE" }; // <-- Fill in your MAC here! (e.g. {0x90, 0xA2, 0xDA, 0x00, 0x22, 0x33})
String cikData = "PUTYOURCIKHERE"; // <-- Fill in your CIK here! (https://portals.exosite.com -> Add Device)
Exosite exosite(&Ethernet, macData, cikData);
You have to assign the Ethernet card a MAC address. The intent is that they be globally unique so you can put your device on any LAN and expect it to work. They MUST be locally unique (on the LAN) so each device on the Ethernet can be addressed separately.
If you generate a random 48-bit (6 byte) number you should be reasonably safe.
You can't use random() to generate a unique MAC without first using randomSeed() to change the random number generator from it's initial position. Unfortunately that makes the numbers no more random than the number used to seed randomSeed().