Run an MQTT protocol on arduino
sudo ./arduino
Very important to run as sudo!
Preferances -> Add this URL: https://dl.espressif.com/dl/package_esp32_index.json
Tools -> Board Manager.. -> Search 'esp32' -> Install
Select 'WEMOS LILON32'
Tools -> Manage libraries -> search 'PubSubClient' - by Nick 'O Leary (important to instal this spesific library)
mosquitto_pub -t mytopic
mosquitto_pub -t mytopic -m "my message"
mosquitto_passwd -c passwordfile user
http://www.steves-internet-guide.com/mqtt-username-password-example/
Tutorial: http://www.iotsharing.com/2017/05/how-to-use-mqtt-to-build-smart-home-arduino-esp32.html MQTT Lib: https://github.com/knolleary/pubsubclient/ MQTT Code: https://techtutorialsx.com/2017/04/24/esp32-publishing-messages-to-mqtt-topic/