Page 1 of 1

device title color

Posted: Wednesday 12 November 2014 14:46
by jackslayter
Hi, I seen which when I don't use a device during period the title become red (see attached)

its possible to put manually by lua/json the desired color ?
e.g. : for visual notice

thank you

Re: device title color

Posted: Wednesday 12 November 2014 20:09
by gizmocuz
Nope, because we have different colors for normal, battery problem, device problem, protected device, and so on.
If you overrule this color, then you wont notice the above

Re: device title color

Posted: Wednesday 12 November 2014 20:43
by jackslayter
ok , and it is possible to force the for example a "device problem" for not force debug colors ?
or maybe create new icons (red orange green) can you control in lua or new virtual device with icons?

Re: device title color

Posted: Wednesday 12 November 2014 20:50
by gizmocuz
yes, but this has to be in the database (json udevice)
if the device is received again, and there is no problem, the color will be normal

Re: device title color

Posted: Wednesday 12 November 2014 21:26
by jackslayter
ok so with json command I can change colour ?
what is the parameter ?

Re: device title color

Posted: Thursday 12 March 2015 22:39
by juankar
Hello
And which is the key to understand the meaning of colors?
I can't find it.
thanks

Re: device title color

Posted: Friday 13 March 2015 8:13
by jackslayter
yellow = low battery
red = no data received during +3 days
other ?

Re: device title color

Posted: Friday 13 March 2015 11:42
by juankar
Thanks,
And I get red color in a PIR sensor with two days without temperature report, although it reports presence and lux every few hours.

Re: device title color

Posted: Friday 24 April 2015 11:24
by jackslayter
'blue'
-> normal
normal.png
normal.png (8.81 KiB) Viewed 6547 times
'dark blue'
-> Device who is Protected
protec.png
protec.png (9.22 KiB) Viewed 6547 times
'yellow'
-> low battery
nobatt.png
nobatt.png (9.35 KiB) Viewed 6547 times

Re: device title color

Posted: Friday 24 April 2015 11:46
by jackslayter
'red'
-> no data received during +3 days
nodata.png
nodata.png (9.93 KiB) Viewed 6547 times

Re: device title color

Posted: Friday 24 April 2015 16:42
by gcoupe
gizmocuz wrote:...we have different colors for normal, battery problem, device problem, protected device, and so on.
jackslayter - thanks for documenting this so far.

I note that Gizmocuz says "and so on" in his reply. That would seem to indicate that there are further colours to be discovered and documented. Gizmocuz, is this in fact the case? Thanks.

Re: device title color

Posted: Tuesday 01 December 2015 14:20
by ramesses
I have Vision ZP3102 PIR Motion Sensor and it works great, but the title bar is read. See the picture (right - "Pokoj Alarm..")Image
There are several of them in my Domoticz and all are with red title bar. Can somebody explane to me why? Battery is ok and sensor works correctly.

Re: device title color

Posted: Thursday 10 December 2015 10:18
by ramesses
I solved the issue with red title bar of my Vision ZP3102 PIR motion sensor "Pokoj alarm...". I choose "another row" from Devices list to indicate PIR's motion which is not red in Dashboard.

Re: device title color

Posted: Tuesday 06 November 2018 9:27
by luberth
Hello

Do not realy get it
device status color turns red on devicetitlebar of dummy thermostat setting
why its only a setpoint?

another thing
is it possible to set/change the temperature setting of dummy thermostat setting from the floorplan

http://test:[email protected]:8080/#/Floorplans

ok as user test it is not possible
but as admin i also can not change temp setting on floorplan

greet luberth

Re: device title color

Posted: Tuesday 06 November 2018 9:35
by bewo
luberth wrote: Tuesday 06 November 2018 9:27 device status color turns red on devicetitlebar of dummy thermostat setting
why its only a setpoint?
Yes. If there is no new entry in the timeout you configured in your settings, then the device turns red.
There is no option to deactivate this feature for dummy devices.

If you don't want a red bar in your devices you can keep the setpoint active with an short lua script. Not a beautiful way, but it works without any problems for years now... :)

If it's useful for somebody:

Code: Select all

-- Script for "holding active" an dummy setpoint
-- 
-- After the configured timeout (in settings) an dummy setpoint will turn red, if there is no new entry.
-- This is only an optical problem, the device is working probably. But i don't like an red bar in my devices,
-- this sript renews the devices before it is going red. My setted timeout are 60 minutes, so if choosen
-- 3500 seconds as the renew-time.
-- So you have to chance the name of the dummy device, and perhaps the time in seconds.
-- Date: 06.11.2018 -- Domoticz forum -- bewo


-- Here set your setpoint:
local thermostat = 'Thermostat Heizautomatik'

commandArray = {}

function timedifference(timestamp)
  y, m, d, H, M, S = timestamp:match("(%d+)-(%d+)-(%d+) (%d+):(%d+):(%d+)")
  difference = os.difftime(os.time(), os.time{year=y, month=m, day=d, hour=H, min=M, sec=S})
  return difference
end

local function updatenum(dev, value1)
    local cmd = string.format("%d|0|%d", otherdevices_idx[dev], value1)
    table.insert (commandArray, { ['UpdateDevice'] = cmd } )
end

for deviceName,deviceValue in pairs(otherdevices) do
    if (deviceName== thermostat ) then

        if tonumber(deviceValue) > 0 then
            -- And here you have to set a time in seconds shorter than your timeout.
            if timedifference(otherdevices_lastupdate[thermostat]) > 3500
            
            then
            
            print ("The setpoint was renewed with the same temperature.")
            
            updatenum(thermostat, tonumber(otherdevices[thermostat]) + 0)
            
            end
        
       end
    end
end


return commandArray

Re: device title color

Posted: Tuesday 06 November 2018 9:59
by luberth
Thank you bewo ;-)

anybody has an answer to the second question?
another thing
is it possible to set/change the temperature setting of dummy thermostat setting from the floorplan

http://test:[email protected]:8080/#/Floorplans

ok as user test it is not possible
but as admin i also can not change temp setting on floorplan

greet luberth

Re: device title color

Posted: Tuesday 06 November 2018 10:28
by luberth
did code it a litle different but does the same

Code: Select all

commandArray = {}
now=os.date("*t")

-- domoticz lua timed script to prevent red titlebars on dummy thermostat
-- http://test:[email protected]:8080/#/Floorplans

                                        -- change % 1 to your desired reload minutes
if now.min % 1 == 0 then
   
        local SetTempVent = tonumber(otherdevices_svalues['Ventilate Living start >'])            -- get setting
	commandArray[#commandArray+1] = {['UpdateDevice']='32|1|'..SetTempVent}              -- set setting wih get setting
        print("SetTemp ventilator updated to prevent red titlebars  "..SetTempVent)                  -- print in log
        
        local SetTempPump = tonumber(otherdevices_svalues['cv pomp setting pomp aanbij Berkhout<'])        -- get setting
	commandArray[#commandArray+1] = {['UpdateDevice']='31|1|'..SetTempPump}                                   -- set setting wih get setting
        print("SetTempPump updated to prevent red titlebars  "..SetTempPump)                                              -- print in log
      
end

return commandArray
anybody has an answer to the second question?
another thing
is it possible to set/change the temperature setting of dummy thermostat setting from the floorplan

http://test:[email protected]:8080/#/Floorplans

ok as user test it is not possible
but as admin i also can not change temp setting on floorplan

greet luberth

Re: device title color

Posted: Wednesday 03 November 2021 14:22
by andrehj
andreazan wrote: Thursday 23 May 2019 21:50 I have sensors that are updated once /day.
In a fresh installation of Domoticz 4.10717, the default in
settings -> Other settings -> Sensor Timeout is 60 minutes, not 3 days !
So, to consider acceptable a full day delay for an update and avoid the device title color to become red,
you should set this value to 60*24 = 1440.
Thanks for this tip! I also have sensors updated only once a day and just changed the setting to 1440!