bwssytems / ha-bridge

Home automation bridge that emulates a Philips Hue light system and can control other systems such as a Vera, Harmony Hub, Nest, MiLight bulbs or any other system that has an http/https/tcp/udp interface. This is a compact impl to run on small format computers. This is impl started from this project https://github.com/armzilla/amazon-echo-ha-bridge.
Apache License 2.0
1.45k stars 198 forks source link

Failure to integrate with broadlink plugins #149

Closed useriousbo closed 8 years ago

useriousbo commented 8 years ago

Hi i am currently using your amazing HA bridge, trying to integrate my Broadlink devices into HABridge using the application Broadlink RM Tasker Plugin.

I test out the plugin and I can get Broadlink to send commands out using a browser with this url - http://192:168:3:55:6605/send?deviceMac=***********&codeId=85 and that device will react with a on or off. Plugin working good.

then i tried to create a custom device in HABridge

Name: Bedroom Target: Encapsulated Device Type: Custom Map Type - Please Select\ On URL: http://192:168:3:55:6605/send?deviceMac=**********_&codeId=84 Dim URL: Off URL:http://192:168:3:55:6605/send?deviceMac=**_********&codeId=85 HTTP Headers: Http Verb: Content Type: Content body on: Content body off:

Add device and click Turn On or Turn Off throw this error

Request Error, Please look in your habridge log:error {"type":6. "address":"/lights/1629545413","description":Error on calling url to change device state","parameter":"/lights/1629545413state"}

went into the logs and found these

**2016-08-02 15:36:26,926 [qtp2823272-25] WARNcom.bwssystems.HABridge.hue.HueMulator - Error on calling url to change device state: http://192:168:3:55:6605/send?deviceMac=***********&codeId=84

2016-08-02 15:36:26,926 [qtp2823272-25] WARNcom.bwssystems.HABridge.hue.HueMulator - Error on calling url to change device state: http://192:168:3:55:6605/send?deviceMac=********_**&codeId=85_*

i have already trial and error for 3 days, unable to get Habridge to send the url out to activate the plug in which will trigger the broadlink. Can you please help me. I am running out of options.

bwssytems commented 8 years ago

Does the Broadcom link use headers? The browser maybe sending some but the call within the bridge does not unless specified.

useriousbo commented 8 years ago

Actually it's Broadlink.

It's a HA system made in China

Someone made a plugin to connect Broadlink to HABridge

https://play.google.com/store/apps/details?id=us.originally.tasker&hl=en

I tried communicating with the app developer but it hasn't been smooth sailing, I really hop you can help me.

Below is a forward of my email exchanges with the app developer.

Begin forwarded message:

From: Torin Nguyen torin@originally.us Date: 2 August 2016 at 12:20:30 PM SGT To: Karl Lee useriousbo@gmail.com Subject: Re: tasker broadlink plug in

Sorry but i'm loosing my patient with you.

I am already being as clear as I can. Let me repeat myself one last time:

  1. First thing, make sure the on/off urls actually work by executing them in normal web browser. Copy & Paste the URL into web browser and press Enter. If the error is in JSON format, copy it here, I will tell you what it means. If it's network error (ie, browser cannot reach your minix device), then it's network error. I cannot help you with this, do your own troubleshooting.
  2. I saw the error in your HA Bridge logs. These are not errors from my app. These solely belong to HA Bridge. a) HTTP Request may not be null

On Tue, Aug 2, 2016 at 10:16 AM, Karl Lee useriousbo@gmail.com wrote: Hi the error as shown in my ha bridge logs. Please help

On 2 Aug 2016, at 8:53 AM, Torin Nguyen torin@originally.us wrote:

If the urls don't work, there should be some form of error.

If the error is in json format, copy it here for me to troubleshoot.

If it's network error, then it's network error, make sure your RM, your Minix does not change its IP address. It is recommended to set a static IP for all your Broadlink devices.

On Tue, Aug 2, 2016 at 7:40 AM, Karl Lee useriousbo@gmail.com wrote: That will be fantastic of the new app launch. If the url doesn't work then what will be the appropriate thing to edit

Sent from my iPhone

On 2 Aug 2016, at 8:27 AM, Torin Nguyen torin@originally.us wrote:

Your on/off url looks correct to me, I don't find anything wrong in your photos.

First thing, make sure these urls actually work by executing them in normal web browser.

From your earlier email, it looks like you have enabled authentication in my HTTP Bridge. However, I don't think HA Bridge supports any form of authentication. So, disable authentication.

FYI, I'm currently working on a new version of my app that supports Echo directly, no need for a HA Bridge in the middle. ETA about 1 month time.

On Mon, Aug 1, 2016 at 8:21 PM, Karl Lee useriousbo@gmail.com wrote: I really desperate for help please, I have tried to setup as custom url but really can't get it to work, can you help me please expert, I will buy the paid version of your amazing work

On 1 Aug 2016, at 12:45 PM, Torin Nguyen torin@originally.us wrote:

You missed out :9876 behind the IP address. The documentation is in that URL.

On Mon, Aug 1, 2016 at 11:03 AM, Karl Lee useriousbo@gmail.com wrote: Do you mind to guide me on how to create a custom on off url please. I love your work but I really hope you can guide me or give me a link to how it work. Went in the below address and tried to do a http://192:168:3:28/ MAC device and device ID but don't work when I enter it in browser to test

Sent from my iPhone > On 1 Aug 2016, at 1:21 AM, Torin Nguyen torin@originally.us wrote: > > You dont need Tasker for this purpose. > Simply turn on HTTP Bridge feature in my app and follow the link to the documentation. I assume you know how to configure a custom device in HA Bridge with custom on/off url. > > > On Sunday, 31 July 2016, Karl Lee useriousbo@gmail.com wrote: > > Hi i am trying out the trial of your awesome plugin but i dont understand or know how to let tasker talk to my home automation bridge, i have set it up like this so far > > > > Echo - Home Automation Bridge (Raspberry Pi) - Vera Edge > > > > Works perfect with my vera and hue so the bridge is setup properly > > > > Is there any step by step instruction on how do i set up tasker to use your plugin and communicate to my HA Bridge and finally to my broadlink devices? > > > > I would love to purchase your apps for my phones but i really cant figure out how to do it with the trial. > > > > Awesome piece of work from a fellow Singapore company. Please reply. > >

Sent from my iPhone

On 3 Aug 2016, at 1:51 AM, BWS Systems notifications@github.com wrote:

Does the Broadcom link use headers? The browser maybe sending some but the call within the bridge does not unless specified.

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

bwssytems commented 8 years ago

I'm checking with him as well. He is on the micasaverde forums.

bwssytems commented 8 years ago

Also, it seems on which version of the device you have for what API it supports.

Here is another API doc http://rm-bridge.fun2code.de/downloads/RMBridge-APIDocumentation.pdf

useriousbo commented 8 years ago

Hi please take note that there is currently 2 plugins that will link Broadlink devices with HA bridge

1: Broadlink RM Tasker

2: RM Bridge

Rm bridge is a copy of Broadlink RM Tasker

Is there Any problem you see from the email I sent you before this?

Sent from my iPhone

On 3 Aug 2016, at 5:01 AM, BWS Systems notifications@github.com wrote:

Also, it seems on which version of the device you have for what API it supports.

Here is another API doc http://rm-bridge.fun2code.de/downloads/RMBridge-APIDocumentation.pdf

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

useriousbo commented 8 years ago

Hi is there any reply or new config method for Broadlink RM Tasker Plugin? Thank you

Sent from my iPhone

On 3 Aug 2016, at 5:01 AM, BWS Systems notifications@github.com wrote:

Also, it seems on which version of the device you have for what API it supports.

Here is another API doc http://rm-bridge.fun2code.de/downloads/RMBridge-APIDocumentation.pdf

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

