create virtual hardware at command line

All kinds of 'OS' scripts

Moderator: leecollings

Post Reply
funky
Posts: 75
Joined: Saturday 06 May 2017 22:38
Target OS: Raspberry Pi / ODroid
Domoticz version: newest
Location: Zeist, Netherlands
Contact:

create virtual hardware at command line

Post by funky »

When I run this in the browser it works:

Code: Select all

 http://192.168.178.33:8080/json.htm?type=createdevice&idx=9&sensorname=test_gf&sensormappedtype=0xF449
but when I run it on the command line in linux with:

Code: Select all

curl http://192.168.178.33:8080/json.htm?type=createdevice&idx=9&sensorname=test_gf&sensormappedtype=0xF449
it gives:

{
   "status" : "ERR"
}
The strange thing is that I can make a virtual dummy at the command line with the following command:

Code: Select all

curl http://192.168.178.33:8080/json.htm?type=command&param=addhardware&htype=15&name=presence_detection&enabled=true&datatimeout=0
whats the difference with my create device vs my add hardware wich works ..
funky
Posts: 75
Joined: Saturday 06 May 2017 22:38
Target OS: Raspberry Pi / ODroid
Domoticz version: newest
Location: Zeist, Netherlands
Contact:

Re: create virtual hardware at command line

Post by funky »

already found the clue curl http must be within quotes
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest