ESP EASY LCD MQTT

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
davidcgu
Normal user
Posts: 12
Joined: 02 Jul 2017, 10:22

ESP EASY LCD MQTT

#1 Post by davidcgu » 18 Aug 2017, 07:13

I'm trying to figure out how to handle an 1602LCD I2C to display messages received via MQTT, I'm looking for some info but not able to find something that really clarifies me how to.

There is someone who already made it who can give me some tips?

I will really appreciate.

Thanks in advance

davidcgu
Normal user
Posts: 12
Joined: 02 Jul 2017, 10:22

Re: ESP EASY LCD MQTT

#2 Post by davidcgu » 25 Aug 2017, 14:22

What a success on my post... hahaha

I was looking the possibility to directly publish an MQTT message to publish directly on the LCD display however I get it working publishing an HTTP post with node red importing directly the received values from MQTT, what means I receive values via MQTT and node-red send the values directly to the LCD via HTTP.

If anyone is interested I can get some details.

Regards

davidcgu
Normal user
Posts: 12
Joined: 02 Jul 2017, 10:22

Re: ESP EASY LCD MQTT

#3 Post by davidcgu » 25 Aug 2017, 21:37

Any way to scroll a message on the LCD?

User avatar
dynamicdave
Normal user
Posts: 257
Joined: 30 Jan 2017, 20:25
Location: Hampshire, UK

Re: ESP EASY LCD MQTT

#4 Post by dynamicdave » 26 Aug 2017, 11:34

Hi,
I've been using MQTT to publish messages( i.e. temperature values and supporting text like "Too Hot", "OK", "Too Cold") to a miniature OLED I2C module (connected to an Wemos Mini D1 ESP8266).

I set the "Topic" entry of the MQTT node to... /<node_name>/cmd
e.g. /wemos22/cmd
Depending on how you have configured your ESP8266 you may or maynot need the first forward "slash".

The MQTT node was driven from a Function node which setup the payload.
e.g. msg.payload = "oled,0,0,fred";
return msg;

The 0 and 0 are the row and column parameters for the OLED.

Fred is just a piece of text.

If you wanted to send a value then use...

msg.payload = "oled, 0,0" + name_of_variable;
return msg;

You could put all the settings in the Function node and leave the MQTT node empty (apart from the MQTT server setting).
e.g.
msg.topic = "/wemos22/cmd";
msg.payload="oled,0,0,hello world";
return msg;

Hope this helps.

linker3000
Normal user
Posts: 12
Joined: 08 May 2017, 09:51

Re: ESP EASY LCD MQTT

#5 Post by linker3000 » 02 Jan 2018, 18:10

Thanks - saved me a bit of time working it out!

PS: For a 128x32 OLED display, I downloaded and compiled the Mega V2 branch today. In this code/config, the display XY origin is 1,1 and not 0,0.

Post Reply

Who is online

Users browsing this forum: No registered users and 85 guests