beckyricha / Broadlink-RM-SmartThings-Alexa

Control RF and Ir devices using SmartThings and Alexa.
151 stars 114 forks source link

Issue with handler #18

Open sergejvohrin opened 7 years ago

sergejvohrin commented 7 years ago

Hi,

I am following your instruction however can't understand what is the issue. 1) I am using RM bridge. I have all codes configured, I opened my router ports and I can switch on/off light using my web browser. 2) I created a Device Handler - beckyricha : RM Bridge Switch Cloud. I have changed login, password and ip address. 3) I have created one of the devices to switch on bar light. 4) I added the devices on the Alexa app. Alexa recognises the device and I can even see the code is being sent by Alexa and received by smartthings.

Problem: The light does not get turned on.

Here is what I have in my device setting: Bar light Device Name Bar light Label
Type RM Bridge Switch Cloud Version Published Device Network Id Bar light Status ACTIVE Last Activity At 2017-01-19 10:57 PM UTC Date Created 2017-01-19 10:57 PM UTC Last Updated 2017-01-19 10:57 PM UTC Data No data found for device Current States
switch: on Events List Events In Use By

Event List: Bar light (Device) Events — displayed | all | from device Date Source Type Name Value User Displayed Text 2017-01-19 11:56:36.163 PM UTC 12 minutes ago DEVICE switch on Bar light switch is on 2017-01-19 11:56:35.962 PM UTC 12 minutes ago APP_COMMAND on
2017-01-19 11:55:57.650 PM UTC 12 minutes ago APP_COMMAND off
2017-01-19 11:30:43.580 PM UTC 38 minutes ago DEVICE switch off Bar light switch is off 2017-01-19 11:30:43.442 PM UTC 38 minutes ago APP_COMMAND off
2017-01-19 11:26:42.062 PM UTC 42 minutes ago DEVICE switch on Bar light switch is on 2017-01-19 11:26:42.043 PM UTC 42 minutes ago APP_COMMAND on

This shows that Alexa sends the command correctly. IP address is configured correctly. Smartthings received the command. If I send the same command via web browser URL it does the action. But I am not sure why smartthings don't send the code through.

Thanks Serg

beckyricha commented 7 years ago

Thanks for including so many relevant details. this helps focus it.  this does seem like something in the last step of smart things calling the rm bridge.  Based on the troubleshooting you've done so far it looks like you already understand a lot, so forgive me if i ask some seemingly basic troubleshooting questions.  1) in setting up the bar light in the rm bridge did you name the codes bar light on and bar light off?   2) What happens if you send the command from the smart things app? 3) is the ip address you changed it to in the code the one to reach your device from outside using a dynamic dns or some other stable ip?  If using authentication did you get that added to the code? 4) What happens if you enter that external address instead of the local one in the rm bridge test site? ( The fun2code.de site) Also, i don't use the cloud version as much so I will also take a look at my code again and make sure i don't see anything there I've learned in the other app. Did you just download that code recently? There was a change last week or so to help with a reported bug but it did work for people after that. I've also been having issues the last couple of days having to repeat known good commands a few times to make them work, so will also check smart things for outages. Please let me know if any of this helps. Becky On Jan 19, 2017 7:19 PM, sergejvohrin notifications@github.com wrote:Hi, I am following your instruction however can't understand what is the issue. I am using RM bridge. I have all codes configured, I opened my router ports and I can switch on/off light using my web browser.I created a Device Handler - beckyricha : RM Bridge Switch Cloud. I have changed login, password and ip address.I have created one of the devices to switch on bar light.I added the devices on the Alexa app. Alexa recognises the device and I can even see the code is being sent by Alexa and received by smartthings. Problem: The light does not get turned on. Here is what I have in my device setting: Bar light Device Name Bar light Label Type RM Bridge Switch Cloud Version Published Device Network Id Bar light Status ACTIVE Last Activity At 2017-01-19 10:57 PM UTC Date Created 2017-01-19 10:57 PM UTC Last Updated 2017-01-19 10:57 PM UTC Data No data found for device Current States switch: on Events List Events In Use By Event List: Bar light (Device) Events — displayed | all | from device Date Source Type Name Value User Displayed Text 2017-01-19 11:56:36.163 PM UTC 12 minutes ago DEVICE switch on Bar light switch is on 2017-01-19 11:56:35.962 PM UTC 12 minutes ago APP_COMMAND on 2017-01-19 11:55:57.650 PM UTC 12 minutes ago APP_COMMAND off 2017-01-19 11:30:43.580 PM UTC 38 minutes ago DEVICE switch off Bar light switch is off 2017-01-19 11:30:43.442 PM UTC 38 minutes ago APP_COMMAND off 2017-01-19 11:26:42.062 PM UTC 42 minutes ago DEVICE switch on Bar light switch is on 2017-01-19 11:26:42.043 PM UTC 42 minutes ago APP_COMMAND on This shows that Alexa sends the command correctly. IP address is configured correctly. Smartthings received the command. If I send the same command via web browser URL it does the action. But I am not sure why smartthings don't send the code through. Thanks Serg

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

sergejvohrin commented 7 years ago

Hi Becky,

1) Yes, in RM bridge set to Bar light on / off

2) From smartthing app it does not do anything

3) I have added login and password to the url. I am using a dynamic external ip address, but it does not get changed too often. Btw, is it feasible to add a function that can dynamically detect your external ip address?

4) I did try to send the command via a link using external ip address and it works fine.

I think the cloud version is great as I can use my android tablet - it is always on and always at home, to host rm bridge app.

I had it working last year until I factory reset my tablet and had to redo the codes. Since then I can't get it work.

Thanks for your help.

Serg

On 20 Jan 2017 3:31 a.m., "Becky Onuschak" notifications@github.com wrote:

Thanks for including so many relevant details. this helps focus it. this does seem like something in the last step of smart things calling the rm bridge. Based on the troubleshooting you've done so far it looks like you already understand a lot, so forgive me if i ask some seemingly basic troubleshooting questions. 1) in setting up the bar light in the rm bridge did you name the codes bar light on and bar light off? 2) What happens if you send the command from the smart things app? 3) is the ip address you changed it to in the code the one to reach your device from outside using a dynamic dns or some other stable ip? If using authentication did you get that added to the code? 4) What happens if you enter that external address instead of the local one in the rm bridge test site? ( The fun2code.de site) Also, i don't use the cloud version as much so I will also take a look at my code again and make sure i don't see anything there I've learned in the other app. Did you just download that code recently? There was a change last week or so to help with a reported bug but it did work for people after that. I've also been having issues the last couple of days having to repeat known good commands a few times to make them work, so will also check smart things for outages. Please let me know if any of this helps. Becky On Jan 19, 2017 7:19 PM, sergejvohrin notifications@github.com wrote:Hi, I am following your instruction however can't understand what is the issue. I am using RM bridge. I have all codes configured, I opened my router ports and I can switch on/off light using my web browser.I created a Device Handler - beckyricha : RM Bridge Switch Cloud. I have changed login, password and ip address.I have created one of the devices to switch on bar light.I added the devices on the Alexa app. Alexa recognises the device and I can even see the code is being sent by Alexa and received by smartthings. Problem: The light does not get turned on. Here is what I have in my device setting: Bar light Device Name Bar light Label Type RM Bridge Switch Cloud Version Published Device Network Id Bar light Status ACTIVE Last Activity At 2017-01-19 10:57 PM UTC Date Created 2017-01-19 10:57 PM UTC Last Updated 2017-01-19 10:57 PM UTC Data No data found for device Current States switch: on Events List Events In Use By Event List: Bar light (Device) Events — displayed | all | from device Date Source Type Name Value User Displayed Text 2017-01-19 11:56:36.163 PM UTC 12 minutes ago DEVICE switch on Bar light switch is on 2017-01-19 11:56:35.962 PM UTC 12 minutes ago APP_COMMAND on 2017-01-19 11:55:57.650 PM UTC 12 minutes ago APP_COMMAND off 2017-01-19 11:30:43.580 PM UTC 38 minutes ago DEVICE switch off Bar light switch is off 2017-01-19 11:30:43.442 PM UTC 38 minutes ago APP_COMMAND off 2017-01-19 11:26:42.062 PM UTC 42 minutes ago DEVICE switch on Bar light switch is on 2017-01-19 11:26:42.043 PM UTC 42 minutes ago APP_COMMAND on This shows that Alexa sends the command correctly. IP address is configured correctly. Smartthings received the command. If I send the same command via web browser URL it does the action. But I am not sure why smartthings don't send the code through. Thanks Serg

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

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

beckyricha commented 7 years ago

That is very helpful info. I do have something i want to look at in the code, but first make sure you are using the latest broadlink device handler code. Interesting that it worked before. I don't think it would be possible to detect the ip address, so it's important to just use a name service. The reason is that everything is in the cloud on this version, so it would not be able to access your network until after you tell it where it is. Vicious circle.  Something may be possible in the LAN version, but it would not be necessary there as it uses your local IP.  All i could imagine is something like the dynamic update services used by dns providers, where you have a script running on a pc that occasionally pings them your new ip. That may be beyond my abilities though. On Jan 20, 2017 4:23 AM, sergejvohrin notifications@github.com wrote:Hi Becky,

1) Yes, in RM bridge set to Bar light on / off

2) From smartthing app it does not do anything

3) I have added login and password to the url. I am using a dynamic external ip address, but it does not get changed too often. Btw, is it feasible to add a function that can dynamically detect your external ip address?

4) I did try to send the command via a link using external ip address and it works fine.

I think the cloud version is great as I can use my android tablet - it is always on and always at home, to host rm bridge app.

I had it working last year until I factory reset my tablet and had to redo the codes. Since then I can't get it work.

Thanks for your help.

Serg

On 20 Jan 2017 3:31 a.m., "Becky Onuschak" notifications@github.com wrote:

Thanks for including so many relevant details. this helps focus it. this does seem like something in the last step of smart things calling the rm bridge. Based on the troubleshooting you've done so far it looks like you already understand a lot, so forgive me if i ask some seemingly basic troubleshooting questions. 1) in setting up the bar light in the rm bridge did you name the codes bar light on and bar light off? 2) What happens if you send the command from the smart things app? 3) is the ip address you changed it to in the code the one to reach your device from outside using a dynamic dns or some other stable ip? If using authentication did you get that added to the code? 4) What happens if you enter that external address instead of the local one in the rm bridge test site? ( The fun2code.de site) Also, i don't use the cloud version as much so I will also take a look at my code again and make sure i don't see anything there I've learned in the other app. Did you just download that code recently? There was a change last week or so to help with a reported bug but it did work for people after that. I've also been having issues the last couple of days having to repeat known good commands a few times to make them work, so will also check smart things for outages. Please let me know if any of this helps. Becky On Jan 19, 2017 7:19 PM, sergejvohrin notifications@github.com wrote:Hi, I am following your instruction however can't understand what is the issue. I am using RM bridge. I have all codes configured, I opened my router ports and I can switch on/off light using my web browser.I created a Device Handler - beckyricha : RM Bridge Switch Cloud. I have changed login, password and ip address.I have created one of the devices to switch on bar light.I added the devices on the Alexa app. Alexa recognises the device and I can even see the code is being sent by Alexa and received by smartthings. Problem: The light does not get turned on. Here is what I have in my device setting: Bar light Device Name Bar light Label Type RM Bridge Switch Cloud Version Published Device Network Id Bar light Status ACTIVE Last Activity At 2017-01-19 10:57 PM UTC Date Created 2017-01-19 10:57 PM UTC Last Updated 2017-01-19 10:57 PM UTC Data No data found for device Current States switch: on Events List Events In Use By Event List: Bar light (Device) Events — displayed | all | from device Date Source Type Name Value User Displayed Text 2017-01-19 11:56:36.163 PM UTC 12 minutes ago DEVICE switch on Bar light switch is on 2017-01-19 11:56:35.962 PM UTC 12 minutes ago APP_COMMAND on 2017-01-19 11:55:57.650 PM UTC 12 minutes ago APP_COMMAND off 2017-01-19 11:30:43.580 PM UTC 38 minutes ago DEVICE switch off Bar light switch is off 2017-01-19 11:30:43.442 PM UTC 38 minutes ago APP_COMMAND off 2017-01-19 11:26:42.062 PM UTC 42 minutes ago DEVICE switch on Bar light switch is on 2017-01-19 11:26:42.043 PM UTC 42 minutes ago APP_COMMAND on This shows that Alexa sends the command correctly. IP address is configured correctly. Smartthings received the command. If I send the same command via web browser URL it does the action. But I am not sure why smartthings don't send the code through. Thanks Serg

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

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

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

sergejvohrin commented 7 years ago

Hi,

Btw, in the latest cloud code there is an error that makes the handler LAN instead of Cloud. The definition field had a mistake.

I understand the issue with ip address, that is not a problem as I don't have to change it that often.

Is there anything else I can provide to help to detect the issue?

Sergejs

On 20 Jan 2017 12:32, "Becky Onuschak" notifications@github.com wrote:

That is very helpful info. I do have something i want to look at in the code, but first make sure you are using the latest broadlink device handler code. Interesting that it worked before. I don't think it would be possible to detect the ip address, so it's important to just use a name service. The reason is that everything is in the cloud on this version, so it would not be able to access your network until after you tell it where it is. Vicious circle. Something may be possible in the LAN version, but it would not be necessary there as it uses your local IP. All i could imagine is something like the dynamic update services used by dns providers, where you have a script running on a pc that occasionally pings them your new ip. That may be beyond my abilities though. On Jan 20, 2017 4:23 AM, sergejvohrin notifications@github.com wrote:Hi Becky,

1) Yes, in RM bridge set to Bar light on / off

2) From smartthing app it does not do anything

3) I have added login and password to the url. I am using a dynamic external ip address, but it does not get changed too often. Btw, is it feasible to add a function that can dynamically detect your external ip address?

4) I did try to send the command via a link using external ip address and it works fine.

I think the cloud version is great as I can use my android tablet - it is always on and always at home, to host rm bridge app.

I had it working last year until I factory reset my tablet and had to redo the codes. Since then I can't get it work.

Thanks for your help.

Serg

On 20 Jan 2017 3:31 a.m., "Becky Onuschak" notifications@github.com wrote:

Thanks for including so many relevant details. this helps focus it. this does seem like something in the last step of smart things calling the rm bridge. Based on the troubleshooting you've done so far it looks like you already understand a lot, so forgive me if i ask some seemingly basic troubleshooting questions. 1) in setting up the bar light in the rm bridge did you name the codes bar light on and bar light off? 2) What happens if you send the command from the smart things app? 3) is the ip address you changed it to in the code the one to reach your device from outside using a dynamic dns or some other stable ip? If using authentication did you get that added to the code? 4) What happens if you enter that external address instead of the local one in the rm bridge test site? ( The fun2code.de site) Also, i don't use the cloud version as much so I will also take a look at my code again and make sure i don't see anything there I've learned in the other app. Did you just download that code recently? There was a change last week or so to help with a reported bug but it did work for people after that. I've also been having issues the last couple of days having to repeat known good commands a few times to make them work, so will also check smart things for outages. Please let me know if any of this helps. Becky On Jan 19, 2017 7:19 PM, sergejvohrin notifications@github.com wrote:Hi, I am following your instruction however can't understand what is the issue. I am using RM bridge. I have all codes configured, I opened my router ports and I can switch on/off light using my web browser.I created a Device Handler - beckyricha : RM Bridge Switch Cloud. I have changed login, password and ip address.I have created one of the devices to switch on bar light.I added the devices on the Alexa app. Alexa recognises the device and I can even see the code is being sent by Alexa and received by smartthings. Problem: The light does not get turned on. Here is what I have in my device setting: Bar light Device Name Bar light Label Type RM Bridge Switch Cloud Version Published Device Network Id Bar light Status ACTIVE Last Activity At 2017-01-19 10:57 PM UTC Date Created 2017-01-19 10:57 PM UTC Last Updated 2017-01-19 10:57 PM UTC Data No data found for device Current States switch: on Events List Events In Use By Event List: Bar light (Device) Events — displayed | all | from device Date Source Type Name Value User Displayed Text 2017-01-19 11:56:36.163 PM UTC 12 minutes ago DEVICE switch on Bar light switch is on 2017-01-19 11:56:35.962 PM UTC 12 minutes ago APP_COMMAND on 2017-01-19 11:55:57.650 PM UTC 12 minutes ago APP_COMMAND off 2017-01-19 11:30:43.580 PM UTC 38 minutes ago DEVICE switch off Bar light switch is off 2017-01-19 11:30:43.442 PM UTC 38 minutes ago APP_COMMAND off 2017-01-19 11:26:42.062 PM UTC 42 minutes ago DEVICE switch on Bar light switch is on 2017-01-19 11:26:42.043 PM UTC 42 minutes ago APP_COMMAND on This shows that Alexa sends the command correctly. IP address is configured correctly. Smartthings received the command. If I send the same command via web browser URL it does the action. But I am not sure why smartthings don't send the code through. Thanks Serg

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

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

—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 authored the thread. Reply to this email directly, view it on GitHub https://github.com/beckyricha/Broadlink-RM-SmartThings-Alexa/issues/18#issuecomment-274061930, or mute the thread https://github.com/notifications/unsubscribe-auth/AV8-k6BlYRqoYgdMP3Zs4rxbqeSe3-ojks5rUKllgaJpZM4LoxbO .

beckyricha commented 7 years ago

I think that's enough info. I'm off today so i will look it over later this morning. On Jan 20, 2017 7:38 AM, sergejvohrin notifications@github.com wrote:Hi,

Btw, in the latest cloud code there is an error that makes the handler LAN instead of Cloud. The definition field had a mistake.

I understand the issue with ip address, that is not a problem as I don't have to change it that often.

Is there anything else I can provide to help to detect the issue?

Sergejs

On 20 Jan 2017 12:32, "Becky Onuschak" notifications@github.com wrote:

That is very helpful info. I do have something i want to look at in the code, but first make sure you are using the latest broadlink device handler code. Interesting that it worked before. I don't think it would be possible to detect the ip address, so it's important to just use a name service. The reason is that everything is in the cloud on this version, so it would not be able to access your network until after you tell it where it is. Vicious circle. Something may be possible in the LAN version, but it would not be necessary there as it uses your local IP. All i could imagine is something like the dynamic update services used by dns providers, where you have a script running on a pc that occasionally pings them your new ip. That may be beyond my abilities though. On Jan 20, 2017 4:23 AM, sergejvohrin notifications@github.com wrote:Hi Becky,

1) Yes, in RM bridge set to Bar light on / off

2) From smartthing app it does not do anything

3) I have added login and password to the url. I am using a dynamic external ip address, but it does not get changed too often. Btw, is it feasible to add a function that can dynamically detect your external ip address?

4) I did try to send the command via a link using external ip address and it works fine.

I think the cloud version is great as I can use my android tablet - it is always on and always at home, to host rm bridge app.

I had it working last year until I factory reset my tablet and had to redo the codes. Since then I can't get it work.

Thanks for your help.

Serg

On 20 Jan 2017 3:31 a.m., "Becky Onuschak" notifications@github.com wrote:

Thanks for including so many relevant details. this helps focus it. this does seem like something in the last step of smart things calling the rm bridge. Based on the troubleshooting you've done so far it looks like you already understand a lot, so forgive me if i ask some seemingly basic troubleshooting questions. 1) in setting up the bar light in the rm bridge did you name the codes bar light on and bar light off? 2) What happens if you send the command from the smart things app? 3) is the ip address you changed it to in the code the one to reach your device from outside using a dynamic dns or some other stable ip? If using authentication did you get that added to the code? 4) What happens if you enter that external address instead of the local one in the rm bridge test site? ( The fun2code.de site) Also, i don't use the cloud version as much so I will also take a look at my code again and make sure i don't see anything there I've learned in the other app. Did you just download that code recently? There was a change last week or so to help with a reported bug but it did work for people after that. I've also been having issues the last couple of days having to repeat known good commands a few times to make them work, so will also check smart things for outages. Please let me know if any of this helps. Becky On Jan 19, 2017 7:19 PM, sergejvohrin notifications@github.com wrote:Hi, I am following your instruction however can't understand what is the issue. I am using RM bridge. I have all codes configured, I opened my router ports and I can switch on/off light using my web browser.I created a Device Handler - beckyricha : RM Bridge Switch Cloud. I have changed login, password and ip address.I have created one of the devices to switch on bar light.I added the devices on the Alexa app. Alexa recognises the device and I can even see the code is being sent by Alexa and received by smartthings. Problem: The light does not get turned on. Here is what I have in my device setting: Bar light Device Name Bar light Label Type RM Bridge Switch Cloud Version Published Device Network Id Bar light Status ACTIVE Last Activity At 2017-01-19 10:57 PM UTC Date Created 2017-01-19 10:57 PM UTC Last Updated 2017-01-19 10:57 PM UTC Data No data found for device Current States switch: on Events List Events In Use By Event List: Bar light (Device) Events — displayed | all | from device Date Source Type Name Value User Displayed Text 2017-01-19 11:56:36.163 PM UTC 12 minutes ago DEVICE switch on Bar light switch is on 2017-01-19 11:56:35.962 PM UTC 12 minutes ago APP_COMMAND on 2017-01-19 11:55:57.650 PM UTC 12 minutes ago APP_COMMAND off 2017-01-19 11:30:43.580 PM UTC 38 minutes ago DEVICE switch off Bar light switch is off 2017-01-19 11:30:43.442 PM UTC 38 minutes ago APP_COMMAND off 2017-01-19 11:26:42.062 PM UTC 42 minutes ago DEVICE switch on Bar light switch is on 2017-01-19 11:26:42.043 PM UTC 42 minutes ago APP_COMMAND on This shows that Alexa sends the command correctly. IP address is configured correctly. Smartthings received the command. If I send the same command via web browser URL it does the action. But I am not sure why smartthings don't send the code through. Thanks Serg

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

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

—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 authored the thread. Reply to this email directly, view it on GitHub https://github.com/beckyricha/Broadlink-RM-SmartThings-Alexa/issues/18#issuecomment-274061930, or mute the thread https://github.com/notifications/unsubscribe-auth/AV8-k6BlYRqoYgdMP3Zs4rxbqeSe3-ojks5rUKllgaJpZM4LoxbO .

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

beckyricha commented 7 years ago

Also have you tried temporarily disabling your router firewall? It may be rejecting the incoming connection. On Jan 20, 2017 7:38 AM, sergejvohrin notifications@github.com wrote:Hi,

Btw, in the latest cloud code there is an error that makes the handler LAN instead of Cloud. The definition field had a mistake.

I understand the issue with ip address, that is not a problem as I don't have to change it that often.

Is there anything else I can provide to help to detect the issue?

Sergejs

On 20 Jan 2017 12:32, "Becky Onuschak" notifications@github.com wrote:

That is very helpful info. I do have something i want to look at in the code, but first make sure you are using the latest broadlink device handler code. Interesting that it worked before. I don't think it would be possible to detect the ip address, so it's important to just use a name service. The reason is that everything is in the cloud on this version, so it would not be able to access your network until after you tell it where it is. Vicious circle. Something may be possible in the LAN version, but it would not be necessary there as it uses your local IP. All i could imagine is something like the dynamic update services used by dns providers, where you have a script running on a pc that occasionally pings them your new ip. That may be beyond my abilities though. On Jan 20, 2017 4:23 AM, sergejvohrin notifications@github.com wrote:Hi Becky,

1) Yes, in RM bridge set to Bar light on / off

2) From smartthing app it does not do anything

3) I have added login and password to the url. I am using a dynamic external ip address, but it does not get changed too often. Btw, is it feasible to add a function that can dynamically detect your external ip address?

4) I did try to send the command via a link using external ip address and it works fine.

I think the cloud version is great as I can use my android tablet - it is always on and always at home, to host rm bridge app.

I had it working last year until I factory reset my tablet and had to redo the codes. Since then I can't get it work.

Thanks for your help.

Serg

On 20 Jan 2017 3:31 a.m., "Becky Onuschak" notifications@github.com wrote:

Thanks for including so many relevant details. this helps focus it. this does seem like something in the last step of smart things calling the rm bridge. Based on the troubleshooting you've done so far it looks like you already understand a lot, so forgive me if i ask some seemingly basic troubleshooting questions. 1) in setting up the bar light in the rm bridge did you name the codes bar light on and bar light off? 2) What happens if you send the command from the smart things app? 3) is the ip address you changed it to in the code the one to reach your device from outside using a dynamic dns or some other stable ip? If using authentication did you get that added to the code? 4) What happens if you enter that external address instead of the local one in the rm bridge test site? ( The fun2code.de site) Also, i don't use the cloud version as much so I will also take a look at my code again and make sure i don't see anything there I've learned in the other app. Did you just download that code recently? There was a change last week or so to help with a reported bug but it did work for people after that. I've also been having issues the last couple of days having to repeat known good commands a few times to make them work, so will also check smart things for outages. Please let me know if any of this helps. Becky On Jan 19, 2017 7:19 PM, sergejvohrin notifications@github.com wrote:Hi, I am following your instruction however can't understand what is the issue. I am using RM bridge. I have all codes configured, I opened my router ports and I can switch on/off light using my web browser.I created a Device Handler - beckyricha : RM Bridge Switch Cloud. I have changed login, password and ip address.I have created one of the devices to switch on bar light.I added the devices on the Alexa app. Alexa recognises the device and I can even see the code is being sent by Alexa and received by smartthings. Problem: The light does not get turned on. Here is what I have in my device setting: Bar light Device Name Bar light Label Type RM Bridge Switch Cloud Version Published Device Network Id Bar light Status ACTIVE Last Activity At 2017-01-19 10:57 PM UTC Date Created 2017-01-19 10:57 PM UTC Last Updated 2017-01-19 10:57 PM UTC Data No data found for device Current States switch: on Events List Events In Use By Event List: Bar light (Device) Events — displayed | all | from device Date Source Type Name Value User Displayed Text 2017-01-19 11:56:36.163 PM UTC 12 minutes ago DEVICE switch on Bar light switch is on 2017-01-19 11:56:35.962 PM UTC 12 minutes ago APP_COMMAND on 2017-01-19 11:55:57.650 PM UTC 12 minutes ago APP_COMMAND off 2017-01-19 11:30:43.580 PM UTC 38 minutes ago DEVICE switch off Bar light switch is off 2017-01-19 11:30:43.442 PM UTC 38 minutes ago APP_COMMAND off 2017-01-19 11:26:42.062 PM UTC 42 minutes ago DEVICE switch on Bar light switch is on 2017-01-19 11:26:42.043 PM UTC 42 minutes ago APP_COMMAND on This shows that Alexa sends the command correctly. IP address is configured correctly. Smartthings received the command. If I send the same command via web browser URL it does the action. But I am not sure why smartthings don't send the code through. Thanks Serg

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

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

—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 authored the thread. Reply to this email directly, view it on GitHub https://github.com/beckyricha/Broadlink-RM-SmartThings-Alexa/issues/18#issuecomment-274061930, or mute the thread https://github.com/notifications/unsubscribe-auth/AV8-k6BlYRqoYgdMP3Zs4rxbqeSe3-ojks5rUKllgaJpZM4LoxbO .

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

beckyricha commented 7 years ago

I will fix the description. Thanks for that note. I just created a new st account under a different email and did not associate a hub. The code worked like a charm, even on devices with spaces in the name. Sorry if I'm getting rudimentary but this is such simple code I'm getting stumped.  Just guessing now but will figure this out.. When you added the address into the code was it http (not HTTPS) in this format? http://username:password@external.ip address:port Have you double checked the case sensitivity of the device name?

On Jan 20, 2017 7:38 AM, sergejvohrin notifications@github.com wrote:Hi,

Btw, in the latest cloud code there is an error that makes the handler LAN instead of Cloud. The definition field had a mistake.

I understand the issue with ip address, that is not a problem as I don't have to change it that often.

Is there anything else I can provide to help to detect the issue?

Sergejs

On 20 Jan 2017 12:32, "Becky Onuschak" notifications@github.com wrote:

That is very helpful info. I do have something i want to look at in the code, but first make sure you are using the latest broadlink device handler code. Interesting that it worked before. I don't think it would be possible to detect the ip address, so it's important to just use a name service. The reason is that everything is in the cloud on this version, so it would not be able to access your network until after you tell it where it is. Vicious circle. Something may be possible in the LAN version, but it would not be necessary there as it uses your local IP. All i could imagine is something like the dynamic update services used by dns providers, where you have a script running on a pc that occasionally pings them your new ip. That may be beyond my abilities though. On Jan 20, 2017 4:23 AM, sergejvohrin notifications@github.com wrote:Hi Becky,

1) Yes, in RM bridge set to Bar light on / off

2) From smartthing app it does not do anything

3) I have added login and password to the url. I am using a dynamic external ip address, but it does not get changed too often. Btw, is it feasible to add a function that can dynamically detect your external ip address?

4) I did try to send the command via a link using external ip address and it works fine.

I think the cloud version is great as I can use my android tablet - it is always on and always at home, to host rm bridge app.

I had it working last year until I factory reset my tablet and had to redo the codes. Since then I can't get it work.

Thanks for your help.

Serg

On 20 Jan 2017 3:31 a.m., "Becky Onuschak" notifications@github.com wrote:

Thanks for including so many relevant details. this helps focus it. this does seem like something in the last step of smart things calling the rm bridge. Based on the troubleshooting you've done so far it looks like you already understand a lot, so forgive me if i ask some seemingly basic troubleshooting questions. 1) in setting up the bar light in the rm bridge did you name the codes bar light on and bar light off? 2) What happens if you send the command from the smart things app? 3) is the ip address you changed it to in the code the one to reach your device from outside using a dynamic dns or some other stable ip? If using authentication did you get that added to the code? 4) What happens if you enter that external address instead of the local one in the rm bridge test site? ( The fun2code.de site) Also, i don't use the cloud version as much so I will also take a look at my code again and make sure i don't see anything there I've learned in the other app. Did you just download that code recently? There was a change last week or so to help with a reported bug but it did work for people after that. I've also been having issues the last couple of days having to repeat known good commands a few times to make them work, so will also check smart things for outages. Please let me know if any of this helps. Becky On Jan 19, 2017 7:19 PM, sergejvohrin notifications@github.com wrote:Hi, I am following your instruction however can't understand what is the issue. I am using RM bridge. I have all codes configured, I opened my router ports and I can switch on/off light using my web browser.I created a Device Handler - beckyricha : RM Bridge Switch Cloud. I have changed login, password and ip address.I have created one of the devices to switch on bar light.I added the devices on the Alexa app. Alexa recognises the device and I can even see the code is being sent by Alexa and received by smartthings. Problem: The light does not get turned on. Here is what I have in my device setting: Bar light Device Name Bar light Label Type RM Bridge Switch Cloud Version Published Device Network Id Bar light Status ACTIVE Last Activity At 2017-01-19 10:57 PM UTC Date Created 2017-01-19 10:57 PM UTC Last Updated 2017-01-19 10:57 PM UTC Data No data found for device Current States switch: on Events List Events In Use By Event List: Bar light (Device) Events — displayed | all | from device Date Source Type Name Value User Displayed Text 2017-01-19 11:56:36.163 PM UTC 12 minutes ago DEVICE switch on Bar light switch is on 2017-01-19 11:56:35.962 PM UTC 12 minutes ago APP_COMMAND on 2017-01-19 11:55:57.650 PM UTC 12 minutes ago APP_COMMAND off 2017-01-19 11:30:43.580 PM UTC 38 minutes ago DEVICE switch off Bar light switch is off 2017-01-19 11:30:43.442 PM UTC 38 minutes ago APP_COMMAND off 2017-01-19 11:26:42.062 PM UTC 42 minutes ago DEVICE switch on Bar light switch is on 2017-01-19 11:26:42.043 PM UTC 42 minutes ago APP_COMMAND on This shows that Alexa sends the command correctly. IP address is configured correctly. Smartthings received the command. If I send the same command via web browser URL it does the action. But I am not sure why smartthings don't send the code through. Thanks Serg

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

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

—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 authored the thread. Reply to this email directly, view it on GitHub https://github.com/beckyricha/Broadlink-RM-SmartThings-Alexa/issues/18#issuecomment-274061930, or mute the thread https://github.com/notifications/unsubscribe-auth/AV8-k6BlYRqoYgdMP3Zs4rxbqeSe3-ojks5rUKllgaJpZM4LoxbO .

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

sergejvohrin commented 7 years ago

Hi,

Regarding firewall, I have just tested sending the code from my phone browser (over 4g, so I am external) and it worked.

I don't know if you might think of a line of code that I can add to test if the device communicates with handler and handler runs the code?

Below few more results on the tests I have done.

1) I have just tried again, I copied the url from the handler config file and pasted to browser. I have replaced only $replaced%20$toggle to "Bar light_on" so it became http://login:password@2.124.xxx.x03:7474/code/Bar%20light_on (login, password and xxx in the ip address got modified for security reason).

When I run it in the browser it works absolutely fine. So seems the ip address in the handler are correct.

2)I have looked into the RM bridge codes and I can see this Bar light_off b4:43:0d:aa:1c:34 http://192.168.0.2:7474/code/Bar light_off Bar light_on b4:43:0d:aa:1c:34 http://192.168.0.2:7474/code/Bar light_on

So names should be good as well.

3)When I test it in smartthings app, it does nothing. It changes on/off but no action. This what I can see on smart things site: Name * Bar light

Label

Zigbee Id

Device Network Id * Bar light

Type * RM Bridge Switch Cloud

Version* Published

Config looks correct.

4) Event list records - all events are from smartthings app Bar light (Device) Events — displayed | all | from device Date Source Type Name Value User Displayed Text 2017-01-20 6:15:37.033 PM UTC 12 minutes ago DEVICE switch off Bar light switch is off 2017-01-20 6:15:35.551 PM UTC 13 minutes ago DEVICE switch on Bar light switch is on 2017-01-20 6:15:34.018 PM UTC 13 minutes ago DEVICE switch off Bar light switch is off 2017-01-20 6:15:31.655 PM UTC 13 minutes ago DEVICE switch on Bar light switch is on

5) This is my handler code (ip address masked)

// 09/01/2016 - itsamti - Added new switch definition below metadata {

definition (name: "RM Bridge Switch Cloud", namespace: "beckyricha",

author: "BeckyR") { capability "Switch"

command "onPhysical" command "offPhysical" }

tiles { standardTile("switch", "device.switch", width: 2, height: 2, canChangeIcon: true) { state "off", label: '${currentValue}', action: "switch.on", icon: "st.switches.switch.off", backgroundColor: "#ffffff" state "on", label: '${currentValue}', action: "switch.off", icon: "st.switches.switch.on", backgroundColor: "#79b821" } standardTile("on", "device.switch", decoration: "flat") { state "default", label: 'On', action: "onPhysical", backgroundColor: "#ffffff" } standardTile("off", "device.switch", decoration: "flat") { state "default", label: 'Off', action: "offPhysical", backgroundColor: "#ffffff" } main "switch" details(["switch","on","off"]) } }

def parse(String description) { def pair = description.split(":") createEvent(name: pair[0].trim(), value: pair[1].trim()) }

def on() { sendEvent(name: "switch", value: "on") put('on') }

def off() { sendEvent(name: "switch", value: "off") put('off') }

def onPhysical() { sendEvent(name: "switch", value: "on", type: "physical") put('on') }

def offPhysical() { sendEvent(name: "switch", value: "off", type: "physical") put('off') }

private put(toggle) { def toReplace = device.deviceNetworkId def replaced = toReplace.replaceAll(' ', '%20') def params = [ uri: "http://login:password@2.124.xxx.x03:7474/code/$replaced%20$toggle"

] httpGet(params) }

Thanks a lot for your help

Serg

On 20 Jan 2017 13:22, "Becky Onuschak" notifications@github.com wrote:

I will fix the description. Thanks for that note. I just created a new st account under a different email and did not associate a hub. The code worked like a charm, even on devices with spaces in the name. Sorry if I'm getting rudimentary but this is such simple code I'm getting stumped. Just guessing now but will figure this out.. When you added the address into the code was it http (not HTTPS) in this format? http://username:password@external.ip address:port Have you double checked the case sensitivity of the device name?

On Jan 20, 2017 7:38 AM, sergejvohrin notifications@github.com wrote:Hi,

Btw, in the latest cloud code there is an error that makes the handler LAN instead of Cloud. The definition field had a mistake.

I understand the issue with ip address, that is not a problem as I don't have to change it that often.

Is there anything else I can provide to help to detect the issue?

Sergejs

On 20 Jan 2017 12:32, "Becky Onuschak" notifications@github.com wrote:

That is very helpful info. I do have something i want to look at in the code, but first make sure you are using the latest broadlink device handler code. Interesting that it worked before. I don't think it would be possible to detect the ip address, so it's important to just use a name service. The reason is that everything is in the cloud on this version, so it would not be able to access your network until after you tell it where it is. Vicious circle. Something may be possible in the LAN version, but it would not be necessary there as it uses your local IP. All i could imagine is something like the dynamic update services used by dns providers, where you have a script running on a pc that occasionally pings them your new ip. That may be beyond my abilities though. On Jan 20, 2017 4:23 AM, sergejvohrin notifications@github.com wrote:Hi Becky,

1) Yes, in RM bridge set to Bar light on / off

2) From smartthing app it does not do anything

3) I have added login and password to the url. I am using a dynamic external ip address, but it does not get changed too often. Btw, is it feasible to add a function that can dynamically detect your external ip address?

4) I did try to send the command via a link using external ip address and it works fine.

I think the cloud version is great as I can use my android tablet - it is always on and always at home, to host rm bridge app.

I had it working last year until I factory reset my tablet and had to redo the codes. Since then I can't get it work.

Thanks for your help.

Serg

On 20 Jan 2017 3:31 a.m., "Becky Onuschak" notifications@github.com wrote:

Thanks for including so many relevant details. this helps focus it. this does seem like something in the last step of smart things calling the rm bridge. Based on the troubleshooting you've done so far it looks like you already understand a lot, so forgive me if i ask some seemingly basic troubleshooting questions. 1) in setting up the bar light in the rm bridge did you name the codes bar light on and bar light off? 2) What happens if you send the command from the smart things app? 3) is the ip address you changed it to in the code the one to reach your device from outside using a dynamic dns or some other stable ip? If using authentication did you get that added to the code? 4) What happens if you enter that external address instead of the local one in the rm bridge test site? ( The fun2code.de site) Also, i don't use the cloud version as much so I will also take a look at my code again and make sure i don't see anything there I've learned in the other app. Did you just download that code recently? There was a change last week or so to help with a reported bug but it did work for people after that. I've also been having issues the last couple of days having to repeat known good commands a few times to make them work, so will also check smart things for outages. Please let me know if any of this helps. Becky On Jan 19, 2017 7:19 PM, sergejvohrin notifications@github.com wrote:Hi, I am following your instruction however can't understand what is the issue. I am using RM bridge. I have all codes configured, I opened my router ports and I can switch on/off light using my web browser.I created a Device Handler - beckyricha : RM Bridge Switch Cloud. I have changed login, password and ip address.I have created one of the devices to switch on bar light.I added the devices on the Alexa app. Alexa recognises the device and I can even see the code is being sent by Alexa and received by smartthings. Problem: The light does not get turned on. Here is what I have in my device setting: Bar light Device Name Bar light Label Type RM Bridge Switch Cloud Version Published Device Network Id Bar light Status ACTIVE Last Activity At 2017-01-19 10:57 PM UTC Date Created 2017-01-19 10:57 PM UTC Last Updated 2017-01-19 10:57 PM UTC Data No data found for device Current States switch: on Events List Events In Use By Event List: Bar light (Device) Events — displayed | all | from device Date Source Type Name Value User Displayed Text 2017-01-19 11:56:36.163 PM UTC 12 minutes ago DEVICE switch on Bar light switch is on 2017-01-19 11:56:35.962 PM UTC 12 minutes ago APP_COMMAND on 2017-01-19 11:55:57.650 PM UTC 12 minutes ago APP_COMMAND off 2017-01-19 11:30:43.580 PM UTC 38 minutes ago DEVICE switch off Bar light switch is off 2017-01-19 11:30:43.442 PM UTC 38 minutes ago APP_COMMAND off 2017-01-19 11:26:42.062 PM UTC 42 minutes ago DEVICE switch on Bar light switch is on 2017-01-19 11:26:42.043 PM UTC 42 minutes ago APP_COMMAND on This shows that Alexa sends the command correctly. IP address is configured correctly. Smartthings received the command. If I send the same command via web browser URL it does the action. But I am not sure why smartthings don't send the code through. Thanks Serg

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

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

—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 authored the thread. Reply to this email directly, view it on GitHub https://github.com/beckyricha/Broadlink-RM-SmartThings-Alexa/issues/18# issuecomment-274061930, or mute the thread https://github.com/notifications/unsubscribe-auth/AV8- k6BlYRqoYgdMP3Zs4rxbqeSe3-ojks5rUKllgaJpZM4LoxbO .

