Virtual sensor with 2 inputs

Moderator: leecollings

Post Reply
willem9136
Posts: 53
Joined: Friday 11 December 2020 15:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands Paesens
Contact:

Virtual sensor with 2 inputs

Post by willem9136 »

I try to make a virtual sensor which can monitor 2 inputs.
The custom sensor asks for just one axis label.
I need 2 axis labels. Just like Temp and Humidity for example.

I want to see the position of the roofwindows of my greenhouse. Four levels 0, 1, 2 and 3.
And the inside temperature of the greenhouse. Both in one graph.
willem9136
Posts: 53
Joined: Friday 11 December 2020 15:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands Paesens
Contact:

Re: Virtual sensor with 2 inputs

Post by willem9136 »

Who can tell me where I can find the construction of for example the virtual meter for Humidity and Temperature? Maybe this gives me enough information on how to build something similar suitable for my purpose.
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Virtual sensor with 2 inputs

Post by waltervl »

You can see all the device types and how to update them through an Http api json call on https://www.domoticz.com/wiki/Domoticz_ ... .2Fsensors
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
plugge

Re: Virtual sensor with 2 inputs

Post by plugge »

willem9136
Posts: 53
Joined: Friday 11 December 2020 15:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands Paesens
Contact:

Re: Virtual sensor with 2 inputs

Post by willem9136 »

Waltervl: I know all this. Thanks anyway.

My question is not understood I think.
All I ask is how to construct a virtual meter with 2 inputs of different types. For 1 Y axes there are plenty examples.
What I need is a 2 Y axes graph. 1 axes for temperature and 1 for position of a window. ( 4 positions) 0, 1, 2, 3 and 4.
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Virtual sensor with 2 inputs

Post by waltervl »

The Temp/hum or temp/bar devices have this double axes. You can send perhaps position 0-4 as hum or bar. Then you get 1 graph with 2 values.
you can try yourself to create a dummy device and send some sample data with the Json calls.
https://www.domoticz.com/wiki/Domoticz_ ... 2Fhumidity

If you want a position Y axis you will have to program that yourself in C+ based on the github repository as @plugge mentioned. But there is a steep learning curve. You will have to program a new device type, program database interaction, program the api, prgram the graphing and loging envirionment etc.
Another option would be to use 2 devices and merge the values in a combined graph afterwards with for example Dashticz or Grafana. But then the combined graph is not in the standard user interface.
Another option is to use the Custom Graph function in the temperature Tab and enhance that with the position device. But that will require some javascripting skills. https://www.domoticz.com/wiki/Managing_ ... om_Graph_2
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
willem9136
Posts: 53
Joined: Friday 11 December 2020 15:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands Paesens
Contact:

Re: Virtual sensor with 2 inputs

Post by willem9136 »

Thanks a lot waltervl . I think I can carry on now....
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest