Domoticz bookmarklet

Moderator: leecollings

Post Reply
blauwebuis
Posts: 331
Joined: Wednesday 21 December 2016 9:11
Target OS: Raspberry Pi / ODroid
Domoticz version: current
Contact:

Domoticz bookmarklet

Post by blauwebuis »

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: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Domoticz bookmarklet

Post by Egregius »

Do you have authentication enabled?
Maybe add your local network.
blauwebuis
Posts: 331
Joined: Wednesday 21 December 2016 9:11
Target OS: Raspberry Pi / ODroid
Domoticz version: current
Contact:

Re: Domoticz bookmarklet

Post by blauwebuis »

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: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Domoticz bookmarklet

Post by Egregius »

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