Nodejs Plugwise driver code

Forum about MQTT, machine-to-machine (M2M), "Internet of Things" and Node.js

Moderators: Digit, Rene, Willem4ever, Bwired

Post Reply
Bwired
Administrator
Administrator
Posts: 4704
Joined: Sat Mar 25, 2006 1:07 am
Location: Netherlands
Contact:

Nodejs Plugwise driver code

Post by Bwired »

Camilo Tapia made a Plugwise interface for Nodejs some years ago. Today Camilo updated the code with a function to also read the power buffer of a Circle.
This is a very nice wanted upgrade!

Code: Select all

Read the power buffer

// Returns todays power consumtion as an array of dates and {watt: [number], kWh: [number], pulses: [number] }
circle.powerbufferinfo(callback([array]);

// Returns the amount of hours back in time of  power consumtion as an array of dates and {watt: [number], kWh: [number], pulses: [number] }
circle.powerbufferinfo([number], callback([array]);

// Returns the dates power consumtion as an array of dates and {watt: [number], kWh: [number], pulses: [number] }
circle.powerbufferinfo([date], callback([array]);

// Returns the dates interval power consumtion as an array of dates and {watt: [number], kWh: [number], pulses: [number] }
circle.powerbufferinfo([[date], [date]], callback([array]);
Check the code on github https://github.com/camme/plugwisejs
also check out his interesting blog with more Nodejs solutions.http://www.1001.io/blog
http://www.bwired.nl Online Home, Domotica, Home Automation. Weblog. http://blog.bwired.nl
Edwin
Member
Member
Posts: 447
Joined: Sat Oct 20, 2007 6:37 am
Location: Netherlands

Re: Nodejs Plugwise driver code

Post by Edwin »

How can a json call in the adresbar be done?
Or isnt it possibble?
Something like this:
http://<username:password@>plugwise-ip<:port>/json.htm?api-call
Or must it be done anotherway?
Sorry noob in this :-(
Thanks
Regards
Edwin
Bwired
Administrator
Administrator
Posts: 4704
Joined: Sat Mar 25, 2006 1:07 am
Location: Netherlands
Contact:

Re: Nodejs Plugwise driver code

Post by Bwired »

No, this cannot be done with this nodejs module without adding the http server code
This python module has a Http server but it is in Python, but can run on Rasp like..
https://github.com/SevenW/Plugwise-2-py
Bwired
Administrator
Administrator
Posts: 4704
Joined: Sat Mar 25, 2006 1:07 am
Location: Netherlands
Contact:

Re: Nodejs Plugwise driver code

Post by Bwired »

Edwin
Member
Member
Posts: 447
Joined: Sat Oct 20, 2007 6:37 am
Location: Netherlands

Re: Nodejs Plugwise driver code

Post by Edwin »

Bwired wrote:and here
viewtopic.php?f=39&t=9421
Thanks for your answer,
But
Is it possible to get it running on windows some how?
Bwired
Administrator
Administrator
Posts: 4704
Joined: Sat Mar 25, 2006 1:07 am
Location: Netherlands
Contact:

Re: Nodejs Plugwise driver code

Post by Bwired »

ah, thats why you wanted to use the nodejs version, which can run on windows...
i dont know if Python can run on windows, i guess not. :(
Post Reply

Return to “MQTT & Node.js”