Bwired Nodejs, MQTT, Websockets Iskra Smartmeter solution
Bwired Nodejs, MQTT, Websockets Iskra Smartmeter solution
Most of you know that i'm really a Windows guy for many years now.
I have a love hate relation with Windows but since Windows 2012 I started to dislike Windows more and more.
The step to go over to Linux started to interest me more and more with the birth of the Raspberry PI.
Also friends like Robert and Rene pushed me for years to make the turn
And since i got to know the Nodejs framework on Linux i had to make the switch.
And believe me; im loving every minute of it, what a relieve it is to program on Linux with Nodejs.
i have many Nodejs/MQTT/Websockets projects running now, but the first one who is presentable is the Node-js Iskra smartmeter solution.
I have a Raspberry connected to my smartmeter which sends the data via MQTT to the broker which is running on a Cubietruck http://blog.bwired.nl/?p=877
The Cubie is logging all the data to a mysql server which is also on the cubietruck and the Cubie is presenting this realtime smartmeter webpage with a realtime Graph
check out http://www.mijnsmartmeter.nl
A more detailed blog with sources can be found here http://blog.bwired.nl/?p=913
Later im panning also to open up a MQTT broker on my server so i can receive your MQTT messages as well!
Again special thanks goes out to Rene and Robert who turned me and helped me out with samples etc. during my Windows transition
I have a love hate relation with Windows but since Windows 2012 I started to dislike Windows more and more.
The step to go over to Linux started to interest me more and more with the birth of the Raspberry PI.
Also friends like Robert and Rene pushed me for years to make the turn
And since i got to know the Nodejs framework on Linux i had to make the switch.
And believe me; im loving every minute of it, what a relieve it is to program on Linux with Nodejs.
i have many Nodejs/MQTT/Websockets projects running now, but the first one who is presentable is the Node-js Iskra smartmeter solution.
I have a Raspberry connected to my smartmeter which sends the data via MQTT to the broker which is running on a Cubietruck http://blog.bwired.nl/?p=877
The Cubie is logging all the data to a mysql server which is also on the cubietruck and the Cubie is presenting this realtime smartmeter webpage with a realtime Graph
check out http://www.mijnsmartmeter.nl
A more detailed blog with sources can be found here http://blog.bwired.nl/?p=913
Later im panning also to open up a MQTT broker on my server so i can receive your MQTT messages as well!
Again special thanks goes out to Rene and Robert who turned me and helped me out with samples etc. during my Windows transition
http://www.bwired.nl Online Home, Domotica, Home Automation. Weblog. http://blog.bwired.nl
Re: Bwired Nodejs, MQTT, Websockets Iskra Smartmeter solution
Well done & looking very good!
Re: Bwired Nodejs, MQTT, Websockets Iskra Smartmeter solution
[SMILING FACE WITH OPEN MOUTH AND SMILING EYES]
Rene.
Re: Bwired Nodejs, MQTT, Websockets Iskra Smartmeter solution
Looking forward to your blog !
Verstuurd vanaf mijn GT-I9300 met Tapatalk
Verstuurd vanaf mijn GT-I9300 met Tapatalk
groeten,
Harry
Harry
Re: Bwired Nodejs, MQTT, Websockets Iskra Smartmeter solution
Looks very good, I love that updating bar diagram,
Re: Bwired Nodejs, MQTT, Websockets Iskra Smartmeter solution
check out the detailed blog
http://blog.bwired.nl/?p=913
http://blog.bwired.nl/?p=913
Re: Bwired Nodejs, MQTT, Websockets Iskra Smartmeter solution
Hi,
I'm also trying to build it.
When I run node smartmeter.,js is get an error
Any idea what it wrong?
regards Richard
I'm also trying to build it.
When I run node smartmeter.,js is get an error
Any idea what it wrong?
regards Richard
Code: Select all
root@raspberrypi:~# node smartmeter.js
Starting Smart Meter
Received: /ISk5\2ME382-1003
Received:
Received: 0-0:96.1.1(4B413650303035313534323830333133)
Received: 1-0:1.8.1(00257.944*kWh)
Received: 1-0:1.8.2(00124.951*kWh)
Received: 1-0:2.8.1(00000.000*kWh)
Received: 1-0:2.8.2(00000.000*kWh)
Received: 0-0:96.14.0(0001)
Received: 1-0:1.7.0(0000.26*kW)
Received: 1-0:2.7.0(0000.00*kW)
Received: 0-0:17.0.0(0999.00*kW)
Received: 0-0:96.3.10(1)
Received: 0-0:96.13.1()
Received: 0-0:96.13.0()
Received: 0-1:24.1.0(3)
Received: 0-1:96.1.0(4730303135353631303133333035303133)
Received: 0-1:24.3.0(140215200000)(00)(60)(1)(0-1:24.2.1)(m3)
Received: (00232.296)
Received: 0-1:24.4.0(1)
Received: !
/root/smartmeter.js:158
sendSdata(btelegram);
^
ReferenceError: sendSdata is not defined
at SerialPort.<anonymous> (/root/smartmeter.js:158:13)
at SerialPort.EventEmitter.emit (events.js:95:17)
at /root/node_modules/serialport/parsers.js:24:17
at Array.forEach (native)
at Object.parser (/root/node_modules/serialport/parsers.js:23:13)
at Object.SerialPort.options.dataCallback (/root/node_modules/serialport/serialport.js:136:15)
at SerialPortFactory.SerialPort._emitData (/root/node_modules/serialport/serialport.js:305:20)
at afterRead (/root/node_modules/serialport/serialport.js:283:18)
at /root/node_modules/serialport/serialport.js:297:9
at Object.wrapper [as oncomplete] (fs.js:454:17)
root@raspberrypi:~#
Re: Bwired Nodejs, MQTT, Websockets Iskra Smartmeter solution
You are calling a function sendSdata which is unknown.
Rene.
Re: Bwired Nodejs, MQTT, Websockets Iskra Smartmeter solution
I grabbed the script from the blog
http://blog.bwired.nl/?p=913
So what should it be?
regards Richard
http://blog.bwired.nl/?p=913
So what should it be?
regards Richard
Re: Bwired Nodejs, MQTT, Websockets Iskra Smartmeter solution
Drop it. I think I know where Pieter uses it for. so I assume and you won't need it.
Re: Bwired Nodejs, MQTT, Websockets Iskra Smartmeter solution
Robert,
Thats it.
Now its working , nice stuff
regards Richard
Thats it.
Now its working , nice stuff
regards Richard
Re: Bwired Nodejs, MQTT, Websockets Iskra Smartmeter solution
Hi Guys
Robert is right...as always
i adjusted the script on the blog also
I use this to send the data also to my old Home automation software, forgot to remove these 2 lines in the blog!
keep me posted if all is working an if i need to adjust some more
thanks Pieter
Robert is right...as always
i adjusted the script on the blog also
I use this to send the data also to my old Home automation software, forgot to remove these 2 lines in the blog!
Code: Select all
var btelegram = telegram.join();
sendSdata(btelegram);
thanks Pieter
Re: Bwired Nodejs, MQTT, Websockets Iskra Smartmeter solution
Hi all!
Could anybody give me a hint about modifying the code in order to get the values to be displayed from an MySQL database instead of getting them through the serial port?
Thanks
Could anybody give me a hint about modifying the code in order to get the values to be displayed from an MySQL database instead of getting them through the serial port?
Thanks
Re: Bwired Nodejs, MQTT, Websockets Iskra Smartmeter solution
my next blog is telling how to log this to mysql via MQTT, so you have to wait
Re: Bwired Nodejs, MQTT, Websockets Iskra Smartmeter solution
I hope you're posting on the blog every day