Just made my plugwise webpage better

Plugwise Forum about Plugwise devices and the Source software.
Post Reply
Quart
Starting Member
Starting Member
Posts: 14
Joined: Wed Jan 21, 2009 2:43 pm
Location: Sweden
Contact:

Just made my plugwise webpage better

Post by Quart »

Hi
Just want to show you what can be done with some php code and the plugwise webserver.
WIth at friend of mine at http://www.lokaltvader.se we have made this.
If you come from a "trusted" ip you can turn aplliances on/off
Here is a link if you want to download it: http://www.sundshult.se/temp/pw.zip


We also have some scripts checking if some appliances is taking more then example 40W and then they turn on/off someother things.
We am also using the sunmeter from my Davis station to trigger lights at home when its getting dark.

http://www.sundshult.se/wxpw.php
Last edited by Quart on Fri Nov 16, 2012 12:50 pm, edited 6 times in total.
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

Re: Just made my plugwise page better

Post by Digit »

Nice!
vanisher

Re: Just made my plugwise page better

Post by vanisher »

Nice!! Are you going to publish the php scripts?
Wim2008
Advanced Member
Advanced Member
Posts: 718
Joined: Wed Aug 12, 2009 1:42 pm
Location: Eindhoven, Netherlands

Re: Just made my plugwise page better

Post by Wim2008 »

More people are interessed in the script.

BR Wim :wink:
Wim2008
Advanced Member
Advanced Member
Posts: 718
Joined: Wed Aug 12, 2009 1:42 pm
Location: Eindhoven, Netherlands

Re: Just made my plugwise page better

Post by Wim2008 »

You make us curious.
Last edited by Wim2008 on Thu Nov 15, 2012 12:35 pm, edited 1 time in total.
hansieh
Starting Member
Starting Member
Posts: 25
Joined: Sun Nov 26, 2006 12:27 pm
Location: Netherlands
Contact:

Re: Just made my plugwise page better

Post by hansieh »

That looks good,
I'am also interested in the scripts,
Hans
(domotica, arduino, MySQL, PHP, electronics)
http://www.chamiri.nl
Quart
Starting Member
Starting Member
Posts: 14
Joined: Wed Jan 21, 2009 2:43 pm
Location: Sweden
Contact:

Re: Just made my plugwise page better

Post by Quart »

Thanks for all credits.
I dont want to support them but I will try help you all get it going.
But they are build round plugwise own ´webserver and it can get inputs from Weather-Display software.
I will put them all in a zip package and will post a link.
vanisher

Re: Just made my plugwise page better

Post by vanisher »

Hi Quart,

Did you have time yet to 'zip-up' the package?
Quart
Starting Member
Starting Member
Posts: 14
Joined: Wed Jan 21, 2009 2:43 pm
Location: Sweden
Contact:

Re: Just made my plugwise page better

Post by Quart »

Last edited by Quart on Fri Nov 16, 2012 12:51 pm, edited 2 times in total.
yjb
Member
Member
Posts: 211
Joined: Fri Apr 17, 2009 1:15 pm
Location: Venhuizen, Netherlands

Re: Just made my plugwise page better

Post by yjb »

Quart wrote:Finally, here it is.
Thanks so much! Let's see if I can find some time to play with this.

Ysbrand
Wim2008
Advanced Member
Advanced Member
Posts: 718
Joined: Wed Aug 12, 2009 1:42 pm
Location: Eindhoven, Netherlands

Re: Just made my plugwise webpage better

Post by Wim2008 »

Thanks for sharing this script.
Can you give a short explanation, what to do with those 3 files?

B.R. Wim :wink:
Quart
Starting Member
Starting Member
Posts: 14
Joined: Wed Jan 21, 2009 2:43 pm
Location: Sweden
Contact:

Re: Just made my plugwise webpage better

Post by Quart »

Put them all in example a folder called pw
then edit the file pwsettings.php, all things you need to edit is explained in pwsettings.php
After the you just open a webbrowser and go to your website example http://www.mysite.se/pw/index.php

Just added a scriptfile I am running each 5 minutes everyday, it checks the sunlight measured with my Davis VP station.
Right now I am using 9W as limit, when it goes under 9W it send a "turn on" command to my "lamps group" in Plugwise

The script can med downloaded here http://www.lokaltvader.se/download/autoswitch.php
Last edited by Quart on Thu Nov 15, 2012 2:37 pm, edited 4 times in total.
Wim2008
Advanced Member
Advanced Member
Posts: 718
Joined: Wed Aug 12, 2009 1:42 pm
Location: Eindhoven, Netherlands

Re: Just made my plugwise webpage better

Post by Wim2008 »

Thanks. I will give it a try.

BR Wim :)
MarnixT
Starting Member
Starting Member
Posts: 42
Joined: Thu Nov 22, 2012 1:45 am

Re: Just made my plugwise webpage better

Post by MarnixT »

THanks for the scripts. I did try a little with the xampp webserver after which a nice page showed up, however with errors like

Notice: Use of undefined constant mac - assumed 'mac' in C:\NODOWeb\htdocs\index.php on line 157
Notice: Use of undefined constant lock - assumed 'lock' in C:\NODOWeb\htdocs\index.php on line 158

after this I realised it was supposed to work with the inbuilt webserver.
Unfortunately running that I got back a plain text page, starting with

<?php
require_once('pwsettings.php');
etc.

What can I do about this?
Quart
Starting Member
Starting Member
Posts: 14
Joined: Wed Jan 21, 2009 2:43 pm
Location: Sweden
Contact:

Re: Just made my plugwise webpage better

Post by Quart »

You shall not use the Plugwise webserver, I dont think it can execute PHP pages.
So you can use xampp but you need to edit the pwsettings.php and tell whre your plugwise webserver is etc
Post Reply

Return to “Plugwise Forum”