Search found 3 matches

by sjdejong
Monday 28 December 2015 21:38
Forum: Other questions and discussions
Topic: Using JSON in HTML to switch scenes
Replies: 11
Views: 5396

Re: Using JSON in HTML to switch scenes

+1 scene = only On group = on/mixed/off <script> function SceneToggle() { $.ajax({ url: 'http://domotica.pb67.lan:8080/json.htm?type=command&param=switchscene&idx=1&switchcmd=on&level=0', success: function(){ console.log('SUCCES'); }, error: function(){ console.log('ERROR'); } }); } </script> <div ...
by sjdejong
Sunday 27 December 2015 23:27
Forum: Other questions and discussions
Topic: Using JSON in HTML to switch scenes
Replies: 11
Views: 5396

Re: Using JSON in HTML to switch scenes

Allright, will have a look at it, thanks!

But is there a way to use the JSON API to call the toggle url, but not open the status page? Do i need to use a POST or PUT method? and how can this be done?


Best regards,
Sjoerd
by sjdejong
Sunday 27 December 2015 22:18
Forum: Other questions and discussions
Topic: Using JSON in HTML to switch scenes
Replies: 11
Views: 5396

Using JSON in HTML to switch scenes

Hi Guys, First and foremost, i love Domoticz and i specially love the community around this epic system. I have been lurking on the forums for a while, but never needed to register. But the time has come that a question rised: I have created a custom html page that exactly fits the tablet that i ...