Show Description in Switches tab for Virtual Switch

Moderator: leecollings

Post Reply
julasd
Posts: 2
Joined: Wednesday 23 November 2022 19:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Show Description in Switches tab for Virtual Switch

Post by julasd »

In my Domoticz I use digital inputs and outputs designed by me and using the CANBUS protocol. The DI modules have 16 digital inputs, UP to 8 zero crossing triac outputs used for LED lighting, or 6 relay outputs for switching higher currents. The data exchanged between the modules and Domoticz uses the OpenCan protocol modified by me. Domoticz runs on Rapberry Pi3 with added RS485_CAN_HAT module. Program written in Python exchanges data between modules and Domoticz. Inputs and outputs declared as “Virtual Sensor”. To define the address of the module I use the Description field as I have not found another field in the SQL database. When reviewing the switches, I would like to see the Description field in Sensors tab between “Type” text and “Log” “Edit” “Notifications” pushbuttons.
In the tabular view (Setup/Devices) I added a Description column in the devices. js file (works in Firefox, I can't force Chromium to accept changes probably because of cash):

What and in which file/files should I change to display the Description field?

Any hints welcome.
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Show Description in Switches tab for Virtual Switch

Post by waltervl »

If you would make a python plugin out of your python program you can use the device ID for address. Now the device ID is managed by the virtual devices hardware gateway.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
julasd
Posts: 2
Joined: Wednesday 23 November 2022 19:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Show Description in Switches tab for Virtual Switch

Post by julasd »

I just want to add the "Description" field to the "Light/Switch" sensor view in the "Sensors" tab. I can't find any place in js files where I can change it.
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Show Description in Switches tab for Virtual Switch

Post by waltervl »

Me neither.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests