Power/ Usage sensor - multi channel - local display
-
Good evening,
After a couple of weeks, again i'm busy with my arduino's, but now i have a rasberry with domoticz near my arduino, so i don't need to send it wireless.
Is there a possibility to connect the master or slave arduino directly to my rasberry and read out the pulse meters??? -
With MySensors version 1.6 (currently in development) you can connect the Arduino to the Raspberry Pi's USB port using a FTDI or CH340G. That type of connection is called a serial gateway. Before 1.6, the gateways do not support local sensors.
-
I meen the master sketch like written above.
I'd want to build a gateway but without the wireless RF part, just connect the master arduino directly through usb to the RasberryPi and readout the measurements.
So in general:
Kwh Meters -- cable --> Slave arduino <-- serial --> Master arduino <-- USB --> RasberryPi
-
I meen the master sketch like written above.
I'd want to build a gateway but without the wireless RF part, just connect the master arduino directly through usb to the RasberryPi and readout the measurements.
So in general:
Kwh Meters -- cable --> Slave arduino <-- serial --> Master arduino <-- USB --> RasberryPi
-
@FotoFieber To be honest .. a left over from some experiments. Just leave it out... you won't notice the difference.
-
@AWI
Goodmorning,
I've got a question, are you planning to re-write the script for the main and slave Arduino to the new MySensors 2.0 structuur?I've also tryed to look on github if there's a page from you, but didn't find it...
-
Super.
I've updated everything and it's up and running.
But my Master arduino (UNO clone) gives this readout on the USB port:0;255;3;0;14;Gateway startup complete. 0;255;3;0;11;AWI-12ChannelPulse 0;255;3;0;12;2.0 0;0;0;0;13;Groep 1 0;1;0;0;13;Groep 2 0;2;0;0;13;Groep 3 0;3;0;0;13;Groep 4 0;4;0;0;13;Groep 5 0;5;0;0;13;Groep 6 0;20;0;0;36;Usage meter LCD 0;20;1;0;47;- 0;255;3;0;1; 0;255;3;0;1; 0;0;1;0;17;0 0;0;1;0;18;-0.001 0;255;3;0;1; 0;1;1;0;17;0 0;1;1;0;18;-0.001 0;255;3;0;1; 0;2;1;0;17;0 0;2;1;0;18;-0.001 0;255;3;0;1; 0;3;1;0;17;0 0;3;1;0;18;-0.001 0;255;3;0;1; 0;4;1;0;17;0 0;4;1;0;18;-0.001 0;255;3;0;1; 0;5;1;0;17;0 0;5;1;0;18;-0.001 0;255;3;0;1; 0;0;1;0;17;0 0;0;1;0;18;-0.001 0;255;3;0;1; 0;1;1;0;17;0 0;1;1;0;18;-0.001 0;255;3;0;1; 0;2;1;0;17;0 0;2;1;0;18;-0.001 0;20;2;0;47; 0;255;3;0;1; 0;3;1;0;17;0 0;3;1;0;18;-0.001 0;255;3;0;1; 0;4;1;0;17;0 0;4;1;0;18;-0.001 0;255;3;0;1; 0;5;1;0;17;0 0;5;1;0;18;-0.001 0;255;3;0;1; 0;0;1;0;17;0 0;0;1;0;18;-0.001 0;255;3;0;1; 0;1;1;0;17;0 0;1;1;0;18;-0.001 0;255;3;0;1; 0;2;1;0;17;0 0;2;1;0;18;-0.001 0;255;3;0;1; 0;3;1;0;17;0 0;3;1;0;18;-0.001 0;255;3;0;1; 0;4;1;0;17;0 0;4;1;0;18;-0.001 0;255;3;0;1; 0;5;1;0;17;0 0;5;1;0;18;-0.001 0;255;3;0;1; 0;0;1;0;17;0 0;0;1;0;18;-0.001 0;20;2;0;47; 0;255;3;0;1; 0;1;1;0;17;0 0;1;1;0;18;-0.001 0;255;3;0;1; 0;2;1;0;17;0 0;2;1;0;18;-0.001 0;255;3;0;1; 0;3;1;0;17;0 0;3;1;0;18;-0.001 0;255;3;0;1; 0;4;1;0;17;0 0;4;1;0;18;-0.001 0;255;3;0;1; 0;5;1;0;17;0 0;5;1;0;18;-0.001 0;255;3;0;1; 0;0;1;0;17;0 0;0;1;0;18;-0.001 0;255;3;0;1; 0;1;1;0;17;0 0;1;1;0;18;-0.001 0;255;3;0;1; 0;2;1;0;17;0 0;2;1;0;18;-0.001 0;255;3;0;1; 0;3;1;0;17;0 0;3;1;0;18;-0.001 0;255;3;0;1; 0;4;1;0;17;0 0;4;1;0;18;-0.001 0;20;2;0;47; 0;255;3;0;1; 0;5;1;0;17;0 0;5;1;0;18;-0.001 0;255;3;0;1; 0;0;1;0;17;0 0;0;1;0;18;-0.001 0;255;3;0;1; 0;1;1;0;17;0 0;1;1;0;18;-0.001 0;255;3;0;1; 0;2;1;0;17;0 0;2;1;0;18;-0.001 0;255;3;0;1; 0;3;1;0;17;0 0;3;1;0;18;-0.001 0;255;3;0;1; 0;4;1;0;17;0 0;4;1;0;18;-0.001 0;255;3;0;1; 0;5;1;0;17;0 0;5;1;0;18;-0.001 0;255;3;0;1; 0;0;1;0;17;0 0;0;1;0;18;-0.001 0;255;3;0;1; 0;1;1;0;17;0 0;1;1;0;18;-0.001 0;255;3;0;1; 0;2;1;0;17;0 0;2;1;0;18;-0.001 0;20;2;0;47; 0;255;3;0;1; 0;3;1;0;17;0 0;3;1;0;18;-0.001 0;255;3;0;1; 0;4;1;0;17;0 0;4;1;0;18;-0.001 0;255;3;0;1; 0;5;1;0;17;0 0;5;1;0;18;-0.001 0;255;3;0;1; 0;0;1;0;17;0 0;0;1;0;18;-0.001 0;255;3;0;1; 0;1;1;0;17;0 0;1;1;0;18;-0.001 0;255;3;0;1; 0;2;1;0;17;0 0;2;1;0;18;-0.001 0;255;3;0;1; 0;3;1;0;17;0 0;3;1;0;18;-0.001 0;255;3;0;1; 0;4;1;0;17;0 0;4;1;0;18;-0.001 0;255;3;0;1; 0;5;1;0;17;0 0;5;1;0;18;-0.001 0;255;3;0;1; 0;0;1;0;17;0 0;0;1;0;18;-0.001 0;20;2;0;47; 0;255;3;0;1; 0;1;1;0;17;0 0;1;1;0;18;-0.001 0;255;3;0;1; 0;2;1;0;17;0 0;2;1;0;18;-0.001 0;255;3;0;1; 0;3;1;0;17;0 0;3;1;0;18;-0.001 0;255;3;0;1; 0;4;1;0;17;0 0;4;1;0;18;-0.001 0;255;3;0;1; 0;5;1;0;17;0 0;5;1;0;18;-0.001 0;255;3;0;1; 0;0;1;0;17;0 0;0;1;0;18;-0.001 0;255;3;0;1; 0;1;1;0;17;0 0;1;1;0;18;-0.001 0;255;3;0;1; 0;2;1;0;17;0 0;2;1;0;18;-0.001 0;255;3;0;1; 0;3;1;0;17;0 0;3;1;0;18;-0.001 0;255;3;0;1; 0;4;1;0;17;0 0;4;1;0;18;-0.001 0;20;2;0;47; 0;255;3;0;1; 0;5;1;0;17;0 0;5;1;0;18;-0.001 0;255;3;0;1; 0;0;1;0;17;0 0;0;1;0;18;-0.001 0;255;3;0;1; 0;1;1;0;17;0 0;1;1;0;18;-0.001 0;255;3;0;1; 0;2;1;0;17;0 0;2;1;0;18;-0.001 0;255;3;0;1; 0;3;1;0;17;0 0;3;1;0;18;-0.001 0;255;3;0;1; 0;4;1;0;17;0 0;4;1;0;18;-0.001 0;255;3;0;1; 0;5;1;0;17;0 0;5;1;0;18;-0.001 0;255;3;0;1; 0;0;1;0;17;0 0;0;1;0;18;-0.001 0;255;3;0;1; 0;1;1;0;17;0 0;1;1;0;18;-0.001 0;255;3;0;1; 0;2;1;0;17;0 0;2;1;0;18;-0.001 0;20;2;0;47; 0;255;3;0;1; 0;3;1;0;17;0 0;3;1;0;18;-0.001 0;255;3;0;1; 0;4;1;0;17;0 0;4;1;0;18;-0.001 0;255;3;0;1; 0;5;1;0;17;0 0;5;1;0;18;-0.001 0;255;3;0;1; 0;0;1;0;17;0 0;0;1;0;18;-0.001 0;255;3;0;1; 0;1;1;0;17;0 0;1;1;0;18;-0.001 0;255;3;0;1; 0;2;1;0;17;0 0;2;1;0;18;-0.001 0;255;3;0;1; 0;3;1;0;17;0 0;3;1;0;18;-0.001 0;255;3;0;1; 0;4;1;0;17;0 0;4;1;0;18;-0.001 0;255;3;0;1; 0;5;1;0;17;0 0;5;1;0;18;-0.001 0;255;3;0;1; 0;0;1;0;17;0 0;0;1;0;18;-0.001 0;20;2;0;47; 0;255;3;0;1; 0;1;1;0;17;0 0;1;1;0;18;-0.001 0;255;3;0;1; 0;2;1;0;17;0 0;2;1;0;18;-0.001 0;255;3;0;1; 0;3;1;0;17;0 0;3;1;0;18;-0.001 0;255;3;0;1; 0;4;1;0;17;0 0;4;1;0;18;-0.001 0;255;3;0;1; 0;5;1;0;17;0 0;5;1;0;18;-0.001 0;255;3;0;1; 0;0;1;0;17;0 0;0;1;0;18;-0.001 0;255;3;0;1; 0;1;1;0;17;0 0;1;1;0;18;-0.001 0;255;3;0;1; 0;2;1;0;17;0 0;2;1;0;18;-0.001 0;255;3;0;1; 0;3;1;0;17;0 0;3;1;0;18;-0.001 0;255;3;0;1; 0;4;1;0;17;0 0;4;1;0;18;-0.001 0;20;2;0;47; 0;255;3;0;1; 0;5;1;0;17;0 0;5;1;0;18;-0.001 0;255;3;0;1; 0;0;1;0;17;0 0;0;1;0;18;-0.001 0;255;3;0;1; 0;1;1;0;17;0 0;1;1;0;18;-0.001 0;255;3;0;1; 0;2;1;0;17;0 0;2;1;0;18;-0.001 0;255;3;0;1; 0;3;1;0;17;0 0;3;1;0;18;-0.001 0;255;3;0;1; 0;4;1;0;17;0 0;4;1;0;18;-0.001 0;255;3;0;1; 0;5;1;0;17;0 0;5;1;0;18;-0.001 0;255;3;0;1; 0;0;1;0;17;0 0;0;1;0;18;-0.001 0;255;3;0;1; 0;1;1;0;17;0 0;1;1;0;18;-0.001 0;255;3;0;1; 0;2;1;0;17;0 0;2;1;0;18;-0.001 0;20;2;0;47; 0;255;3;0;1; 0;3;1;0;17;0 0;3;1;0;18;-0.001 0;255;3;0;1; 0;4;1;0;17;0 0;4;1;0;18;-0.001 0;255;3;0;1; 0;5;1;0;17;0 0;5;1;0;18;-0.001 0;255;3;0;1; 0;0;1;0;17;0 0;0;1;0;18;-0.001 0;255;3;0;1; 0;1;1;0;17;0 0;1;1;0;18;-0.001 0;255;3;0;1; 0;2;1;0;17;0 0;2;1;0;18;-0.001 0;255;3;0;1; 0;3;1;0;17;0 0;3;1;0;18;-0.001 0;255;3;0;1; 0;4;1;0;17;0 0;4;1;0;18;-0.001 0;255;3;0;1; 0;5;1;0;17;0 0;5;1;0;18;-0.001 0;255;3;0;1; 0;0;1;0;17;0 0;0;1;0;18;-0.001 0;20;2;0;47; 0;255;3;0;1; 0;1;1;0;17;0 0;1;1;0;18;-0.001 0;255;3;0;1; 0;2;1;0;17;0 0;2;1;0;18;-0.001 0;255;3;0;1; 0;3;1;0;17;0 0;3;1;0;18;-0.001 0;255;3;0;1; 0;4;1;0;17;0 0;4;1;0;18;-0.001 0;255;3;0;1; 0;5;1;0;17;0 0;5;1;0;18;-0.001 0;255;3;0;1; 0;0;1;0;17;0 0;0;1;0;18;-0.001 0;255;3;0;1; 0;1;1;0;17;0 0;1;1;0;18;-0.001 0;255;3;0;1; 0;2;1;0;17;0 0;2;1;0;18;-0.001 0;255;3;0;1; 0;3;1;0;17;0 0;3;1;0;18;-0.001 0;255;3;0;1; 0;4;1;0;17;0 0;4;1;0;18;-0.001 0;20;2;0;47; 0;255;3;0;1; 0;5;1;0;17;0 0;5;1;0;18;-0.001 0;255;3;0;1; 0;0;1;0;17;0 0;0;1;0;18;-0.001Is this correct?
Because Domoticz doesn't change the values.
Also this is not the format, wich is past through in the JSON code from the slave to master duino?? -
@AWI
How is it that i get the readings like above? And after a while the sensor also stops with sending data, last connection stays on that time and date.I've uploaded your github sketch and done a serial readout of the measuring arduino and that one functions proberbly. No faulty low voltage errors etc.
-
@AWI
How is it that i get the readings like above? And after a while the sensor also stops with sending data, last connection stays on that time and date.I've uploaded your github sketch and done a serial readout of the measuring arduino and that one functions proberbly. No faulty low voltage errors etc.
-
@MarkV Ok, one step at a time.. the output looks like the output of your (serial) gateway. Have you tried to switch on the "Master node" debug Serial.print() statements?
@AWI
It the serial output from the gateway arduino, wich i've got connected through usb.
I don't have a rotaryswitch connected and yesterday evening i connected a I2c Display just to see if something changes on that.I noticed one thin, when i check the serial output, the timer on the display is reset. Further more when i stop the serial readout, the counter also stops, like if the hole thing go's into a idle or stop.
I've uncommented the debug informatie wich i could find:
// Handle incoming messages from the MySensors Gateway void receive(const MyMessage &message) { // Expect few types of messages from controller, V_VAR1 for messages if (message.type==V_TEXT) { // if message comes in, update the kWH reading for meter with value since last update // Write some debug info Serial.print("Last reading for sensor: "); Serial.print(message.sensor); Serial.print(", Message: "); Serial.println(message.getString()); if (message.sensor == LCD1_CHILD ) { strcpy(lastLCD1, message.getString()); // read payload in LCD string } } }Were could i read this debug information?
At this moment i got my arduino hooked up through usb to my rasberry to see if it keeps sending information.I also changed all the cables to the meters.
This is how one meter looks like:
And a other one:
All the meters are showing also strange values on the axis.
Sorry for being such a noob at this.. :-S
-
@AWI
It the serial output from the gateway arduino, wich i've got connected through usb.
I don't have a rotaryswitch connected and yesterday evening i connected a I2c Display just to see if something changes on that.I noticed one thin, when i check the serial output, the timer on the display is reset. Further more when i stop the serial readout, the counter also stops, like if the hole thing go's into a idle or stop.
I've uncommented the debug informatie wich i could find:
// Handle incoming messages from the MySensors Gateway void receive(const MyMessage &message) { // Expect few types of messages from controller, V_VAR1 for messages if (message.type==V_TEXT) { // if message comes in, update the kWH reading for meter with value since last update // Write some debug info Serial.print("Last reading for sensor: "); Serial.print(message.sensor); Serial.print(", Message: "); Serial.println(message.getString()); if (message.sensor == LCD1_CHILD ) { strcpy(lastLCD1, message.getString()); // read payload in LCD string } } }Were could i read this debug information?
At this moment i got my arduino hooked up through usb to my rasberry to see if it keeps sending information.I also changed all the cables to the meters.
This is how one meter looks like:
And a other one:
All the meters are showing also strange values on the axis.
Sorry for being such a noob at this.. :-S
@MarkV Hi Mark It is a rather complicated sketch, so not easy to debug remote.
You need to connect the master arduino to your USB and check with the serial monitor.
then add some Serial.print() statements starting form where the data is read.The piece you commented out is where the node should receive information from the controller. I expect you didn't come far enough to set that up.
(as I noticed you are Dutch, we can use the chat function on the forum to get this working...please don't expect immediate answers..)
-
@MarkV Hi Mark It is a rather complicated sketch, so not easy to debug remote.
You need to connect the master arduino to your USB and check with the serial monitor.
then add some Serial.print() statements starting form where the data is read.The piece you commented out is where the node should receive information from the controller. I expect you didn't come far enough to set that up.
(as I noticed you are Dutch, we can use the chat function on the forum to get this working...please don't expect immediate answers..)