beckyricha / Broadlink-RM-SmartThings-Alexa

Control RF and Ir devices using SmartThings and Alexa.
152 stars 115 forks source link

Connecting from smartthings to broadlink-RM #7

Open Andyycloud opened 7 years ago

Andyycloud commented 7 years ago

Hi becky,

really like the idea of this project but struggling to get the switchcloud working using the RM bridge.

When I run via http://rm-bridge.fun2code.de/rm_manage/index.html the controls are fine. But when I try through the smartthings site I get no response. Looking at the simulator I get an org.apache.http.conn.ConnectTimeoutException: Connect to xxx.xxx.x.xx:xxxx [/xxx.xxx.x.xx] failed: connect timed out @ line 47

Any ideas what could be causing this?

Thanks Andy

Andyycloud commented 7 years ago

Just in case it helps anyone else out the above problem was caused by an issue with my virginmedia (I'm based on the UK router). For anyone scratching their heads the way around this I've gone for is to: Set up dynamic DNS with a hostname Installed an android App on the smart TV box to keep this updated Create a port forwarding rule to the 192 address The RM bridge shows the 192 rather than public IP which still seems to work. = all of the RM bridge codes now work through the simulator

Now if only I could get the Alexa app to add the skill!

lengyej commented 7 years ago

alexa-broadlink step by step tutorial

tracyhuard commented 7 years ago

Hi -

I very much appreciate the discussion and the tools here. I managed to use RM Tasker running the HTTP and Alexa Bridges on an old Android device (some Verizon Motorola phone). I am almost exclusively an iPhone/iOS user these days; so, that device is the only Android around. Also, Alexa (an Echo Dot) recognizes the commands (such as turning on and off different lights) and executes them. I am not using a Smartthings Hub for this.

Some additional info: I am able to manually execute the http commands created by the RM Tasker in a browser on the Android device, and they work. For example:

http://192.168.xxx.x:xxxx/send?deviceMac=xxxxxxxxxxxx&codeId=13

When I try to execute them in browsers on my Mac laptop and iPhone (on the same home network), they hang because the address/port is not accessible. I guess that's to be expected; it is available only on the Android device.

With an Echo Dot working, I tried to get RM Tasker commands to work with Google Home. I tried this several different ways: 1) through IFTTT using "Launch Center" to execute the http command; 2) through IFTTT using "Maker" to execute the http command; and 3) connecting a Smartthings Hub, and following the directions in the README here (for RM Tasker) to install the devices/codes from the RM Tasker. Approach 1 did not work, I think because "Launch Center" will only execute on iOS devices, and the http command needs to be executed on the Android device. Approach 2 didn't work either; I'm not sure why. I could not, for whatever reason, get Approach 3 to work either, though I believe I got very close, as explained in discussion below.

So, to sum up the two main issues that I encountered:

1) For some reason, the Echo Dot only discovers 21 of the 25 codes that were created in the RM Tasker (after I created custom buttons in the Broadlink e-control app, following the directions in the README, and shared with RM Tasker), even though I can manually execute in a browser on the Android device the 4 codes present in RM Tasker but not discovered by Echo Dot, and they work. Also, when I look in the Alexa app, I notice that some of the 21 discovered codes (or devices) were listed as "IDLE", though Alexa did execute them successfully when I asked. So, the main question here is, why only 21? (I have repeatedly tried discovering more.) The secondary question is why are some "IDLE" but thankfully still available?

2) When trying to get the Smartthings Hub to work with the RM Tasker, the devices/codes just did not install after selecting "Install" when working with Broadlink LAN SmartApp in "My Smartapps" in the Smartthings tool. The log file showed errors complaining that the JSON input on Line 66 cannot be empty or null. Has anyone else seen such a problem? Either I am missing something obvious to others or there is something peculiar about my setup.

To further try to get the Google Home to execute the http commands to turn on/off lights, I am next going to try the RM Bridge instead of RM Tasker (though I will try to keep RM Tasker running, if I can, since it is working currently with Alexa/Echo Dot, except for the few missing codes).

If anyone has any insight, it would be helpful and appreciated. Oh, and I must add: I really wish someone would develop the means for the Broadlink RM Pro to be used with Alexa and Google Home without the Android device. I am sure this ability is forthcoming, but I am impatient. :)

Thanks, folks!

Trace

tracyhuard commented 7 years ago

Hi -

OK, quick followup now that I have also tried to get the approach using RM Bridge (instead of RM Tasker) to work. When going to the RM Bridge - Management Code page to create new codes, I receive the following message:

Error learning code: mac:xx:xx:xx:xx:xx:xx not rm2

(where the actual mac address is shown). My Broadlink is an RM Pro, and it is listed as an RM2+ (10026) when I look at its mac address, ip address, and model as shown in the RM Tasker. So, I assume that the model number (the extra "+") is bugging out the program. Is there an easy work-around so that the RM Bridge approach can still work?

Thanks.

Trace

beckyricha commented 7 years ago

That's the same model I use, so the model is likely not your issue unless they changed something in the firmware.  Based on this and your other note that you could not access the tasker version from other device browsers (you should be able to) I would suggest looking at your router security settings or similar network issues. As long as everything is on the same subnet you should not need to open the port for the bridge, though, so I'm not sure what would cause this, but something seems to be not working right. Also, do you have a different android device to try hosting the bridge on to see if that's somehow related? It's possible you may also have a defective broadlink. Does everything work fine using their app? On Dec 12, 2016 8:51 PM, tracyhuard notifications@github.com wrote:Hi - OK, quick followup now that I have also tried to get the approach using RM Bridge (instead of RM Tasker) to work. When going to the RM Bridge - Management Code page to create new codes, I receive the following message: Error learning code: mac:xx:xx:xx:xx:xx:xx not rm2 (where the actual mac address is shown). My Broadlink is an RM Pro, and it is listed as an RM2+ when I look at its mac address, ip address, and model as shown in the RM Tasker. So, I assume that the model number (the extra "+") is bugging out the program. Is there an easy work-around so that the RM Bridge approach can still work? Thanks. Trace

—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or mute the thread.

beckyricha commented 7 years ago

Also, what type of code were you learning? Did you start with an ir device? Those are a lot easier to get consistent results with to help troubleshoot which part of the system to look at. Sorry if I'm all over the place with ideas. I haven't seen this issue before so I'm guessing. Looks like a nice little community is forming here so hopefully someone else has seen/fixed this before. On Dec 12, 2016 8:51 PM, tracyhuard notifications@github.com wrote:Hi - OK, quick followup now that I have also tried to get the approach using RM Bridge (instead of RM Tasker) to work. When going to the RM Bridge - Management Code page to create new codes, I receive the following message: Error learning code: mac:xx:xx:xx:xx:xx:xx not rm2 (where the actual mac address is shown). My Broadlink is an RM Pro, and it is listed as an RM2+ when I look at its mac address, ip address, and model as shown in the RM Tasker. So, I assume that the model number (the extra "+") is bugging out the program. Is there an easy work-around so that the RM Bridge approach can still work? Thanks. Trace

—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or mute the thread.

beckyricha commented 7 years ago

One more thought. On the Rm Bridge add codes page, are you discovering your rm pro by pressing the "load devices" button, or entering its mac address manually? You should not have to enter it, so if it can't be found on your network that will also tell you something. On Dec 12, 2016 8:51 PM, tracyhuard notifications@github.com wrote:Hi - OK, quick followup now that I have also tried to get the approach using RM Bridge (instead of RM Tasker) to work. When going to the RM Bridge - Management Code page to create new codes, I receive the following message: Error learning code: mac:xx:xx:xx:xx:xx:xx not rm2 (where the actual mac address is shown). My Broadlink is an RM Pro, and it is listed as an RM2+ when I look at its mac address, ip address, and model as shown in the RM Tasker. So, I assume that the model number (the extra "+") is bugging out the program. Is there an easy work-around so that the RM Bridge approach can still work? Thanks. Trace

—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or mute the thread.

tracyhuard commented 7 years ago

Hi beckyricha - Thank you for the quick reply! I am sorry for the delay in feedback; it's been quite busy at the office. I'll try to post some details tonight or tomorrow morning, but here is a quick summary, for now: RM Tasker works with Echo (without the Smartthings hub) but problems remain getting it to work with the hub and Google Home; RM Bridge works now for both Google Home and Echo through the hub. More soon... - Trace

iguman commented 7 years ago

Hi, I have same problem , mac:xx:xx:xx:xx:xx:xx not rm2 , and only manual add device work. Broadlink RM Pro firmware v20024.

beckyricha commented 7 years ago

Please be more specific, and consider answering the same questions i asked the earlier poster who encountered but apparently self-resolved this issue. If the codes cannot be recorded using the rm bridge page this won't be related to my coffee, but I'll help if I can. If I can't, this would be something to ask the rm bridge developer about. Thanks. Becky

iguman commented 7 years ago

Im try to connect bridge with rm pro v20024 , on same subnet, and get error mac:xx:xx:xx:xx:xx:xx not rm2. On page Code learning Load Devices wont find rm , only when I do that manually and that get message mac:xx:xx:xx:xx:xx:xx not rm2. Im try with newer android device to host rm bridge but I get same results. Im asking here because someone maybe have solution or know the reason. Thanks

beckyricha commented 7 years ago

It is almost always a network or permissions issue, which can be hard for others to diagnose but I'll try, and I'm sure others here will as well if they have ideas. However, to start please let us know what happens when you use the broadlink econtrol app. Has your broadlink been demonstrated to work at all? Thanks for adding the model number. I will verify whether the matches mine when i get home.

There is also another rm bridge forum, in which it's author participates (or has...) here: http://www.eventghost.net/forum/viewtopic.php?f=9&t=7826

Someone there may also have ideas.

beckyricha commented 7 years ago

I am using an older firmware version, ending in 22 not 24, but still a pro model. Also, did you need to go to your router to find your mac address? I have not find it in the app anywhere. In the broadlink app I would make sure the hub name doesn't have any special characters that typically cause trouble, and also ensure the switch to lock it is not selected.

iguman commented 7 years ago

Thanks for replay. econtrol app works excellent. I find mac in app, its same as on ruter, and hub does not have special characters in name ( Broadlink_RMPROSUB-ef-24-62 )

beckyricha commented 7 years ago

Thank you.  That is a very long device name. Have you tried shortening it? Mine is something like hub. Also which app are you referring to when you said an app shows you the mac? On Jan 12, 2017 4:45 AM, iguman notifications@github.com wrote:Thanks for replay. econtrol app works excellent. I find mac in app, its same as on ruter, and hub does not have special characters in name ( Broadlink_RMPROSUB-ef-24-62 )

—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.

iguman commented 7 years ago

How I can rename hub name?

e-control show mac of hub

On Thu, Jan 12, 2017 at 13:13 Becky Onuschak notifications@github.com wrote:

Thank you. That is a very long device name. Have you tried shortening it? Mine is something like hub.

Also which app are you referring to when you said an app shows you the mac?

On Jan 12, 2017 4:45 AM, iguman notifications@github.com wrote:Thanks for replay.

econtrol app works excellent. I find mac in app, its same as on ruter, and hub does not have special characters in name ( Broadlink_RMPROSUB-ef-24-62 )

—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/beckyricha/Broadlink-RM-SmartThings-Alexa/issues/7#issuecomment-272148675, or mute the thread https://github.com/notifications/unsubscribe-auth/AQOZxUbGE7KvVbJL45h88RX58cIrUxVVks5rRhj_gaJpZM4LC_ru .

itsamti commented 7 years ago

Go to e-control app, show device list. Find hub and press and hold. You will see menu option for edit.

iguman commented 7 years ago

Broadlink_RMPROSUB-ef-24-62 - This is name of hub on router. in app looks like this

img_0398

beckyricha commented 7 years ago

Thanks. This is a good device name so likely fine. Is the app in android? Oddly, i reinstalled the e control so to help you so mine is latest version. My device displays like this but also shows Mac address. Did you just edit that our fit security, or dues yours not show here? Doesn't look edited. I ask because I'm wondering if it is protecting its Mac address info from apps and network devices for some reason.

beckyricha commented 7 years ago

For giggles, have you tried temporarily disabling you router firewall features or anything else that could be screening network traffic? Most of them don't engage to protect local devices from each other, but you never know.

iguman commented 7 years ago

My app is on iOS and Im edit this pic to remove Mac.

On Thu, Jan 12, 2017 at 4:40 PM, Becky Onuschak notifications@github.com wrote:

For giggles, have you tried temporarily disabling you router firewall features or anything else that could be screening network traffic? Most of them don't engage to protect local devices from each other, but you never know.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/beckyricha/Broadlink-RM-SmartThings-Alexa/issues/7#issuecomment-272196129, or mute the thread https://github.com/notifications/unsubscribe-auth/AQOZxX1PxWouFAByjT0ZLkB3zN8-lXlPks5rRklqgaJpZM4LC_ru .

beckyricha commented 7 years ago

Sorry, but here are the only things I know further to try:

  1. go through your router and security settings;
  2. try the fun2code web portal on different devices, or use the option to download and use the offline version (on the main page of his web site).
  3. Maybe if user tracyhuard above sees this, maybe found a solution as the issue looked similar and will share.
  4. Checking with the RM bridge developer (Jochen Ruehl, android@fun2code.de). Perhaps there is something in the newer firmware causing the issue. Has anyone else had success using the version listed above that ends in 24? I'm not going to upgrade as mine works fine.
beckyricha commented 7 years ago

BTW I tested the add manually button and it does the same thing on my hub. Doesn't seem to work. You need to get it find the hub automatically. I was also thinking it could be in your browser javascript permissions, but doubtful if other things on the page were working.

beckyricha commented 7 years ago

For people having this issue, did anyone try using the fun2code site on a different device and/or turning off firewall/antivirus programs while using? Did that work? For anyone who has solved it, if you have advice for others it would be very helpful.

cousinit99 commented 7 years ago

Same issue here. "[MAC_address_of_RM-Pro] not RM2" when trying to learn a new remote command from RM Commander Build Tools. The RM Bridge console detects the RM-Pro without issue, and I can execute .cbe commands previously learned via RM Commander Build Tools successfully from the command line using direct-send.

It seems to be an issue with RM Commander Build Tools, because I can learn new codes via the web-based RM Bridge console just fine, just not with RM Commander Build Tools anymore. If all I have to do is copy and paste the command into a .cbe file after that, then I think I'm doing pretty good..

beckyricha commented 7 years ago

I have no idea what rm commander build tools refers to, so you're on your own there.  If you can use the web interface and set this up per the instructions i provided then i am not sure what issue you still have. I am not the developer of rm bridge or whatever the other tool is that you referenced, so if one of those is malfunctioning you will need to contact its developer for assistance. Thanks. On Feb 16, 2017 3:04 AM, cousinit99 notifications@github.com wrote:Same issue here. "[MAC_address_of_RM-Pro] not RM2" when trying to learn a new remote command from RM Commander Build Tools. The RM Bridge console detects the RM-Pro without issue, and I can execute .cbe commands previously learned via RM Commander Build Tools successfully from the command line using direct-send. It seems to be issue with RM Commander Build Tools, because I can learn new codes via the web-based RM Bridge console just fine, just not with RM Commander Build Tools anymore..

—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.

cousinit99 commented 7 years ago

I thought I saw someone up above mention RM Commander, but I guess not. It must have been RM Bridge. It was late when I wrote that last night...

Effectively, there is no issue. I was just offering my insights related to this issue (i.e. the "not rm2" error message) for the benefit of others; that's all.

If your project uses curl like RM Commander does, then there's probably a great deal of similarity between the two.

beckyricha commented 7 years ago

Thanks for clarifying. Just making sure it was solved and nothing else needed help. I'm glad to hear it seems to be fixed. On Feb 16, 2017 9:27 PM, cousinit99 notifications@github.com wrote:I thought I saw someone up above mention RM Commander, but I guess not. It must have been RM Bridge. It was late when I wrote that last night... Effectively, there is no issue. I was just offering my insights related to this issue (i.e. the "not rm2" error message) for the benefit of others; that's all.

—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.

johng1965 commented 6 years ago

Hi thank you for the great insight, I am new to the world of Smartthings and IDE, I have followed your excellent tutorial using the RM tasker plugin. Where I am getting stuck is point 12

"To the right or the bottom of the code, depending on your browser, there should be an option where you can select the location. This must be a location with a hub physically attached to it, on the same local network as your broadlink and bridge, the hub must be turned on and the RM Bridge app must be running"

As you may be able to see in the attached screenshot I cannot see location anywhere? What am I missing here ? image I can see once I come out of the my smarthings App it is showing location as empty and should the "Status" be showing as "unpublished" image

Thanking you in advance for your help.

Regards,

John