—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 authored the thread. Reply to this email directly, view it on GitHub https://github.com/beckyricha/Broadlink-RM-SmartThings-Alexa/issues/18#issuecomment-274070865, or mute the thread https://github.com/notifications/unsubscribe-auth/AV8-kz1YTrnBwQbw9bNiD8IjNxWcAXGrks5rULUrgaJpZM4LoxbO .

beckyricha commented 7 years ago

What is the underscore between the device name and on or off? If that really exists in your code that is the issue. The name must be followed by a slave, then the word on our off. I'm working to improve that in the direct Alexa skill. On Jan 20, 2017 1:48 PM, sergejvohrin notifications@github.com wrote:Hi,

Regarding firewall, I have just tested sending the code from my phone browser (over 4g, so I am external) and it worked.

I don't know if you might think of a line of code that I can add to test if the device communicates with handler and handler runs the code?

Below few more results on the tests I have done.

1) I have just tried again, I copied the url from the handler config file and pasted to browser. I have replaced only $replaced%20$toggle to "Bar light_on" so it became http://login:password@2.124.xxx.x03:7474/code/Bar%20light_on (login, password and xxx in the ip address got modified for security reason).

When I run it in the browser it works absolutely fine. So seems the ip address in the handler are correct.

2)I have looked into the RM bridge codes and I can see this Bar light_off b4:43:0d:aa:1c:34 http://192.168.0.2:7474/code/Bar light_off Bar light_on b4:43:0d:aa:1c:34 http://192.168.0.2:7474/code/Bar light_on

So names should be good as well.

3)When I test it in smartthings app, it does nothing. It changes on/off but no action. This what I can see on smart things site: Name * Bar light

Label

Zigbee Id

Device Network Id * Bar light

Type * RM Bridge Switch Cloud

Version* Published

Config looks correct.

4) Event list records - all events are from smartthings app Bar light (Device) Events — displayed | all | from device Date Source Type Name Value User Displayed Text 2017-01-20 6:15:37.033 PM UTC 12 minutes ago DEVICE switch off Bar light switch is off 2017-01-20 6:15:35.551 PM UTC 13 minutes ago DEVICE switch on Bar light switch is on 2017-01-20 6:15:34.018 PM UTC 13 minutes ago DEVICE switch off Bar light switch is off 2017-01-20 6:15:31.655 PM UTC 13 minutes ago DEVICE switch on Bar light switch is on

5) This is my handler code (ip address masked)

// 09/01/2016 - itsamti - Added new switch definition below metadata {

definition (name: "RM Bridge Switch Cloud", namespace: "beckyricha",

author: "BeckyR") { capability "Switch"

command "onPhysical" command "offPhysical" }

tiles { standardTile("switch", "device.switch", width: 2, height: 2, canChangeIcon: true) { state "off", label: '${currentValue}', action: "switch.on", icon: "st.switches.switch.off", backgroundColor: "#ffffff" state "on", label: '${currentValue}', action: "switch.off", icon: "st.switches.switch.on", backgroundColor: "#79b821" } standardTile("on", "device.switch", decoration: "flat") { state "default", label: 'On', action: "onPhysical", backgroundColor: "#ffffff" } standardTile("off", "device.switch", decoration: "flat") { state "default", label: 'Off', action: "offPhysical", backgroundColor: "#ffffff" } main "switch" details(["switch","on","off"]) } }

def parse(String description) { def pair = description.split(":") createEvent(name: pair[0].trim(), value: pair[1].trim()) }

def on() { sendEvent(name: "switch", value: "on") put('on') }

def off() { sendEvent(name: "switch", value: "off") put('off') }

def onPhysical() { sendEvent(name: "switch", value: "on", type: "physical") put('on') }

def offPhysical() { sendEvent(name: "switch", value: "off", type: "physical") put('off') }

private put(toggle) { def toReplace = device.deviceNetworkId def replaced = toReplace.replaceAll(' ', '%20') def params = [ uri: "http://login:password@2.124.xxx.x03:7474/code/$replaced%20$toggle"

] httpGet(params) }

Thanks a lot for your help

Serg

On 20 Jan 2017 13:22, "Becky Onuschak" notifications@github.com wrote:

I will fix the description. Thanks for that note. I just created a new st account under a different email and did not associate a hub. The code worked like a charm, even on devices with spaces in the name. Sorry if I'm getting rudimentary but this is such simple code I'm getting stumped. Just guessing now but will figure this out.. When you added the address into the code was it http (not HTTPS) in this format? http://username:password@external.ip address:port Have you double checked the case sensitivity of the device name?

On Jan 20, 2017 7:38 AM, sergejvohrin notifications@github.com wrote:Hi,

Btw, in the latest cloud code there is an error that makes the handler LAN instead of Cloud. The definition field had a mistake.

I understand the issue with ip address, that is not a problem as I don't have to change it that often.

Is there anything else I can provide to help to detect the issue?

Sergejs

On 20 Jan 2017 12:32, "Becky Onuschak" notifications@github.com wrote:

That is very helpful info. I do have something i want to look at in the code, but first make sure you are using the latest broadlink device handler code. Interesting that it worked before. I don't think it would be possible to detect the ip address, so it's important to just use a name service. The reason is that everything is in the cloud on this version, so it would not be able to access your network until after you tell it where it is. Vicious circle. Something may be possible in the LAN version, but it would not be necessary there as it uses your local IP. All i could imagine is something like the dynamic update services used by dns providers, where you have a script running on a pc that occasionally pings them your new ip. That may be beyond my abilities though. On Jan 20, 2017 4:23 AM, sergejvohrin notifications@github.com wrote:Hi Becky,

1) Yes, in RM bridge set to Bar light on / off

2) From smartthing app it does not do anything

3) I have added login and password to the url. I am using a dynamic external ip address, but it does not get changed too often. Btw, is it feasible to add a function that can dynamically detect your external ip address?

4) I did try to send the command via a link using external ip address and it works fine.

I think the cloud version is great as I can use my android tablet - it is always on and always at home, to host rm bridge app.

I had it working last year until I factory reset my tablet and had to redo the codes. Since then I can't get it work.

Thanks for your help.

Serg

On 20 Jan 2017 3:31 a.m., "Becky Onuschak" notifications@github.com wrote:

Thanks for including so many relevant details. this helps focus it. this does seem like something in the last step of smart things calling the rm bridge. Based on the troubleshooting you've done so far it looks like you already understand a lot, so forgive me if i ask some seemingly basic troubleshooting questions. 1) in setting up the bar light in the rm bridge did you name the codes bar light on and bar light off? 2) What happens if you send the command from the smart things app? 3) is the ip address you changed it to in the code the one to reach your device from outside using a dynamic dns or some other stable ip? If using authentication did you get that added to the code? 4) What happens if you enter that external address instead of the local one in the rm bridge test site? ( The fun2code.de site) Also, i don't use the cloud version as much so I will also take a look at my code again and make sure i don't see anything there I've learned in the other app. Did you just download that code recently? There was a change last week or so to help with a reported bug but it did work for people after that. I've also been having issues the last couple of days having to repeat known good commands a few times to make them work, so will also check smart things for outages. Please let me know if any of this helps. Becky On Jan 19, 2017 7:19 PM, sergejvohrin notifications@github.com wrote:Hi, I am following your instruction however can't understand what is the issue. I am using RM bridge. I have all codes configured, I opened my router ports and I can switch on/off light using my web browser.I created a Device Handler - beckyricha : RM Bridge Switch Cloud. I have changed login, password and ip address.I have created one of the devices to switch on bar light.I added the devices on the Alexa app. Alexa recognises the device and I can even see the code is being sent by Alexa and received by smartthings. Problem: The light does not get turned on. Here is what I have in my device setting: Bar light Device Name Bar light Label Type RM Bridge Switch Cloud Version Published Device Network Id Bar light Status ACTIVE Last Activity At 2017-01-19 10:57 PM UTC Date Created 2017-01-19 10:57 PM UTC Last Updated 2017-01-19 10:57 PM UTC Data No data found for device Current States switch: on Events List Events In Use By Event List: Bar light (Device) Events — displayed | all | from device Date Source Type Name Value User Displayed Text 2017-01-19 11:56:36.163 PM UTC 12 minutes ago DEVICE switch on Bar light switch is on 2017-01-19 11:56:35.962 PM UTC 12 minutes ago APP_COMMAND on 2017-01-19 11:55:57.650 PM UTC 12 minutes ago APP_COMMAND off 2017-01-19 11:30:43.580 PM UTC 38 minutes ago DEVICE switch off Bar light switch is off 2017-01-19 11:30:43.442 PM UTC 38 minutes ago APP_COMMAND off 2017-01-19 11:26:42.062 PM UTC 42 minutes ago DEVICE switch on Bar light switch is on 2017-01-19 11:26:42.043 PM UTC 42 minutes ago APP_COMMAND on This shows that Alexa sends the command correctly. IP address is configured correctly. Smartthings received the command. If I send the same command via web browser URL it does the action. But I am not sure why smartthings don't send the code through. Thanks Serg

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

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

—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 authored the thread. Reply to this email directly, view it on GitHub https://github.com/beckyricha/Broadlink-RM-SmartThings-Alexa/issues/18# issuecomment-274061930, or mute the thread https://github.com/notifications/unsubscribe-auth/AV8- k6BlYRqoYgdMP3Zs4rxbqeSe3-ojks5rUKllgaJpZM4LoxbO .

—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 authored the thread. Reply to this email directly, view it on GitHub https://github.com/beckyricha/Broadlink-RM-SmartThings-Alexa/issues/18#issuecomment-274070865, or mute the thread https://github.com/notifications/unsubscribe-auth/AV8-kz1YTrnBwQbw9bNiD8IjNxWcAXGrks5rULUrgaJpZM4LoxbO .

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

sergejvohrin commented 7 years ago

Hi Becky,

I knew it would be something stupid. I don't know why I thought I need underscore for on/off. I removed it and it solved the issue. Thanks a lot for your help, much appreciated. You know that your solution is pretty much the only solution I could find for broadlink.

Did you mention you are trying to develop Alexa skill? That would be amazing.

Serg

On 20 Jan 2017 21:05, "Becky Onuschak" notifications@github.com wrote:

