Hello guys,
I like to create a number of virtual switches using JSON so to have IDX of switch selected by me. I search forum but no post found. Also wiki describes on the way to create virtual sensors but not virtual switches.
Is there any way to perform it even using a console script? Please help!
Add new virtual switch using JSON Topic is solved
Moderators: leecollings, remb0
-
korniza
- Posts: 157
- Joined: Thursday 27 August 2015 18:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V3.6028
- Location: Greece
- Contact:
Add new virtual switch using JSON
>>>> Google Home <<<<<
SBC: Odroid XU4 * Raspberry Pi2 * banana Pi v1
Peripherals: rfxtrx433E, aeon z-stick gen5, bluetooth dongles
Extended Software packages: Xeoma (video NVR), FHEM (extra home automation software)
SBC: Odroid XU4 * Raspberry Pi2 * banana Pi v1
Peripherals: rfxtrx433E, aeon z-stick gen5, bluetooth dongles
Extended Software packages: Xeoma (video NVR), FHEM (extra home automation software)
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Add new virtual switch using JSON
Use developer mode of your browser while adding a switch.
Don't think you can choose the idx.
Don't think you can choose the idx.
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Add new virtual switch using JSON
Code: Select all
json.htm?type=createvirtualsensor&idx=2&sensorname=test&sensortype=6-
korniza
- Posts: 157
- Joined: Thursday 27 August 2015 18:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V3.6028
- Location: Greece
- Contact:
Re: Add new virtual switch using JSON
Thank you for! It does work!Egregius wrote:idx is the idx of the dummy hardware.Code: Select all
json.htm?type=createvirtualsensor&idx=2&sensorname=test&sensortype=6
New device was created is not assigned to any hardware (it appeared on devices as ? unknown hardware). Can I "move" it to an exist hardware or build via JSON a hardware and assign this orphan device?
The reason I ask them is that I like to create a script to replicate some of my hardware to another (backup) domoticz. It is a painfull situation performing by hand and always have the same IDX for particular sensors.
>>>> Google Home <<<<<
SBC: Odroid XU4 * Raspberry Pi2 * banana Pi v1
Peripherals: rfxtrx433E, aeon z-stick gen5, bluetooth dongles
Extended Software packages: Xeoma (video NVR), FHEM (extra home automation software)
SBC: Odroid XU4 * Raspberry Pi2 * banana Pi v1
Peripherals: rfxtrx433E, aeon z-stick gen5, bluetooth dongles
Extended Software packages: Xeoma (video NVR), FHEM (extra home automation software)
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Add new virtual switch using JSON
I assume you have the dummy hardware installed and used that idx in your url?
If it's only for backup I would create a script that copies the records directly from/to the database.
If it's only for backup I would create a script that copies the records directly from/to the database.
-
korniza
- Posts: 157
- Joined: Thursday 27 August 2015 18:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V3.6028
- Location: Greece
- Contact:
Re: Add new virtual switch using JSON
If it was for the settings, I use the database backup/restore process. BUT is it for specific devices/sensors.
>>>> Google Home <<<<<
SBC: Odroid XU4 * Raspberry Pi2 * banana Pi v1
Peripherals: rfxtrx433E, aeon z-stick gen5, bluetooth dongles
Extended Software packages: Xeoma (video NVR), FHEM (extra home automation software)
SBC: Odroid XU4 * Raspberry Pi2 * banana Pi v1
Peripherals: rfxtrx433E, aeon z-stick gen5, bluetooth dongles
Extended Software packages: Xeoma (video NVR), FHEM (extra home automation software)
Who is online
Users browsing this forum: No registered users and 1 guest