Page 1 of 2
setcolor results in openurl 0.0.0.0:80 [solved with workarround]
Posted: Wednesday 13 March 2024 14:23
by ravaoo
Hi,
I want to change the color of my hue GU10 spot in dzVents
Code: Select all
return
{
active = true,
on =
{
devices = {'DZVENTS tester'}
},
logging =
{
level = domoticz.LOG_DEBUG,
marker = "Hue light test",
},
execute = function(domoticz)
domoticz.devices('Huespot 1').setColor(0, 255, 0)
--end
end
}
Results in :
OpenURL: url =
http://0.0.0.0:80/json.htm?type=command ... :255,"b":0}
Is this a bug or is de script wrong?
Re: setcolor results in openurl 0.0.0.0:80
Posted: Wednesday 13 March 2024 15:52
by Kedi
What should be a bug? Does the light not change to green?
Re: setcolor results in openurl 0.0.0.0:80
Posted: Wednesday 13 March 2024 16:33
by waltervl
For color settings DzVents probably uses the API instead of LUA integration so then it uses 0.0.0.0.
So this seems normal.
Re: setcolor results in openurl 0.0.0.0:80
Posted: Wednesday 13 March 2024 20:16
by ravaoo
Nothing changes (should be green) And i get this message in the log.
2024-03-13 14:16:13.776 Error: Error opening url:
http://0.0.0.0:80/json.htm?type=command ... :255,"b":0}
Re: setcolor results in openurl 0.0.0.0:80
Posted: Wednesday 13 March 2024 22:44
by waltervl
Check your security settings, so that it allows basic authorisation for HTTP.
Also check that the internal IP of your Domoticz container is in the security trusted networks setting. Both options can be found in Domoticz menu setup - Settings, tab Security.
Re: setcolor results in openurl 0.0.0.0:80
Posted: Thursday 14 March 2024 10:15
by ravaoo
waltervl wrote: āWednesday 13 March 2024 22:44
Check your security settings, so that it allows basic authorisation for HTTP.
Also check that the internal IP of your Domoticz container is in the security trusted networks setting. Both options can be found in Domoticz menu setup - Settings, tab Security.
Thanks for helping!
basic authorisation for HTTP is checked
I mist de container IP and i added it.
Stil not working. Also after restarting Domoticz (if this could be necessary)
I tried it on a other Hue device, color bulp in stat of spot, and still not working.
Something else i can check/try?
Re: setcolor results in openurl 0.0.0.0:80
Posted: Thursday 14 March 2024 10:38
by ravaoo
I also tried switchOn() and this works! In the log i don't see the use of OpenUrl so my gues is it is using some other mechanism
Re: setcolor results in openurl 0.0.0.0:80
Posted: Thursday 14 March 2024 10:56
by bvdf0251
From Wiki
setColor(r, g, b, br, cw, ww, m, t): Function. Sets the light to requested color. r, g, b required, others optional. Supports command options. Meaning and limits of parms can be found here.
setRGB(red, green, blue): Function. Set the lamps RGB color. Values are from 0-255. Supports command options.
Looks like you need to either change command or parameters
Re: setcolor results in openurl 0.0.0.0:80
Posted: Thursday 14 March 2024 11:13
by ravaoo
bvdf0251 wrote: āThursday 14 March 2024 10:56
From Wiki
setColor(r, g, b, br, cw, ww, m, t): Function. Sets the light to requested color. r, g, b required, others optional. Supports command options. Meaning and limits of parms can be found here.
setRGB(red, green, blue): Function. Set the lamps RGB color. Values are from 0-255. Supports command options.
Looks like you need to either change command or parameters
Thank you for helping.
I tried "setRGB(0, 255, 0)" and get also an error.
setColor() error:
2024-03-14 11:10:10.406 Error: Error opening url:
http://0.0.0.0:80/json.htm?type=command ... white=true
setRGB() error:
2024-03-14 11:10:10.407 Error: Error opening url:
http://0.0.0.0:80/json.htm?type=command ... :255,"b":0}
Different url but still an error!
Re: setcolor results in openurl 0.0.0.0:80
Posted: Thursday 14 March 2024 11:27
by ravaoo
I do not know what the difference is but when i go to the switch in domoticz and i change the color in de color selector then the color changes in the bulp and i get no errors! The same change i want to do with dzVents.
In the log i saw
Status: setcolbrightnessvalue: ID: 9, bri: 11, color: '{m: 3, RGB: 314fff, CWWW: 0000, CT: 0}'
So i tried setcolbrightness(0,255,0) and it gives the same result is setColor()
Re: setcolor results in openurl 0.0.0.0:80
Posted: Thursday 14 March 2024 17:04
by Kedi
It looks like you are running Domoticz on port 80 (default is 8080)
Is there nothing else running on that port? Because you script runs fine at my place.
Re: setcolor results in openurl 0.0.0.0:80
Posted: Tuesday 19 March 2024 12:07
by ravaoo
It took me some wile but i managed to get Domoticz to run on port 8080. I think there was nothing else running on port 80 but to rule out this posibility i changed the setup. The result is disapointing and i get the same error but only on a different port
Error:
2024-03-19 12:06:21.782 Error: Error opening url:
http://0.0.0.0:8080/json.htm?type=comma ... hite=false
Re: setcolor results in openurl 0.0.0.0:80
Posted: Wednesday 20 March 2024 11:04
by ravaoo
New input for this problem (maybe)
I restarted Domoticz and in the log was this message:
2024-03-20 10:57:42.491 Status: WebServer(HTTP) startup failed on address :: with port: 8082: resolve: Host not found (authoritative) [asio.netdb:1 at /usr/local/include/boost/asio/detail/resolver_service.hpp:84 in function 'resolve'], trying ::
2024-03-20 10:57:42.491 Status: WebServer(HTTP) startup failed on address :: with port: 8082: resolve: Host not found (authoritative) [asio.netdb:1 at /usr/local/include/boost/asio/detail/resolver_service.hpp:84 in function 'resolve'], trying 0.0.0.0
Could this cause my problem and if so how do i fix it?
By the way: To rule out conflict on port 8080 a changed Domoticz to port 8082. (i learned how to do this so was easy this time

)
Re: setcolor results in openurl 0.0.0.0:80
Posted: Wednesday 20 March 2024 16:04
by waltervl
Check the Docker container configuration, perhaps you changed it the wrong way.
https://www.domoticz.com/wiki/Synology
Code: Select all
Port settings:
Local port 7080, container port 80
Environment:
WWW_PORT: 80
SSL_PORT: 0
So WWW_PORT and Container port should be the same but could be set both to 8082 in your case.
Local port is the port you are looking to to get to Domoticz from another PC in your network eg
http://NAS-IP:7080
Re: setcolor results in openurl 0.0.0.0:80
Posted: Monday 25 March 2024 9:18
by ravaoo
Thanks for responding Waltervl:
I think my config voor de container is okay. I use a project in container manager now. this is my yaml file content:
Code: Select all
version: '3.3'
services:
domoticz:
image: domoticz/domoticz:latest
container_name: domoticz
restart: on-failure:5
privileged: true
ports:
- "8082:80"
volumes:
- /volume1/docker/domoticz:/opt/domoticz/userdata
environment:
- TZ=Europe/Amsterdam
- WWW_PORT=80
- LOG_PATH=/opt/domoticz/userdata/domoticz.log
During testing I shortly switched off firewall in DMS so settings there should not be the problem
Re: setcolor results in openurl 0.0.0.0:80
Posted: Monday 25 March 2024 9:30
by Kedi
Try it with the line " privileged: true" removed.
Re: setcolor results in openurl 0.0.0.0:80
Posted: Monday 25 March 2024 10:26
by ravaoo
Kedi wrote: āMonday 25 March 2024 9:30
Try it with the line " privileged: true" removed.
I tested it but got the same error.
(By the way : I use de privileged modes for zwave stick and smart energy meter)
Re: setcolor results in openurl 0.0.0.0:80
Posted: Monday 25 March 2024 10:35
by ravaoo
I got a idee!
Can someone provide me with code do the same in LUA or Python? I want to test if it is a environment problem or a dzVents problem.
Re: setcolor results in openurl 0.0.0.0:80
Posted: Monday 25 March 2024 11:40
by Kedi
What's the output of
when you ssh into your NAS
it should be something like
Code: Select all
0f788fe90201 domoticz/domoticz:latest "docker-entrypoint.sā¦" 45 hours ago Up 45 hours 443/tcp, 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp
Special IP 0.0.0.0:<port> should be present.
Re: setcolor results in openurl 0.0.0.0:80
Posted: Monday 25 March 2024 11:57
by Kedi
Try adding an environment variable