Domoticz bookmarklet

Post Reply
blauwebuis
Posts: 154
Joined: Wednesday 21 December 2016 10:11
Target OS: Raspberry Pi
Domoticz version: current
Contact:

Domoticz bookmarklet

Post by blauwebuis » Tuesday 14 March 2017 11:49

I have a bookmarklet that I use to trigger lights on my house. It's great. It's fantastic.

The code:
javascript:void((function(){(new Image()).src = "http://192.168.1.34:8080/json.htm?type= ... cmd=Toggle";})());

But it only works if I have recently opened Domoticz in a tab.

How can I change this bookmarklet to always work?

User avatar
Egregius
Posts: 2446
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: Beta
Location: Beitem, BE
Contact:

Re: Domoticz bookmarklet

Post by Egregius » Tuesday 14 March 2017 13:07

Do you have authentication enabled?
Maybe add your local network.

blauwebuis
Posts: 154
Joined: Wednesday 21 December 2016 10:11
Target OS: Raspberry Pi
Domoticz version: current
Contact:

Re: Domoticz bookmarklet

Post by blauwebuis » Saturday 18 March 2017 0:08

No I don't have authentification turned on.

And I double checked: I think I have the network set up ok (127.0.0.*;192.168.1.*).

User avatar
Egregius
Posts: 2446
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: Beta
Location: Beitem, BE
Contact:

Re: Domoticz bookmarklet

Post by Egregius » Saturday 18 March 2017 7:56

What happens if you past the url in a browser at that moment?

Code: Select all

http://192.168.1.34:8080/json.htm?type=command&param=switchlight&idx=59&switchcmd=Toggle

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest