If you want to change the topic names for the publisher and the subscriber you can do that in line 50 and 51. We have to create a topic to identify the CO2-values also on the Home Assistant side. If you have defined a user and a password for your MQTT-Broker, you have to provide the information as well in line 45: #define MQTT_USERNAME "User" The standard port of the MQTT-Broker is usually 1883, but if you have chosen another port you have to change that as well. Please be careful with the quotation marks. For example: #define MQTT_BROKER_ADDRESS "10.3.141.1" #define MQTT_PORT 8883 Then we have to define the address of the MQTT-Broker (line 36). For this we first have to open the file mqtt_client_config.h, which is in the same folder ( configs). The next thing that is required is the configuration of the MQTT-Client. But if you're interested feel free to explore the rest of the file :) That is it for the WiFi configuration! There a few more things to configure, but those are not mandatory to get the example running. So the first thing you should see after the MTB started is this prompt here: That means opening the MTB and start coding :) Don't worry, we will guide you through the necessary steps, because the ModusToolbox can be a bit intimidating in the beginning. So far so good! Since we prepared everything in the step above, we are now ready to directly jump into action. Furthermore, you also need a running MQTT-Broker. You need a running Home Assistant instance on it, in order to configure the GUI for the window. The second thing which has to be prepared is the Raspberry Pi. You will find a bunch of information there and also an user manual and a getting started guide :) In this post we will refer to the ModusToolbox as MTB. If you're interested to learn more about the ModusToolbox you can check out this link. It is required to change the code on the connected sensor kit. ONTHEAIR NODE INSTALLIn order to get started we first have to install Infineon's ModusToolbox.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |