Limitless Plugwise for free

Plugwise Forum about Plugwise devices and the Source software.
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

Limitless Plugwise for free

Post by Digit »

Ah well, not totally fair and accurate, but let's say all you need is a small Linux board like a Raspberry Pi, Cubieboard, BeagleBone or something similar that can run Node.JS But who doesn't have one these days :lol:

This week I had an email conversation with someone who asked me if I had already finished moving Plugwise to Raspberry Pi. I hadn't at that time, but the question triggered me to re-explore the options I had and saw that I was mistakenly thinking that a module I found back in 2013 was only about switching and had no power monitoring functions. I was wrong! All I needed was covered by that module. After an hour or so I had it running on a Raspberry Pi, so after some hours of test-driving the module I finished moving Plugwise from a Windows XP VM to one of my RPi's this afternoon. Works like a charm!

Bye bye Source webserver, Windows VM, Belkin USB, ... :D

Ingredients:
- Node.JS
- the PlugwiseJS module;
- a wrapper of only 150 loc to fit PlugwiseJS into my system.

Plug the Stick into the Linux board and off you go!
User avatar
RdP
Advanced Member
Advanced Member
Posts: 989
Joined: Thu May 04, 2006 10:14 am
Location: Netherlands

Re: Limitless Plugwise for free

Post by RdP »

Interesting.....

Like to know more about this. Does it really have feature parity with the source or is it more or less like the Stretch?

I mean, does it also have reports/graphs, schedules, daily usage etc?

I'm not at home this weekend, so I cannot give it a try on one of my RPi's

Thanks,
Rien
Rien
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

Re: Limitless Plugwise for free

Post by Digit »

No, you can't compare it to "the Source". The Source is for 'the masses' I think, not for us :P This is somewhat more low-level, based on Maartens "unleashed" work, although the output is very easy to work with.

Let me explain a bit more.
Before today, I used the Source web-server to periodically get an XML with new power usage info and to switch the Circles.
But the Source has always been a PITA for several reasons and I was looking for an alternative.
Reason for that is that I want to power down my 30W Hyper-V and end up with a large real-time HA system only consuming ~5W.
The Plugwise Source software prevented me from doing that.

With this new solution I am able to get power usage (Watt) and switch Circles and that's all I need... because I already have the rest in my own system.
So basically I only need the raw data, nothing more - in fact, anything more than that is plain ballast in my situation.
Reports, charts, schedules, historical data, I already have all that for a long time. For a simple temperature sensor to a boiler or security system.

So, what makes this solution so "special" to post about it (IMO)?
That you don't have to bother about the Plugwise protocol anymore but you do get all the basic information and tools to build your own "Source" or embed Plugwise into your own HA system in a very comfortable & easy way - without the need to install a complete HA solution that you maybe don't want or need....

Conclusion: perfect for those that like to tinker with software!

Capice? :wink:
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

Re: Limitless Plugwise for free

Post by Digit »

To make it even more clear of what you get:
plugwise-Knipsel.PNG
plugwise-Knipsel.PNG (40.02 KiB) Viewed 22717 times
Being able to display it in a console means you can do anything with it 8)
User avatar
Phaeton
Advanced Member
Advanced Member
Posts: 573
Joined: Wed May 19, 2010 12:44 pm
Location: Wassenaar
Contact:

Re: Limitless Plugwise for free

Post by Phaeton »

I'm not an software engineer, but with all you post about node.js you really tempt me Robert. Now even a plugwise solution! I really appriciate your blogs and interesting posts. It inspires. I dont't think I will be able to use these hints in the near future but it surely gives me a goal for the long run.
groeten,
Harry
User avatar
nico_gh2
Member
Member
Posts: 133
Joined: Wed Apr 06, 2011 12:24 pm
Location: Betuwe, Netherlands
Contact:

Re: Limitless Plugwise for free

Post by nico_gh2 »

Good work!
I have a RPi lying around so will give it a try later.

Is it only about circles or can scan/sense measurements be used as well?
Only exercise left for the reader is getting these values into a database and highcharts will do the rest.
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

Re: Limitless Plugwise for free

Post by Digit »

@phaeton
I'm no software engineer either :lol:
My background is mechanical engineering/industrial automation (Robotics, CAD/CAM, CNC, that kinda stuff)
So you don't have to be... :wink:

@nico_gh2:
All credits go to the developer of the software (and that's not me). I only found it :wink:
I can't say anything about scan/sense, cause I don't have those. Just give it a try...
jeroen_
Member
Member
Posts: 105
Joined: Mon Feb 11, 2013 4:02 pm
Location: Switzerland
Contact:

Re: Limitless Plugwise for free

Post by jeroen_ »

Thus, if I get it correctly, as you are directly talking to the plugwise stick over serial, your data never leaves the network aka goes to the 'cloud' right?
As that would remove my objections to Plugwise (in the other thread about software/license updates and feature removals), at least to the hardware part...
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

Re: Limitless Plugwise for free

Post by Digit »

You're 100% correct :)
roheve
Starting Member
Starting Member
Posts: 49
Joined: Tue Apr 19, 2011 8:38 am
Contact:

Re: Limitless Plugwise for free

Post by roheve »

jeroen_ wrote:Thus, if I get it correctly, as you are directly talking to the plugwise stick over serial, your data never leaves the network aka goes to the 'cloud' right?
Yes, that is right.
However you stil need the plugwise-source-software to configure your network (and add modules). But once it's configured, PlugWise BV can *not* trace you anymore, you don't need to start its 'source' programe again (still a silly and confusing name!).

This javascript sample does the same thing as what you can do with plugwise in, for example Domotiga, and a few other of those. What is implemented (i took a peek into the code on github) is just reading and translating the realtime statistics and switching modules on or of.

Some of the other commands could be easily added while others are more difficult (e.g groups and switching schedules), but doable. It all depend on what you want and how much time you want to spend configuring/programming/learning.

Somewhere else, I found an example script to configure your network and add a module (on a frensh blog). That got me started to look into that and also did some digging (and described that proces a bit on my blog two years ago). I only tested some parts of the protocol with tiny scripts, just to see how it worked, before I lost interest and used my free-time for other things...
Darwusch
Member
Member
Posts: 164
Joined: Sun Dec 21, 2008 10:25 pm
Location: Netherlands

Re: Limitless Plugwise for free

Post by Darwusch »

roheve wrote:PlugWise BV can *not* trace you anymore, you don't need to start its 'source' programe again (still a silly and confusing name!).
It is a very logical name: It is the source for their information about our usage.
:D
remcokortekaas
Starting Member
Starting Member
Posts: 3
Joined: Sun Aug 25, 2013 10:40 pm

Re: Limitless Plugwise for free

Post by remcokortekaas »

Hi Robert,

Would you like to share your 150 lines of code 'for inspiration' also? I'm not a JS programmer but looking at your output, it converts Plugwise data to MQTT topcis, just what I need to get a heads start.

Thanks in advance

Remco.
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

Re: Limitless Plugwise for free

Post by Digit »

Remco,

No problem. But I have to 'warn' you...the module I linked to has a memory leak.
Within 24 hours the amount of memory used will be sky-high and also CPU usage increases as well (on RPi: starts @ 0.1%, within 12 hours it's 4%, yuck).

This won't be that much of a problem on a multi-GB RAM desktop/laptop, but not something you'd like to have running on a RPi this way.
And since the module uses the Serialport module (which I've never been able to successfully compile on Windows) it's running on a RPi over here, but automatically restarted every 24 hours until I have had some time to look into the issue.
Besides that, it does what it's supposed to do :wink:
Attachments
plugwisecode.zip
(1.72 KiB) Downloaded 828 times
remcokortekaas
Starting Member
Starting Member
Posts: 3
Joined: Sun Aug 25, 2013 10:40 pm

Re: Limitless Plugwise for free

Post by remcokortekaas »

Thanks Robert. Memleak is no problem, I'm just trying to learn from your example so I will not just copy the code.

Regards,
Remco.
Borgso
Starting Member
Starting Member
Posts: 5
Joined: Thu Nov 21, 2013 4:24 pm

Re: Limitless Plugwise for free

Post by Borgso »

Hi, this looks verry interesting.

I have some problem getting it to work, it seems i lack some file.
Havent worked much with node.js, but im familiar with linux shell.
Do you have a step-by-step instructions for how to get this setup?
Also link to all files needed..

Thanks in advance =)
Post Reply

Return to “Plugwise Forum”