Show Device States as App
Use with Domoticz
Show a specific device state from Domoticz on AWTRIX
- Topic
- Smarthome
- Includes
- Flow
Runs on
- Does not run on 32×8 (TC001 & DIY) Made for AWTRIX 3.
- Does not run on 52×16 (TC002) Made for AWTRIX 3.
- Runs on 32×8 with AWTRIX 3 (TC001 & DIY)
Flow description
🔄 Activation and Timing:
- The script is marked as active by setting
active = true. - It runs every minute as specified in the trigger section
timer = {'every 1 minutes'}to ensure frequent updates.
-
📝 Logging:
- Entries are logged with the marker "AWTRIX_APP", making it easy to filter and identify messages related to this script.
- The logging level is set to
domoticz.LOG_INFO, capturing detailed informational logs for monitoring and debugging.
-
🔌 Power Check:
- Checks if the "AWTRIX3 - Power" device is "On" before proceeding. If not, the script execution is halted.
- Logs if the power device is off to explain why the script is not executing the status updates.
-
📈 Device Status Collection:
- Iterates over a predefined list of devices in
orderedDevicesto ensure a consistent sequence. - Retrieves status for each device based on its type and applies the corresponding data formatting:
- Temperature 🌡️: Captures temperature in Celsius (e.g., "21.5C").
- Power ⚡: Records current power usage in watts (e.g., "150W").
- Water 💧: Gathers water usage in liters (e.g., "23.4L").
- Text 📝: Fetches textual status (e.g., "Online").
- Switch 🔌: Monitors switch state, "On" or "Off".
- Selector 🔄: Retrieves the current selector level name (e.g., "High").
- Gas 🏭: Measures gas usage in cubic meters (e.g., "12.34 m³").
- Logs successfully gathered statuses and any missing data errors.
- Iterates over a predefined list of devices in
-
📤 Status Transmission to AWTRIX:
- Converts collected status data into JSON format for transmission to AWTRIX.
- Accesses the "AWTRIX3 - Send Custom App" device to send updates.
- Activates the app device briefly to ensure data is sent, logging the transmission for confirmation.
🏁 Purpose: This script facilitates real-time status monitoring from various home automation devices by displaying dynamic updates on the AWTRIX, enhancing the integration of Domoticz and AWTRIX for a seamless smart home experience.
More Information:
Domoticz:
www.domoticz.com
Domoticz AWTRIX3 Plugin:
https://github.com/galadril/Domoticz-AWTRIX3-Plugin
Sign in to view and copy the code of this flow.
Discussion 0
Ask a question, suggest a change or share how you use it.
No comments yet. Start the conversation.
Have an idea?
Sign in to ask questions and join the conversation.