Page 1 of 1

create virtual hardware at command line

Posted: Sunday 24 February 2019 16:38
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 ..

Re: create virtual hardware at command line

Posted: Sunday 24 February 2019 16:40
by funky
already found the clue curl http must be within quotes