small & clean text field in Dashticz?

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
renerene
Posts: 351
Joined: Wednesday 03 August 2016 11:36
Target OS: -
Domoticz version:
Contact:

small & clean text field in Dashticz?

Post by renerene »

To minimise place on my tablet I would lilke to show some data (temperatures, daily energy price) in a text field. That takes less room than the devices. How can this best be done?
I could make a dummy text sensor, but how to handle end of line returns?
Last edited by renerene on Monday 13 February 2023 19:36, edited 1 time in total.
willemd
Posts: 649
Joined: Saturday 21 September 2019 17:55
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.1
Location: The Netherlands
Contact:

Re: text field?

Post by willemd »

I use the log of a text field to show a table.
have a look at the example here
https://user-images.githubusercontent.c ... a9ab04.png
I had to change the default font of domoticz, to make it non-proportional and I had to replace spaces with underscore to get a nice table.

The top line of the log is then shown in the icon, example shown on the same page
https://github.com/WillemD61/battery-planning/
User avatar
madpatrick
Posts: 667
Joined: Monday 26 December 2016 12:17
Target OS: Linux
Domoticz version: 2025.1
Location: Netherlands
Contact:

Re: text field?

Post by madpatrick »

You can make a dummy text sensor in Domoticz and the text can easily confiured in Dashticz
I've several text " blocks" in Dashticz and the text is controlled via a Dzvents script to update the text or control the text

Here an example of Dashticz Screenssaver
2023-02-12 12_33_25-Fully Remote Admin.png
2023-02-12 12_33_25-Fully Remote Admin.png (29.76 KiB) Viewed 584 times
-= HP server GEN11 =- OZW -=- Toon2 (rooted) -=- Domoticz v2025.1 -=- Dashticz v3.14b on Tab8" =-
renerene
Posts: 351
Joined: Wednesday 03 August 2016 11:36
Target OS: -
Domoticz version:
Contact:

Re: text field?

Post by renerene »

madpatrick wrote: Sunday 12 February 2023 12:35 You can make a dummy text sensor in Domoticz and the text can easily confiured in Dashticz
I like the clean layout of these texts.
How do you make multiple lines? A table layout option also would be nice.
Just need something smal to place a lot of textdata in.
User avatar
madpatrick
Posts: 667
Joined: Monday 26 December 2016 12:17
Target OS: Linux
Domoticz version: 2025.1
Location: Netherlands
Contact:

Re: small & clean text field in Dashticz?

Post by madpatrick »

It is very dependable where the information is coming from.
You can use tables or formatting it by html code
Dashticz is very flexibel
-= HP server GEN11 =- OZW -=- Toon2 (rooted) -=- Domoticz v2025.1 -=- Dashticz v3.14b on Tab8" =-
renerene
Posts: 351
Joined: Wednesday 03 August 2016 11:36
Target OS: -
Domoticz version:
Contact:

Re: small & clean text field in Dashticz?

Post by renerene »

madpatrick wrote: Monday 13 February 2023 20:12 It is very dependable where the information is coming from.
From Domiticz offcourse ;-)
Maybe use dzVents to create some in-between variable / data file?
You can use tables or formatting it by html code
Dashticz is very flexibel
Sounds promising. Please elaborate. Do you have an example or instructions?
User avatar
madpatrick
Posts: 667
Joined: Monday 26 December 2016 12:17
Target OS: Linux
Domoticz version: 2025.1
Location: Netherlands
Contact:

Re: small & clean text field in Dashticz?

Post by madpatrick »

Sure.

This is a part of my DzVents script

Code: Select all

        if warmwater.state == "WW" and sensor.state =="On" then
            if not(afzuiging.active) then
                afzuiging.cancelQueuedCommands()
                afzuiging.switchOn().checkFirst()
                local message =  os.date("%H:%M",os.time() ) .. ' Ventilatie staat AAN'
                dz.log(message, dz.LOG_FORCE)
                textblock.updateText(message)
            else
                afzuiging.cancelQueuedCommands()
                dz.log('Ventilatie staat (al) AAN' , dz.LOG_FORCE)
                local message =  os.date("%H:%M",os.time() ) .. ' Ventilatie staat AAN'
                textblock.updateText(message)
            end
in Dashticz

Code: Select all

blocks['vent_block'] 		= {idx: 532, width : 4,hide_data : true,icon: ' ',title: 'Ventilatie'}

in Domoticz
make a virtual text sensor (mine is in this example idx: 532)
-= HP server GEN11 =- OZW -=- Toon2 (rooted) -=- Domoticz v2025.1 -=- Dashticz v3.14b on Tab8" =-
renerene
Posts: 351
Joined: Wednesday 03 August 2016 11:36
Target OS: -
Domoticz version:
Contact:

Re: small & clean text field in Dashticz?

Post by renerene »

Thank you madpatrick. Got it working

1) For testing I copied the same text three times and experimented a bit with "/n" symbol and string.char(10). But have not found a "new line" method yet. But good to see Dashticz shows multiple lines and breaks automaticly. That is a good starting point.
2) the reserved space for the icon and the title is a bit of a waste of space.

Image


UPDATE:
ah, needs some manual adjustments...
Image
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest