I need to focus on my additional project in PHP. That means Doton and GfxLCD lib must wait but we will use this time to upgrade ProxyLCD project.
What is ProxyLCD? It is remote LCD that works on NodeMCU, stand alone desktop app in Python and Symfony’s bundle.
Bundle listens to dump() command and when a dump is called it parse object or array to a string, connects to an app and sends it. App gets this content and sends it to added remote LCDs.
Read more about ProxyLCD on the right column:)
I felt urge to finalize last step with remote LCD that I had in mind. It is a custom board with removable NodeMCU, LCD and PCF8574. All together are a Remote LCD Node :):
and it use at work desk:
We have our base container with Python3, PyQt5, CharLCD and iot_message: bkosciow/rpi-qtpython.
Today we will learn how to get files from GitHub and put them into image.
I found one annoying issue – when sending only number it crashes.
Crash was easy to fix but unexpected. While converting int to json, Python just convert it to number. I’m not sure if this is a bug or not. But I added additional check.
Lets make an app a little more talkative. When started it prints some useful info:
Config loaded. Starting app
TCP port: 5054
Broadcast IP: 192.168.1.255
Broadcast port: 5053
Name | Node name | Size | Stream | Type
Debug | node-40x4 | 40,4 | + | charlcd
Info | rpi1 | 20,4 | + | charlcd
damaged | node-2 | 16,2 | - | charlcd
We have a nice desktop application with nice GUI but this is not very useful on Raspberry Pi. Today we will work on adding option to run without GUI. Only server and data transfer.
How to manage LCD’s without GUI? Manually of course in the ini file 🙂
Finally 3rd phase of project – integration with Symfony 🙂 But I’m afraid it is not the last part 🙂
What is the goal of this Symfony bundle? It will hook to dump() command and send content to ProxyLCD application. It will transform any array or object to string representation.
Source on GitHub
Install via composer, package name: kosci/proxy-lcd-bundle
In first part we saw a summary (hardware and software) of remote LCD. Such remote LCD works on NodeMCU and can be accessed via network. It was first stage of bigger project.
Now is time for second part, a desktop application. Its main task is to manage remote LCDs and provide a way to send content from computer to display.
One may add/remove node and set a stream option. What is stream option?
App works in two ways (one for now :P, second option in 3rd phase) if it receive content and it is not a proper packet it iterates over all added lcds and streams data to them. Difference between display and stream is that stream as name says is just a data stream and it send chars one after another. When it reaches end of available space on display it starts over.
In case of packet it will send formatted content to node.
Get from GitHub
Part 1 – remote LCD
CLI on Raspberry Pi
First brick for my ‘secret’ project is ready. It is a remote LCD based on NodeMCU. Such node has a char lcd (HD44780) connected to it and listens for incoming broadcast messages. After receiving message that is for this node it displays content. It is nothing new but lets quickly summarize it.
Source code on GitHub