Page 1 of 1

JSON command for create virtual sensor - custom sensor?

Posted: Tuesday 12 December 2017 16:53
by sammyke007
Hi

Anyone who knows the JSON command for creating a virtual sensor - custom sensor?
It has to be

Code: Select all

http://IPADRESS:8080/json.htm?type=createvirtualsensor&idx=1&sensorname=Test&sensortype=XYZ
where XYZ should be the number for a custom sensor.
Some sensortypes are wrote down here already:
https://www.domoticz.com/wiki/Domoticz_ ... ual_sensor

Any idea?
Tnx!

Re: JSON command for create virtual sensor - custom sensor?

Posted: Saturday 23 December 2017 22:27
by McMelloW
sammyke007 wrote: Tuesday 12 December 2017 16:53 Hi

Anyone who knows the JSON command for creating a virtual sensor - custom sensor?
It has to be

Code: Select all

http://IPADRESS:8080/json.htm?type=createvirtualsensor&idx=1&sensorname=Test&sensortype=XYZ
where XYZ should be the number for a custom sensor.
Some sensortypes are wrote down here already:
https://www.domoticz.com/wiki/Domoticz_ ... ual_sensor

Any idea?
Tnx!
You need to add an extra parameter for the y-axis. But i don't know how to do this. Facing exact the same problem.

Re: JSON command for create virtual sensor - custom sensor?

Posted: Sunday 14 July 2019 7:37
by Filnet
Hello

Have you solved this?

I have the same problem.

Thanks for your help.

Re: JSON command for create virtual sensor - custom sensor?

Posted: Sunday 14 July 2019 8:24
by Tristan

Code: Select all

http://IPADRESS:8080/json.htm?type=createvirtualsensor&idx=HARDWAREID&sensorname=NAME&sensortype=TYPEID&sensoroptions=1;AXUNIT
AXUNIT = Ax Unit
HARDWAREID = Hardware index of the Dummy Hardware you are using (not a sensor index)
NAME = Name of the new sensor
TYPEID = See https://github.com/domoticz/domoticz/bl ... aretypes.h

Re: JSON command for create virtual sensor - custom sensor?

Posted: Sunday 14 July 2019 13:45
by Filnet
Thank you!

JSON command for create virtual sensor - custom sensor?

Posted: Friday 19 July 2019 19:35
by philchillbill
If you create a test device (of any type you like) in the Domoticz UI in a browser while you have developer tools enabled (ctrl-shift-i in Chrome), under the network tab you'll see the JSON that the UI sends back to the Domoticz engine when you create or change something. From this, you can figure out the correct JSON to use for any command !

Re: JSON command for create virtual sensor - custom sensor?

Posted: Monday 11 October 2021 11:30
by willem9136
Question, can I create any type of sensor?

I need a kind of custom sensor with 3 inputs

I need to see the output of 3 separate thermometers in 1 graph on the dashboard of Domoticz.

Is this possible?

Re: JSON command for create virtual sensor - custom sensor?

Posted: Monday 11 October 2021 13:11
by waltervl
willem9136 wrote: Monday 11 October 2021 11:30 Question, can I create any type of sensor?

I need a kind of custom sensor with 3 inputs

I need to see the output of 3 separate thermometers in 1 graph on the dashboard of Domoticz.

Is this possible?
No this is not possible. A Custom Sensor can only store and display 1 value. Also it is not possible to view graphs on the default dashboard of Domoticz.
If you want to graph multiple values on a dashboard you need something like dashticz extension or make your own graphing with grafana.

Re: JSON command for create virtual sensor - custom sensor?

Posted: Sunday 16 April 2023 20:06
by henkkoorn
philchillbill wrote: Friday 19 July 2019 19:35 If you create a test device (of any type you like) in the Domoticz UI in a browser while you have developer tools enabled (ctrl-shift-i in Chrome), under the network tab you'll see the JSON that the UI sends back to the Domoticz engine when you create or change something. From this, you can figure out the correct JSON to use for any command !
I have something here