This is a simple widget for Scriptable that displays current data from your OpenDTU.
To set up the widget, follow these steps:
- Load the
opendtu-small.js
oropendtu-medium.js
file into Scriptable. - Run the widget. Upon the first run, an
opendtu-config.json
file is created inside the Scriptable folder of your iCloud. Update thedtuApiUrl
variable with the IP address or URL of your OpenDTU.
- If you want to show the current power draw at your power meter, set
showPowerDraw = 1
. - As of now, the Tasmota and Shelly API are supported for power draw readings. Depending on your power meter, set
powermeter
to eithertasmota
orshelly
- update the
tasmotaApiUrl
/shellyApiUrl
variable with the IP address or URL of your Tasmota device. - If you use HTTP basic authentication, make sure to set
tasmotaUser
/shellyUser
andtasmotaPass
/shellyPass
respectively. - If desired, you may customize the thresholds section as well to configure how the Power value is colored.
It is strongly recommended not to completely expose your OpenDTU/Tasmota/Shelly device to the internet due to security reasons. However, if you still want to access it remotely, you can use a reverse proxy such as Nginx Proxy Manager. By configuring the reverse proxy to only expose the /api/livedata/status
endpoint, you can limit the exposure of your OpenDTU. Same goes for the /cm?cmnd=status%208
endpoint of your Tasmota device or the /status
endpoint of your Shelly. Since this endpoint only provides read-only access and does not expose any private data, it should be relatively safe. However, please note that I do not take any responsibility for any issues that may arise from this configuration.
For additional security, you might want to set up HTTP Basic authentication for the URLs. The widget provides support for that as well (c.f. above).
For instructions on how to forward the API endpoint using Nginx Proxy Manager, refer to this hint.
- Scriptable
- OpenDTU
- Tasmota
- Hichi Reader to read the values from my power meter
- Nginx Proxy Manager