Page 1 of 1

HTTP request -> LCD??

Posted: 23 Jul 2019, 19:29
by bastibasti
Hi,

is it possible to display the data received from a http request on a attached display? For example a rule runs every hour or so and requests http://whatever/display1234

the result will be plain text "123456"

can I display this value on the LCD or 7 segment??

Re: HTTP request -> LCD??

Posted: 23 Jul 2019, 22:24
by grovkillen
Currently no. The standard way is to POST to the unit. But you're suggesting that the unit itself should GET?

Re: HTTP request -> LCD??

Posted: 24 Jul 2019, 08:49
by dynamicdave
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 know it's not HTTP but MQTT works really well on the ESP8266 with ESP Easy (and a Raspberry Pi etc...).

I set the "Topic" entry of the MQTT-Out node in the Raspberry Pi to... <node_name>/cmd
e.g. wemos22/cmd

The MQTT-Out node was driven from a Function node (in the RPi) which setup the payload.
e.g. msg.payload = "oled,1,1,fred";
return msg;

The 1 and 1 are the row and column parameters for the OLED.
Please note the values for 'row' and 'col' start at 1 NOT 0 as in many array-element naming conventions,
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.

Re: HTTP request -> LCD??

Posted: 24 Jul 2019, 09:58
by bastibasti
mmhh,

thanks. If GET isnt currently supported, I think I will implement this using the AT firmware and an external arduino or something.

Goal is to get displayed values from an existing server by http, tcp or udp telnet. Push is not possible, since the esp module is not inside my network ;-)