Concepts dealt with:
Software components used:
Physical devices used:
GUIDE more indicated for:
Notes and disclaimer
|Driving review: 1.1|
The use in home automation of infrared and / or radio frequency codes (433mhz / 315mhz) rappoften resents a good technique to be able to domotize something that, natively, it wouldn't be.
In fact they have existed for some time simple and cheap devices useful toappefficiency and above all the transmission of codes of this type (eg Broadlink RM Mini 3); such devices, once inserted in home automation, rappthey provide a "lever" to virtualize the indirect control of "objective" devices.
In essence, the technique is that of appmake the codes from the remote controls of the devices we want to domotize, insert them in the configuration of ours personale HUB (in this case, Home Assistant) in the form of accessories (switches, fans, air conditioners, etc.) which, when activated, arise in sending infrared / radiofrequency codes appropiati.
This technique has been used in several projets featured on inDomus, including:
- Domotize TV, decoder, (synto) amplifiers with Broadlink e Home Assistant
- Domotize TV, decoder, (synto) amplifiers with Broadlink e Home Assistant (V2)
- Household a traditional air conditioner with Broadlink e Home Assistant
- Household a traditional air conditioner with Broadlink e Home Assistant (V2)
- Home automation of a non-domotic robot vacuum cleaner with Broadlink e Home Assistant
- Domotise a bathroom fan heater with Broadlink e Home Assistant
What we will see in this guide is how, starting from a device Broadlink (capable of receiving / sending infrared / radiofrequency codes) and from a remote control or a radio controlor (capable respectively in transmitting infrared or radio frequency codes), we will succeed to capture these codes for the purpose of reuse in home automation configuration.
Nb. this guide refers to 433mhz / 315mhz radiofrequency codes (not rolling code) and infrared signals (with wavelengths between 700 nm and 1 mm, or that of traditional remote controls).
To domotize remote controls rolling code, is available this guide.
On the topic of the use of infrared and radio frequencies in home automation we have dedicated an episode of ours Podcast.
Device configuration Broadlink
Before starting the code capture through the combined use of Home Assistant and its component "Broadlink", It is necessary that the actuator is already present on ours Wi-Fi. In case this step has already been done previously, it will be possible profollow over.
To make the infrared emitter enter (and remain) inside yours Wi-Fi just download theappe-Control reporting for Android o for iOS and follow the instructions. In case of difficulty, it is available the manual in Italian.
Switch configuration "learner"
To capture the codes it is necessary that the component "Broadlink” is configured at Home Assistant. As explained also in the page dedicated to the platform, the before what to do is therefore to define a mock switch you create, within Home Assistant, the awareness of the presence of a device Broadlink (among those listed above) on the network.
This awareness it's necessary to equip ourselves with two services:
The first service will be necessary for 'appreturn of codes, the second to send (used by the entity which we will define in the configuration.
We therefore define at the configuration di Home Assistant this first switch:
# Esempio di configurazione learner switch: - platform: broadlink host: 192.168.1.2 mac: 'B4:43:0D:CC:0F:58' timeout: 30 friendly_name: "Dispositivo Broadlink" type: rm_mini switches: learner: friendly_name: "Learner" command_on: '' command_off: ''
Nb The fields "host" and "mac”Indicated they are just examples and will therefore be valued with IP (fixed) and address MAC of our actuator Broadlink, as well as the field "type". The fields "on" and "off"Are intentionally left empty.
For configuration details appromerge on the component board Home Assistant "Broadlink"
First to ask yourself proproblem of capturing codes, the healthiest thing is to jump on ours COLLABORATIVE ARCHIVE of infrared / radiofrequency codes. With any luck, you may already find the job done. Differently, don't forget (always through that page) after collecting yours, to send them to the archive!
At this point restart Home Assistant and, in the left column of the frontend select, under the "Developer Tools" menu the first icon on the left, or "Services".
Then select the service from the drop-down menu broadlink.learn and, under "Service Data", indicate:
where obviously "ip_del_broadlink”Is the IP of the device to be used to acquire the codes.
Finally click on "Call Service".
At this point - for 20 seconds that will follow - the Broadlink (indicated through the IP) will be in "listening" for any infrared and / or radio frequency codes. Pressing within 20 seconds a button on the remote control (taking care to point it towards the Broadlink, if it is an infrared remote control), Home Assistant will receive from Broadlink the respective Base64 code and will list it at the list of notifications of the user interface (icon of bluebell top right), for example:
A code can apparire like a long string of characters, kind:
Finally save this string and keep it aside.
DONE! Not that difficult, isn't it? 😉
At this point the codes thus collected can be used for the most diverse uses, for example defining new configuration files for climate unit domotization (using the platform “SmartIR Climate") Rather than control switch through the component"Broadlink"
It will say: "you could have said it before", but to capture the codes it exists a shortcut. It has not been said before - in this guide - why the definition of the switch entity "learner" it is a necessary passage, most often, when checking a device Broadlink by Home Assistant.
That said, if the prothe code capture procedure described in this guide is a bit awkward (which it is), the alternative - if you have a computer with an operating system Windows - is described here.
|ATTENZIONE: remember that there is on our FORUM community an ad hoc section dedicated to Home Assistant, for any doubt, question, information on the specific merit of these components.|