Nodejs Plugwise driver code

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

Moderators: Digit, Rene, Willem4ever, Bwired

Nodejs Plugwise driver code

Postby Bwired » Tue Sep 30, 2014 10:45 pm

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
User avatar
Bwired
Administrator
Administrator
 
Posts: 5298
Joined: March 2006
Location: Netherlands

Re: Nodejs Plugwise driver code

Postby Edwin » Sat Jan 07, 2017 8:17 am

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
Edwin
Member
Member
 
Posts: 445
Joined: October 2007
Location: Netherlands

Re: Nodejs Plugwise driver code

Postby Bwired » Tue Jan 10, 2017 8:36 pm

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
User avatar
Bwired
Administrator
Administrator
 
Posts: 5298
Joined: March 2006
Location: Netherlands

Re: Nodejs Plugwise driver code

Postby Bwired » Tue Jan 10, 2017 10:03 pm

User avatar
Bwired
Administrator
Administrator
 
Posts: 5298
Joined: March 2006
Location: Netherlands

Re: Nodejs Plugwise driver code

Postby Edwin » Wed Jan 11, 2017 9:02 am

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?
Edwin
Member
Member
 
Posts: 445
Joined: October 2007
Location: Netherlands

Re: Nodejs Plugwise driver code

Postby Bwired » Wed Jan 11, 2017 5:17 pm

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. :(
User avatar
Bwired
Administrator
Administrator
 
Posts: 5298
Joined: March 2006
Location: Netherlands


Return to MQTT & Node.js

Who is online

Users browsing this forum: No registered users and 1 guest