I'm currently building sensors which publish their data via pub/sub to my MQTT server. Everything is working fine so far.
In order to only have one piece of code for all my ~20 nodes I'd like to automate config and also do the rest via http to avoid having multiple software versions.
I create the mac address, at least the last 3 octets randomly and store it into the eeprom on first boot. For connection I'm using DHCP.
now: for the MQTT server, I'd like to store the server IP and the topic in EEPROM too, but changeable via a page via http server.
I have setup the server and it is displaying some code (http server example from arduino.cc), now I need two input boxes and a button to store the values to the eeprom.
Server IP: maybe 4 boxes with boundary check (unless theres code available which checks the whole address...), prefilled with the predefined server ip from the eeprom written on first boot
MQTT topic: a box to input a topic for MQTT, should be prefilled with the last three octets from the mac address in HEX
Can anyone help me here? Is this possible? Thanks!!