What is the underscore between the device name and on or off? If that really exists in your code that is the issue. The name must be followed by a slave, then the word on our off. I'm working to improve that in the direct Alexa skill. On Jan 20, 2017 1:48 PM, sergejvohrin notifications@github.com wrote:Hi,

Regarding firewall, I have just tested sending the code from my phone browser (over 4g, so I am external) and it worked.

I don't know if you might think of a line of code that I can add to test if the device communicates with handler and handler runs the code?

Below few more results on the tests I have done.

1) I have just tried again, I copied the url from the handler config file and pasted to browser. I have replaced only $replaced%20$toggle to "Bar light_on" so it became http://login:password@2.124.xxx.x03:7474/code/Bar%20light_on (login, password and xxx in the ip address got modified for security reason).

When I run it in the browser it works absolutely fine. So seems the ip address in the handler are correct.

2)I have looked into the RM bridge codes and I can see this Bar light_off b4:43:0d:aa:1c:34 http://192.168.0.2:7474/code/Bar light_off Bar light_on b4:43:0d:aa:1c:34 http://192.168.0.2:7474/code/Bar light_on

So names should be good as well.

3)When I test it in smartthings app, it does nothing. It changes on/off but no action. This what I can see on smart things site: Name * Bar light

Label

Zigbee Id

Device Network Id * Bar light

Type * RM Bridge Switch Cloud

Version* Published

Config looks correct.

4) Event list records - all events are from smartthings app Bar light (Device) Events — displayed | all | from device Date Source Type Name Value User Displayed Text 2017-01-20 6:15:37.033 PM UTC 12 minutes ago DEVICE switch off Bar light switch is off 2017-01-20 6:15:35.551 PM UTC 13 minutes ago DEVICE switch on Bar light switch is on 2017-01-20 6:15:34.018 PM UTC 13 minutes ago DEVICE switch off Bar light switch is off 2017-01-20 6:15:31.655 PM UTC 13 minutes ago DEVICE switch on Bar light switch is on

5) This is my handler code (ip address masked)

// 09/01/2016 - itsamti - Added new switch definition below metadata {

definition (name: "RM Bridge Switch Cloud", namespace: "beckyricha", author: "BeckyR") { capability "Switch"

command "onPhysical" command "offPhysical" }

tiles { standardTile("switch", "device.switch", width: 2, height: 2, canChangeIcon: true) { state "off", label: '${currentValue}', action: "switch.on", icon: "st.switches.switch.off", backgroundColor: "#ffffff" state "on", label: '${currentValue}', action: "switch.off", icon: "st.switches.switch.on", backgroundColor: "#79b821" } standardTile("on", "device.switch", decoration: "flat") { state "default", label: 'On', action: "onPhysical", backgroundColor: "#ffffff" } standardTile("off", "device.switch", decoration: "flat") { state "default", label: 'Off', action: "offPhysical", backgroundColor: "#ffffff" } main "switch" details(["switch","on","off"]) } }

def parse(String description) { def pair = description.split(":") createEvent(name: pair[0].trim(), value: pair[1].trim()) }

def on() { sendEvent(name: "switch", value: "on") put('on') }

def off() { sendEvent(name: "switch", value: "off") put('off') }

def onPhysical() { sendEvent(name: "switch", value: "on", type: "physical") put('on') }

def offPhysical() { sendEvent(name: "switch", value: "off", type: "physical") put('off') }

private put(toggle) { def toReplace = device.deviceNetworkId def replaced = toReplace.replaceAll(' ', '%20') def params = [ uri: "http://login:password@2.124.xxx.x03:7474/code/$replaced%20$toggle"

] httpGet(params) }

Thanks a lot for your help

Serg

On 20 Jan 2017 13:22, "Becky Onuschak" notifications@github.com wrote:

I will fix the description. Thanks for that note. I just created a new st account under a different email and did not associate a hub. The code worked like a charm, even on devices with spaces in the name. Sorry if I'm getting rudimentary but this is such simple code I'm getting stumped. Just guessing now but will figure this out.. When you added the address into the code was it http (not HTTPS) in this format? http://username:password@external.ip address:port Have you double checked the case sensitivity of the device name?

On Jan 20, 2017 7:38 AM, sergejvohrin notifications@github.com wrote:Hi,

Btw, in the latest cloud code there is an error that makes the handler LAN instead of Cloud. The definition field had a mistake.

I understand the issue with ip address, that is not a problem as I don't have to change it that often.

Is there anything else I can provide to help to detect the issue?

Sergejs

On 20 Jan 2017 12:32, "Becky Onuschak" notifications@github.com wrote:

That is very helpful info. I do have something i want to look at in the code, but first make sure you are using the latest broadlink device handler code. Interesting that it worked before. I don't think it would be possible to detect the ip address, so it's important to just use a name service. The reason is that everything is in the cloud on this version, so it would not be able to access your network until after you tell it where it is. Vicious circle. Something may be possible in the LAN version, but it would not be necessary there as it uses your local IP. All i could imagine is something like the dynamic update services used by dns providers, where you have a script running on a pc that occasionally pings them your new ip. That may be beyond my abilities though. On Jan 20, 2017 4:23 AM, sergejvohrin notifications@github.com wrote:Hi Becky,

1) Yes, in RM bridge set to Bar light on / off

2) From smartthing app it does not do anything

3) I have added login and password to the url. I am using a dynamic external ip address, but it does not get changed too often. Btw, is it feasible to add a function that can dynamically detect your external ip address?

4) I did try to send the command via a link using external ip address and it works fine.

I think the cloud version is great as I can use my android tablet - it is always on and always at home, to host rm bridge app.

I had it working last year until I factory reset my tablet and had to redo the codes. Since then I can't get it work.

Thanks for your help.

Serg

On 20 Jan 2017 3:31 a.m., "Becky Onuschak" notifications@github.com wrote:

Thanks for including so many relevant details. this helps focus it. this does seem like something in the last step of smart things calling the rm bridge. Based on the troubleshooting you've done so far it looks like you already understand a lot, so forgive me if i ask some seemingly basic troubleshooting questions. 1) in setting up the bar light in the rm bridge did you name the codes bar light on and bar light off? 2) What happens if you send the command from the smart things app? 3) is the ip address you changed it to in the code the one to reach your device from outside using a dynamic dns or some other stable ip? If using authentication did you get that added to the code? 4) What happens if you enter that external address instead of the local one in the rm bridge test site? ( The fun2code.de site) Also, i don't use the cloud version as much so I will also take a look at my code again and make sure i don't see anything there I've learned in the other app. Did you just download that code recently? There was a change last week or so to help with a reported bug but it did work for people after that. I've also been having issues the last couple of days having to repeat known good commands a few times to make them work, so will also check smart things for outages. Please let me know if any of this helps. Becky On Jan 19, 2017 7:19 PM, sergejvohrin notifications@github.com wrote:Hi, I am following your instruction however can't understand what is the issue. I am using RM bridge. I have all codes configured, I opened my router ports and I can switch on/off light using my web browser.I created a Device Handler - beckyricha : RM Bridge Switch Cloud. I have changed login, password and ip address.I have created one of the devices to switch on bar light.I added the devices on the Alexa app. Alexa recognises the device and I can even see the code is being sent by Alexa and received by smartthings. Problem: The light does not get turned on. Here is what I have in my device setting: Bar light Device Name Bar light Label Type RM Bridge Switch Cloud Version Published Device Network Id Bar light Status ACTIVE Last Activity At 2017-01-19 10:57 PM UTC Date Created 2017-01-19 10:57 PM UTC Last Updated 2017-01-19 10:57 PM UTC Data No data found for device Current States switch: on Events List Events In Use By Event List: Bar light (Device) Events — displayed | all | from device Date Source Type Name Value User Displayed Text 2017-01-19 11:56:36.163 PM UTC 12 minutes ago DEVICE switch on Bar light switch is on 2017-01-19 11:56:35.962 PM UTC 12 minutes ago APP_COMMAND on 2017-01-19 11:55:57.650 PM UTC 12 minutes ago APP_COMMAND off 2017-01-19 11:30:43.580 PM UTC 38 minutes ago DEVICE switch off Bar light switch is off 2017-01-19 11:30:43.442 PM UTC 38 minutes ago APP_COMMAND off 2017-01-19 11:26:42.062 PM UTC 42 minutes ago DEVICE switch on Bar light switch is on 2017-01-19 11:26:42.043 PM UTC 42 minutes ago APP_COMMAND on This shows that Alexa sends the command correctly. IP address is configured correctly. Smartthings received the command. If I send the same command via web browser URL it does the action. But I am not sure why smartthings don't send the code through. Thanks Serg

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

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

—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 authored the thread. Reply to this email directly, view it on GitHub https://github.com/beckyricha/Broadlink-RM- SmartThings-Alexa/issues/18# issuecomment-274061930, or mute the thread https://github.com/notifications/unsubscribe-auth/AV8- k6BlYRqoYgdMP3Zs4rxbqeSe3-ojks5rUKllgaJpZM4LoxbO .

—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 authored the thread. Reply to this email directly, view it on GitHub https://github.com/beckyricha/Broadlink-RM-SmartThings-Alexa/issues/18# issuecomment-274070865, or mute the thread https://github.com/notifications/unsubscribe-auth/AV8- kz1YTrnBwQbw9bNiD8IjNxWcAXGrks5rULUrgaJpZM4LoxbO .

—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 authored the thread. Reply to this email directly, view it on GitHub https://github.com/beckyricha/Broadlink-RM-SmartThings-Alexa/issues/18#issuecomment-274179848, or mute the thread https://github.com/notifications/unsubscribe-auth/AV8-kxad0ZymHA6Rzp4QcWFPBOVw5caTks5rUSG3gaJpZM4LoxbO .

beckyricha commented 7 years ago

Yep. Was working on it today. I can't work around the net for oauth by sending the request using google drive and google scripts.  Having issues getting discovery to work. Probably something silly but once i fix it the rest shouldn't be hard. On Jan 20, 2017 6:11 PM, sergejvohrin notifications@github.com wrote:Hi Becky,

I knew it would be something stupid. I don't know why I thought I need underscore for on/off. I removed it and it solved the issue. Thanks a lot for your help, much appreciated. You know that your solution is pretty much the only solution I could find for broadlink.

Did you mention you are trying to develop Alexa skill? That would be amazing.

Serg

