Page 1 of 2

Grayed-out UI item in Utility Sensors

Posted: Tuesday 01 December 2020 18:57
by philchillbill
Just noticed something I've never seen before, a dark/grayish UI entry for one of my sensors:

Image

Any idea what causes it?

Re: Grayed-out UI item in Utility Sensors

Posted: Tuesday 01 December 2020 20:56
by waaren
philchillbill wrote: Tuesday 01 December 2020 18:57 Just noticed something I've never seen before, a dark/grayish UI entry for one of my sensors:
Is this on the default theme?

Re: Grayed-out UI item in Utility Sensors

Posted: Tuesday 01 December 2020 23:27
by philchillbill
waaren wrote:
philchillbill wrote: Tuesday 01 December 2020 18:57 Just noticed something I've never seen before, a dark/grayish UI entry for one of my sensors:
Is this on the default theme?
Yes

Greyed out sensor

Posted: Wednesday 02 December 2020 17:50
by MikeyMan
Hi all,

Just noticed today; one of the sensors being greyed out:
Naamloos3.png
Naamloos3.png (32 KiB) Viewed 2207 times
It is working; didn't see it before. What could this be?

Br,
Michael

Re: Grayed-out UI item in Utility Sensors

Posted: Tuesday 08 December 2020 13:29
by MikeyMan
Anyone got any clue what causes this?

Re: Grayed-out UI item in Utility Sensors

Posted: Monday 21 December 2020 12:58
by JohnOosterlaken
I have the same "issue" also with the water meter.

Re: Grayed-out UI item in Utility Sensors

Posted: Wednesday 23 December 2020 21:39
by JohnOosterlaken
if fixed it by recreating the item via the GUI and not using a url.
it seems that this way the hardware type is not unknown anymore.

Re: Grayed-out UI item in Utility Sensors

Posted: Wednesday 23 December 2020 21:51
by MikeyMan
JohnOosterlaken wrote: Wednesday 23 December 2020 21:39 if fixed it by recreating the item via the GUI and not using a url.
it seems that this way the hardware type is not unknown anymore.
Doesnt that screw up the history?

Re: Grayed-out UI item in Utility Sensors

Posted: Monday 25 January 2021 8:00
by free_nsc
Go into Hardware -> select relevant item and check off Enabled tick box ☑ then click update

Re: Grayed-out UI item in Utility Sensors

Posted: Monday 25 January 2021 10:28
by MikeyMan
Its not under hadeware i'm afraid.

Re: Grayed-out UI item in Utility Sensors

Posted: Monday 25 January 2021 10:50
by waaren
MikeyMan wrote: Monday 25 January 2021 10:28 Its not under hadeware i'm afraid.
In domoticz terms a device object is connected to a hardware object.
If the hardware object is disabled (look at the hardware tab of your GU) and the hardware is one of the Python plugins, the device object tiles connected to that hardware object are greyed out in the switches-, weather, utility or temperature tab.

Re: Grayed-out UI item in Utility Sensors

Posted: Monday 25 January 2021 10:53
by MikeyMan
Hmm... Strange... I recall it's always been the same, just not greyed out:
2021-01-25 10_52_48-Window.png
2021-01-25 10_52_48-Window.png (68.24 KiB) Viewed 2077 times
I dont think i ever had any hardware attached... And it is working as it should...

Very weird...

Re: Grayed-out UI item in Utility Sensors

Posted: Monday 25 January 2021 11:24
by waaren
MikeyMan wrote: Monday 25 January 2021 10:53 I dont think i ever had any hardware attached... And it is working as it should...
It should not be possible to create a device without a 'parent' hardware without entering it directly in the database using an external program.
Also: devices are removed from the system when the 'parent' hardware is deleted in domoticz.

I can only guess what's happened but assume that some time in the past the hardware that this device was connected to was removed with an external program or something else in the database happened causing the connection between your device and the 'parent' to got lost.

I don't see any direct issue for the state of the system other then the greyed out tile but to be sure I would reconnect it to one of your hardware objects.

To identify all devices without a 'parent' hardware and to show all hardware objects can you please do

Code: Select all

dzDir=/home/pi/domoticz # change to your domoticz dir
sudo sqlite3 --header $dzDir/domoticz.db "SELECT Name, Id , HardwareID FROM DeviceStatus WHERE HardwareID NOT IN (SELECT ID FROM Hardware)"
sudo sqlite3 --header $dzDir/domoticz.db "SELECT Id, Enabled, Type, Name FROM Hardware"

Re: Grayed-out UI item in Utility Sensors

