I have been using for quite some time the broadlink add-on as described in the thread in the version provided by @themillhousegroup in its git repository.
I was able to send IR commands to my RM mini and read temperature values from my A1 device. The captured IR codes were contained in a file (broadlink.map) in my case.
In OH 3.4 the previous add-on no longer works, but there is a broadlink binding, that used to be called broadlinkthermostat
, which now includes the RM mini devices, as it appears in the docs. There’s apparently no possibility to use a map file.
I figured out how to capture an IR code and to generate it, but I am unable to find where the captured codes are stored. The binding actually creates a directory broadlink/infrared_commands
but it remains empty. Where are the codes stored? How can they be transferred to a different OH instance? Is it possible to retrieve the learned codes through the REST API? Once this is known, I could re-cycle the codes in my former broadlink.map file.
A second question concerns the support of the A1. Should I raise an Issue somewhere to ask for it?
Thank you for your attention,
Lionello
PS. Let me add in the following some details on how I figured out to make my RM mini work. At present I used the UI, but in principle I could try with a textual configuration, to be added to the docs.
The first step is to discover the RM Mini. The code of automatically discovered thing is
pretty simple
UID: broadlinkthermostat:rmuniversaldevice:Broadlink-Sogg
label: Broadlink-Sogg RM mini
thingTypeUID: broadlinkthermostat:rmuniversaldevice
configuration:
host: 192.168.xx.xx
macAddress: xx:xx:xx:xx:xx:xx
location: Soggiorno
Once the equipment is created from thing, three items appear. Here’s the output of the REST API query of the equipment item, showing the three items linked to the channels
{
"members": [
{
"link": "http://192.168.27.82:8080/rest/items/BroadlinkSogg_RM_mini_Learning_Mode",
"state": "OFF",
"type": "Switch",
"name": "BroadlinkSogg_RM_mini_Learning_Mode",
"label": "Learning Mode",
"category": "",
"tags": [
"Point"
],
"groupNames": [
"BroadlinkSogg_RM_mini"
]
},
{
"link": "http://192.168.27.82:8080/rest/items/BroadlinkSogg_RM_mini_Save_Learned",
"state": "AMPLITOGGLE",
"stateDescription": {
"pattern": "%s",
"readOnly": false,
"options": []
},
"type": "String",
"name": "BroadlinkSogg_RM_mini_Save_Learned",
"label": "Save Learned",
"category": "",
"tags": [
"Point"
],
"groupNames": [
"BroadlinkSogg_RM_mini"
]
},
{
"link": "http://192.168.27.82:8080/rest/items/BroadlinkSogg_RM_mini_Send_Learned",
"state": "AMPLITOGGLE",
"stateDescription": {
"pattern": "%s",
"readOnly": false,
"options": []
},
"type": "String",
"name": "BroadlinkSogg_RM_mini_Send_Learned",
"label": "Send Learned",
"category": "",
"tags": [
"Point"
],
"groupNames": [
"BroadlinkSogg_RM_mini"
]
}
],
"link": "http://192.168.27.82:8080/rest/items/BroadlinkSogg_RM_mini",
"state": "NULL",
"editable": true,
"type": "Group",
"name": "BroadlinkSogg_RM_mini",
"label": "RM mini",
"category": "",
"tags": [
"RemoteControl"
],
"groupNames": [
"gLoc_Soggiorno"
]
}
In order to enter the name of the command I modified the standalone widget, following the suggestion of this post, adding a standalone widget of oh-input-card.
value: oh-input-card
config:
outline: true
inputmode: text
footer: =items.BroadlinkSogg_RM_mini_Save_Learned.state
title: Learned Command Name
type: text
sendButton: true
validate: true
The sequence to learn a code is as follows:
- toggle the
BroadlinkSogg_RM_mini_Learning_Mode
to ON
The RM mini white LED is lit - send the IR command from the remote to the mini
The RM mini white LED switches off when the IR command is learnt - set the name of the command in the
BroadlinkSogg_RM_mini_Save_Learned
The captured IR command is stored somewhere
When I set BroadlinkSogg_RM_mini_Send_Learned
item to the name of the command, the RM mini sends the IR command.