question on api call through domoticz itself
Moderators: leecollings, remb0
-
- Posts: 22
- Joined: Wednesday 04 October 2017 13:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
question on api call through domoticz itself
hello,
until now i was using a dummy selector to trigger a sepcific level on a dimmer , using api call :
for example on my dummy i have this level set :
10 with this action :
http://domoticz.redhome.local:8090/json ... l&level=12
so it sets level 12 on my dimmer.
everything was working until i update (from 2022.1 to 2023.1), i understand there has been modifications, soi i added authentication :
action : http://myuser:[email protected] ... l&level=12
but it is not working in domoticz (but working fine when doing a curl...) so what is wrong ? how can i get this working (without making a script call that do curl...) ?
thanks for your help !
until now i was using a dummy selector to trigger a sepcific level on a dimmer , using api call :
for example on my dummy i have this level set :
10 with this action :
http://domoticz.redhome.local:8090/json ... l&level=12
so it sets level 12 on my dimmer.
everything was working until i update (from 2022.1 to 2023.1), i understand there has been modifications, soi i added authentication :
action : http://myuser:[email protected] ... l&level=12
but it is not working in domoticz (but working fine when doing a curl...) so what is wrong ? how can i get this working (without making a script call that do curl...) ?
thanks for your help !
- kiddigital
- Posts: 438
- Joined: Thursday 10 August 2017 6:52
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: question on api call through domoticz itself
If doing API calls over (unsecured) HTTP, you now have to explicitly enable it via the Security settings (see the changelog).
Make sure the credentials are provided correctly (via a Basic Authentication header) or that the calling script is within the Trusted network (more secure to use proper credentials and access rights)
Make sure the credentials are provided correctly (via a Basic Authentication header) or that the calling script is within the Trusted network (more secure to use proper credentials and access rights)
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
One RPi with Pi foundation standard touch screen to display Dashticz
-
- Posts: 22
- Joined: Wednesday 04 October 2017 13:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: question on api call through domoticz itself
i think it is enabled, because doing it through curl is working, but i would like to make it working through domoticz interface directly, which was working before update....
- kiddigital
- Posts: 438
- Joined: Thursday 10 August 2017 6:52
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
question on api call through domoticz itself
What do you mean with ‘through Domoticz interface’? Through the Browser? Can you post a screenshot?
You can run Domoticz with additional debugging info by activating the debug loglevel and set debug loglevel flags (see wiki).
If you run with debugflags webserver, received and auth you get much more info on what is going on in Domoticz internals.
You can run Domoticz with additional debugging info by activating the debug loglevel and set debug loglevel flags (see wiki).
If you run with debugflags webserver, received and auth you get much more info on what is going on in Domoticz internals.
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
One RPi with Pi foundation standard touch screen to display Dashticz
-
- Posts: 22
- Joined: Wednesday 04 October 2017 13:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: question on api call through domoticz itself
see attachment, i have tested on level 20 and 50 without success.
but the same line in curl is working...
but the same line in curl is working...
- Attachments
-
- domoticz.jpg (167.94 KiB) Viewed 1353 times
-
- Posts: 22
- Joined: Wednesday 04 October 2017 13:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: question on api call through domoticz itself
No Idea on how to make this working again ?
- kiddigital
- Posts: 438
- Joined: Thursday 10 August 2017 6:52
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: question on api call through domoticz itself
I do not understand what you are trying to do and what the screenshot should show?
Did you run Domoticz with the before mentioned debug flags? What was the debug output?
Make sure that you have set the correct security settings, see the changelog of 2023.1 and Wiki for more information.
Did you run Domoticz with the before mentioned debug flags? What was the debug output?
Make sure that you have set the correct security settings, see the changelog of 2023.1 and Wiki for more information.
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
One RPi with Pi foundation standard touch screen to display Dashticz
-
- Posts: 664
- Joined: Thursday 10 November 2016 9:30
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: question on api call through domoticz itself
As many french users he use a qubino module to drive heaters ( pilot wire mode mandatory in France) that is controlled as a dimmer for compatibility purpose.kiddigital wrote: ↑Thursday 30 March 2023 6:40 I do not understand what you are trying to do and what the screenshot should show?
0 to 10% as off
11 to 20 as anti icing ( 7°)
Etc...
So using a virtual device to show real heater mode.
-
- Posts: 22
- Joined: Wednesday 04 October 2017 13:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: question on api call through domoticz itself
Yes exactly, i use a virtual device which modify real device through api call. But it doesn not work anymore.
- waltervl
- Posts: 5907
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: question on api call through domoticz itself
What if you use localhost or local IP address instead of server name domoticz.redhome.local ? And put localhost or Iocal IP address in the trusted network setting.
As you are calling the api from the server itself, not from an external client, it is not needed to call it from outside. Perhaps that is blocking it now.
As you are calling the api from the server itself, not from an external client, it is not needed to call it from outside. Perhaps that is blocking it now.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 577
- Joined: Monday 20 March 2023 14:41
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Somewhere in NL
- Contact:
Re: question on api call through domoticz itself
Why not use dzVents?
Logic will get you from A to B. Imagination will take you everywhere.
- waltervl
- Posts: 5907
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: question on api call through domoticz itself
It should work with this option to use device actions too. It is now a kind of bug or misconfiguration due to security changes.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
- waltervl
- Posts: 5907
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: question on api call through domoticz itself
Is the curl also working when running on the domoticz server itself (as that is what happens using these device actions)?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 22
- Joined: Wednesday 04 October 2017 13:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: question on api call through domoticz itself
sorry for delay, but i have switched on another subject and forget this, but, i am still trying how to mak it works.
to answer : yes the curl command (with http://myuser:[email protected] ... l&level=12) is working from domoticz itself.
but not from action ...
please help....
to answer : yes the curl command (with http://myuser:[email protected] ... l&level=12) is working from domoticz itself.
but not from action ...
please help....
-
- Posts: 22
- Joined: Wednesday 04 October 2017 13:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: question on api call through domoticz itself
if no solution i will have to use dzevent, but it was much more easier to use api through action directly... (and was working)
-
- Posts: 22
- Joined: Wednesday 04 October 2017 13:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: question on api call through domoticz itself
try dzevent with openURL, but it doesn t work also... i don't understand... please help.... same :
Error: Error opening url: http://<myip:port>/json.htm?type=command¶m=setactivetimerplan&ActiveTimerPlan=2
Error: Error opening url: http://<myip:port>/json.htm?type=command¶m=setactivetimerplan&ActiveTimerPlan=2
- waltervl
- Posts: 5907
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: question on api call through domoticz itself
Also be aware that these urls are case sensitive so be sure you do type it correct!
And if you are running Domoticz in a docker container you have to use the IP address of the internal Domoticz docker container.
And if you are running Domoticz in a docker container you have to use the IP address of the internal Domoticz docker container.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 22
- Joined: Wednesday 04 October 2017 13:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: question on api call through domoticz itself
I will try using domoticz internal docker IP adress.
I keep you informed
I keep you informed
Who is online
Users browsing this forum: No registered users and 1 guest