Closed abhiklkothari closed 8 years ago
var param=JSON.stringify({bindings: [{binding: '', config: ' ' }], groups: [], icon: 'Light', label: 'Item1', format: '', units: '', model: 'demo', name: 'Item1', translateRule: 'None', translateService: '', type: 'SwitchItem'});
jQuery.ajax ({ type: "PUT", url:'http://localhost:8080/services/habmin/config/items/Item1', dataType: 'json', async: true,
contentType: "application/json", data: param, success: function (response) { }, complete:function(xhr,status) { }, error:function(xhr,status,error) { }, }).fail(function(payload) { });
i have added the habmin jar in addons this call is working with openhab 1.6 but it gives 405 error with openhab2.0
I think the config folder location has changed in OH2 so this won’t work at the moment.=
var param=JSON.stringify({bindings: [{binding: '', config: ' ' }], groups: [], icon: 'Light', label: 'Item1', format: '', units: '', model: 'demo', name: 'Item1', translateRule: 'None', translateService: '', type: 'SwitchItem'});
jQuery.ajax ({ type: "PUT", url:'http://localhost:8080/services/habmin/config/items/Item1', dataType: 'json', async: true,
i have added the habmin jar in addons this call is working with openhab 1.6 but it gives 405 error with openhab2.0