TCPLightingWebInterface icon indicating copy to clipboard operation
TCPLightingWebInterface copied to clipboard

Comments, Questions, open forum (2)

Open bren1818 opened this issue 8 years ago β€’ 278 comments

Closed the last topic as it had gotten really lengthy. Opening this one for more questions

bren1818 avatar Dec 05 '16 17:12 bren1818

Thanks Bren for your previous responses; looking forward to any IFTTT or SmartThings development to keep these bulbs alive into the future ...

merrickw avatar Dec 06 '16 23:12 merrickw

Hi Bren,

Happy New Year!

Just curious if you have any thing in the works for IFTTT or SmartThings? Ultimately I'd love to get Google Home to control these bulbs.

Regards, Merrick

merrickw avatar Jan 13 '17 17:01 merrickw

Hey @merrickw - nothing yet. Smart things requires me to have the Samsung Bridge which I dont have. I did look into the IFTTT. They have an applet for 'Connect Greenwave Systems' which of course doesnt work since it's tied to the Greenwave servers they took down... So I have 'applied' to be a maker: image Which is still labelled as 'coming soon'. I mean all we really need is an applet which allows http requests, so it shouldn't be hard, but its likely harder than what IFTTT wants for the average user...

I have been re-writing some of the code, so I can support more than one bridge at a time and control HUE lights too (inc colour). It's not really ready for prime time... Needs some polish, but if you want to experiment it is in the non master branch.

Cheers

bren1818 avatar Jan 14 '17 23:01 bren1818

Thanks for the update. The IFTTT sounds the most interesting, but I guess it can only work if you have your local web server running... which makes sense, you wouldn't want the cloud turning off your lights, with all the hacking going on .... I haven't bought any Hue lights yet ... my TCP's got me covered ...

merrickw avatar Jan 16 '17 03:01 merrickw

Now that the Greenwave link got sacked, the clock resides in my TCP gateway is drifting away every single day. So over last 6 months or so, mine is now like 20-30 minutes ahead. Sunrise/sunset schedule would be way off also.

So, quick questions: Is there a way to correct the clock in gateway via some UI on local web server? Or better yet, get the clock to sync with local web server automatically/periodically?

Count this as a feature request. :)

Oh BTW, I was talking about the clock inside the gateway. I understand that the scheduler on local web server would trigger just fine.

And, great work Bren! I'm excited!!

k8gg avatar Jan 28 '17 05:01 k8gg

@k8gg Hey there - I'm guessing you're looking at the regular branch versus dev? I'll look into time setting. I'm fairly certain it will be possible. Stay tuned...

bren1818 avatar Jan 28 '17 18:01 bren1818

Yes, branch. Great work you've got so far! Also the IFTTT idea sounds awesome. :)

k8gg avatar Jan 28 '17 18:01 k8gg

@k8gg - Done - pull master, should have 3 updates, index.php, setDateTime.php and a JS file. I have made the new screen to set date and time. I kinda whipped it together... so hope it works. Pretty simple. There appears to be functions to set time zone too, but this should do the trick... I don't use the built in Bridge functions so please let me know. Thanks!

image

bren1818 avatar Jan 28 '17 19:01 bren1818

This date tweak worked awesome for me thanks so much

sktaylortrash avatar Jan 31 '17 00:01 sktaylortrash

@sktaylortrash - Awesome glad to hear it. I just need to find some time to finish the build I have in progress in Dev which has Hue integration and hooks for multiple bridges. Not enough hours in a day :)

bren1818 avatar Jan 31 '17 00:01 bren1818

Yup. The date/time update interface worked. Thanks a lot @bren1818 !

k8gg avatar Jan 31 '17 17:01 k8gg

@bren1818 forgive my asking but what would the use case for multiple bridges be?

sktaylortrash avatar Feb 01 '17 01:02 sktaylortrash

My guess: to have one single web UI that would control not only TCP bulbs but also Hue or wemo or even zwave bulbs... Yes?

On Jan 31, 2017 8:21 PM, "sktaylortrash" [email protected] wrote:

@bren1818 https://github.com/bren1818 forgive my asking but what would the use case for multiple bridges be?

β€” 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-276546536, or mute the thread https://github.com/notifications/unsubscribe-auth/AYOM2_N5MOeC6QtoLMjkULpEwk4rtE2Nks5rX94ZgaJpZM4LEhw5 .

k8gg avatar Feb 01 '17 02:02 k8gg

Oh I get multiple brands I meant multiple TCP bridges

sktaylortrash avatar Feb 01 '17 02:02 sktaylortrash

@sktaylortrash - reason for multiple TCP bridges is two fold. I bought up some of the bridge packs when they were clearing them out. At one point I accidentally messed up my bridge, which required me to re-flash it and downgrade the firmware. Before I got it to work again, I got kind of frustrated and started setting up a second bridge so I could continue development on this project and so I could control my bulbs via a web interface. This meant re-setting up all my existing bulbs on the new bridge. Its a lengthy thing to do, so I was tackling it room by room, every few days. When I eventually got my initial bridge working again, I had half my bulbs on one bridge and the other half on the other bridge. I was going to migrate all the bulbs back to one bridge, however - by having two bridges it offered one advantage, since I use remotes, having one bridge meant I only had 4 buttons to control all the lights in my house, both upstairs and downstairs. By having a second bridge, I could pair half my remotes with the downstairs, and half the remotes with the upstairs, meaning I had 8 buttons to control the house. Not a huge deal, but comes in handy when you're fumbling around in the dark, so you dont turn on the whole house but half of it :)

@k8gg is also right. I wanted to extend my project to work with at least Hue since I have some Hue lights, and by having two TCP bridges, it allows me to test code compatibility with multiple hubs.

Hope that answers your question πŸ‘

bren1818 avatar Feb 01 '17 02:02 bren1818

@bren1818 so I totally should have thought of the remote thing. I have 3 in a drawer I'll never use for that reason. May need to pickup another bridge or two. It's not like I now have 24 bulbs running or anything :)

sktaylortrash avatar Feb 01 '17 03:02 sktaylortrash

Another way to use 2 remotes and have 8 zones is to keep 4 bulbs off the gateway, and connect to a remote directly. I did this so one remote controls 4 bulbs in my upstairs bedroom, off the gateway. The main floor is on the gateway. This works perfectly since I don't need scheduling or remote access for my bedroom lights, just the handy remote. The support guys at TCP walked me through how to set that up.

merrickw avatar Feb 01 '17 03:02 merrickw

@sktaylortrash haha, I can't say I have that many either... but in the bedroom, we have two lamps on either side of the bed and 3 bulbs acting as one appliance in the ceiling fan, so it's nice to have the remote to turn on/off and dim the lights that way. I stuck some Velcro on the back of the remotes (I have 5 of them) and stuck them to the wall to use as a switch too. They're handy but at the same time, remotes... remotes everywhere haha

@merrickw makes a very good point too. You don't necessarily need to bridges to accomplish this. It just sorta worked out that way for me.

bren1818 avatar Feb 01 '17 03:02 bren1818

Hi Bren, I read about this project and am excited that I can possibly now remotely connect to my bulbs from outside the house. I have setup IIS on windows machine with web application addons for php. My problem is I cannot get token from tcp box. I press the Sync button on the TCP box with green leds blinking around and then on the windows machine browser I type http://localhost/index.php. The browser connects to tcp box and says waiting for local host. Finally it says with error "Firefox has detected that server is redirecting the request for this address in a way that will never complete" I have added ip adresss in the include.php. The version of firmware on the tcp box is 3.0.80. Could this version be causing issues.
Please advise how I can get token. My tcp app on iPad and iPhone work fine when I am at home on local LAN

Thanks Viji

vijimaini avatar Mar 15 '17 18:03 vijimaini

Hi @vijimaini - shouldn't be an issue, I'm pretty sure my bridges have the latest firmware. The more likely issue is you're using IIS. - I cant say I have tested with IIS.

In your IIS folder, could you create a simple php file like: <?php echo "Hello World"; ?> and see if you can load that? It could also be that with IIS you do not have the curl library being loaded.

I recommend you download XAMPP and try the project in there first. Let me know if that helps.

Cheers!

bren1818 avatar Mar 15 '17 18:03 bren1818

Bren, I installed XAMPP and it works perfectly. Thanks for your help.

vijimaini avatar Mar 15 '17 19:03 vijimaini

@vijimaini Glad to hear that. When you use IIS, you'd likely have needed to enable some php extensions which come pre-enabled on xampp. Fortunately you can use Apache and IIS simultaneously.

Cheers,

Bren

bren1818 avatar Mar 15 '17 19:03 bren1818

Hi Bren, I am newbie to development, could you please me setting this up. I am NAS storage. Is there any documentation that can help me seeting up from scratch, as i ddon't have development background. Regards

shrms avatar Mar 15 '17 22:03 shrms

@shrms - Sure, its pretty straightforward and you wont need any development experience. You will however need to have a bit of knowledge about home networking.

So first things first, download yourself XAMPP: https://www.apachefriends.org/index.html its free. I suggest getting the version with PHP 5.6.3 image

Install the application, if you use the defaults, it will set you up an htdocs folder in: C:\xampp\htdocs

this is the folder you want to download this project into. So download the zip image

and extract its contents into the folder, the htdocs folder should look something like this:

image

now the tricky part, using a text editor of your choice, (I suggest Notepad++) and edit the include.php file.

You can leave pretty much everything as is, with one exception - edit LINE 8, and replace the IP address with the local IP address of your lighting bridge.

image

You can usually find this in your routers DHCP/client listing. Once you have the IP in there, save the file,.

Press the Sync button on your bridge, and then open up localhost. (go to a browser and type: http://localhost)

In theory, that's it, it should display your pre-setup bulbs and allow you to control them. Let me know if you have any problems. There should also be some documentation here: https://github.com/bren1818/TCPLightingWebInterface/issues/3 and https://github.com/bren1818/TCPLightingWebInterface/issues/1 which may be of use.

Best of luck!

bren1818 avatar Mar 15 '17 23:03 bren1818

Hi Bren, Thanks for sending the instructions, i follwed the same and updated the IP address aswell. I got below message

'If you are seeing this, you haven't generated your token yet. Could not fetch token. Ensure you have the correct IP for your bridge and that you have hit the sync button before running this. Since you ae not using the token file option, ensure you paste your token in the include.php.

Regards

shrms avatar Mar 16 '17 00:03 shrms

@shrms - are you sure you pressed the sync button and have the correct IP of your bridge? As for the token file, did a "tcp.token" file get generated in the htdocs folder?

If you have the right IP for you bridge, in theory you can navigate to: https://{BRIDGE-IP}/gwr/

If you get a "privacy error" (this is from the Bridge, not my code) just allow it and see if the page resolves. If the request times out, you likely have the wrong IP.

You can also try changing the LIGHTING_PORT (line 9) to 80 instead of 443, but most bridges will be on 443.

bren1818 avatar Mar 16 '17 00:03 bren1818

Hi @bren1818 - is there a way to setup sunset and sunrise time. This feature using IOS app does not work. The tcp device must have been getting this information from the Gwr server, before it shutdown. The feature to adjust time is great. The time on my device was out by 35 minutes. Thanks

vijimaini avatar Mar 16 '17 17:03 vijimaini

@vijimaini I haven't developed code yet to work with the sunrise/sunset natively, but I did develop a scheduler which triggers the lights at programmed times using the underlying API for this app. I'll have a look to see if I can emulate or develop that function, but I never used it.

Cheers

bren1818 avatar Mar 16 '17 22:03 bren1818

@bren1818 Ok, I was wondering if the sunset / sunrise values were stored on device that was updated daily from cloud. The API test script shows value to be sunset, which means it may be stored somewhere on device. Thanks

vijimaini avatar Mar 16 '17 22:03 vijimaini

@vijimaini Im fairly certain the cloud stuff has been disabled altogether. The bridge used to have a nice web interface, but it was removed during one of the bridge updates. I have the older firmware files for the bridges, however the cloud update is still on, so even if you go through the tricky downgrade process, when the bridges phone home, they re-update unless you block the domain on your network.

Which API showed you the desired value? (sunset?) I'm guessing the sunrise/sunset you're referring to was one of the 'smart controls'. I can probably look into whipping something up to edit that. I thought I had, but perhaps not. I've been working on a newer build of this, which handles multiple bridges and is quicker, but haven't had the time lately to hunker down and get to it haha, maybe in the near future :)

bren1818 avatar Mar 16 '17 23:03 bren1818

This is where I saw sunset from get scene list GWSceneGetList Array ( [version] => 1 [rc] => 200 [enable] => 1 [scene] => Array ( [0] => Array ( [sid] => 1 [active] => 0 [name] => Home [desc] => Home [order] => 0 [type] => schedulecustom [icon] => images/scene/home.png [islocal] => 1 [every] => 0,1,2,3,4,5,6 [starttime] => sunset [stoptime] => 23:15

Thanks Viji

vijimaini avatar Mar 16 '17 23:03 vijimaini

Hi Bren,

Yes, i pressed the sync button, but no file got generated in htdocs folder.

Yes, Ip is correct, even i tried with https://{BRIDGE-IP}/gwr/ but in am getting 403 forbidden. I checked in both ports but no luck.

MSG that i am getting now is.:

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

shrms avatar Mar 16 '17 23:03 shrms

@shrms hmm that is odd. What operating system and web server are you using? On your router are your ips set as static or do they expire?

bren1818 avatar Mar 17 '17 00:03 bren1818

Bren ..i am on windows 7 and i installed XAMPP. On router its static ip on router.

Attached is picture of my tcp device 20170316_233017_hdr

shrms avatar Mar 17 '17 00:03 shrms

@shrms - Any luck getting it to work? If you are getting 403 forbidden, technically the bridge is communicating. I'm thinking either you do not have curl enabled (it should be by default with XAMPP so thats a head scratcher) or perhaps you have an over-active firewall. Did you allow XAMPP to communicate with local networks when you installed it?

You can also try the build in my DEV Branch if you like, please let me know!

bren1818 avatar Mar 22 '17 02:03 bren1818

Hi Bren, I was travelling, today again i checked but its same message 'GWR Command not returned'

How can i try the build in your dev branch, you might need to guide me a bit there.

shrms avatar Mar 31 '17 21:03 shrms

@shrms hope the travelling was good, my thought is if you're getting the Command not returned, it means either CURL is not working (make sure it is enabled in PHP - it should be since you said you're using XAMPP and it is enabled by default) or you perhaps have a firewall rule which is blocking the traffic (most likely), OR you have the wrong IP of the bridge, which I'm pretty sure you dont.

Try disabling your firewall for starters, and then go to a wired connection. Beyond that...

quick question - are you Windows and if so are you on Wifi?

The link to the dev branch is here:

https://github.com/bren1818/TCPLightingWebInterface/tree/Dev very simiar setup to the standard branch, im just testing some other things out...

bren1818 avatar Mar 31 '17 22:03 bren1818

Random question does anyone remember how to pair a remote to a bulb without a gateway. Was gonna give my parents some bulbs and a remote but can't remember how

ghost avatar Apr 19 '17 19:04 ghost

I saved these instructions from TCP support:

II. No Gateway, remote only

  1. Resetting the remote (remove from gateway and bulbs)

    (Remote Factory Reset): If you are sure you want to reset the remote control, use the following steps:

  1. Remove the battery cover from the back of the remote control.
    
  2. Remove the batteries from the remote control.
    
  3. Press and hold the Program button.
    
  4. While still pressing the Program button, reinsert the batteries into the remote control.
    
  5. Release the Program button.
    
  1. Resetting the bulbs:

    1.) Take the lamps from the gateway you are NOT using and insert them into a socket (preferably one that is controlled by a switch). 2.) You will begin with the lights turned OFF 3.) Power cycle the lights 3 times by turning them on/off, on/off, on/off - after three, turn them on for a fourth time and leave them on - after several seconds, the bulbs should start pulsing, which means they are ready to be paired.

  2. Pair the bulbs with your factory reset remote:

    1. With the bulb dimming and brightening, take your factory reset remote and press and hold the first lighting group button.
    2. The indicator light for that particular lighting group should begin to flash steadily, this means that the lighting group is active and ready to accept new bulbs.
    3. The indicator light should begin to flash rapidly shortly thereafter, this means that the remote control has found a new lightbulb within range. After the lightbulb is successfully added to the remote, the indicator light will stop flashing
    4. Once the group indicator light turns a solid color (green) a lightbulb has been successfully added to the remote (the bulb should also stop pulsing at this time)

You should only need to factory reset the remote 1 time, that will allow you to add bulbs to the remote directly.

merrickw avatar Apr 19 '17 19:04 merrickw

Oh that's good info to have.

sktaylortrash avatar Apr 19 '17 19:04 sktaylortrash

Hi Bren,

Just checking if you have anything in works for IFTTT or Smarthings integration? I'd love to figure out how to integrate this gateway/bulbs into home automation ... like Google Home ....

Thanks, Merrick

merrickw avatar May 05 '17 15:05 merrickw

Hi Merrick, I haven't done any integration yet, that being said, I just checked the IFTTT platform and looks like they're finally allowing development integration.

https://platform.ifttt.com/docs/hello_world#give-ifttt-your-api-url

I'll have to read up on it because I could likely make an Applet, but you would also need your own copy to point to your local network endpoint.

I've been pretty swamped lately but I'll see if there's an easy way to do so.

On Fri, May 5, 2017 at 11:36 AM, merrickw [email protected] wrote:

Hi Bren,

Just checking if you have anything in works for IFTTT or Smarthings integration? I'd love to figure out how to integrate this gateway/bulbs into home automation ... like Google Home ....

Thanks, 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#issuecomment-299498329, or mute the thread https://github.com/notifications/unsubscribe-auth/ACDCH97h3crtq-itVJnw4W_R7pqeIgKMks5r20IAgaJpZM4LEhw5 .

bren1818 avatar May 09 '17 17:05 bren1818

Hi Bren. I am too unable to get the token file generated either.

If you ssh into the hub there is a file under /media/config/tokens that appears to contain the tokens known to the hub. Maybe we can just copy one of these tokens (or create a random new one??) and use it instead?

inahas avatar May 19 '17 02:05 inahas

I've never tried that, it could work, but I'd doubt it.

You pressed the sync button and hit the index page? You have curl enabled?

On May 18, 2017 10:41 PM, "inahas" [email protected] wrote:

Hi Bren. I am too unable to get the token file generated either.

If you ssh into the hub there is a file under /media/config/tokens that appears to contain the tokens known to the hub. Maybe we can just copy one of these tokens (or create a random new one??) and use it instead?

β€” 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-302593718, or mute the thread https://github.com/notifications/unsubscribe-auth/ACDCH72FxXgEnPaHoPQLHUzbdXDt7u-Vks5r7QFNgaJpZM4LEhw5 .

bren1818 avatar May 19 '17 02:05 bren1818

Switching the LIGHTNING_PORT to 80 fixed it. It works now, but I still don't see a token file under htdocs!

inahas avatar May 19 '17 02:05 inahas

And yes I pressed the Sync page and kept refreshing the http://localhost page. I got the little graphic instructing me to get the token. How do I enable curl?

inahas avatar May 19 '17 02:05 inahas

I guess depending on how the bridge is running, you may have to set it to :80.

Are you using Xampp? It gives people the least grief. If you're feeling adventurous you can check out my Dev branch and try the new build. It isn't perfect but has most of the function.

I'm afk currently but I'll check it after work tomorrow if you don't figure it out by then :)

On May 18, 2017 10:50 PM, "inahas" [email protected] wrote:

Switching the LIGHTNING_PORT to 80 fixed it. It works now, but I still don't see a token file under htdocs!

β€” 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-302594908, or mute the thread https://github.com/notifications/unsubscribe-auth/ACDCH4w9YXsEIlC1LGCQdoHUBuWgiqsAks5r7QN3gaJpZM4LEhw5 .

bren1818 avatar May 19 '17 03:05 bren1818

Yes I followed the instructions above precisely. Maybe firmware 3.0.39 didn't use tokens? If I type this in the browser:

http://192.168.1.122/gwr/gop.php?cmd=GWRLogin&data=
<gip><version>1</version><email>hello</email><password>SomeUID</password></gip>&fmt=xml

I get the following response:

<gip>
<version>1</version>
<rc>200</rc>
<token>1234567890</token>
</gip>

inahas avatar May 19 '17 03:05 inahas

Hmm, I just checked out the project. I have two bridges, one at 1.108, and one at 1.109, I've loaded my project on :86, so I modify the include.php accordingly.

image

press the sync button and refresh the page...

image

Interface loads up. I didn't change anything else,

Hope that helps, I'm off to bed for the night - will have another look tomorrow. rc 200 is a good sign though. You may be right about the 3.0.39 - I haven't used that firmware for a while, I've allowed mine to update to the latest.

bren1818 avatar May 19 '17 03:05 bren1818

@inahas - Any luck with the code ? What happens if you try this:

http://192.168.1.122/gwr/gop.php?cmd=GWRBatch&data=<gwrcmds><gwrcmd><gcmd>RoomGetCarousel</gcmd><gdata><gip><version>1</version><token>1234567890</token><fields>name,image,imageurl,control,power,product,class,realtype,status</fields></gip></gdata></gwrcmd></gwrcmds>&fmt=xml

?

bren1818 avatar May 20 '17 01:05 bren1818

It's working fine without the token at port 80. The above command returns a full dump of everything.

I'm not worried about making it work with the token, I figure it's before they enforced tokens in the code (although interestingly they do return a dummy toekn when requested).

What I'm thinking now is, since the REST API works fine with the latest build (with tokens), what is the benefit of downgrading to the older builds that have SSH enabled? What benefit do we gain?

inahas avatar May 20 '17 02:05 inahas

There isn't much reason to have the ssh enabled version in my opinion. It has a web interface, however I found it to be flaky and continues to try to update the bridge when you access it.

So if the command worked, then yep API works for you. It is funny about the dummy code as you indicate.

We'll have fun with the code. My Dev branch is cleaned up but less complete, but I did extend it to integrate with the Phillips hue bridge.

On May 19, 2017 10:32 PM, "inahas" [email protected] wrote:

It's working fine without the token. The above command returns a full dump of everything.

I'm not worried about making it work with the token, I figure it's before they enforced tokens in the code (although interestingly they do return a dummy code).

What I'm thinking now is, since the REST API works fine with the latest build (with tokens), what is the benefit of downgrading to the older builds that have SSH enabled? What benefit do we gain?

β€” 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-302845329, or mute the thread https://github.com/notifications/unsubscribe-auth/ACDCHwIZ7inIUTRJbaQNqNPxz9gUDXkKks5r7lDGgaJpZM4LEhw5 .

bren1818 avatar May 20 '17 03:05 bren1818

@merrickw - Good News! Using IFTTT, webhooks, this project and say a Google Home - you can totally control your lights using voice commands. I'll be documenting the process in the next few days and hopefully making a Youtube video. The process is trivial really and just relies on issuing commands to the api.php file via the webhooks in IFTTT. It'll require you to have a static IP, or use a service like dyndns, but works beautifully.

bren1818 avatar Nov 28 '17 00:11 bren1818

That is awesome! I look forward to trying this out. I do use a dyndns service, so that part is covered...

Thanks for working on this!

-------- Original message -------- From: Bren [email protected] Date: 11/27/17 7:11 PM (GMT-05:00) To: bren1818/TCPLightingWebInterface [email protected] Cc: merrickw [email protected], Mention [email protected] Subject: Re: [bren1818/TCPLightingWebInterface] Comments, Questions, open forum (2) (#6)

@merrickwhttps://github.com/merrickw - Good News! Using IFTTT, webhooks, this project and say a Google Home - you can totally control your lights using voice commands. I'll be documenting the process in the next few days and hopefully making a Youtube video. The process is trivial really and just relies on issuing commands to the api.php file via the webhooks in IFTTT. It'll require you to have a static IP, or use a service like dyndns, but works beautifully.

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/bren1818/TCPLightingWebInterface/issues/6#issuecomment-347371017, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AWTwJOHK3p08GGdCLaukV_PxzsyZG6gzks5s60-PgaJpZM4LEhw5.

merrickw avatar Nov 28 '17 00:11 merrickw

This is great news because I had nothing but bad luck with the firmware downgrading to make the hub work with smartthings. But with IFTTT I should be able to get it talking that way instead

sktaylortrash avatar Nov 28 '17 00:11 sktaylortrash

I just gave it a quick test to turn one light off, and it worked like a charm.

I guess the next step would be to understand how to use the URL's to call scenes or multiple lights.

This is great!

merrickw avatar Nov 28 '17 01:11 merrickw

You're too quick! I'm writing up a doc on how to connect everything :) yes, I'd say this gives me some more incentive to extend this project.

Gotta love black Friday Google home purchases :)

On Nov 27, 2017 8:09 PM, "merrickw" [email protected] wrote:

I just gave it a quick test to turn one light off, and it worked like a charm.

I guess the next step would be to understand how to use the URL's to call scenes or multiple lights.

This is great!

β€” 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-347380637, or mute the thread https://github.com/notifications/unsubscribe-auth/ACDCH0uCw3y21A_8uZ54ZcK43yK6Kencks5s611FgaJpZM4LEhw5 .

bren1818 avatar Nov 28 '17 01:11 bren1818

@merrickw @sktaylortrash - I've written up some basic instructions on how to utilize IFTTT with the existing API in this project. I uploaded the docs into the DEV & Master branch. # Using this project with IFTTT.docx

I'll have to play some more with IFTTT and see what else I can work in with the existing API. This method appears to work fine with Rooms and Single Lights / grouped devices.

Enjoy!

bren1818 avatar Nov 28 '17 02:11 bren1818

@bren1818 that is super slick. My Google home wont be here until Thursday but I tested with my phone and it worked perfect. For the instructions you'll probably want to mention that a firewall hole needs to be made. Also the port change can usually just be done there without modifying the apache config. That's all I did anyways

sktaylortrash avatar Nov 28 '17 03:11 sktaylortrash

Speaking of opening the firewall for http, port 80 ... I generally never leave that open for security. If I do open it up, what precautions should I take?

After I tested yesterday I just stopped XAMPP for safety...


From: sktaylortrash [email protected] Sent: Monday, November 27, 2017 10:17 PM To: bren1818/TCPLightingWebInterface Cc: merrickw; Mention Subject: Re: [bren1818/TCPLightingWebInterface] Comments, Questions, open forum (2) (#6)

@bren1818https://github.com/bren1818 that is super slick. My Google home wont be here until Thursday but I tested with my phone and it worked perfect. For the instructions you'll probably want to mention that a firewall hole needs to be made. Also the port change can usually just be done there without modifying the apache config. That's all I did anyways

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/bren1818/TCPLightingWebInterface/issues/6#issuecomment-347401266, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AWTwJJBRLfZeI9ASDuU6Z8hhADULehTlks5s63tKgaJpZM4LEhw5.

merrickw avatar Nov 28 '17 13:11 merrickw

So the security thing is the biggest issue with self running a service like this.

Hence why I was trying to get the smartthings integration mentioned here: working. But couldn't keep my bridge stable with the 3.0.39 firmware.

There's a couple options I would consider:

  1. The basic is the security through obscurity of using a non standard port
  2. Allowing the configuration of a password for all pages but api.php
  3. For api.php require the inclusion of a user specified key to be included in the url i.e. http://lighting.url:1818/api.php?fx=toggle&type=device&uid=360123189510580692&val=0&key=mmmbop

Another option I'm looking at is using a .htaccess file that only allows access from my subnet and specific external domains. I just need to figure out how to confirm what domain all the ifttt requests are coming from then I can use something like

Order deny,allow Deny from all Allow from 172.16.33.0/24 Allow from ifttt\.com

sktaylortrash avatar Nov 28 '17 14:11 sktaylortrash

@sktaylortrash Thanks for fielding that, spot on answer.

In a near future build I'll add a password option and a toggle to only process requests from an internal IP range and the IFTTT range.

The .htaccess method works well too, but not sure how comfortable people will be with configuring it. I should also add something about firewall rules. I was just eager to get it out there. Its nice to no longer have dumb bulbs.

I had been trying to create some routines with dialogflow but was struggling, this with IFTTT works pretty well though. reconnected

bren1818 avatar Nov 28 '17 15:11 bren1818

Sounds good.

In my testing last night the Say a phrase with a number option works pretty well to adjust brightness as long as you are willing to speak in percentages.

So say for my bedside lamp I create a phrase of Bedroom Lamp # and a web request of http://lighting.local/api.php?fx=dim&type=device&uid=216773570733536747&val={{NumberField}}

Then I say Bedroom Lamp 50 and the light goes to half brightness

I'm wondering though in your api is there a way to query the current brightness and then potentially reduce or increase by X amount? That way I could have a Dim Bedroom lamp command and have it reduce the current brightness by the X amount I specify.

Also once I get used to the smartthings world. Also only just got that hub I'm gonna see if I can write a device handler for it that communicates with your api. I'd really like to not have to buy other bulbs just yet to make my home more friendly to users beyond myself. Especially since I have 12 bulbs running currently and another 12 spares

sktaylortrash avatar Nov 28 '17 15:11 sktaylortrash

@sktaylortrash I can definitely add a function for "dim-by". That shouldn't be too hard at all. I'll look into that tonight. There isn't one currently.

I hear you re: not having to purchase other bulbs. I purchased a number of TCP bulbs because truly they were/are a pretty fantastic product, but I also have my foot in the Philips Hue World. In my DEV branch I have code which allows you to connect to both TCP and HUE using my front end. If/when I find the time, I'll try and make it so we can create groupings from more than one bridge.

bren1818 avatar Nov 28 '17 16:11 bren1818

@sktaylortrash & @merrickw I just pushed a few updates to the api.php and include.php files as well as some extra files like a .htaccess, and documentation. I added in the requested Dim By / Brighten By functions too for devices / rooms / home and beefed up the security. I outlined the API calls in the 'API Notes.txt' I did some testing and it looks to work well. Let me know your thoughts :) Hope you like em!

bren1818 avatar Nov 29 '17 03:11 bren1818

Sweet that was fast turnaround. Everything looks good and seems to work with the security implemented. api Password and .htaccess file are behaving as I would expect. Between the two of them I think that's a solid as you're going to be able to make it without getting ridiculous

sktaylortrash avatar Nov 29 '17 05:11 sktaylortrash

Bren - what's the best way to apply the changes without losing my configuration?

Also, will the existing URL's still work or is the added security required?


From: Bren [email protected] Sent: Tuesday, November 28, 2017 10:19 PM To: bren1818/TCPLightingWebInterface Cc: merrickw; Mention Subject: Re: [bren1818/TCPLightingWebInterface] Comments, Questions, open forum (2) (#6)

@sktaylortrashhttps://github.com/sktaylortrash & @merrickwhttps://github.com/merrickw I just pushed a few updates to the api.php and include.php files as well as some extra files like a .htaccess, and documentation. I added in the requested Dim By / Brighten By functions too for devices / rooms / home and beefed up the security. I outlined the API calls in the 'API Notes.txt' I did some testing and it looks to work well. Let me know your thoughts :) Hope you like em!

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/bren1818/TCPLightingWebInterface/issues/6#issuecomment-347740661, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AWTwJLHm13WgTkCc7nIpEFY_QlMGIWEZks5s7M1GgaJpZM4LEhw5.

merrickw avatar Nov 29 '17 14:11 merrickw

@merrickw

I just copied over the lighting_url, and user_email values. Basically check to make sure the new include.php variables are set the same as your old.

If you don't want security change REQUIRE_EXTERNAL_API_PASSWORD to 0 and RESTRICT_EXTERNAL_PORT to 2 and don't add the .htaccess file

*edited to reflect mistake mentioned in following post

sktaylortrash avatar Nov 29 '17 14:11 sktaylortrash

@sktaylortrash Thanks for the quick tips;

A couple of edits - I believe for no new security you want REQUIRE_EXTERNAL_API_PASSWORD set to 0. Also, the token file needs to be copied over (if creating a new folder).

Thanks for the help, so far it's been handy to turn rooms on and off with Google Home.


From: sktaylortrash [email protected] Sent: Wednesday, November 29, 2017 9:13 AM To: bren1818/TCPLightingWebInterface Cc: merrickw; Mention Subject: Re: [bren1818/TCPLightingWebInterface] Comments, Questions, open forum (2) (#6)

@merrickwhttps://github.com/merrickw

I just copied over the lighting_url, and user_email values. Basically check to make sure the new include.php variables are set the same as your old.

If you don't want security change REQUIRE_EXTERNAL_API_PASSWORD to 1 and RESTRICT_EXTERNAL_PORT to 2 and don't add the .htaccess file

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/bren1818/TCPLightingWebInterface/issues/6#issuecomment-347871996, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AWTwJHRiGXbOncub8dzkSQUs27Tf9ocAks5s7WaVgaJpZM4LEhw5.

merrickw avatar Nov 29 '17 15:11 merrickw

@merrickw oops good catch on the 0. I've updated my previous post to reflect in case someone else wanders in.

I didn't move my install so I never thought about the token

sktaylortrash avatar Nov 29 '17 16:11 sktaylortrash

@merrickw @sktaylortrash - Glad to hear you got things working πŸ‘

I will work on documenting what each of the options mean in the include file. I think now that IFTTT has rolled out webhooks (perhaps they did sooner and I didn't notice) this project will get some more interest from all of those abandoned TCP users. TCP even yanked their youtube videos and documentation, so I added what I could find here. I've bought myself a Raspberry Pi zero which I'm going to test out as my webserver versus leaving my desktop on at home. We'll see how that goes :)

bren1818 avatar Nov 29 '17 16:11 bren1818

Keep us posted on the Raspberry Pi webserver, that sounds like a good idea.

Another question, is there a URL that would Activate/Deactivate Scenes/Smart Control? I see it's calling scenes.php from the console, but that's it.

merrickw avatar Nov 30 '17 13:11 merrickw

The Pi should work well. I have my instance running in a Linux virtual machine without issue

sktaylortrash avatar Nov 30 '17 13:11 sktaylortrash

@bren1818 Thanks the IFTTT Adiition works great. The only issue I have is that I cannot use SSL as I have self issued SSL certs and IFFTTT does not work on those certs. Has any body encountered same issue? Is using http good enough, though password is exposed.

vijimaini avatar Nov 30 '17 18:11 vijimaini

If you really want HTTPS/SSL you could get a free certificate from Let's Encrypt. If you're running Apache on Linux I'm pretty sure they have a client that will auto renew their certificates.

Otherwise, with HTTP if you use the .htaccess file to limit external connections to only api.php - someone would have to be intercepting traffic between you and IFTTT in order to: 1: Get the port (assuming you run on an alternate than 80) 2: The uid for the light or room 3: The password for the api.

Then to do anything other than turn that one light on and off, they'd have to be intercepting your traffic for quite awhile to get more uid's. Well unless you turn lights off and on a lot in a short period

And ultimately the worst they could do is turn your lights off and on

Normally I'm super anal about punching holes in my firewall for services directly on my primary Lan and instead dump them in a DMZ but I wasn't concerned for this instance

sktaylortrash avatar Nov 30 '17 18:11 sktaylortrash

@sktaylortrash @bren1818 Do you have a recommendation for a RaspberryPi Zero kit? I see a bunch on Amazon. Can you recommend a tutorial to setup an Apache server on it?
I'm a windows guy so this is a bit out of my realm.

merrickw avatar Nov 30 '17 18:11 merrickw

@merrickw if you want a complete kit then this one will do the trick https://www.amazon.com/CanaKit-Raspberry-Wireless-Starter-Official/dp/B06XJQV162 It has the mini-HDMI and the USB OTG already included. Also the SD card has the NOOBS quick setup environment already loaded.

So when you go through this tutorial you can skip the part about copying NOOBS to your card

sktaylortrash avatar Nov 30 '17 18:11 sktaylortrash

Perfect. I'm going to give that a shot.

-------- Original message -------- From: sktaylortrash [email protected] Date: 11/30/17 1:47 PM (GMT-05:00) To: bren1818/TCPLightingWebInterface [email protected] Cc: merrickw [email protected], Mention [email protected] Subject: Re: [bren1818/TCPLightingWebInterface] Comments, Questions, open forum (2) (#6)

@merrickwhttps://github.com/merrickw if you want a complete kit then this one will do the trick https://www.amazon.com/CanaKit-Raspberry-Wireless-Starter-Official/dp/B06XJQV162 It has the mini-HDMI and the USB OTG already included. Also the SD card has the NOOBS quick setup environment already loaded.

So when you go through this tutorialhttps://www.raspberrypi.org/magpi/apache-web-server/ the part about copying NOOBS to your card

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/bren1818/TCPLightingWebInterface/issues/6#issuecomment-348282772, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AWTwJMqwXiKd_3r3xCC_QsznHeTz3Q6gks5s7vglgaJpZM4LEhw5.

merrickw avatar Nov 30 '17 18:11 merrickw

@sktaylortrash Thanks. I will try let’s encrypt. I run Apache on Mac. I use a high end port and not 80. Our isp blocks port 80. I should also try Pi as a web server.

vijimaini avatar Nov 30 '17 19:11 vijimaini

@vijimaini - I know it was answered above, but you can use www.sslforfree.com to make a genuine certificate if Let's Encrypt doesn't work for you. I have used www.sslforfree.com in the past and it works very well. That said, using a non standard port, the .htaccess and a password should keep you pretty secure πŸ‘ Thanks @sktaylortrash for answering above - the kit you recommended to @merrickw was the one I ordered myself so we'll see how it works. I should get it on Friday.

bren1818 avatar Nov 30 '17 19:11 bren1818

@bren1818

Any thoughts on my other question - is there a URL that would Activate/Deactivate Scenes/Smart Control? From the Scenes UI I see it calling scenes.php from the console, but that's the full URL.

merrickw avatar Nov 30 '17 20:11 merrickw

@merrickw the scenes code should be able to be run the same way through IFTTT You'd have to add the scenes.php to the .htaccess file as allowable. Then the URL for the webhook would be a post passing a 'scene', (scene ID) and an 'action' which was "on", "off" or delete.

something like {host}:{port}/scenes.php and then POST data {scene: sceneID and action: "on|off"}

I haven't played with it yet, but that should do it.

Cheers,

Bren

bren1818 avatar Nov 30 '17 20:11 bren1818

I'm not sure how to add POST data ... and get the Scene ID


From: Bren [email protected] Sent: Thursday, November 30, 2017 3:19 PM To: bren1818/TCPLightingWebInterface Cc: merrickw; Mention Subject: Re: [bren1818/TCPLightingWebInterface] Comments, Questions, open forum (2) (#6)

@merrickwhttps://github.com/merrickw the scenes code should be able to be run the same way through IFTTT You'd have to add the scenes.php to the .htaccess file as allowable. Then the URL for the webhook would be a post passing a 'scene', (scene ID) and an 'action' which was "on", "off" or delete.

something like {host}:{port}/scenes.php and then POST data {scene: sceneID and action: "on|off"}

I haven't played with it yet, but that should do it.

Cheers,

Bren

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/bren1818/TCPLightingWebInterface/issues/6#issuecomment-348309074, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AWTwJI09OPTuTbLjGIgll4ylPeEtZ8G0ks5s7w3SgaJpZM4LEhw5.

merrickw avatar Nov 30 '17 20:11 merrickw

I'll try and document tonight. Webhooks I believe has a post option. I'll test tonight and let you know. Worst Case I could add an option to the API.PHP to trigger scenes like the other calls.

Will let you know

On Nov 30, 2017 3:24 PM, "merrickw" [email protected] wrote:

I'm not sure how to add POST data ... and get the Scene ID


From: Bren [email protected] Sent: Thursday, November 30, 2017 3:19 PM To: bren1818/TCPLightingWebInterface Cc: merrickw; Mention Subject: Re: [bren1818/TCPLightingWebInterface] Comments, Questions, open forum (2) (#6)

@merrickwhttps://github.com/merrickw the scenes code should be able to be run the same way through IFTTT You'd have to add the scenes.php to the .htaccess file as allowable. Then the URL for the webhook would be a post passing a 'scene', (scene ID) and an 'action' which was "on", "off" or delete.

something like {host}:{port}/scenes.php and then POST data {scene: sceneID and action: "on|off"}

I haven't played with it yet, but that should do it.

Cheers,

Bren

β€” 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-348309074>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ AWTwJI09OPTuTbLjGIgll4ylPeEtZ8G0ks5s7w3SgaJpZM4LEhw5>.

β€” 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-348310350, or mute the thread https://github.com/notifications/unsubscribe-auth/ACDCH2zM_vqTddJ3KlJTySCmn_Get5Zvks5s7w8DgaJpZM4LEhw5 .

bren1818 avatar Nov 30 '17 20:11 bren1818

@merrickw I updated 3 files in the project, just for you πŸ‘ pull the updated .htaccess, scenes.php and scenescreatedit.php

I made the scenes page tell you the scene Number (ID) and listed how to make a call via a webhook like so:

http://{{your-web-address}}:{{port}}/scenes.php?scene={{Scene Number}}&action={{on|off}}&password={{your-api-password}}

Dont worry about using post, I made it so it will work with the standard GET and uses the security from the api.php

Small confession, it looks like I never finished the creation and edit pages of scenes, but this is something I'll get around to eventually. It should pull the ones you've made via the app though.

Hope this works well for you.

Cheers, dinner time!

Bren

bren1818 avatar Nov 30 '17 23:11 bren1818

@bren1818
Scene stuff looks good worked fine in my initial testing.

Just to test everything I setup a completely clean linux VM tonight to make sure I knew what modules are needed to make everything work and that tutorial I linked to is a little deficient. There's several php modules needed to get this all sorted. I'll see if I can find a spare SD card to throw in my PI and build you guys out some better instructions. Depends on how busy work is tomorrow

On another note. I have a couple more bridge kits coming. Couldn't pass them up @ $10 a piece. Just wondering. Has any of this recent stuff made it's way into the DEV branch that has the multi bridge support? I'm thinking I'd possibly like to run my outdoor bulbs on one bridge, interiors on another.

sktaylortrash avatar Dec 01 '17 06:12 sktaylortrash

Thanks @bren1818

I tested it out, It seems to be invoking a scene, but it's not invoking the right scene. I think it's just turning all the bulbs on. Let me know if I can help troubleshoot.

I am using a URL without a password or the htaccess file for now; My URL looks like: http://blahblah.noip.com:1234/scenes.php?scene=2147483643&action=on

merrickw avatar Dec 01 '17 14:12 merrickw

weird I just fired off all my scenes one at a time and they behaved as expected

sktaylortrash avatar Dec 01 '17 15:12 sktaylortrash

@sktaylortrash - 10$!? Where? Thats a great deal. I haven't seen any of the TCP stuff in stores for the last 6 or so months. I had kept an eye out. My second bridge actually bit the dust, that's why I haven't invested much time into the Dev branch. I haven't migrated any of these changes as with the Dev branch I took a different approach.

In theory you could setup more than one instance of this project under different ports and different names virtual hosts and it should hum along. You could have a poke around the dev branch, but I haven't really documented much of it. It follows some of the same principles, but I was working on it to tie the Hue bridge to the TCP bridge, given the IFTTT now has web-hooks I haven't decided if I want to continue with it.

The main driver for supporting more than one TCP bridge was because the bridges only allow 4 rooms when using a remote. Given I have a kitchen, living room, an office, two bedrooms and a basement, I couldn't program all of my rooms onto one bridge / remote pair so I thought If I have two bridges I could in theory control 8 different rooms.

For what its worth, it ended up being a hassle having more than one bridge, but poke around and let me know what you think. My Pi should be shipping in tonight.

@merrickw - It should work as expected ... I tested last night, that being said, the scenes function for me has always been a bit flakey. IE I can program a scene using the app and schedule it, but it never actually fires on the time I've specified (Even if the time on the bridge is correct). I'll look into it further though and see if I can find any reason why it wouldn't work.

Cheers,

Bren

bren1818 avatar Dec 01 '17 16:12 bren1818

The unopened kits were a couple hours away. Found them on a local buy and sell site. I haven't seen them yet my nephew's picking them up Monday but from the pictures there the ones with 2 bulbs a bridge and a remote. So if nothing else I got 4 more bulbs for $20.

I'll dig around in that other branch see what I can determine.

It's funny about scenes. I use them extensively to turn on lights in the morning when I wake up and again just after I normally leave as well as for exterior lights in the evening. Only trouble I ever have is with the drifting clock since the C&C servers when down

I'm just loading NOOBS to a sd card right now so hopefully I can get a running apache setup documented for you guys today

sktaylortrash avatar Dec 01 '17 16:12 sktaylortrash

I also use scene extensively via the scheduler inside the bridge. And, yes, other than the drifting clock and sunrise/sunset issue due to dead C&C, I'd also say they are quite reliable.

And man, the latest IFTTT development is all very exciting!

On Dec 1, 2017 11:45 AM, "sktaylortrash" [email protected] wrote:

The unopened kits were a couple hours away. Found them on a local buy and sell site. I haven't seen them yet my nephew's picking them up Monday but from the pictures there the ones with 2 bulbs a bridge and a remote. So if nothing else I got 4 more bulbs for $20.

I'll dig around in that other branch see what I can determine.

It's funny about scenes. I use them extensively to turn on lights in the morning when I wake up and again just after I normally leave as well as for exterior lights in the evening. Only trouble I ever have is with the drifting clock since the C&C servers when down

I'm just loading NOOBS to a sd card right now so hopefully I can get a running

β€” 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-348545538, or mute the thread https://github.com/notifications/unsubscribe-auth/AYOM2-tpghR7MPKsXC_htxODGYJQML5eks5s8C06gaJpZM4LEhw5 .

k8gg avatar Dec 01 '17 16:12 k8gg

I created a new test scene (from the TCP android app). When I activate the scene from your UI it turns on all lights to 100% bright. When I activate from the TCP app the dim is set very low for all lights.

I'm wondering if the other testers are trying varying dim levels or all 100% brightness?

merrickw avatar Dec 01 '17 17:12 merrickw

@merrickw Good catch. I was only watching to see if the bulbs turned on and off. But your right it's ignoring the brightness settings on the scenes and just turning any affected bulbs on to full

sktaylortrash avatar Dec 01 '17 17:12 sktaylortrash

@merrickw @sktaylortrash Hmm, I will have a look at that. Perhaps my bridge call back is missing something. I'll see what I can find - good catch.

bren1818 avatar Dec 01 '17 18:12 bren1818

Further to that previous comment. The scene edit function in the WebInterface shows that in the attached instance one light should come on at 44% while the rest are at 100%. In reality the 44% is ignored.

Also now noticing this is not an api only issue as manually triggering the scene from the activate button in the interface exhibits the same behaviour.

Array
(
    [sid] => 2147483642
    [active] => 1
    [name] => Weekday AM
    [desc] => Array
        (
        )
[order] => 3
[type] => schedulecustom
[icon] => images/scene/coffee.png
[islocal] => 1
[every] => 1,2,3,4,5
[starttime] => 06:30
[stoptime] => 07:10
[device] => Array
    (
        [0] => Array
            (
                [id] => 216773570733040739
                [type] => D
                [cmd] => Array
                    (
                        [0] => Array
                            (
                                [type] => power
                                [value] => 1
                            )
                        [1] => Array
                            (
                                [type] => level
                                [value] => 100
                            )
                    )
            )
        [1] => Array
            (
                [id] => 216773570733536747
                [type] => D
                [cmd] => Array
                    (
                        [0] => Array
                            (
                                [type] => power
                                [value] => 1
                            )
                        [1] => Array
                            (
                                [type] => level
                                [value] => 0
                            )
                    )
            )
        [2] => Array
            (
                [id] => 359841714533870036
                [type] => D
                [cmd] => Array
                    (
                        [0] => Array
                            (
                                [type] => power
                                [value] => 1
                            )
                        [1] => Array
                            (
                                [type] => level
                                [value] => 44
                            )
                    )
            )
        [3] => Array
            (
                [id] => 360123189510580692
                [type] => D
                [cmd] => Array
                    (
                        [0] => Array
                            (
                                [type] => power
                                [value] => 1
                            )
                        [1] => Array
                            (
                                [type] => level
                                [value] => 100
                            )
                    )
            )
    )
)

sktaylortrash avatar Dec 01 '17 18:12 sktaylortrash

The array dump you pasted above comes from this raw bridge command: cmd=SceneGetListDetails&data=<gip><version>1</version><token>".TOKEN."</token><bigicon>1</bigicon></gip>

To trigger the scenes, I hit the bridge with a raw command of:

cmd=SceneRun&data=<gip><version>1</version><token>".TOKEN."</token><sid>".$sceneID."</sid><val>1</val></gip>"; //val 1 is on 0 is off

I'll do some digging to see if there is more to it then that. I'll keep you posted

bren1818 avatar Dec 01 '17 18:12 bren1818

Sorry guys this took longer than planned - Hopefully it helps RaspberryPI-LAMP-Install.docx

sktaylortrash avatar Dec 02 '17 08:12 sktaylortrash

Very cool. I'll be receiving my kit in the next day or two and will use your guide.

Thanks for putting this together.


From: sktaylortrash [email protected] Sent: Saturday, December 2, 2017 3:31 AM To: bren1818/TCPLightingWebInterface Cc: merrickw; Mention Subject: Re: [bren1818/TCPLightingWebInterface] Comments, Questions, open forum (2) (#6)

Sorry guys this took longer than planned - Hopefully it helps RaspberryPI-LAMP-Install.docxhttps://github.com/bren1818/TCPLightingWebInterface/files/1523660/RaspberryPI-LAMP-Install.docx

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/bren1818/TCPLightingWebInterface/issues/6#issuecomment-348677408, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AWTwJHC6u6VBbwFpl4VofzBeyJCgMngnks5s8Qr2gaJpZM4LEhw5.

merrickw avatar Dec 02 '17 13:12 merrickw

@sktaylortrash Thanks for putting that guide together. I got my pi all setup and running yesterday and I can say it works quite well. Wish I had your guide at the time. For whatever reason my pi would not pickup on a mouse/keyboard combo. I got through the guides using just the keyboard and enabled ssh. I fortunately had a usb-ethernet adaptor because I was seemingly unable to figure our how to turn on wifi using just the keyboard.

I installed apache and php 5. I used the default virtual host and modified it to meet my needs, but your guide is great. Thanks for that.

@merrickw re: the scenes I'll poke around the bridge to see if I can find a different command which activates with the levels. Worst case scenario, I'll read the scene from the bridge and manually activate the rooms and lights per their settings. I'll probably not get to this this weekend as I'm out and about but will see what I can do.

Cheers!

Bren

bren1818 avatar Dec 02 '17 14:12 bren1818

http://www.noip.com/support/knowledgebase/install-ip-duc-onto-raspberry-pi/ -- one thing to add to pi setup πŸ‘

bren1818 avatar Dec 02 '17 15:12 bren1818