Learning programming languages for a smart home
When setting up a smart home, a lot of different programming languages are actually used. These can also be common languages that can be used for other needs, for work.
The main language used is Python, but since all smart home systems use programming languages in one way or another, they are used for their development, and in the systems themselves it is also possible to develop additional scripts in programming languages and python is basically the most popular there, you can always run it, for example, if it is Linux, then on a microcomputer Raspberry python is already installed in the operating system right away, and you can use simple commands to immediately start launching and execute various commands.
In principle, you can write a python script that will handle different events in a smart home, access different external servers, can access and connect to the smart home system, use different APIs, it is also clear that you can connect different additional libraries there, for example, you can connect a library for recognizing images and some things define, people, animals, that is, a lot of features are used, but also there are great opportunities in python when processing different data, that is, it can be very fast and easy to parse various complex structures, for example, there is a description in JSON format, or XML, or there is some kind of web page to get, and from it parse data.
Well, you can also generally make some kind of web server of your own on this python and, in principle, already execute commands normally, for example, I have a server that constantly processes information in a smart home for the same dashboard to display, transmits information, sends different images there, and uploads these images to various resources, and also in Telegram bot, can also be configured to work through this integration, which can be written using the corresponding library in python.
Also, the Java language is still used, but it is much less used and in fact there are still some smart home systems that are also written in Java, it will be much more difficult to finish there and of course it is not so popular, but at least it is such a universal language that can be used many places and many things, not just the system at home, they are developed in Java and therefore you can study it, practice it, and then you can also use it in automation in a smart home.
The PHP language is also used, but in fact, by default, this language is not installed in the Linux system, that is, it will need to be additionally installed as well as Java, but in fact it will also be possible to do some commands there, run libraries, and connect them, but in principle it is useful for web development-sites, that is, you can also find various other applications of this language, so it is also useful to practice writing scripts in this language.
A lot of smart home systems and in general various components of a smart home they work in JavaScript, in principle all languages of course they are now very similar to each other, they are more based on the syntax of the C language, and of course it will be quite easy to understand the same JavaScript if you already know some other language, but if, for example, you need to modify some function, then in the smart home system you can make some scripts for processing scenarios, there, for example, in the same NodeRed, for example, is used in the system for developing automation, if there is no function, you can just open a window there and write the necessary program in it to process some tasks.that is, but of course, in the principle of javascript, it has much more features and is used in the development of dynamic websites and web pages, my dashboard is made so that it is just made in JavaScript and there you can make different types of requests there to different sources of information and dynamically process all clicks there, on this page It is very convenient and gives you a lot of opportunities to change the information on this page, show or hide new objects there.
In the Linux operating system itself, the bash language is used there by default, it also has quite a lot of features, there are a lot of additional components that can be used, or they will need to be installed there if they are not installed immediately, you can do a lot of different scripts and automations and integrations with different systems, including sometimes you can also connect to external resources, but of course, for example, I have this, I connect to a telegram bot, and in principle everything works quite normally, but disassembling some input data becomes quite difficult, because by default bash does not have libraries that allow it to parse input data in any format., but in principle, if the data is not complex enough, some simple ones go, for example, in JSON format, description, date, time, status of some kind, then in principle it is possible to parse it in bash, in principle, it is not very difficult at all.
In smart home systems, in order to write all the settings of scripts or some devices, there is also a special interface that uses the YAML language, it is also used in Home Assistant from the very beginning, and now it is also supported in OpenHAB, too, and you can also develop various applications on it quite simply.
scripts for automation, in principle, the syntax is quite specific it's just a structured description of all these objects, that is, it's not just programming and there are certainly a lot of limitations, but by and large it's a useful language for a smart home and you can really do quite tricky scenarios there with handling very different complex conditions, a lot of which let's say that there is a remote control processing that works via Bluetooth, where all events are processed just using a description in this YAML language and then control takes place in the smart home system with different devices, several lamps in different modes, that is, in principle, it also has quite large capabilities, but this of course depends primarily on the smart home system itself that uses the language.
To work with databases, SQL is also used as a database query language, it is basically the same in almost all databases, basic commands, but there are of course specific commands for individual databases and if you use them, then of course first you need to study them and find these commands, and then of course in another system these commands will no longer be executed, well, the syntax of some databases is also different, for example, not all of them can perform some operations there for joining tables or converting data, but by and large this is useful and some even things related to data processing in large tables, too it will be possible to do this using this language, of course, I have there and writing information to the database goes through SQL commands and getting information, and processing information, and various things related to dashboards, they also use the capabilities of the SQL language for data processing.
Well, if you also program different microcontrollers or different devices, for example Arduino or esp 8266 or eps32, then you can also use the Arduino IDE programming environment there, the C language is actually used there, it certainly has some features, but it also uses a lot of additional libraries that need to be connected if you need some there you can use certain controllers or run certain functions of these microcontrollers, but in fact it is also quite universal, you can try programming certain pieces of hardware in the work, which will allow you to learn how to configure different equipment, manage it, make programs for them, and accordingly it will also be very interesting to study and then apply it in a similar way not only in a smart home.
Automation in a smart home should be useful and create additional comfort, but sometimes everything goes wrong… The reasons for this, and how to configure everything, see on my channel.