Skip to content

New Share your ideas with the AWTRIX community. Keep your creations together in your account.

Sign in

Which AWTRIX do you have? Choose it once and the Hub shows what runs on it.

ScriptAWTRIX NG

Solar App V2

On an AWTRIX display
Solar App V2 shown on an AWTRIX display
Solar App V2 · by shaarkys

On your display

Animated solar, battery, house load and grid power dashboard for AWTRIX NG on TC002, using your MQTT data.

Which AWTRIX do you have? See below where it runs, or choose your device.
Topic
Smarthome
Includes
Script

Runs on

  • Does not run on 32×8 (TC001 & DIY) Made for 52×16 (TC002).
  • Runs on 52×16 (TC002)
  • Does not run on 32×8 with AWTRIX 3 (TC001 & DIY) Made for AWTRIX NG.

Choose your display in the next step.

Send to AWTRIX

Choose your AWTRIX

Solar App V2AWTRIX NG script

Install this script on your AWTRIX NG. Its icons and sounds are installed with it.

Your AWTRIX’s local address, for example 192.168.178.39 or awtrix.local.

The name shown in your AWTRIX script list. Use letters, digits, hyphens or underscores.

Connection & device login

Connect your phone or computer to the same network as your AWTRIX. Allow local network access if your browser asks.

Use the device’s IP address, without a page path such as /#/apps.

If your AWTRIX requires a login, the username and password fields will appear when you connect.

Sign in to the Hub to install scripts. Attached files are installed separately.

Script description

Description

Turn your Ulanzi TC002 into a compact energy dashboard. Solar App V2 is a remix of SolarApp with rotating views for your solar production, battery, house load and grid connection.

  • Solar: current production and today's yield, with a choice of two animated sun styles.
  • Battery: state of charge and optional signed charge/discharge power. Illuminated cells follow the reported charge, and particles show the direction of charging or discharging.
  • House: measured house load with an animated scene. The illustration reflects an available measured source, or uses a generic electricity symbol when the source is unknown; it does not calculate an energy mix.
  • Grid: signed net power with import, export or idle status and directional energy particles.

The default rotation is Solar → Battery → House → Grid, five seconds per view. Press Select to advance. You can choose the starting view, rotation time, solar style, animation speed and which views are enabled. Solar is skipped when production is zero, below its threshold or stale; other views are skipped when their primary data is missing or stale. If no view is available, the app shows NO DATA / MQTT.

Solar App V2 four-view rotation

The images and animations are simulated previews rendered from the script with sample MQTT data, not recordings of a physical TC002. Actual colors, timing and appearance can differ on the device.

Screens and animations

Solar App V2 simulated screenshot gallery

View Screenshot Animation
Solar — large sun PNG GIF
Solar — half sun PNG GIF
Battery charging PNG GIF
Battery discharging PNG GIF
House — solar available PNG GIF
House — battery discharging PNG GIF
House — grid import PNG GIF
House — source unknown PNG GIF
Grid import PNG GIF
Grid export PNG GIF
Grid idle PNG GIF

View the complete screenshot gallery · Source and full guide

Setup

Requirements: AWTRIX NG on a 52×16 TC002, an MQTT broker configured on the clock, and a source that publishes your energy readings to MQTT. No separate icons or sounds are required.

  1. Install the remix through AWTRIX Hub, or import SolarApp.ax in the clock's Scripts tab and save it.
  2. Open the script settings and enter the MQTT topics you use. Disable a view or leave its primary topic empty if you do not use it.
  3. Set the yield input unit and the grid/battery sign conventions to match your publisher. Adjust the per-view switches, rotation time and data timeouts as needed.
  4. Compare the displayed values and directions with your inverter, battery and grid meter. Use Select to cycle through available views.
Setting Expected input Example
Power MQTT Topic Solar production in watts 2500 or {"P_AC":2500}
Daily Yield MQTT Topic Today's production, in Wh by default 12345 or {"YieldDay":12345}
Consumption MQTT Topic Actual house load in watts 900 or {"consumption":900}
FVE Battery Capacity MQTT Topic (%) State of charge, 0–100% 76 or {"soc":76}
FVE Battery Power MQTT Topic (W) Optional signed charge/discharge power 850 or {"battery_power":850}
Grid Power MQTT Topic (W) Signed net grid power -420 or {"grid_power":-420}

All power inputs are watts. By default, positive grid power means import and negative means export; positive battery power means charging and negative means discharging. Each sign convention can be reversed in settings. The battery and grid idle thresholds default to 10 W.

The yield input defaults to Wh; select kWh if your publisher uses kWh. Its display unit is configured separately. Live readings expire after 120 seconds and yield after 3600 seconds by default; increase these for slower publishers or set a timeout to 0 to disable expiry. A retained message is considered fresh when received, even if it was published long ago.

Numeric MQTT payloads and JSON objects with numeric values or numeric strings are supported. For custom JSON keys, enter the exact top-level field name in the Optional JSON fields settings. The same JSON topic can be used for multiple readings. Nested JSON paths and separate unsigned import/export topics are not supported; publish a signed net grid value. House load must be an actual house measurement, not net grid power.

Example shared payload:

{"pv":2500,"today":12345,"house":900,"soc":76,"battery":850,"grid":-420}

Configure the same topic for the six inputs and set their JSON fields to pv, today, house, soc, battery and grid, respectively. See the full setup and troubleshooting guide for more details.

More scripts in Smarthome

Something wrong with this script? Report it.