Open bren1818 opened 7 years ago
@jadakin no worries we replied at the same time. I'm finding a few references to the Wi-Fi bridges not working with some 3rd party apps so there's definitely something different going on with then. So while I'd love to mess with one and figure out the difference. If it's cost prohibitive to mail one to Canada don't worry about it.
@sktaylortrash Should be ok, it's very small and light. PM me your address and I'll see what I can do.. It'll be a good investment it if you can make anything of it!
@jadakin there's no PM feature on github but you can hit me up at ptaylor @ taylortrash.com and I'll get you my info
π Just wanted to say hi as I've been searching for a project like this for a while.
I have a number of TCP bulbs that i still use locally via the TCP app but i'd love to get them working remotely again.
I'm wondering if there is potential to get this project running on a raspberry pi or similar and potentially turn it in to a hub that can be controlled via IFTTT or another app to enable remote access once again. this could mean that the security is abstracted away and avoid having a username/password on a web server with ports open to the world on your local network.
Either way ill be cloning this repo very soon to have a play. βοΈ
@lukewakeford in the wiki you will find end to end instructions for a raspi install. There are additional instructions for setting up letencrypt so it can be reasonably safely exposed to the internet for IFTTT use as well. The web interface provides a built-in tool to build the calls for interaction with IFTTT's webhooks. You could then interact with verbal controls with an amazon echo or google home device. Or really any other triggering interface IFTTT provides
@lukewakeford - this may not be the answer you are looking for, but I use this (https://www.home-assistant.io/ ; https://www.home-assistant.io/components/light.greenwave/) and this (https://community.home-assistant.io/t/greenwave-reality-tcp-connected-lights-component-not-working/46831) to achieve the "remote access" feature, among others.
Another possibility for those of an Apple persuasion is Homebridge. There is a plugin (https://www.npmjs.com/package/homebridge-connectedbytcp) that works really well, although you'll need an AppleTV4 or an "at home" ipad if you want remote access.
@lukewakeford Hope the project works well for you. As you can see from the replies, still an active community, and there are plenty of options (not just this one) to control those old bulbs. Really just depends on your flavor of language and what meets your needs. At my house all the bulbs are controlled by Google Home & IFTTT integration as well as the project running on a raspberry pi. Feel free to take the code and play. I'm fairly certain I mapped out all of the bridge API calls, and those have since been ported to other projects too
Awesome, thanks for all the suggestions. looks like this will be a lot less work than i thought! π
Thank God I found this!
@bren1818 You saved me from having to replace my 6 TCP bulbs
Very happy to hear that! Enjoy!
On Mon, Oct 15, 2018, 7:12 PM Kemory Grubb notifications@github.com wrote:
Thank God I found this!
@bren1818 https://github.com/bren1818 You saved me from having to replace my 6 TCP bulbs
β You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bren1818/TCPLightingWebInterface/issues/6#issuecomment-430045590, or mute the thread https://github.com/notifications/unsubscribe-auth/ACDCH5fGqFpX7b1DdlgcExqkJ4_ghBkHks5ulRZ4gaJpZM4LEhw5 .
@k8gg - I've got home assistant installed on my raspberry pi, and i have the tcp hub paired - it can see all my lights. but none of them switch on and off, I'm guessing this is why you said:
After looking at that thread, I'm not sure what the solution actually is. any pointers?
That error, if the same looks to be complaining about getting a string not an int:
File β/usr/lib/python3.6/site-packages/greenwavereality/greenwavereality.pyβ, line 75, in turn_off scheme + β://β + host + β/gwr/gop.php?cmd=DeviceSendCommand&data=1β + token
I don't use the home assistant but based on what I see, the command looks formatted wrong. For example the command to turn on a command would be something like so:
$CMD = "cmd=DeviceSendCommand&data=
You may have to alter the Python calls, but there could be some formatting going on behind the scenes I don't see there.
Hope that helps you track things down.
On Thu, Oct 18, 2018 at 4:44 PM Luke Wakeford notifications@github.com wrote:
@k8gg https://github.com/k8gg - I've got home assistant installed on my raspberry pi, and i have the tcp hub paired - it can see all my lights. but none of them switch on and off, I'm guessing this is why you said:
and this ( https://community.home-assistant.io/t/greenwave-reality-tcp-connected-lights-component-not-working/46831 )
After looking at that thread, I'm not sure what the solution actually is. any pointers?
β You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bren1818/TCPLightingWebInterface/issues/6#issuecomment-431153757, or mute the thread https://github.com/notifications/unsubscribe-auth/ACDCH7CAH4Y3eKnCfN9SuUrQvpmPtlesks5umOf8gaJpZM4LEhw5 .
@lukewakeford I never could get the home assistant integration working reliably. You'll notice I'm the one that started the error report linked within that other thread. Honestly that component locked up my tcp hub every 2 or 3 days. So ever since I've only ever used this project as it's been 100% stable for me. If you want to use the HA component you'll probably have better luck asking in their forums as their may be users over there who've worked through the same problem. But if I remember correctly the actual fixes never got pushed to the main HA codebase and still have to be fixed manually as described in the secondary thread
Thanks for the info.
I can see that PR that never got merged, I might take a look and see if there is anything I can do to resolve.
Also Looks like an issue was opened on the python repo that hass is depending on? - https://github.com/dfiel/greenwavereality/issues/2
Cheers.
Added a PR here: https://github.com/dfiel/greenwavereality/pull/3 for the hassio fixes, just need to figure out how to test it.
If anyone was wanting to get started with this gear or do a big expansion. Here's an auction with a lot of gear for a reasonable price. I've already got 20 spare of each size and 2 spare gateways or I'd jump on it. https://www.ebay.ca/itm/TCP-Connected-Starter-Kit-with-22-bulbs/202638341551?hash=item2f2e2fb5af:g:VPAAAOSw1Hdby1A0
I love this package! I bought up about 50 bulbs when I found them on super clearance and your package has made them workable in my house!!!
Ive been playing with the scheduler (very cool feature that I am just starting to play with), but I think that only individual lights can be scheduled? Is there a way to schedule an entire room (rid)?
Also, I've tried using scenes, but it appears that scheduled scenes no longer work; I assume due to the cloud service no longer being present? Is there a way (other than IFTTT) to schedule a scene?
Also, I've tried using scenes, but it appears that scheduled scenes no longer work; I assume due to the cloud service no longer being present? Is there a way (other than IFTTT) to schedule a scene?
My scheduled scenes work you just need to make sure the time is correct on your gateway. It seems to drift without the cloud service. You can set it by choosing -Set Bridge Date Time- at the bottom of the webpage.
Just a heads up if anyone is interested in easily combining this project with Home Assistant, Node-Red or the like. I have created a fork that enables MQTT and provides a method of Home Assistant to auto discover the lights. It's available at https://github.com/sktaylortrash/TCPLightingWebInterface-MQTT
Hey Bren, I don't know if you have time to support this at this point, but, after years of working with no issue, it no longer works for me.
The page comes up with "GWR Command not returned, this likely indicates your token is expired, or invalid. Remove token and try regenerating a new one. If you are continuously seeing this message, ensure the folder is writeable or that tcp.token is writeable"
I've tried re-generating the token and nothing happens. I confirmed my gateway ip is the same and raspberry pi is the same I try: https://[my gatewayip]/gwr/ (after pressing gateway sync)
And it won't connect: "This site canβt be reached192.168.0.x refused to connect. Try: Checking the connection Checking the proxy and the firewall ERR_CONNECTION_REFUSED"
I notice the WAN light is solid red, but I assume that's okay since we just need LAN for this.
I have no idea what changed. Any ideas?
Regards, Merrick
Hey Merrick, this has happened to me before, for reasons unknown... To fix it, all I did was unplug the bridge for an hour or so, then plug it back in holding the sync button.
One word of advice, make sure when you plug it in, you plug in the correct power adapter. I incidentally fried a bridge by putting in the wrong power cord.
If that doesn't work, double check the bridge is getting an ip address.
Are you using the software on a computer or pi? One fellow found there pi updated and it messed up the php config (perhaps the curl module)?
Let me know if that works for you
On Sun, Sep 15, 2019, 11:28 AM Merrick Weintraub notifications@github.com wrote:
Hey Bren, I don't know if you have time to support this at this point, but, after years of working with no issue, it no longer works for me.
The page comes up with "GWR Command not returned, this likely indicates your token is expired, or invalid. Remove token and try regenerating a new one. If you are continuously seeing this message, ensure the folder is writeable or that tcp.token is writeable"
I've tried re-generating the token and nothing happens. I confirmed my gateway ip is the same and raspberry pi is the same I try: https://[my gatewayip]/gwr/ (after pressing gateway sync)
And it won't connect: "This site canβt be reached192.168.0.x refused to connect. Try: Checking the connection Checking the proxy and the firewall ERR_CONNECTION_REFUSED"
I notice the WAN light is solid red, but I assume that's okay since we just need LAN for this.
I have no idea what changed. Any ideas?
Regards, Merrick
β You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bren1818/TCPLightingWebInterface/issues/6?email_source=notifications&email_token=AAQMEHYA6SFWXIM2DFQRCFLQJZIBXA5CNFSM4CYSDQ42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6XTBOA#issuecomment-531574968, or mute the thread https://github.com/notifications/unsubscribe-auth/AAQMEH7MTPAZW5445Y545WTQJZIBXANCNFSM4CYSDQ4Q .
Thanks Bren. I have it unplugged now and we'll see what happens in an hour.
Regarding the php/curl settings, that would be irrelevant for just looking at the gateway page, http:// [gatewayip] /gwr, correct? That page returns Forbidden if I use https, or unavailable for http. It doesn't return a token.
I assume that test rules out server configuration or code issues, right?
Regards, Merrick
From: Bren notifications@github.com Sent: Sunday, September 15, 2019 12:29 PM To: bren1818/TCPLightingWebInterface TCPLightingWebInterface@noreply.github.com Cc: Merrick Weintraub merrickw@hotmail.com; Mention mention@noreply.github.com Subject: Re: [bren1818/TCPLightingWebInterface] Comments, Questions, open forum (2) (#6)
Hey Merrick, this has happened to me before, for reasons unknown... To fix it, all I did was unplug the bridge for an hour or so, then plug it back in holding the sync button.
One word of advice, make sure when you plug it in, you plug in the correct power adapter. I incidentally fried a bridge by putting in the wrong power cord.
If that doesn't work, double check the bridge is getting an ip address.
Are you using the software on a computer or pi? One fellow found there pi updated and it messed up the php config (perhaps the curl module)?
Let me know if that works for you
On Sun, Sep 15, 2019, 11:28 AM Merrick Weintraub notifications@github.com wrote:
Hey Bren, I don't know if you have time to support this at this point, but, after years of working with no issue, it no longer works for me.
The page comes up with "GWR Command not returned, this likely indicates your token is expired, or invalid. Remove token and try regenerating a new one. If you are continuously seeing this message, ensure the folder is writeable or that tcp.token is writeable"
I've tried re-generating the token and nothing happens. I confirmed my gateway ip is the same and raspberry pi is the same I try: https://[my gatewayip]/gwr/ (after pressing gateway sync)
And it won't connect: "This site canβt be reached192.168.0.x refused to connect. Try: Checking the connection Checking the proxy and the firewall ERR_CONNECTION_REFUSED"
I notice the WAN light is solid red, but I assume that's okay since we just need LAN for this.
I have no idea what changed. Any ideas?
Regards, Merrick
β You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bren1818/TCPLightingWebInterface/issues/6?email_source=notifications&email_token=AAQMEHYA6SFWXIM2DFQRCFLQJZIBXA5CNFSM4CYSDQ42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6XTBOA#issuecomment-531574968, or mute the thread https://github.com/notifications/unsubscribe-auth/AAQMEH7MTPAZW5445Y545WTQJZIBXANCNFSM4CYSDQ4Q .
β You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/bren1818/TCPLightingWebInterface/issues/6?email_source=notifications&email_token=AFSPAJAAE42HX4YWF4LOMOTQJZPFTA5CNFSM4CYSDQ42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6XUE2I#issuecomment-531579497, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFSPAJDMNI2MHXDZY4V6G6LQJZPFTANCNFSM4CYSDQ4Q.
Well if you are going directly via browser to the bridge page and it responds that's good. You'd want to use the https address if that's what gives you the 403.
Assuming you get that far, through the browser that tells me the bridge is ok.
The project uses curl to fetch the data similar to how the browser is used but could fail silently.
At the top of the config. Inc file you could add the following php code
error_reporting(E_ALL);
that may provide more information.
You could also delete the token file and try rebuilding it
On Sun, Sep 15, 2019, 2:12 PM Merrick Weintraub notifications@github.com wrote:
Thanks Bren. I have it unplugged now and we'll see what happens in an hour.
Regarding the php/curl settings, that would be irrelevant for just looking at the gateway page, http:// [gatewayip] /gwr, correct? That page returns Forbidden if I use https, or unavailable for http. It doesn't return a token.
I assume that test rules out server configuration or code issues, right?
Regards, Merrick
From: Bren notifications@github.com Sent: Sunday, September 15, 2019 12:29 PM To: bren1818/TCPLightingWebInterface < TCPLightingWebInterface@noreply.github.com> Cc: Merrick Weintraub merrickw@hotmail.com; Mention < mention@noreply.github.com> Subject: Re: [bren1818/TCPLightingWebInterface] Comments, Questions, open forum (2) (#6)
Hey Merrick, this has happened to me before, for reasons unknown... To fix it, all I did was unplug the bridge for an hour or so, then plug it back in holding the sync button.
One word of advice, make sure when you plug it in, you plug in the correct power adapter. I incidentally fried a bridge by putting in the wrong power cord.
If that doesn't work, double check the bridge is getting an ip address.
Are you using the software on a computer or pi? One fellow found there pi updated and it messed up the php config (perhaps the curl module)?
Let me know if that works for you
On Sun, Sep 15, 2019, 11:28 AM Merrick Weintraub <notifications@github.com
wrote:
Hey Bren, I don't know if you have time to support this at this point, but, after years of working with no issue, it no longer works for me.
The page comes up with "GWR Command not returned, this likely indicates your token is expired, or invalid. Remove token and try regenerating a new one. If you are continuously seeing this message, ensure the folder is writeable or that tcp.token is writeable"
I've tried re-generating the token and nothing happens. I confirmed my gateway ip is the same and raspberry pi is the same I try: https://[my gatewayip]/gwr/ (after pressing gateway sync)
And it won't connect: "This site canβt be reached192.168.0.x refused to connect. Try: Checking the connection Checking the proxy and the firewall ERR_CONNECTION_REFUSED"
I notice the WAN light is solid red, but I assume that's okay since we just need LAN for this.
I have no idea what changed. Any ideas?
Regards, Merrick
β You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/bren1818/TCPLightingWebInterface/issues/6?email_source=notifications&email_token=AAQMEHYA6SFWXIM2DFQRCFLQJZIBXA5CNFSM4CYSDQ42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6XTBOA#issuecomment-531574968 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AAQMEH7MTPAZW5445Y545WTQJZIBXANCNFSM4CYSDQ4Q
.
β You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub< https://github.com/bren1818/TCPLightingWebInterface/issues/6?email_source=notifications&email_token=AFSPAJAAE42HX4YWF4LOMOTQJZPFTA5CNFSM4CYSDQ42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6XUE2I#issuecomment-531579497>, or mute the thread< https://github.com/notifications/unsubscribe-auth/AFSPAJDMNI2MHXDZY4V6G6LQJZPFTANCNFSM4CYSDQ4Q
.
β You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bren1818/TCPLightingWebInterface/issues/6?email_source=notifications&email_token=AAQMEH5XLCO472EHRUIKU3LQJZ3HJA5CNFSM4CYSDQ42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6XWALY#issuecomment-531587119, or mute the thread https://github.com/notifications/unsubscribe-auth/AAQMEHZX2B5GGAWRZL3P74LQJZ3HJANCNFSM4CYSDQ4Q .
Thanks again, Bren.
After 1) leaving the bridge unplugged for one hour, 2) I reconnected/powered, 3) pressed sync 4) re-opened the /gwr/ page 5) got a new token, 6) I pasted it in tcp.token
And, I'm back in business. Web page works, IFTTT / Google Home works.
I guess the token changed or expired after years? Strange.
But thanks for the tip!
Regards, Merrick
From: Bren notifications@github.com Sent: Sunday, September 15, 2019 3:28 PM To: bren1818/TCPLightingWebInterface TCPLightingWebInterface@noreply.github.com Cc: Merrick Weintraub merrickw@hotmail.com; Mention mention@noreply.github.com Subject: Re: [bren1818/TCPLightingWebInterface] Comments, Questions, open forum (2) (#6)
Well if you are going directly via browser to the bridge page and it responds that's good. You'd want to use the https address if that's what gives you the 403.
Assuming you get that far, through the browser that tells me the bridge is ok.
The project uses curl to fetch the data similar to how the browser is used but could fail silently.
At the top of the config. Inc file you could add the following php code
error_reporting(E_ALL);
that may provide more information.
You could also delete the token file and try rebuilding it
On Sun, Sep 15, 2019, 2:12 PM Merrick Weintraub notifications@github.com wrote:
Thanks Bren. I have it unplugged now and we'll see what happens in an hour.
Regarding the php/curl settings, that would be irrelevant for just looking at the gateway page, http:// [gatewayip] /gwr, correct? That page returns Forbidden if I use https, or unavailable for http. It doesn't return a token.
I assume that test rules out server configuration or code issues, right?
Regards, Merrick
From: Bren notifications@github.com Sent: Sunday, September 15, 2019 12:29 PM To: bren1818/TCPLightingWebInterface < TCPLightingWebInterface@noreply.github.com> Cc: Merrick Weintraub merrickw@hotmail.com; Mention < mention@noreply.github.com> Subject: Re: [bren1818/TCPLightingWebInterface] Comments, Questions, open forum (2) (#6)
Hey Merrick, this has happened to me before, for reasons unknown... To fix it, all I did was unplug the bridge for an hour or so, then plug it back in holding the sync button.
One word of advice, make sure when you plug it in, you plug in the correct power adapter. I incidentally fried a bridge by putting in the wrong power cord.
If that doesn't work, double check the bridge is getting an ip address.
Are you using the software on a computer or pi? One fellow found there pi updated and it messed up the php config (perhaps the curl module)?
Let me know if that works for you
On Sun, Sep 15, 2019, 11:28 AM Merrick Weintraub <notifications@github.com
wrote:
Hey Bren, I don't know if you have time to support this at this point, but, after years of working with no issue, it no longer works for me.
The page comes up with "GWR Command not returned, this likely indicates your token is expired, or invalid. Remove token and try regenerating a new one. If you are continuously seeing this message, ensure the folder is writeable or that tcp.token is writeable"
I've tried re-generating the token and nothing happens. I confirmed my gateway ip is the same and raspberry pi is the same I try: https://[my gatewayip]/gwr/ (after pressing gateway sync)
And it won't connect: "This site canβt be reached192.168.0.x refused to connect. Try: Checking the connection Checking the proxy and the firewall ERR_CONNECTION_REFUSED"
I notice the WAN light is solid red, but I assume that's okay since we just need LAN for this.
I have no idea what changed. Any ideas?
Regards, Merrick
β You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/bren1818/TCPLightingWebInterface/issues/6?email_source=notifications&email_token=AAQMEHYA6SFWXIM2DFQRCFLQJZIBXA5CNFSM4CYSDQ42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6XTBOA#issuecomment-531574968 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AAQMEH7MTPAZW5445Y545WTQJZIBXANCNFSM4CYSDQ4Q
.
β You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub< https://github.com/bren1818/TCPLightingWebInterface/issues/6?email_source=notifications&email_token=AFSPAJAAE42HX4YWF4LOMOTQJZPFTA5CNFSM4CYSDQ42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6XUE2I#issuecomment-531579497>, or mute the thread< https://github.com/notifications/unsubscribe-auth/AFSPAJDMNI2MHXDZY4V6G6LQJZPFTANCNFSM4CYSDQ4Q
.
β You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bren1818/TCPLightingWebInterface/issues/6?email_source=notifications&email_token=AAQMEH5XLCO472EHRUIKU3LQJZ3HJA5CNFSM4CYSDQ42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6XWALY#issuecomment-531587119, or mute the thread https://github.com/notifications/unsubscribe-auth/AAQMEHZX2B5GGAWRZL3P74LQJZ3HJANCNFSM4CYSDQ4Q .
β You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/bren1818/TCPLightingWebInterface/issues/6?email_source=notifications&email_token=AFSPAJDCF3SNYZFMO5TTN4LQJ2EHLA5CNFSM4CYSDQ42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6XXKYQ#issuecomment-531592546, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFSPAJC2AHM3BK2J2A2Q4C3QJ2EHLANCNFSM4CYSDQ4Q.
No problem! Glad to hear that worked!
On Sun, Sep 15, 2019, 3:41 PM Merrick Weintraub notifications@github.com wrote:
Thanks again, Bren.
After 1) leaving the bridge unplugged for one hour, 2) I reconnected/powered, 3) pressed sync 4) re-opened the /gwr/ page 5) got a new token, 6) I pasted it in tcp.token
And, I'm back in business. Web page works, IFTTT / Google Home works.
I guess the token changed or expired after years? Strange.
But thanks for the tip!
Regards, Merrick
From: Bren notifications@github.com Sent: Sunday, September 15, 2019 3:28 PM To: bren1818/TCPLightingWebInterface < TCPLightingWebInterface@noreply.github.com> Cc: Merrick Weintraub merrickw@hotmail.com; Mention < mention@noreply.github.com> Subject: Re: [bren1818/TCPLightingWebInterface] Comments, Questions, open forum (2) (#6)
Well if you are going directly via browser to the bridge page and it responds that's good. You'd want to use the https address if that's what gives you the 403.
Assuming you get that far, through the browser that tells me the bridge is ok.
The project uses curl to fetch the data similar to how the browser is used but could fail silently.
At the top of the config. Inc file you could add the following php code
error_reporting(E_ALL);
that may provide more information.
You could also delete the token file and try rebuilding it
On Sun, Sep 15, 2019, 2:12 PM Merrick Weintraub notifications@github.com wrote:
Thanks Bren. I have it unplugged now and we'll see what happens in an hour.
Regarding the php/curl settings, that would be irrelevant for just looking at the gateway page, http:// [gatewayip] /gwr, correct? That page returns Forbidden if I use https, or unavailable for http. It doesn't return a token.
I assume that test rules out server configuration or code issues, right?
Regards, Merrick
From: Bren notifications@github.com Sent: Sunday, September 15, 2019 12:29 PM To: bren1818/TCPLightingWebInterface < TCPLightingWebInterface@noreply.github.com> Cc: Merrick Weintraub merrickw@hotmail.com; Mention < mention@noreply.github.com> Subject: Re: [bren1818/TCPLightingWebInterface] Comments, Questions, open forum (2) (#6)
Hey Merrick, this has happened to me before, for reasons unknown... To fix it, all I did was unplug the bridge for an hour or so, then plug it back in holding the sync button.
One word of advice, make sure when you plug it in, you plug in the correct power adapter. I incidentally fried a bridge by putting in the wrong power cord.
If that doesn't work, double check the bridge is getting an ip address.
Are you using the software on a computer or pi? One fellow found there pi updated and it messed up the php config (perhaps the curl module)?
Let me know if that works for you
On Sun, Sep 15, 2019, 11:28 AM Merrick Weintraub < notifications@github.com
wrote:
Hey Bren, I don't know if you have time to support this at this point, but, after years of working with no issue, it no longer works for me.
The page comes up with "GWR Command not returned, this likely indicates your token is expired, or invalid. Remove token and try regenerating a new one. If you are continuously seeing this message, ensure the folder is writeable or that tcp.token is writeable"
I've tried re-generating the token and nothing happens. I confirmed my gateway ip is the same and raspberry pi is the same I try: https://[my gatewayip]/gwr/ (after pressing gateway sync)
And it won't connect: "This site canβt be reached192.168.0.x refused to connect. Try: Checking the connection Checking the proxy and the firewall ERR_CONNECTION_REFUSED"
I notice the WAN light is solid red, but I assume that's okay since we just need LAN for this.
I have no idea what changed. Any ideas?
Regards, Merrick
β You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <
, or mute the thread <
https://github.com/notifications/unsubscribe-auth/AAQMEH7MTPAZW5445Y545WTQJZIBXANCNFSM4CYSDQ4Q
.
β You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub<
https://github.com/notifications/unsubscribe-auth/AFSPAJDMNI2MHXDZY4V6G6LQJZPFTANCNFSM4CYSDQ4Q
.
β You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/bren1818/TCPLightingWebInterface/issues/6?email_source=notifications&email_token=AAQMEH5XLCO472EHRUIKU3LQJZ3HJA5CNFSM4CYSDQ42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6XWALY#issuecomment-531587119 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AAQMEHZX2B5GGAWRZL3P74LQJZ3HJANCNFSM4CYSDQ4Q
.
β You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub< https://github.com/bren1818/TCPLightingWebInterface/issues/6?email_source=notifications&email_token=AFSPAJDCF3SNYZFMO5TTN4LQJ2EHLA5CNFSM4CYSDQ42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6XXKYQ#issuecomment-531592546>, or mute the thread< https://github.com/notifications/unsubscribe-auth/AFSPAJC2AHM3BK2J2A2Q4C3QJ2EHLANCNFSM4CYSDQ4Q
.
β You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bren1818/TCPLightingWebInterface/issues/6?email_source=notifications&email_token=AAQMEHYJOZA5BE2RNEV5YLLQJ2FVHA5CNFSM4CYSDQ42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6XXROQ#issuecomment-531593402, or mute the thread https://github.com/notifications/unsubscribe-auth/AAQMEHZZ2I2AVKSAGYBPZCTQJ2FVHANCNFSM4CYSDQ4Q .
Hi,
Can I use this to talk to the greenwave powernodes as well?
Thanks Ezekiel-au
Hi Ezekiel,
It's possible, but unlikely. I only developed this against the light bulbs, and what I could reverse engineer based on the light bulbs & lighting app. If the powernode can be controlled by native TCP Lighting app, it's possible this could work. Please let me know if it does.
Cheers
On Sat, Nov 9, 2019, 6:23 PM ezekiel-au notifications@github.com wrote:
Hi,
Can I use this to talk to the greenwave powernodes as well?
Thanks Ezekiel-au
β You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bren1818/TCPLightingWebInterface/issues/6?email_source=notifications&email_token=AAQMEH2NEJFIBFEIJPY4RTLQS5BAHA5CNFSM4CYSDQ42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDURODQ#issuecomment-552146702, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQMEH3HQCVPCJJGWQMMN7TQS5BAHANCNFSM4CYSDQ4Q .
Thanks for the fast response.
I've tried a few apps and it looks like this is a bust.
I guess the only thing now is to purchase a zwave dongle and sync the powernodes to that and hopefully they work as they use to back in the day.
A bit more research before I pull the trigger on this as I'm really interested in the power consumption data.
Regards,
Ezekiel
On Sun, 10 Nov 2019, 12:08 pm Bren, notifications@github.com wrote:
Hi Ezekiel,
It's possible, but unlikely. I only developed this against the light bulbs, and what I could reverse engineer based on the light bulbs & lighting app. If the powernode can be controlled by native TCP Lighting app, it's possible this could work. Please let me know if it does.
Cheers
On Sat, Nov 9, 2019, 6:23 PM ezekiel-au notifications@github.com wrote:
Hi,
Can I use this to talk to the greenwave powernodes as well?
Thanks Ezekiel-au
β You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/bren1818/TCPLightingWebInterface/issues/6?email_source=notifications&email_token=AAQMEH2NEJFIBFEIJPY4RTLQS5BAHA5CNFSM4CYSDQ42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDURODQ#issuecomment-552146702 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AAQMEH3HQCVPCJJGWQMMN7TQS5BAHANCNFSM4CYSDQ4Q
.
β You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bren1818/TCPLightingWebInterface/issues/6?email_source=notifications&email_token=ANXIUP2LHQEG2E2YC6TUGNDQS5NKNA5CNFSM4CYSDQ42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDUS2UA#issuecomment-552152400, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANXIUP7EZM4FSQI6QQ4Y2NTQS5NKNANCNFSM4CYSDQ4Q .
Hi Bren,
No idea if you support this code anymore, but extra "quarantine" time, I FINALLY got around to trying to set this up.
I'm trying to run this on Raspberry Pi 3 Model B running Buster.
I get the dreaded "GWR Command not returned" error from the webpage.
Attempting a secure http connection to the IP of the TCP hub results in a 403 Forbidden page, so I believe I have the right URL...
I tried your, one-time suggested test of:
<?php echo "Hello World"; ?>
and can successfully load that in the browser.
I've also tried your suggestion of
error_reporting(E_ALL);
and I don't see any other errors on the page. (I don't know PHP though, so perhaps they get logged somewhere else?)
My suspicion is that my problem might have something to do with having to use:
sudo apt-get install php libapache2-mod-php php7.3-curl php-xml php-pear php7.3-mysql php7.3-cgi
rather than your suggested:
sudo apt-get install php libapache2-mod-php php7.0-curl php-xml php-pear php7.0-mysql php7.0-cgi
Any guidance or suggestions? I'm definitely on the newer end of this, but hungry to regain control of these 15 lights!
Thanks in advance for any suggestions or guidance, Reg
PHP 7.3 should be fine. Did you manually create the tcp.token file and make it writeable?
Hey there, as mentioned php 7.3 should work. One thing you may have to do is uncomment line 39 of include.php :
curl_setopt($ch, CURLOPT_SSL_CIPHER_LIST, 'DEFAULT:!DH');
I left it in the code as it shouldn't be needed but can be depending on software configuration.
Try that and let us know. Sometimes the bridge can also be a bit flakey and need to be left unplugged for a while and then power cycled.
Hope that helps, good luck
On Fri, Apr 24, 2020, 10:11 PM crutchre-source notifications@github.com wrote:
Hi Bren,
No idea if you support this code anymore, but extra "quarantine" time, I FINALLY got around to trying to set this up.
I'm trying to run this on Raspberry Pi 3 Model B running Buster.
I get the dreaded "GWR Command not returned" error from the webpage.
Attempting a secure http connection to the IP of the TCP hub results in a 403 Forbidden page, so I believe I have the right URL...
I tried your, one-time suggested test of: <?php echo "Hello World"; ?> and can successfully load that in the browser.
I've also tried your suggestion of error_reporting(E_ALL);
and I don't see any other errors on the page. (I don't know PHP though, so perhaps they get logged somewhere else?)
My suspicion is that my problem might have something to do with having to use: sudo apt-get install php libapache2-mod-php php7.3-curl php-xml php-pear php7.3-mysql php7.3-cgi
rather than your suggested: sudo apt-get install php libapache2-mod-php php7.0-curl php-xml php-pear php7.0-mysql php7.0-cgi
Any guidance or suggestions? I'm definitely on the newer end of this, but hungry to regain control of these 15 lights!
Thanks in advance for any suggestions or guidance, Reg
β You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bren1818/TCPLightingWebInterface/issues/6#issuecomment-619303794, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQMEHZEFSWYHXEFJF5NXG3ROJBEXANCNFSM4CYSDQ4Q .
Bren, Paul,
Thank you for the suggestions. Here is what I've tried, but still no success.
I've noticed that now when I refresh the website, it deletes the tcp.token file.
I tried adding this to the index.php file to see what kind of response I'm getting from the getCurlReturn() command:
echo '<p>'.$result.'</p>';
When the router is on it returns: 1401
Does that provide any kind of clue what the trouble might be?
Thanks again for the help, Reg
Bren, Paul,
Never mind, I forgot that I had tried setting the USE_TOKEN_FILE to 0. Setting it back to 1 "seems" to have fixed it!
Thanks.
Awesome! So all is working for you now?
Enjoy your lights again π
On Sat, Apr 25, 2020, 2:15 PM crutchre-source notifications@github.com wrote:
Bren, Paul,
Never mind, I forgot that I had tried setting the USE_TOKEN_FILE to 0. Setting it back to 1 "seems" to have fixed it!
Thanks.
β You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bren1818/TCPLightingWebInterface/issues/6#issuecomment-619420094, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQMEHZIXVXY6B23KQ5OAGLROMSD5ANCNFSM4CYSDQ4Q .
It's definitely progress! My main goal is to make it controllable via Alexa, so I think that means that IFTTT is next up for me. (So there's a chance I may be back asking for more help... π)
But moving forward! I'll let you know if I make it to the end...
Well, this project will definitely work with IFTTT. Thatβs how my lights are configured (albeit with Google Home vs Alexa) using ifttt. You just have to make sure you have a static dns and port forward accordingly if required.
Best of luck
On Sat, Apr 25, 2020 at 2:52 PM crutchre-source notifications@github.com wrote:
It's definitely progress! My main goal is to make it controllable via Alexa, so I think that means that IFTTT is next up for me. (So there's a chance I may be back asking for more help... π)
But moving forward! I'll let you know if I make it to the end...
β You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bren1818/TCPLightingWebInterface/issues/6#issuecomment-619424884, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQMEH56V6EDI6ZBSXTY2ATROMWQVANCNFSM4CYSDQ4Q .
Awesome glad you got it working. Just curious, are you only looking for Alexa integration or do you have something like Home Assistant or Node-Red in your plans?
@crutchre-source other than the PHP installation commands. Were there any other changes from the install commands in the wiki? I wrote those against Raspbian Jessie so I should probably update for Buster. But if it was really only that then I will just change that one command.
@sktaylortrash The other thing that gave (and is now giving) me an error, was the presence of that .htaccess file in the /var/www/html folder. The website gives an "Internal Server Error" when it is present. When I check the apache error logs it says something about "no comments allowed on .htaccess". I confirmed that I did chmod 777 on it. I know little to nothing about apache, but my brief searching seems to indicate to me that recent versions of apache don't like something about using .htacess, and they want me to edit the main server config file (?). Something about this approach not being very secure and people shouldn't do it. I was just about to dig into it a little more to try and figure it out. If it's obvious to you let me know. Otherwise, I'll report what I find out..
@sktaylortrash Oh- missed your other comment. For me, just Alexa integration..
Okay looked that up To fix the .htaccess errors - try 2 things
An .htaccess will need to not be 777 - it should probably be 644. You can delete the file if you wish, its more of a template which allows you to secure your document root using some of apache's build in methods. I have found depending on if you're using apache 2.2. vs 2.4 the htaccess syntax can vary.
I'm currently using: Apache/2.4.38 on raspbian.
Options -Indexes RewriteEngine On
Order deny,allow Deny from all Allow from 192.168.1.0/24
This allows access to the api.php from everywhere and access to everything else from local computers. Make sure you have a password specified in your config - this is how you can secure calls to your project. You can use the query builder to build out IFTTT web calls which will end up looking something like this:
http/s://{{your-dns-address}}/api.php?fx=toggle&type=room&uid=0&val=1&password={{yourpassword}}
Usually the thing which trips people up is the configuration on the router and getting the dns pointed. Lately I've been using: https://www.dynu.com/ for free dns pointing over no-ip. It also has an updater script which can be used to auto update which is nice.
On Sat, Apr 25, 2020, 3:12 PM crutchre-source notifications@github.com wrote:
@sktaylortrash https://github.com/sktaylortrash The other thing that gave (and is now giving) me an error, was the presence of that .htaccess file in the /var/www/html folder. The website gives an "Internal Server Error" when it is present. When I check the apache error logs it says something about "no comments allowed on .htaccess". I confirmed that I did chmod 777 on it. I know little to nothing about apache, but my brief searching seems to indicate to me that recent versions of apache don't like something about using .htacess, and they want me to edit the main server config file (?). Something about this approach not being very secure and people shouldn't do it. I was just about to dig into it a little more to try and figure it out. If it's obvious to you let me know. Otherwise, I'll report what I find out..
β You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bren1818/TCPLightingWebInterface/issues/6#issuecomment-619427252, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQMEHZRUKNIOW7OFYU7NF3ROMYYJANCNFSM4CYSDQ4Q .
@bren1818 you could tweak the docs. I have static IPs and registered domains. So that bit was always under-tested from my end.
Wow! Thanks! Let's see if I can keep up with you two:
' Didn't seem to fix it.
I matched the .htaccess document to match yours Bren, but didn't seem to fix.
I will try setting up the dynamic dns and encryption and see if that puts me back on track. I'll report back after I get those steps done.
Yeah, I'll make a note on that. Having a static IP is a huge bonus. Non-static IPs can definitely be pain. Tricky to troubleshoot and there is propagation delays. Services also seem to change their offerings.
On Sat, Apr 25, 2020 at 3:30 PM Paul notifications@github.com wrote:
@bren1818 https://github.com/bren1818 you could tweak the docs. I have static IPs and registered domains. So that bit was always under-tested from my end.
β You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bren1818/TCPLightingWebInterface/issues/6#issuecomment-619429509, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQMEHZ2AQ64R2XGXCOM4DTROM24HANCNFSM4CYSDQ4Q .
To get started and avoid road blocks, I suggest removing (or renaming the .htaccess) to start. Make sure the project is accessible locally and remotely. You'll also need to make sure that the .htaccess is owned appropriately with the proper permissions. The sample I provided should be pretty vanilla. I think in a default setup the owner should be www-data with the same group. If you do an ls -lah it should match your other files.
If you opt to use https (encryption) using certbot to setup the encryption can make your life easier too. Its not required though, just an extra layer of protection. You don't need it to make your project work with IFTTT (unless something has changed)
If it helps my virtual host configuration looks something like this:
<VirtualHost *:{PORT}> DocumentRoot /var/www/html/{projectFolder} <Directory "/var/www/html/{projectFolder} "> allow from all Options None Require all granted
On Sat, Apr 25, 2020 at 3:49 PM crutchre-source notifications@github.com wrote:
Wow! Thanks! Let's see if I can keep up with you two:
- I'm also using Apache/2.4.38 (Raspbian)
- I haven't setup dns pointing yet nor the encryption yet. (I found the full walk-through after I had followed the steps in the Install & Config section of the wiki.)
- So my subnet currently is 192.168.1.0/24 I believe (?). (All my other home devices start 192.168...(?))
- Commenting out these two lines: '#Allow from 127.0.0.1 #localhost
Allow from ::1 #localhost
' Didn't seem to fix it.
I matched the .htaccess document to match yours Bren, but didn't seem to fix.
I will try setting up the dynamic dns and encryption and see if that puts me back on track. I'll report back after I get those steps done.
β You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bren1818/TCPLightingWebInterface/issues/6#issuecomment-619431739, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQMEH5ZBYNITZDDPTA4RALROM5DZANCNFSM4CYSDQ4Q .
Ok here is my update:
I can access the webpage from:
but
results in a "website not found". So something seems to be up with the certbot step. Also, I was planning on this being a stand-alone server, so I don't think I need to do anything with virtual host(?).
I have another question though: I was able to reserve an IP in my router for the Pi, so do I still need to edit the dhcpcd.conf file to add the static IP there?
I'm fading for tonight, but hope to press onwards again tomorrow!
Thanks again for the help!
Ah! Never mind- I hadn't turned on port forwarding for 443. (Why do I always figure something out right after I post?!) Now I can access it through https and the custom url.
Ok making tons of progress. Removing .htaccess allows me to control the lights using Alexa via IFTTT. Hurray!!!
Now I'm just trying to figure out how to properly use Apache directives to stop any ol' person from controlling the lights.
According to the apache docs, it sounds like I should try and make the changes within the apache.conf file rather than using a .htaccess file.. So here is what I currently have:
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
#<Directory /var/www/html>
# Options -Indexes
# RewriteEngine On
# Order deny,allow
# Deny from all
# Allow from 192.168.1.0/24
#</Directory>
<Files /var/www/html/api.php>
Allow from all
</Files>
If I uncomment that the block above, I can still access the page within the local LAN, and I get a 403 error if I try to access from outside the LAN (great!)- BUT it seems that api.php becomes inaccessible as well and breaks the IFTTT web hook. (boo!).
Any idea on how to properly format the directives to keep api.php accessible by all?
As always- thanks!
Closed the last topic as it had gotten really lengthy. Opening this one for more questions