Dashboard connection and separate HMI¶
Dashboard needs a running program that repeatedly executes its block and a transfer between that program and the dashboard. For the board, it uses connections established in ESP IDE; in the simulator its own communication link.
Start the project or connect to the program?¶
| Action | What happens |
|---|---|
| Run the code in the main IDE | It will load and run the program in the usual way. You can then open the panel with the block button or from the menu. |
| Start the project in the dashboard | It will use the normal launch of the current project and then open the connected dashboard. |
| Connect to program | Connects the panel to an already running program with the same configuration. The program does not reload or restart. |
| Odisconnect panel / close window | Terminates the dashboard session; the program continues. |
| Stop project | Stops the program itself. You have to start it again for the next run. |
The open panel attempts to connect to the corresponding program automatically when a connection is available. After manual disconnection, use Connect to program.
First connection to board¶
- Select the processor and connect the board in ESP IDE via USB, Bluetooth or WebREPL.
- Check the data points and external inputs of the Dashboard block. Variables must be attached for control.
- Start the project with the current configuration.
- Open the dashboard and wait for the first values.
A second independent connection to the same board is not opened. The attached panel uses the existing ESP IDE transport and reserves it for dashboard communication. Before manual terminal commands, file transfers, or other operations using transfer panel disconnect.
Simulator¶
Select Simulator, run the project and then open the panel. Do not connect USB port or Bluetooth device. The dashboard in the simulator requires shared memory (SharedArrayBuffer) and a running simulated program.
When the message about missing shared memory appears, save your work and restore the current ESP IDE. If the problem persists, send the site address and full report to the administrator; support also depends on the browser and server settings. Factory resetting the simulator files does not fix this setting.
Library on device¶
The generated program uses the espide_dashboard.py library. It must be part of the firmware or manually loaded in /lib. One common library is used for both the board and the simulator; The IDE does not overwrite its source file on startup.
Check device libraries for import error or incompatible transfer. After manually replacing the already loaded library, restart MicroPython. In the simulator, the library belongs to its file system, not to a physical disk attached to the computer.
Recovery and program passes¶
Refresh offers 50, 100, 250, 500ms and 1s. Default is 100ms. It's the required period of data, not the automatic wait inserted instead of your program loop.
The program must actually execute the Dashboard block. If it passes through it only after a longer measurement or wait, it cannot send new values or serve all panel commands before. Therefore, the set 50 ms alone does not guarantee 20 new samples per second.
The connection may wait for the next block traversal without a fixed timeout. You cancel it with the button Disconnect panel. For an already connected panel, the last values may remain visible even with a long pause between data. Track their update time.
The control entry, on the other hand, needs a program response. A long blocking wait can delay its confirmation or lead to an error. Therefore, divide the activity so that the program continuously serves the dashboard.
When the program needs to be uploaded again¶
| Change | What to do |
|---|---|
| Data points, their type, direction, engagement or recovery period | Save the design and run the project again. The running program must match the new configuration. |
| Adding or changing Dashboard blocks in | Run the entire project again; the identity of its dashboards also changes. |
| Only labels, placement or appearance of elements | Save design. These data are not the transferred variables themselves. |
| Configuration for stand-alone HMI stored in device | After the change, re-upload it by running the project, even if it was just the appearance. |
After modifying the design, the program on the board may still be old. Save alone in the dashboard editor does not override it.
Dashboard and debugger¶
Control of breakpoints and tracepoints is described in a separate chapter Program Debugging.
If the program is suspended at a breakpoint, it does not make further passes through the Dashboard block. The last data in the panel is not a new sample and it cannot be assumed that the suspended program will process the control command.
Concurrent Concurrency Limitation
The current implementation reserves traffic for an actively connected dashboard and may reject debugger control commands. Also, some transmissions may not handle debug messages correctly for this session. Therefore, for breakpoint stepping, leave the dashboard disconnected before entering the breakpoint; the open window alone does not replace disconnection of the active session.
If the program gets stuck at a breakpoint and the debugger does not offer a usable status or continue, disconnect the panel, stop the project, and start debugging again without an active dashboard session. This is not a feature that turning on the dashboard should intentionally provide, but a current limitation of traffic sharing.
Export and import panel¶
Export saves the configuration to file .espdash.json: data points, elements, their properties and layout. It does not contain the entire Blockly program or measurement history. To share the program, continue to use the .blk project or the ESP IDE share link.
Import loads the configuration into the design in progress. Go through the data points, confirm Save and check the block wiring. Local bindings of identical points can be preserved, but you have to connect the new points with project values. The import itself does not turn on the save option for standalone HMIs.
For later control in a separate HMI, export the configuration with fully connected inputs and corresponding to the uploaded program. A file without a valid identity can be viewed, but may not allow a control session to be established.
Save for standalone HMI¶
The option is in Edit mode and is disabled by default. The dashboard inside the ESP IDE is configured directly in the block project and does not need another configuration file on the board for its normal work.
After switching on and next project launch, the IDE will also save the configuration of this dashboard to the device. If several are enabled, one dashboard.json file will be created with all non-empty dashboards enabled.
- Saving the design itself does not yet transfer the file to the device.
- Disallowed dashboards continue to work inside the IDE.
- The file contains configurations for the panel, not the program, measurement history or library
espide_dashboard.py. - Disabling the option does not delete the previously saved file. If you no longer want it, delete it in the file manager; the next time you upload an enabled dashboard, the content of the common file is updated according to the project.
Separate HMI¶
HMI is a separate page for controlling an already running program, without an open Blockly editor. It uses the same elements as the dashboard in ESP IDE.
- Create and connect the dashboard in the IDE. Turn on Save for standalone HMI if you want to load the configuration from the board and run the project.
- Release the connection in the IDE. IDE, HMI and other serial monitor should not use the same transfer at the same time.
- Open standalone HMI, select USB, Bluetooth or WebREPL and select Connect device. Enter the necessary connection information for WebREPL.
- The panel loads the configuration from the device. With multiple dashboards, select the desired one in the top bar. Load from device refreshes the list.
- Alternatively, use Open file and load the corresponding
.espdash.jsonexport from the IDE.
HMI is for display and control, not for layout or program editing. It has no buttons to record, start or stop the project. Make these changes in the ESP IDE. The standalone site is not a substitute for the simulator; the given procedure is intended for a connected board with a running program.
Tips and pitfalls¶
| What do you observe | What to check |
|---|---|
| The panel will not open any dashboard | There must be a Dashboard block in the project. Open it with its own button. |
| Waiting for data or long connect | The program must be running, using the appropriate configuration and reaching the Dashboard block. |
| The driver is gray | In Edit mode, this is intentional. Otherwise, verify the connection, the first data received, and the writable point with the attached variable. |
| The value change is not retained | The program can overwrite it itself in the next pass. Check his assignment. |
| After changing the types, the panel does not communicate | Save and run the current project again; the configuration of the panel and the running program must match. |
| HMI reports that there are no dashboards on the device | Verify the option to save and re-upload the program, or open the exported file. |
| HMI will open the file but not connect the control | Check export identity and compatibility with running program; export after the block inputs are fully connected. |
| Terminal or file transfer is blocked | First, disconnect the dashboard session. |