Hello everyone. I really hope that someone can guide me into the right direction. My wife has a kitchen scale that is able to broadcast the weight readout over a serial port. I’m able to capture the data on a pc, but it is very inconvenient to use the pc in the kitchen. How do I use the ESP8266 so that it takes the serial data and broadcast it to an IP address.(with example Putty) On this way I can capture and store the weight without having the pc in way. I know that I have to stepdown the voltage of the serial port, but how to I make the ESP8266 work like a converter?
You’ll want a MAX3233 (or any of the MAX3xxx chips really) to level shift between the scale’s port and the ESP. As Don suggested MQTT is a good choice, you can easily record the data to a database on the other end, using node-red or just a python script.
Another option is websockets, running either client or server on the esp. Server is interesting; then you can connect directly to the ESP with any html5 browser and using a javascript websockets client, stream data from the scale without needing another server on the network.
Use a NodeMCU board or Witty board (ESP-12) so you have more memory to work with.
Thanks @Gordon_McLellan and @Don_Rideaux-Crenshaw for the info. I’ve never heard about MQTT before. It seems to be having a lot of potential even for other projects in the future. What would be the max refresh rate of the data? Many examples on the Web refresh every second. Is it possible to have it faster?
MQTT has a fair amount of overhead on the broker (server) side of things… and that’s just one variable, the signal strength of your WiFi to the esp is another, as well as what other code it’s running (esp programs need to yield frequently for behind the scenes jobs to run). I have toggled an LED via mqtt at 1/4 second intervals, so I know you can go at least that fast. If you want something like a real-time readout from the scales, mqtt is not your answer. For this, I would look at websockets.