On 20 Jan 2017 21:05, "Becky Onuschak" notifications@github.com wrote:

What is the underscore between the device name and on or off? If that really exists in your code that is the issue. The name must be followed by a slave, then the word on our off. I'm working to improve that in the direct Alexa skill. On Jan 20, 2017 1:48 PM, sergejvohrin notifications@github.com wrote:Hi,

Regarding firewall, I have just tested sending the code from my phone browser (over 4g, so I am external) and it worked.

I don't know if you might think of a line of code that I can add to test if the device communicates with handler and handler runs the code?

Below few more results on the tests I have done.

1) I have just tried again, I copied the url from the handler config file and pasted to browser. I have replaced only $replaced%20$toggle to "Bar light_on" so it became http://login:password@2.124.xxx.x03:7474/code/Bar%20light_on (login, password and xxx in the ip address got modified for security reason).

When I run it in the browser it works absolutely fine. So seems the ip address in the handler are correct.

2)I have looked into the RM bridge codes and I can see this Bar light_off b4:43:0d:aa:1c:34 http://192.168.0.2:7474/code/Bar light_off Bar light_on b4:43:0d:aa:1c:34 http://192.168.0.2:7474/code/Bar light_on

So names should be good as well.

3)When I test it in smartthings app, it does nothing. It changes on/off but no action. This what I can see on smart things site: Name * Bar light

Label

Zigbee Id

Device Network Id * Bar light

Type * RM Bridge Switch Cloud

Version* Published

Config looks correct.

4) Event list records - all events are from smartthings app Bar light (Device) Events — displayed | all | from device Date Source Type Name Value User Displayed Text 2017-01-20 6:15:37.033 PM UTC 12 minutes ago DEVICE switch off Bar light switch is off 2017-01-20 6:15:35.551 PM UTC 13 minutes ago DEVICE switch on Bar light switch is on 2017-01-20 6:15:34.018 PM UTC 13 minutes ago DEVICE switch off Bar light switch is off 2017-01-20 6:15:31.655 PM UTC 13 minutes ago DEVICE switch on Bar light switch is on

5) This is my handler code (ip address masked)

// 09/01/2016 - itsamti - Added new switch definition below metadata {

definition (name: "RM Bridge Switch Cloud", namespace: "beckyricha", author: "BeckyR") { capability "Switch"

command "onPhysical" command "offPhysical" }

tiles { standardTile("switch", "device.switch", width: 2, height: 2, canChangeIcon: true) { state "off", label: '${currentValue}', action: "switch.on", icon: "st.switches.switch.off", backgroundColor: "#ffffff" state "on", label: '${currentValue}', action: "switch.off", icon: "st.switches.switch.on", backgroundColor: "#79b821" } standardTile("on", "device.switch", decoration: "flat") { state "default", label: 'On', action: "onPhysical", backgroundColor: "#ffffff" } standardTile("off", "device.switch", decoration: "flat") { state "default", label: 'Off', action: "offPhysical", backgroundColor: "#ffffff" } main "switch" details(["switch","on","off"]) } }

def parse(String description) { def pair = description.split(":") createEvent(name: pair[0].trim(), value: pair[1].trim()) }

def on() { sendEvent(name: "switch", value: "on") put('on') }

def off() { sendEvent(name: "switch", value: "off") put('off') }

def onPhysical() { sendEvent(name: "switch", value: "on", type: "physical") put('on') }

def offPhysical() { sendEvent(name: "switch", value: "off", type: "physical") put('off') }

private put(toggle) { def toReplace = device.deviceNetworkId def replaced = toReplace.replaceAll(' ', '%20') def params = [ uri: "http://login:password@2.124.xxx.x03:7474/code/$replaced%20$toggle"

] httpGet(params) }

Thanks a lot for your help

Serg

On 20 Jan 2017 13:22, "Becky Onuschak" notifications@github.com wrote:

I will fix the description. Thanks for that note. I just created a new st account under a different email and did not associate a hub. The code worked like a charm, even on devices with spaces in the name. Sorry if I'm getting rudimentary but this is such simple code I'm getting stumped. Just guessing now but will figure this out.. When you added the address into the code was it http (not HTTPS) in this format? http://username:password@external.ip address:port Have you double checked the case sensitivity of the device name?

On Jan 20, 2017 7:38 AM, sergejvohrin notifications@github.com wrote:Hi,

Btw, in the latest cloud code there is an error that makes the handler LAN instead of Cloud. The definition field had a mistake.

I understand the issue with ip address, that is not a problem as I don't have to change it that often.

Is there anything else I can provide to help to detect the issue?

Sergejs

On 20 Jan 2017 12:32, "Becky Onuschak" notifications@github.com wrote:

That is very helpful info. I do have something i want to look at in the code, but first make sure you are using the latest broadlink device handler code. Interesting that it worked before. I don't think it would be possible to detect the ip address, so it's important to just use a name service. The reason is that everything is in the cloud on this version, so it would not be able to access your network until after you tell it where it is. Vicious circle. Something may be possible in the LAN version, but it would not be necessary there as it uses your local IP. All i could imagine is something like the dynamic update services used by dns providers, where you have a script running on a pc that occasionally pings them your new ip. That may be beyond my abilities though. On Jan 20, 2017 4:23 AM, sergejvohrin notifications@github.com wrote:Hi Becky,

1) Yes, in RM bridge set to Bar light on / off

2) From smartthing app it does not do anything

3) I have added login and password to the url. I am using a dynamic external ip address, but it does not get changed too often. Btw, is it feasible to add a function that can dynamically detect your external ip address?

4) I did try to send the command via a link using external ip address and it works fine.

I think the cloud version is great as I can use my android tablet - it is always on and always at home, to host rm bridge app.

I had it working last year until I factory reset my tablet and had to redo the codes. Since then I can't get it work.

Thanks for your help.

Serg

On 20 Jan 2017 3:31 a.m., "Becky Onuschak" notifications@github.com wrote:

Thanks for including so many relevant details. this helps focus it. this does seem like something in the last step of smart things calling the rm bridge. Based on the troubleshooting you've done so far it looks like you already understand a lot, so forgive me if i ask some seemingly basic troubleshooting questions. 1) in setting up the bar light in the rm bridge did you name the codes bar light on and bar light off? 2) What happens if you send the command from the smart things app? 3) is the ip address you changed it to in the code the one to reach your device from outside using a dynamic dns or some other stable ip? If using authentication did you get that added to the code? 4) What happens if you enter that external address instead of the local one in the rm bridge test site? ( The fun2code.de site) Also, i don't use the cloud version as much so I will also take a look at my code again and make sure i don't see anything there I've learned in the other app. Did you just download that code recently? There was a change last week or so to help with a reported bug but it did work for people after that. I've also been having issues the last couple of days having to repeat known good commands a few times to make them work, so will also check smart things for outages. Please let me know if any of this helps. Becky On Jan 19, 2017 7:19 PM, sergejvohrin notifications@github.com wrote:Hi, I am following your instruction however can't understand what is the issue. I am using RM bridge. I have all codes configured, I opened my router ports and I can switch on/off light using my web browser.I created a Device Handler - beckyricha : RM Bridge Switch Cloud. I have changed login, password and ip address.I have created one of the devices to switch on bar light.I added the devices on the Alexa app. Alexa recognises the device and I can even see the code is being sent by Alexa and received by smartthings. Problem: The light does not get turned on. Here is what I have in my device setting: Bar light Device Name Bar light Label Type RM Bridge Switch Cloud Version Published Device Network Id Bar light Status ACTIVE Last Activity At 2017-01-19 10:57 PM UTC Date Created 2017-01-19 10:57 PM UTC Last Updated 2017-01-19 10:57 PM UTC Data No data found for device Current States switch: on Events List Events In Use By Event List: Bar light (Device) Events — displayed | all | from device Date Source Type Name Value User Displayed Text 2017-01-19 11:56:36.163 PM UTC 12 minutes ago DEVICE switch on Bar light switch is on 2017-01-19 11:56:35.962 PM UTC 12 minutes ago APP_COMMAND on 2017-01-19 11:55:57.650 PM UTC 12 minutes ago APP_COMMAND off 2017-01-19 11:30:43.580 PM UTC 38 minutes ago DEVICE switch off Bar light switch is off 2017-01-19 11:30:43.442 PM UTC 38 minutes ago APP_COMMAND off 2017-01-19 11:26:42.062 PM UTC 42 minutes ago DEVICE switch on Bar light switch is on 2017-01-19 11:26:42.043 PM UTC 42 minutes ago APP_COMMAND on This shows that Alexa sends the command correctly. IP address is configured correctly. Smartthings received the command. If I send the same command via web browser URL it does the action. But I am not sure why smartthings don't send the code through. Thanks Serg

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

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

—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 authored the thread. Reply to this email directly, view it on GitHub https://github.com/beckyricha/Broadlink-RM- SmartThings-Alexa/issues/18# issuecomment-274061930, or mute the thread https://github.com/notifications/unsubscribe-auth/AV8- k6BlYRqoYgdMP3Zs4rxbqeSe3-ojks5rUKllgaJpZM4LoxbO .

—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 authored the thread. Reply to this email directly, view it on GitHub https://github.com/beckyricha/Broadlink-RM-SmartThings-Alexa/issues/18# issuecomment-274070865, or mute the thread https://github.com/notifications/unsubscribe-auth/AV8- kz1YTrnBwQbw9bNiD8IjNxWcAXGrks5rULUrgaJpZM4LoxbO .

—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 authored the thread. Reply to this email directly, view it on GitHub https://github.com/beckyricha/Broadlink-RM-SmartThings-Alexa/issues/18#issuecomment-274179848, or mute the thread https://github.com/notifications/unsubscribe-auth/AV8-kxad0ZymHA6Rzp4QcWFPBOVw5caTks5rUSG3gaJpZM4LoxbO .

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

sergejvohrin commented 7 years ago

Good luck with it, please let me know if you need any help perhaps with testing.

Serg

On 21 Jan 2017 00:13, "Becky Onuschak" notifications@github.com wrote:

Yep. Was working on it today. I can't work around the net for oauth by sending the request using google drive and google scripts. Having issues getting discovery to work. Probably something silly but once i fix it the rest shouldn't be hard. On Jan 20, 2017 6:11 PM, sergejvohrin notifications@github.com wrote:Hi Becky,

