Skip to content

Latest commit

 

History

History
38 lines (25 loc) · 2.56 KB

README.md

File metadata and controls

38 lines (25 loc) · 2.56 KB

OpenDTU widget

This is a simple widget for Scriptable that displays current data from your OpenDTU.

Small widget Medium-sized widget

Setup

To set up the widget, follow these steps:

Obligatory

  1. Load the opendtu-small.js or opendtu-medium.js file into Scriptable.
  2. Run the widget. Upon the first run, an opendtu-config.json file is created inside the Scriptable folder of your iCloud. Update the dtuApiUrl variable with the IP address or URL of your OpenDTU.

Optional: Current power draw

  1. If you want to show the current power draw at your power meter, set showPowerDraw = 1.
  2. As of now, the Tasmota and Shelly API are supported for power draw readings. Depending on your power meter, set powermeter to either tasmota or shelly
  3. update the tasmotaApiUrl/shellyApiUrl variable with the IP address or URL of your Tasmota device.
  4. If you use HTTP basic authentication, make sure to set tasmotaUser/shellyUser and tasmotaPass/shellyPass respectively.
  5. If desired, you may customize the thresholds section as well to configure how the Power value is colored.

Accessing the widget from the Internet

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.

Links