Hi lokonli, oops! Edwin I mean

Both did not work. I am at a loss here.
Greetz,
Sjonnie
Moderators: leecollings, htilburgs, robgeerts
Hi lokonli, oops! Edwin I mean
Tx for your relentless support!
Code: Select all
~/dev/dashticz $ make stop
Cleaning up dtv3-8082
Container dtv3-8082 exists
sudo docker stop dtv3-8082
dtv3-8082
sudo docker rm dtv3-8082
dtv3-8082
Code: Select all
~/dev/dashticz $ make start
Checking container dtv3-8082
Checking port 8082
sudo docker build --build-arg tz="Europe/Amsterdam" -t dtv3-8082 .
Sending build context to Docker daemon 3.072kB
Step 1/4 : FROM php:7.4-apache
---> a6a0a1e0a8da
Step 2/4 : ARG tz="Europe/Amsterdam"
---> Using cache
---> 8ff05c84eadd
Step 3/4 : RUN printf "[PHP]\ndate.timezone = $tz\n" > /usr/local/etc/php/conf.d/tzone.ini && mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
---> Using cache
---> d0ad1726f727
Step 4/4 : SHELL ["/bin/bash", "-c"]
---> Using cache
---> 2ef0c3cf431c
Successfully built 2ef0c3cf431c
Successfully tagged dtv3-8082:latest
sudo docker run --restart unless-stopped -v /etc/localtime:/etc/localtime:ro --name dtv3-8082 -d -p 8082:80 --mount type=bind,source="/home/pi/dev/dashticz",target=/var/www/html dtv3-8082
10eb0b4e99a416692dfe48e06924d4878d4b9c7b3b3f638fa81c8759b06d9220
Dashticz is running at:
http://192.168.16.165:8082
http://172.17.0.1:8082
Code: Select all
var config = {}
config['domoticz_ip'] = 'http://192.168.16.165:2080';
config['login_timeout'] = '60';
config['user_name'] = '';
config['pass_word'] = '';
config['app_title'] = 'Home Control';
What do you mean with exit? Is it a crash? or is the iPad just stopping an active browser window?
Code: Select all
frames.floorplan = { frameurl: 'http://192.168.x.x:8080/#/Floorplans', height: 695, width:12 }
Code: Select all
frames.slide3 = {frameurl:"http://192.168.x.x:9200/#/Floorplans", height: '540',scrollbars : false, width:12}
frames.fl= { frameurl: 'http://192.168.x.x:8080/#/Floorplans', height: 695, width:12 }
Code: Select all
' instead of " with http link (should not make a big difference i think
' is missing at height setting
Code: Select all
height: 695
Code: Select all
height: '695'
Interesting.TroisSix wrote: ↑Tuesday 23 March 2021 20:13 Hi Lokonli,
After a lot of tests, it seems that the reason of the bug was the frame displaying the floorplan of my domoticz:What is wrong?Code: Select all
frames.floorplan = { frameurl: 'http://192.168.x.x:8080/#/Floorplans', height: 695, width:12 }
In fact, I would prefer to have a simple button displaying the floorplan in fullscreen, but I couldn't make it work. So I added a page with this frames.floorplan
single quotes or double quotes will not make any difference.TroisSix wrote: ↑Wednesday 24 March 2021 8:42 Hi Lokonli,
In fact, I also had the bug without this frame.floorplan...
I will start again all my tests by waiting more longer (several jours between each test...)
If only I could know where to search in logs :'(
Ok madpatrick, I can search inside my code for all the missing quotes, and control I have double quotes for the url, if Lokonli confirms?
Code: Select all
config['enable_websocket'] = false;
I tried to create this for another dial as well.Lokonli wrote: ↑Tuesday 16 March 2021 19:06The data of your text device is already a string, so you have to remove parseFloat, otherwise it will be interpreted as a number. Like this:Chris12 wrote: ↑Tuesday 16 March 2021 11:03Does this work for Dials with text values shown as well?Lokonli wrote: ↑Monday 15 March 2021 21:19
There are a few steps:
1) Add the right device status
You can use the recently added device hook functionality. You have to do some programming...
Add the following to custom.js:
In this example the deviceStatus will be labeled 'bad' or 'good', depending on the ppm value.Code: Select all
function deviceHook(device) { if (device.idx==43) { //Check that device 43 is indeed the correct Domoticz device id var ppmvalue = parseFloat(device.Data); device.deviceStatus = ppmvalue> 500 ? 'bad':'good'; } }
The deviceStatus will be added as CSS class name to the dial values that use this device.
2) Set the styling in custom.css
Code: Select all
.item.bad { color: 'red' !important } .item.good { color: 'green' !important }
I have a dial basically showing me the status of my RPi Active/inactive using Monit, on that RPi I run Pihole.
So it would be great if I can see if the status is OK (Active) or Not OK (Inactive)
I tried this custom.js code:And added the css code as well. But I cannot see any changes for the specific dial (I expect that it will be green, as status is active)
- Spoiler: show
The device ID is correct (it's a text device in Domoticz)
Formatting the main value of a dial is also slightly different. You can use the following:Code: Select all
function deviceHook(device) { if (device.idx==1032) { //Domoticz device ID var rpiactive = device.Data; device.deviceStatus = rpiactive=='Active' ? 'good':'bad'; } }
Code: Select all
.good .value { color: green; } .bad .value { color: red; }
it is a switch type.
Dials of switch type already get a css class 'on' and 'off' assigned, depending on the switch state.Chris12 wrote: ↑Friday 26 March 2021 13:04it is a switch type.
My current dial config:The 'dialicon' does not change the icon within the dial.
- Spoiler: show
edit: Another thing noticed is that the graph does not show any values of this switch. In domoticz I can see the ON/OFF in the log/graph, so there're values logged.
Code: Select all
/*title color*/
div[data-id='switchtest'] .on .device {
color: green !important
}
div[data-id='switchtest'] .off .device {
color: red !important
}
/*switch icon color*/
div[data-id='switchtest'] .on i {
color: green !important
}
div[data-id='switchtest'] .off i {
color: red !important
}
/*ring color*/
div[data-id='switchtest'] .dial-center.on {
--dial-rgba: green !important;
}
div[data-id='switchtest'] .dial-center.off {
--dial-rgba: red !important;
}
div[data-id='switchtest'] .off .switch-face {
box-shadow: 0 0 25px 1px var(--dial-rgba);
}
/*last update colors*/
div[data-id='switchtest'] .on .info {
color: green !important
}
div[data-id='switchtest'] .off .info {
color: red !important
}
Code: Select all
blocks['switchtest'] = {
// idx: 5,
type: 'dial',
idx: 5,
iconSwitch: 'fas fa-volume-up'
}
Code: Select all
git checkout a14782748c1c430e87c32f3c675162ddd30938e2
Code: Select all
commit 2515b05c699130b5959d7b376c782a145bfa0bb2
Author: lokonli
Date: Mon Mar 15 22:14:04 2021 +0100
Users browsing this forum: Google [Bot] and 1 guest