I knew it would be something stupid. I don't know why I thought I need underscore for on/off. I removed it and it solved the issue. Thanks a lot for your help, much appreciated. You know that your solution is pretty much the only solution I could find for broadlink.

Did you mention you are trying to develop Alexa skill? That would be amazing.

Serg

On 20 Jan 2017 21:05, "Becky Onuschak" notifications@github.com wrote:

What is the underscore between the device name and on or off? If that really exists in your code that is the issue. The name must be followed by a slave, then the word on our off. I'm working to improve that in the direct Alexa skill. On Jan 20, 2017 1:48 PM, sergejvohrin notifications@github.com wrote:Hi,

Regarding firewall, I have just tested sending the code from my phone browser (over 4g, so I am external) and it worked.

I don't know if you might think of a line of code that I can add to test if the device communicates with handler and handler runs the code?

Below few more results on the tests I have done.

1) I have just tried again, I copied the url from the handler config file and pasted to browser. I have replaced only $replaced%20$toggle to "Bar light_on" so it became http://login:password@2.124.xxx.x03:7474/code/Bar%20light_on (login, password and xxx in the ip address got modified for security reason).

When I run it in the browser it works absolutely fine. So seems the ip address in the handler are correct.

2)I have looked into the RM bridge codes and I can see this Bar light_off b4:43:0d:aa:1c:34 http://192.168.0.2:7474/code/Bar light_off Bar light_on b4:43:0d:aa:1c:34 http://192.168.0.2:7474/code/Bar light_on

So names should be good as well.

3)When I test it in smartthings app, it does nothing. It changes on/off but no action. This what I can see on smart things site: Name * Bar light

Label

Zigbee Id

Device Network Id * Bar light

Type * RM Bridge Switch Cloud

Version* Published

Config looks correct.

4) Event list records - all events are from smartthings app Bar light (Device) Events — displayed | all | from device Date Source Type Name Value User Displayed Text 2017-01-20 6:15:37.033 PM UTC 12 minutes ago DEVICE switch off Bar light switch is off 2017-01-20 6:15:35.551 PM UTC 13 minutes ago DEVICE switch on Bar light switch is on 2017-01-20 6:15:34.018 PM UTC 13 minutes ago DEVICE switch off Bar light switch is off 2017-01-20 6:15:31.655 PM UTC 13 minutes ago DEVICE switch on Bar light switch is on

5) This is my handler code (ip address masked)

// 09/01/2016 - itsamti - Added new switch definition below metadata {

definition (name: "RM Bridge Switch Cloud", namespace: "beckyricha", author: "BeckyR") { capability "Switch"

command "onPhysical" command "offPhysical" }

tiles { standardTile("switch", "device.switch", width: 2, height: 2, canChangeIcon: true) { state "off", label: '${currentValue}', action: "switch.on", icon: "st.switches.switch.off", backgroundColor: "#ffffff" state "on", label: '${currentValue}', action: "switch.off", icon: "st.switches.switch.on", backgroundColor: "#79b821" } standardTile("on", "device.switch", decoration: "flat") { state "default", label: 'On', action: "onPhysical", backgroundColor: "#ffffff" } standardTile("off", "device.switch", decoration: "flat") { state "default", label: 'Off', action: "offPhysical", backgroundColor: "#ffffff" } main "switch" details(["switch","on","off"]) } }

def parse(String description) { def pair = description.split(":") createEvent(name: pair[0].trim(), value: pair[1].trim()) }

def on() { sendEvent(name: "switch", value: "on") put('on') }

def off() { sendEvent(name: "switch", value: "off") put('off') }

def onPhysical() { sendEvent(name: "switch", value: "on", type: "physical") put('on') }

def offPhysical() { sendEvent(name: "switch", value: "off", type: "physical") put('off') }

private put(toggle) { def toReplace = device.deviceNetworkId def replaced = toReplace.replaceAll(' ', '%20') def params = [ uri: "http://login:password@2.124.xxx.x03:7474/code/$replaced%20$toggle"

] httpGet(params) }

Thanks a lot for your help

Serg

On 20 Jan 2017 13:22, "Becky Onuschak" notifications@github.com wrote:

I will fix the description. Thanks for that note. I just created a new st account under a different email and did not associate a hub. The code worked like a charm, even on devices with spaces in the name. Sorry if I'm getting rudimentary but this is such simple code I'm getting stumped. Just guessing now but will figure this out.. When you added the address into the code was it http (not HTTPS) in this format? http://username:password@external.ip address:port Have you double checked the case sensitivity of the device name?

On Jan 20, 2017 7:38 AM, sergejvohrin notifications@github.com wrote:Hi,

Btw, in the latest cloud code there is an error that makes the handler LAN instead of Cloud. The definition field had a mistake.

I understand the issue with ip address, that is not a problem as I don't have to change it that often.

Is there anything else I can provide to help to detect the issue?

Sergejs

On 20 Jan 2017 12:32, "Becky Onuschak" notifications@github.com wrote:

That is very helpful info. I do have something i want to look at in the code, but first make sure you are using the latest broadlink device handler code. Interesting that it worked before. I don't think it would be possible to detect the ip address, so it's important to just use a name service. The reason is that everything is in the cloud on this version, so it would not be able to access your network until after you tell it where it is. Vicious circle. Something may be possible in the LAN version, but it would not be necessary there as it uses your local IP. All i could imagine is something like the dynamic update services used by dns providers, where you have a script running on a pc that occasionally pings them your new ip. That may be beyond my abilities though. On Jan 20, 2017 4:23 AM, sergejvohrin notifications@github.com wrote:Hi Becky,

1) Yes, in RM bridge set to Bar light on / off

2) From smartthing app it does not do anything

3) I have added login and password to the url. I am using a dynamic external ip address, but it does not get changed too often. Btw, is it feasible to add a function that can dynamically detect your external ip address?

4) I did try to send the command via a link using external ip address and it works fine.

I think the cloud version is great as I can use my android tablet - it is always on and always at home, to host rm bridge app.

I had it working last year until I factory reset my tablet and had to redo the codes. Since then I can't get it work.

Thanks for your help.

Serg

On 20 Jan 2017 3:31 a.m., "Becky Onuschak" notifications@github.com

wrote:

Thanks for including so many relevant details. this helps focus it. this does seem like something in the last step of smart things calling the rm bridge. Based on the troubleshooting you've done so far it looks like you already understand a lot, so forgive me if i ask some seemingly basic troubleshooting questions. 1) in setting up the bar light in the rm bridge did you name the codes bar light on and bar light off? 2) What happens if you send the command from the smart things app? 3) is the ip address you changed it to in the code the one to reach your device from outside using a dynamic dns or some other stable ip? If using authentication did you get that added to the code? 4) What happens if you enter that external address instead of the local one in the rm bridge test site? ( The fun2code.de site) Also, i don't use the cloud version as much so I will also take a look at my code again and make sure i don't see anything there I've learned in the other app. Did you just download that code recently? There was a change last week or so to help with a reported bug but it did work for people after that. I've also been having issues the last couple of days having to repeat known good commands a few times to make them work, so will also check smart things for outages. Please let me know if any of this helps. Becky On Jan 19, 2017 7:19 PM, sergejvohrin notifications@github.com wrote:Hi, I am following your instruction however can't understand what is the issue. I am using RM bridge. I have all codes configured, I opened my router ports and I can switch on/off light using my web browser.I created a Device Handler - beckyricha : RM Bridge Switch Cloud. I have changed login, password and ip address.I have created one of the devices to switch on bar light.I added the devices on the Alexa app. Alexa recognises the device and I can even see the code is being sent by Alexa and received by smartthings. Problem: The light does not get turned on. Here is what I have in my device setting: Bar light Device Name Bar light Label Type RM Bridge Switch Cloud Version Published Device Network Id Bar light Status ACTIVE Last Activity At 2017-01-19 10:57 PM UTC Date Created 2017-01-19 10:57 PM UTC Last Updated 2017-01-19 10:57 PM UTC Data No data found for device Current States switch: on Events List Events In Use By Event List: Bar light (Device) Events — displayed | all | from device Date Source Type Name Value User Displayed Text 2017-01-19 11:56:36.163 PM UTC 12 minutes ago DEVICE switch on Bar light switch is on 2017-01-19 11:56:35.962 PM UTC 12 minutes ago APP_COMMAND on 2017-01-19 11:55:57.650 PM UTC 12 minutes ago APP_COMMAND off 2017-01-19 11:30:43.580 PM UTC 38 minutes ago DEVICE switch off Bar light switch is off 2017-01-19 11:30:43.442 PM UTC 38 minutes ago APP_COMMAND off 2017-01-19 11:26:42.062 PM UTC 42 minutes ago DEVICE switch on Bar light switch is on 2017-01-19 11:26:42.043 PM UTC 42 minutes ago APP_COMMAND on This shows that Alexa sends the command correctly. IP address is configured correctly. Smartthings received the command. If I send the same command via web browser URL it does the action. But I am not sure why smartthings don't send the code through. Thanks Serg

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

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

—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 authored the thread. Reply to this email directly, view it on GitHub https://github.com/beckyricha/Broadlink-RM- SmartThings-Alexa/issues/18# issuecomment-274061930, or mute the thread https://github.com/notifications/unsubscribe-auth/AV8- k6BlYRqoYgdMP3Zs4rxbqeSe3-ojks5rUKllgaJpZM4LoxbO .

—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 authored the thread. Reply to this email directly, view it on GitHub https://github.com/beckyricha/Broadlink-RM- SmartThings-Alexa/issues/18# issuecomment-274070865, or mute the thread https://github.com/notifications/unsubscribe-auth/AV8- kz1YTrnBwQbw9bNiD8IjNxWcAXGrks5rULUrgaJpZM4LoxbO .

—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 authored the thread. Reply to this email directly, view it on GitHub https://github.com/beckyricha/Broadlink-RM-SmartThings-Alexa/issues/18# issuecomment-274179848, or mute the thread https://github.com/notifications/unsubscribe-auth/AV8- kxad0ZymHA6Rzp4QcWFPBOVw5caTks5rUSG3gaJpZM4LoxbO .

—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 authored the thread. Reply to this email directly, view it on GitHub https://github.com/beckyricha/Broadlink-RM-SmartThings-Alexa/issues/18#issuecomment-274213437, or mute the thread https://github.com/notifications/unsubscribe-auth/AV8-k9VAb1EIUmIRZnAiWDqpX7G1_-cHks5rUU24gaJpZM4LoxbO .