JSON command for create virtual sensor - custom sensor?

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

Moderators: leecollings, remb0

Post Reply
sammyke007
Posts: 204
Joined: Monday 08 May 2017 20:48
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Belgium
Contact:

JSON command for create virtual sensor - custom sensor?

Post 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!
User avatar
McMelloW
Posts: 427
Joined: Monday 20 November 2017 17:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.1
Location: Harderwijk, NL
Contact:

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

Post 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.
Greetings McMelloW
Filnet
Posts: 23
Joined: Tuesday 06 March 2018 13:55
Target OS: -
Domoticz version:
Contact:

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

Post by Filnet »

Hello

Have you solved this?

I have the same problem.

Thanks for your help.
Tristan
Posts: 8
Joined: Sunday 30 June 2019 23:55
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post 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
Filnet
Posts: 23
Joined: Tuesday 06 March 2018 13:55
Target OS: -
Domoticz version:
Contact:

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

Post by Filnet »

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

JSON command for create virtual sensor - custom sensor?

Post 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 !
Last edited by philchillbill on Friday 19 July 2019 19:35, edited 1 time in total.
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
willem9136
Posts: 53
Joined: Friday 11 December 2020 15:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands Paesens
Contact:

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

Post 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?
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

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

Post 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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
henkkoorn
Posts: 4
Joined: Sunday 12 February 2023 11:53
Target OS: Linux
Domoticz version: 2023.1
Location: Huizen, Nederland
Contact:

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

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest