[WITHDRAWN - Use the new Broadlink integration by @tomw] NATIVE Broadlink RM/RM Pro/RM Mini/SP driver

So after working well for a while my zwave network experienced some failures and re quires some reboots but now today I can't get the hub to initialise/boot up into the UI.

Putting it in safe mode gets me in but no amount of rebooting/power cycling gets it running in normal mode. There seems to be an error with the broadlink device manager.

Any help would be appreciated, even if removing it helps (apps freeze in safe mode so can't remove driver/app).

Error: ERROR app|481|Broadlink Device Manager (BETA)|java.lang.RuntimeException: java.lang.RuntimeException: java.sql.SQLException: Timeout trying to lock table ; SQL statement: SELECT D.ID, D.VERSION, D.DEVICE_TYPE_ID, D.DEVICE_NETWORK_ID, D.LABEL, D.NAME, D.CONTROLLER_TYPE, D.ZIGBEE_ID, D.ENDPOINT_ID, D.PARENT_INSTALLED_APP_ID AS PARENT_APP_ID, D.PARENT_DEVICE_ID, D.IS_COMPONENT, DT.NAME AS DEVICE_TYPE_NAME, DT.TYPE AS DRIVER_TYPE, D.CREATE_TIME, D.UPDATE_TIME, D.LAST_ACTIVITY_TIME, D.DISABLED, D.LAN_ID, D.DISPLAY_AS_CHILD, D.DATA AS DATA_JSON, D.MESH_ENABLED, D.MESH_FULL_SYNC, IFNULL(NULLIF(D.MAX_EVENTS, 0), 100) AS MAX_EVENTS, IFNULL(NULLIF(D.MAX_STATES, 0), 30) AS MAX_STATES FROM DEVICE D JOIN DEVICE_TYPE DT ON DT.ID = D.DEVICE_TYPE_ID WHERE D.ID = ? [50200-197] Query: SELECT D.ID, D.VERSION, D.DEVICE_TYPE_ID, D.DEVICE_NETWORK_ID, D.LABEL, D.NAME, D.CONTROLLER_TYPE, D.ZIGBEE_ID, D.ENDPOINT_ID, D.PARENT_INSTALLED_APP_ID AS PARENT_APP_ID, D.PARENT_DEVICE_ID, D.IS_COMPONENT, DT.NAME AS DEVICE_TYPE_NAME, DT.TYPE AS DRIVER_TYPE, D.CREATE_TIME, D.UPDATE_TIME, D.LAST_ACTIVITY_TIME, D.DISABLED, D.LAN_ID, D.DISPLAY_AS_CHILD, D.DATA AS DATA_JSON, D.MESH_ENABLED, D.MESH_FULL_SYNC, IFNULL(NULLIF(D.MAX_EVENTS, 0), 100) AS MAX_EVENTS, IFNULL(NULLIF(D.MAX_STATES, 0), 30) AS MAX_STATES FROM DEVICE D JOIN DEVICE_TYPE DT ON DT.ID = D.DEVICE_TYPE_ID WHERE D.ID = ? Parameters: [225] on line 891 (uninstalled)

This appears to be a corrupted system Database. Contact support or perhaps a soft reset may help.

1 Like

where can i find the code?

Hey All,
so ive made one device, added the IR codes and sync'd them.
How do I get hubitat to controll them now ?
I tested all the controls, but how do I get the RM device, with the 5 stored codes, to fire the code I want. Do I have to set buttons etc ?

I think you’ll find it (v 0.50) near post #287. You might want to read, or at least scan it, because there may be updates made by others.

Hi guys,

After adding my broadlink to HE all my device from Broadlink appear online but is offline. Delete my air conditioner and try to add again, but unfortunately did not work.
Broadlink have cable with sensor (temp and humidity) and in their application cannot see but before moving to HE I create some notifications and work find, Broadlink application send that notifications.
Anybody know how to fix this? I want my air to bring to Google Home without HE...

Thk,
Nick

Hei everybody,

I've tried to add my RM4-Pro. It is recognized and not cloud-locked (you can actually unlock it at the app, I've seen it after I've done the whole reset process twice... :expressionless:). It is shown as unsupported device, as described above. As seen in some posts before, there is still a possibility to add it, but I can't figure out how. Can anyone help?

I got this one: https://www.amazon.de/RM4-Sensorkabelsatz-universeller-IR-Fernbedienungshub-Temperaturfeuchtigkeitsmonitor/dp/B0872P4HX7/ref=sr_1_10?__mk_de_DE=ÅMÅŽÕÑ&dchild=1&keywords=broadlink+rm4+pro&qid=1613293102&s=ce-de&sr=1-10

UPDATE: I've manged to get the RM pro S on the HE.

For everyone with the same issue's that i had:

Drivercode: else if (devtype == 0x649b) { devTypeName = "RM4 Pro S"; hasIR = true; isPro = true; hasTemp = true; isRM4 = true}

App-Code: else if (devtype == 0x649b) { devTypeName = "RM4 Pro S"}

As someone with no coding background what so ever, I'm pretty proude on myself. :grin:

And one more thing: The Broadlink-App is still usable, when you just unlock the device directly in the App. :smile:

is that all i have to copy on the drivercode?

That's what you have to add into the driver code and the app code, which you can find at post 287 or so. Then you can discover and work with your BL. :slight_smile:

I have a question for any developers following this thread.

Because the capability for this driver is an Actuator it means that in order to automate things with the Broadlink we need to use Rule Machine (other simpler automations won't work).
Also in rule machine it's quite tedious to set up the rules and in fact if like me you had to remove the driver and add it back again a lot of rules end up breaking and again it's very tedious to fix the rules.

So I'm wondering would it be a good option to modify the code to perhaps add child devices that expose either a switch or button capability. I must try have a look at the Harmony integration and see if I can figure out how that one works

This code is no longer supported by the OP who disappeared from this thread and the forum. After many discussions earlier in this thread the legal consensus was to leave it as is. However, you are always free to modify your version.

I've read the thread and I am aware of the consensus. Thank you

I was asking about modifying it for myself. I've been doing a lot of reading about drivers and developing for the Hubitat and I think for my own learning starting with something that already exists and something that I think I could improve on for personal use would be a good way to learn more about Hubitat.

So I'm asking a more generic question about what would be a better way of doing a driver for the Broadlink, rather than needing to go into the details of this particular implementation. In particular what capabilities should an IR driver expose. Perhaps I should open a separate thread and ask that question?

Since it seems that the question you're trying to solve is what you can use instead of Rule Machine, then the answer is whatever capabilities the apps you want to use instead expect devices to have. For the purposes of the real-world device, the Broadlink, I'd say virtual button devices (e.g., PushableButton capability or related ones if you have a need--and the not-quite-standard but nearly-so push() command that this doesn't technically require but you pretty much need for a virtual devuce) or maybe virtual switches (so Switch and the on() and off() commands this capability requires) would be logical choices. But it depends on how you want to abstract the device's behavior into Hubitat--or really what the apps you want to use expect.

1 Like

thanks very much @bertabcd1234
You put it better than I could do. I just want to use something else other than Rule Machine

The only 2 other apps apart from Rule Machine from HE that I see that could be used would be the button controller and simple automation rules.

  • Simple automation rules only controls switches, but for something like a volume control that is more of a button rather than an on/off, so Simple Automation isn't suited with volume control style controls. What it would work is if I had any devices with dedicate ON and OFF commands.

  • The button controller app can push buttons so that would work with something like volume control or even changing a channel. The downside is that it's less flexible as the only input available to the button controller app is a button and not a switch.

Are there any community apps that people use to help them automate their living room?

Can you elaborate a bit more on the not-quite-standard push()? Or is there a thread I can read up on that?

(And yes I know what I'm looking to do will take a lot more time and effort compared to just doing it in Rule Machine, but it's for the learning and getting some personal sense of achievment)

Not sure there is, but you can look at Hubitat's capability docs, which do not define this as a required command, and a variety of stock and community drivers that implement it nonetheless. It's pretty simple: it takes one parameter, the button number, and just similares a "virtual" push. It's also turn command some stock apps like Rule Machine and Hubitat Dashboard call to "push" a button.

Just a short question. For some reason, some stored codes didn't work. I've tried to remove them, but somehow it won't work. The codes are still listed. Anyone an idea,what to do?
I also tried to store new code under the wrong codes' name.

A while back I added a "clearCodeStore" command to the driver. It's global, all codes stored in a driver are removed. Since I have 5 RM3s, I move the any useful codes to the app.

	command "clearCodeStore"

def clearCodeStore() {
log_debug("(clearCodeStore) DEBUG [${logDebug}]  VERBOSE [${verboseDebug}] - Clearing codes")
state.remove('codeStore')
}

This means using it will delet everything I've created so far, right?

Correct all codes are deleted from the device, not the app.

How to execute this command:

  1. go into the Broadlink app, click "remote codes"
  2. then 'import stored codes from remote devices", then verify commands are stored in the app.
  3. Run command from device
  4. Delete unwanted codes from the app.

When executing a code with RM actuator: codes with same name in device and app, run from the device.