Gurux Node MCU
Gurux Node MCU
Menu
Home Forums Code For Secure Energy Meter Using Nodemcu and Show All
You can create a new topic selecting correct category from Gurux
Forum and then create a new topic selecting "New Topic" from the top
left.
How can i make a code for display reading on lcd of energy meter by
OBIS Code using Nodemcu. Can you suggest or link to me for making
Hi,
Hi,
It also prints date and time for the serial port using GXTRACE.
You need to add register objects in the same way as the clock object has been
added.
The problem at the moment is that one of your settings is different than the me-
ter expects.
Try to connect with GXDLMSDirector for your meter. It will help you to get a
BR,
Mikko
ayushshriwastav 2 years 3 months ago
Hi,
Hi,
Thanks sir for reply. My question is not that use gxtrace or com_AllObject. My
for example, Can i write syntax in void loop() in Arduindo in given below-
Thanks Sir,
Hi,
Hi,
gxtrace is send to write a trace. You don't use it for the communication. You can
think that gxtrace equals Console.WriteLine. It's used to print the value, not for
the communication.
Check this. It will read the date and time from the clock object and then write
//Read clock
gxClock clock1;
com_read(BASE(clock1), 3);
com_read(BASE(clock1), 2);
obj_toString(BASE(clock1), &data);
GXTRACE(GET_STR_FROM_EEPROM("Clock"), data);
obj_clear(BASE(clock1));
free(data);
BR,
Mikko
Hi,
Hi,
Thanks for replying sir, How can i read value of Register and Extended Register
in void loop() function in Arduino? What is syntax of Register and Extended reg-
Hi,
Hi,
Add values that you want to read under the clock object. Something like this:
//Read register
gxRegister reg1;
cosem_init(BASE(reg1), DLMS_OBJECT_TYPE_REGISTER,
"YOUR_OBIS_CODE");
com_read(BASE(reg1), 3);
com_read(BASE(reg1), 2);
obj_toString(BASE(reg1), &data);
GXTRACE(GET_STR_FROM_EEPROM("Register"), data);
obj_clear(BASE(reg1));
free(data);
BR,
Mikko
Hi,
Thank you so much for replying sir . How can i find InvocationCounter for
Secure Meter?
Please tell me about InvocationCounter for Secure meter? How can I find it and
Hi,
Hi,
When you connect to the meter there should be an Invocation Counter data ob-
ject. It's used to improve security, but all meters don't use it.
BR,
Mikko
Hi,
I am very happy to hear for reply sir , thank you so much sir. If Some meter don't
Hi,
Hi,
com_readAllObjects(NULL);
BR,
Mikko
Hi,
Hi,
Thanks for replying sir. I have found new error in NodeMCU Board in Arduino
IDE when clock and register define in void loop() function in given below. How
Arduino: 1.8.18 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz,
Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible),
Hi,
Hi,
BR,
Mikko
Hi,
Hi,
Thank you so much sir. It is working perfectly and i did make it Global Variable
I have some question now that if i want to read more values of Register for ex-
ample reg2, reg3, reg4 and reg5 etc. So what will syntax be written in void loop()
Hi,
Hi,
Check my answer:
https://www.gurux.fi/comment/25325#comment-25325
BR,
Mikko
Hi,
Hi,
Thanks for reply sir. I am receiving this error again after convert object to string
Hi,
Hi,
It's a little hard to say from your pics, but you need to set data to NULL after
free.
free(data);
data = NULL;
BR,
Mikko
Hi,
Hi,
Thanks for replying sir. I am very happy that you are guiding well sir. I am at-
taching code of void loop() function of client.ino in given below - and please tell
void loop()
int ret;
gxClock clock1;
runTime = millis();
ret = com_readAllObjects(1.0..43.1.0.255);
com_close();
Hi,
Hi,
It looks correct to me.
BR,
Mikko
Hi,
Hi,
Thanks for replying sir. Very nice responsive talking. I have added more register
whose name is reg2,reg3,reg4 in given below code. what is this correct code or
not because i am taking register value in same time and declare global variable
char* data = NULL; So please brief explain how is storing reg1,reg2,reg3 and
reg4 in data in same time? And please tell sir this code is correct or not in given
below-
client.ino
int ret;
gxClock clock1;
gxRegister reg1;
gxRegister reg2;
gxRegister reg3;
gxRegister reg4;
Hi,
Hi,
This is the correct way to do it. You aren't reading the values with the same re-
quest. You can use readList to read multiple values with one request, but all the
BR,
Mikko
Hi,
Hi,
Thanks for reply sir, Can you please suggest and give syntax me How can use
And also brief tell sir if meter don't support it then what should be do for it?
Hi,
Hi,
https://github.com/Gurux/GuruxDLMS.c/blob/c65175efc8917f0ee3a7eb340ac4
e…
If that is not supported then you need to read objects one by one as you do now.
BR,
Mikko
Hi,
Hi,
Very thank you so much. Very nice talking and I am very happy that you are very
helpful sir. Can you please tell how can read all value in
com_readScalerAndUnits().
Hi,
Hi,
I believe that you don't want to read all values. It's taking a long time, but this
does it.
https://github.com/Gurux/GuruxDLMS.c/blob/c65175efc8917f0ee3a7eb340ac4
e…
BR,
Mikko
Hi,
Hi,
I believe that you don't want to read all values. It's taking a long time, but this
does it.
https://github.com/Gurux/GuruxDLMS.c/blob/c65175efc8917f0ee3a7eb340ac4
e…
BR,
Mikko
Hi,
Thanks for helping but i didn,t get ouput. Sure, I will find.
1 2
Username
Password
Log in
Latest Releases
Who's new
D@faizan4321
DarrekonTrure
Charleseton
GictorGrala
Wayneimach
RSS feed