virtual sensor inputs
Moderators: leecollings, remb0
virtual sensor inputs
where can i find what the required inputs are for virtual sensors
for example i create a temperature sensor
i know the idx is required but what other inputs
i eventually found that it wants the temperature in svalue
but where is the info for all the other sensors
for example i create a temperature sensor
i know the idx is required but what other inputs
i eventually found that it wants the temperature in svalue
but where is the info for all the other sensors
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: virtual sensor inputs
You can find most information on this wiki page
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Re: virtual sensor inputs
that what i needed
thanks
thanks
- FireWizard
- Posts: 1905
- Joined: Tuesday 25 December 2018 12:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Voorthuizen (NL)
- Contact:
Re: virtual sensor inputs
very good reading
thanks
thanks
Re: virtual sensor inputs
and where would i find specs for a switch of type smoke detector
- FireWizard
- Posts: 1905
- Joined: Tuesday 25 December 2018 12:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Voorthuizen (NL)
- Contact:
Re: virtual sensor inputs
Hi,
Perhaps this is a nice description:
https://techestigate.com/how-to-add-433 ... -domoticz/
Regards
Perhaps this is a nice description:
https://techestigate.com/how-to-add-433 ... -domoticz/
Regards
Re: virtual sensor inputs
i appreciate that but what i am really interested in is finding where that and others are defined in domoticz
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: virtual sensor inputs
If it is not already documented in the Wiki you need to search in the source.
Code: Select all
git clone https://github.com/domoticz/domoticz.git domoticz-dev
cd domoticz-dev
grep -rin smoke
Next you can define a virtual switch in domoticz and edit it on the switch tab from On/Off to Smokedetection
Check the database for the changed device and you will see something like
Code: Select all
sqlite> select id,switchtype,type,subtype,svalue,nvalue from devicestatus where id = 3456;
3456|5|244|73|0|1
Code: Select all
http://<domoticz IP: domoticz port>/json.htm?type=command¶m=switchlight&idx=<IDX>&switchcmd=On
Code: Select all
http://<domoticz IP: domoticz port>/json.htm?type=command¶m=resetsecuritystatus&idx=<IDX>&switchcmd=Normal
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Re: virtual sensor inputs
great
more than one way to skin a cat
more than one way to skin a cat

- FireWizard
- Posts: 1905
- Joined: Tuesday 25 December 2018 12:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Voorthuizen (NL)
- Contact:
Re: virtual sensor inputs
Hi all,
I see that @grumpy is rather happy with the solutions of @waaren, given in the previous post.
However, I still have some remarks, as I feel that it does not answer @grumpy 's goal, as I assume that he wants to control the Smoke Alarm (Smoke Detector) with a remote JSON command.
@waaren says in the first possibility:
But I was unable to find to correct syntax to send a JSON command and control a Smoke Detector.
Perhaps I overlooked something, but with help of that solution, most Domoticz users are unable to control the specific switch.
The next possibility, that @waaren describes is:
But how many will understand what the sequence "11|5|244|73|100|0" means? And, if I understand, how can I correctly control this Smoke Detector?
Use of the DB Browser for SQlite gives the same result (see the last line):
The solution that comes closest to the goal is the third possibility, offered by @waaren.
I finally found it under the "Console" tab and "Requests" tab.
In addition to what @waaren wrote you can also use the passcode (of that switch). I assume you need it, if the switch has been set to protected.
I think that is recommended for a Smoke Alarm.
You will also have noticed that there is a "level΅.
What does that level represent? I think that is one of the questions @grumpy wants to know, if you want to control this switch with a remote command.
Do they expect a value from 0-100? (I think they do, but I'm not sure.)
In the source code, you will find that for a detector the obscuration is expressed in %/feet, which is fine for the UK, but uncommon in the rest of Europe. For optical smoke detectors and smoke alarms the sensitivity and smoke density is expressed in dB/m
I think it is important to know what that "level" represents.
I focused specifically on the Smoke Detector, as I expect that many Domoticz users in the next 1.5 year want to connect their Smoke Alarms to Domoticz, as new building legislation will come into force in The Netherlands from July 1, 2022, and in all homes, also built before 2003, Smoke Alarms will become mandatory.
I know, Domoticz is open-source and we cannot expect that a few developers do everything. I expect also that other switches, sensors, etc have undocumented features. We should improve Domoticz together and perhaps we can get these undocumented features clear and add it to the Wiki.
Are their ideas to get these undocumented features clear? With some guidelines/ideas I'm happy to support, because I have to be at home as much as possible (according to our prime minister
)
Regards
I see that @grumpy is rather happy with the solutions of @waaren, given in the previous post.
However, I still have some remarks, as I feel that it does not answer @grumpy 's goal, as I assume that he wants to control the Smoke Alarm (Smoke Detector) with a remote JSON command.
@waaren says in the first possibility:
I tested it and indeed it gives you a lot of information, not seen earlier, of (in this case) supported Smoke Detectors.If it is not already documented in the Wiki you need to search in the source.
But I was unable to find to correct syntax to send a JSON command and control a Smoke Detector.
Perhaps I overlooked something, but with help of that solution, most Domoticz users are unable to control the specific switch.
The next possibility, that @waaren describes is:
Indeed if you do that, you will see:Next you can define a virtual switch in domoticz and edit it on the switch tab from On/Off to Smokedetection
Check the database for the changed device and you will see something like
Code: Select all
[herman@asterix Domoticz]$ sqlite3 domoticz.db
SQLite version 3.34.0 2020-12-01 16:14:00
Enter ".help" for usage hints.
sqlite> select id,switchtype,type,subtype,svalue,nvalue from devicestatus where id = 11;
11|5|244|73|100|0
sqlite>
Use of the DB Browser for SQlite gives the same result (see the last line):
The solution that comes closest to the goal is the third possibility, offered by @waaren.
I have not been able to find the right command in the "network" tab. I have tested it with Google Chrome and Mozilla Firefox under Linux.Clicking the smokedetector on the device tab while opened the developer console on the network tab of your browser will show you the JSON for activating the detector
I finally found it under the "Console" tab and "Requests" tab.
In addition to what @waaren wrote you can also use the passcode (of that switch). I assume you need it, if the switch has been set to protected.
I think that is recommended for a Smoke Alarm.
You will also have noticed that there is a "level΅.
What does that level represent? I think that is one of the questions @grumpy wants to know, if you want to control this switch with a remote command.
Do they expect a value from 0-100? (I think they do, but I'm not sure.)
In the source code, you will find that for a detector the obscuration is expressed in %/feet, which is fine for the UK, but uncommon in the rest of Europe. For optical smoke detectors and smoke alarms the sensitivity and smoke density is expressed in dB/m
I think it is important to know what that "level" represents.
I focused specifically on the Smoke Detector, as I expect that many Domoticz users in the next 1.5 year want to connect their Smoke Alarms to Domoticz, as new building legislation will come into force in The Netherlands from July 1, 2022, and in all homes, also built before 2003, Smoke Alarms will become mandatory.
I know, Domoticz is open-source and we cannot expect that a few developers do everything. I expect also that other switches, sensors, etc have undocumented features. We should improve Domoticz together and perhaps we can get these undocumented features clear and add it to the Wiki.
Are their ideas to get these undocumented features clear? With some guidelines/ideas I'm happy to support, because I have to be at home as much as possible (according to our prime minister

Regards
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: virtual sensor inputs
Thx for the offer !FireWizard wrote: ↑Wednesday 13 January 2021 20:19 I know, Domoticz is open-source and we cannot expect that a few developers do everything. I expect also that other switches, sensors, etc have undocumented features. We should improve Domoticz together and perhaps we can get these undocumented features clear and add it to the Wiki.
Are their ideas to get these undocumented features clear? With some guidelines/ideas I'm happy to support, because I have to be at home as much as possible (according to our prime minister)
If you send me a PM with your Email address and preferred username, I will create a user-ID that you can use to access the wiki pages as maintainer.
btw. the level parameter is not used for the smoke detector.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Who is online
Users browsing this forum: Bing [Bot] and 1 guest