This is an old revision of the document!
Lühijuhend IoT Kodulabori moodulite konfigureerimiseks nii, et need töötaks mõne muu valitud ruuteri või MQTT-broker-iga. IoT Kodulabori kontrollerimoodulite konfigureerimiseks on vajalik järgmine:
IoT Kodulabori moodulite konfigureerimisekson vajalik programm, mis võimaldab teha HTTP POST päringuid. Selles näites kasutame programmi Advanced REST Client (ARC), mida saab alla laadida siit.
IoT kontrollerimooduli esimest korda sisse lülitamisel, kui konfiguratsioon puudub või kui moodul ei saa ruuteri või MQTT serveriga ühendust, läheb see seadistusrežiimi. See tähendab, et luuakse Wifi pääsupunkt, millega saab ühenduda, kasutades arvutit.
Pärast mooduli sisselülitamist ilmub see arvuti WiFi võrkude loendis kujul:
NB! IoT kontrollerimoodul ei tee WiFi võrku, kui sellel on toimiv ühendus MQTT serveriga. Selle ümberkonfigureerimiseks tuleb moodul olemasoleva WiFi võrgu levialast välja viia. Seda võib teha, kas lülitades ruuteri välja või kui see ei ole võimalik, siis tuleb kontroller füüsiliselt ruuteri leviulatusest välja viia.
After opening the ARC program. First select the POST method. After that type
http://192.168.4.1/set/config
in the Request URL field. Then select the Body parameter and copy the following line there:
{"dname":"ESP44","wname":"raspberryIoT","wpass":"piIoT123","msrv":"192.168.4.1","mport":"1883","muser":"test","mpass":"test","mssl":"false"}
If you are using the Raspberry image we provided then only change the dname field. If you are using some other broker then you have to change all fields according to your setup. The fields are as following:
Field | Description |
---|---|
dname | Name of the controller module. It is recommended to write the name physically on the module to avoid getting them mixed up. |
wname | The SSID of the Wifi router you wish to connect to |
wpass | The password for that Wifi connection |
msrv | The IP address of the MQTT broker |
mport | The port for the MQTT broker (Usually 1883 is used for connections without SSL and 8883 for connections with SSL. |
muser | The username for the MQTT broker. Only relevant when using a broker with SSL. |
mpass | The password for MQTT broker. Only relevant when using a broker with SSL. |
mssl | A boolean that shows if SSL is used or not. |
Once you have configured the fields as necessary press SEND to upload the configuration to the module. After a few seconds the following success indicator should appear after the body field. If it fails check if the connection with the module is still active and if you do not have any formatting mistakes.