I have a script in domoticz that every 20 seconds makes a textfile named 'net_usage.txt' that grabs the values from some devices to make this:
Code: Select all
Voltage L1: 230.5 Volt Verbruik L1: 5 Watt Teruglevering L1: 500 Watt
Voltage L2: 235.2 Volt Verbruik L2: 1235 Watt Teruglevering L2: 2 Watt
Voltage L2: 235.0 Volt Verbruik L2: 20 Watt Teruglevering L2: 1040 Watt
I tried Dashticz to get this textfile to show on a tile but had no luck with this.
First tried the tile as an text so i added this to CONFIG.js to:
Code: Select all
-----
blocks[999] = {
width: 6
}
-----
columns[3] = {
blocks: [999],
width: 4
}
//Definition of tiles
tiles = {}
tiles['power_usage'] = {
block: 999,
width: 6,
title: 'Power Usage',
type: 'text',
refresh: 10,
url: 'file://nas-1/docker/domoticz/userdata/net_verbruik.txt'
}
Code: Select all
//Definition of tiles
tiles = {}
tiles['power_usage'] = {
block: 999,
width: 6,
title: 'Power Usage',
type: 'iframe',
refresh: 10,
url: 'file://nas-1/docker/domoticz/userdata/net_verbruik.txt',
height: '300px'
}
Code: Select all
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/weather-icons.css">
<script src="js/jquery.min.js"></script>
<script src="js/iframeResizer.min.js"></script>
Code: Select all
$(document).ready(function() {
$('iframe').iFrameResize();
What am i missing here?