Posted: Monday 25 January 2021 11:49
by MikeyMan
Followed this guide:

https://ehoco.nl/watermeter-uitlezen-in ... on-script/

Dont see any hardware created here if i'm correct. So maybe the guide is not good

Re: Grayed-out UI item in Utility Sensors

Posted: Monday 25 January 2021 12:04
by waaren
MikeyMan wrote: Monday 25 January 2021 11:49 Followed https://ehoco.nl/watermeter-uitlezen-in ... on-script/
Dont see any hardware created here if i'm correct. So maybe the guide is not good
The guide is not complete.

in the line http: //192.168.2.152:8080/json.htm?type=createvirtualsensor&idx=29&sensorname=Water&sensortype=113 ,
29 is the hardware ID. You should change that number to the ID of one of your hardware objects and preferable your "Dummy (Does nothing, use for virtual switches)" hardware as it shown on the hardware tab.

Re: Grayed-out UI item in Utility Sensors

Posted: Monday 25 January 2021 14:02
by MikeyMan
waaren wrote: Monday 25 January 2021 12:04
MikeyMan wrote: Monday 25 January 2021 11:49 Followed https://ehoco.nl/watermeter-uitlezen-in ... on-script/
Dont see any hardware created here if i'm correct. So maybe the guide is not good
The guide is not complete.

in the line http: //192.168.2.152:8080/json.htm?type=createvirtualsensor&idx=29&sensorname=Water&sensortype=113 ,
29 is the hardware ID. You should change that number to the ID of one of your hardware objects and preferable your "Dummy (Does nothing, use for virtual switches)" hardware as it shown on the hardware tab.
Can i run that now still? Or will that mess up the history?

Re: Grayed-out UI item in Utility Sensors

Posted: Monday 25 January 2021 15:17
by waaren
MikeyMan wrote: Monday 25 January 2021 14:02 Can i run that now still? Or will that mess up the history?
No don't do that. Can you execute the sqlite3 commands I posted earlier? With that information I can advise you how to solve it.

Re: Grayed-out UI item in Utility Sensors

Posted: Monday 25 January 2021 15:20
by MikeyMan
waaren wrote: Monday 25 January 2021 15:17
MikeyMan wrote: Monday 25 January 2021 14:02 Can i run that now still? Or will that mess up the history?
No don't do that. Can you execute the sqlite3 commands I posted earlier? With that information I can advise you how to solve it.
Sure!

Code: Select all

sudo sqlite3 --header $dzDir/domoticz.db "SELECT Name, Id , HardwareID FROM DeviceStatus WHERE HardwareID NOT IN (SELECT ID FROM Hardware)"
Name|ID|HardwareID
Water|43|29

Code: Select all

pi@raspberrypi:~ $ sudo sqlite3 --header $dzDir/domoticz.db "SELECT Id, Enabled, Type, Name FROM Hardware"
ID|Enabled|Type|Name
1|1|67|Domoticz Internal
2|1|4|Slimme Meter
3|1|75|Evohome
5|1|64|Zonnepanelen
6|1|15|Somfy Alarm
9|1|78|Weer
10|1|15|Graaddagen
11|1|15|Tempsensoren
13|1|94|Shelly
14|1|15|Backup
19|1|21|Zwave

Re: Grayed-out UI item in Utility Sensors

Posted: Monday 25 January 2021 15:31
by waaren
MikeyMan wrote: Monday 25 January 2021 15:20

Code: Select all

sudo sqlite3 --header $dzDir/domoticz.db "SELECT Name, Id , HardwareID FROM DeviceStatus WHERE HardwareID NOT IN (SELECT ID FROM Hardware)"
Name|ID|HardwareID
Water|43|29


sudo sqlite3 --header $dzDir/domoticz.db "SELECT Id, Enabled, Type, Name FROM Hardware"
ID|Enabled|Type|Name
1|1|67|Domoticz Internal
OK. You can do

Code: Select all

sudo service domoticz stop
dzDir=/home/pi/domoticz # change to your domoticz dir
sudo cp $dzDir/domoticz.db domoticz.db_keep # just to be sure

sudo sqlite3 $dzDir/domoticz.db "UPDATE DeviceStatus SET HardwareID = 1 WHERE ID = 43"
sudo service domoticz start

Check if OK.

Re: Grayed-out UI item in Utility Sensors

Posted: Monday 25 January 2021 15:35
by MikeyMan
That fixed it! :)
2021-01-25 15_35_01-Window.png
2021-01-25 15_35_01-Window.png (67.36 KiB) Viewed 2049 times
Is that a reserved hardware ID? The internal one?

Thanks :)