bwssytems commented 8 years ago

So, it seems Torin has replied to you and you have to put in a Basic Authorization header as form that dialogue you have authorization in your bridge turned on. Google how to do that and put it in the header area for the ha-bridge device.

Thanks

useriousbo commented 8 years ago

Hi as per my last email with him this is his reply

From your earlier email, it looks like you have enabled authentication in my HTTP Bridge. However, I don't think HA Bridge supports any form of authentication. So, disable authentication.

Sent from my iPhone

On 3 Aug 2016, at 9:52 PM, BWS Systems notifications@github.com wrote:

So, it seems Torin has replied to you and you have to put in a Basic Authorization header as form that dialogue you have authorization in your bridge turned on. Google how to do that and put it in the header area for the ha-bridge device.

Thanks

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

bwssytems commented 8 years ago

I'll need you to test this by turning on some debug through the Logs tab.

Expand the Logging Configuration Item and then select "show all loggers". scroll down to "com.bwssystems.HABridge.hue.HueMulator" and set the value to DEBUG and then update.

Run your commands and then post the output please.

bwssytems commented 8 years ago

So, is this working?

Also, it seems this is part of a setup that was posted here.... http://iotathome.co/en/voice-control-system/20-voice-control-broadlink-rmpro-amazon-echo.html

Is this your site or something that you used?

useriousbo commented 8 years ago

Hi Appreciate u getting back it's still not working. I saw that guide too but it's too non in depth for me to follow

Sent from my iPhone

On 12 Aug 2016, at 11:24 PM, BWS Systems notifications@github.com wrote:

So, is this working?

Also, it seems this is part of a setup that was posted here.... http://iotathome.co/en/voice-control-system/20-voice-control-broadlink-rmpro-amazon-echo.html

Is this your site or something that you used?

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

tilaksidduram commented 8 years ago

I have a Broadlink RM pro remote and i am able to control my Samsung TV and my Onkyo Home theater using the HA bridge (Running on my RPI 2) and i use it with Amazon Echo to also send voice commands to turn on and off my TV and also switch my Home theater to turn on radio mode etc. I am using the latest version of the HA Bridge (3.0.0) and all working fine. I did not have to provide any HTTP headers or HTTP verb while adding a device.

example : TV ON URL : http://xxx.xxx.x.xxx:xxxx/send?deviceMac=xx:xx:xx:xx:xx:xx&codeId=8&on=true

TV OFF URL : http://xxx.xxx.x.xxx:xxxx/send?deviceMac=xx:xx:xx:xx:xx:xx&codeId=8&on=false

useriousbo commented 8 years ago

Can u show the page where u setup a custom device in HA Bridge?

This page Ty

Sent from my iPhone

On 13 Aug 2016, at 3:09 AM, tilak notifications@github.com wrote:

I have a Broadlink RM pro remote and i am able to control my Samsung TV and my Onkyo Home theater using the HA bridge (Running on my RPI 2) and i use it with Amazon Echo to also send voice commands to turn on and off my TV and also switch my Home theater to turn on radio mode etc. I am using the latest version of the HA Bridge (3.0.0) and all working fine. I did not have to provide any HTTP headers or HTTP verb while adding a device.

example : TV ON URL : http://xxx.xxx.x.xxx:xxxx/send?deviceMac=xx:xx:xx:xx:xx:xx&codeId=8&on=true

TV OFF URL : http://xxx.xxx.x.xxx:xxxx/send?deviceMac=xx:xx:xx:xx:xx:xx&codeId=8&on=false

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

cykew commented 8 years ago

Just change the http verb to "Get" will do. Btw i am the owner of www.iotathome.co webpage. You are almost there. Don't give up :)

tilaksidduram commented 8 years ago

@useriousbo Yes just set HTTP Verb to "Get" and that should allow the command to work. If required you can also add the ON and OFF state to the content body fields.

image

bwssytems commented 8 years ago

solved