Grayed-out UI item in Utility Sensors Topic is solved

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

User avatar
philchillbill
Posts: 399
Joined: Monday 12 September 2016 13:47
Target OS: Linux
Domoticz version: beta
Location: Eindhoven. NL
Contact:

Grayed-out UI item in Utility Sensors

Post 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?
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Grayed-out UI item in Utility Sensors

Post 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?
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
philchillbill
Posts: 399
Joined: Monday 12 September 2016 13:47
Target OS: Linux
Domoticz version: beta
Location: Eindhoven. NL
Contact:

Re: Grayed-out UI item in Utility Sensors

Post 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
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
MikeyMan
Posts: 237
Joined: Wednesday 17 October 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Greyed out sensor

Post by MikeyMan »

Hi all,

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

Br,
Michael
MikeyMan
Posts: 237
Joined: Wednesday 17 October 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Grayed-out UI item in Utility Sensors

Post by MikeyMan »

Anyone got any clue what causes this?
JohnOosterlaken
Posts: 2
Joined: Monday 21 October 2019 13:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Grayed-out UI item in Utility Sensors

Post by JohnOosterlaken »

I have the same "issue" also with the water meter.
JohnOosterlaken
Posts: 2
Joined: Monday 21 October 2019 13:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Grayed-out UI item in Utility Sensors

Post 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.
MikeyMan
Posts: 237
Joined: Wednesday 17 October 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Grayed-out UI item in Utility Sensors

Post 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?
free_nsc
Posts: 36
Joined: Friday 19 December 2014 0:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Grayed-out UI item in Utility Sensors

Post by free_nsc »

Go into Hardware -> select relevant item and check off Enabled tick box ☑ then click update
MikeyMan
Posts: 237
Joined: Wednesday 17 October 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Grayed-out UI item in Utility Sensors

Post by MikeyMan »

Its not under hadeware i'm afraid.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Grayed-out UI item in Utility Sensors

Post 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.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
MikeyMan
Posts: 237
Joined: Wednesday 17 October 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Grayed-out UI item in Utility Sensors

Post 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 2069 times
I dont think i ever had any hardware attached... And it is working as it should...

Very weird...
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Grayed-out UI item in Utility Sensors

Post 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"
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
MikeyMan
Posts: 237
Joined: Wednesday 17 October 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Grayed-out UI item in Utility Sensors

Post 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
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Grayed-out UI item in Utility Sensors

Post 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.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
MikeyMan
Posts: 237
Joined: Wednesday 17 October 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Grayed-out UI item in Utility Sensors

Post 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?
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Grayed-out UI item in Utility Sensors

Post 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.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
MikeyMan
Posts: 237
Joined: Wednesday 17 October 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Grayed-out UI item in Utility Sensors

Post 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
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Grayed-out UI item in Utility Sensors

Post 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.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
MikeyMan
Posts: 237
Joined: Wednesday 17 October 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Grayed-out UI item in Utility Sensors

Post 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 2041 times
Is that a reserved hardware ID? The internal one?

Thanks :)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest