Strange result via API with Evohome

For Evohome related questions in Domoticz

Moderator: leecollings

Post Reply
User avatar
philchillbill
Posts: 397
Joined: Monday 12 September 2016 13:47
Target OS: Linux
Domoticz version: beta
Location: Eindhoven. NL
Contact:

Strange result via API with Evohome

Post by philchillbill »

When I call

Code: Select all

/json.htm?type=command&param=setused&idx=<idx>&setpoint=<setpoint>&mode=TemporaryOverride&until=<until>&used=true
via the local Domoticz 8080 address in my LAN it works fine. However, if I call it via an external Apache2 proxy it fails. All other API commands via the same proxy succeed, including setting the Evohome system mode via the API. ANybody got any ideas what might be wrong?
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
User avatar
philchillbill
Posts: 397
Joined: Monday 12 September 2016 13:47
Target OS: Linux
Domoticz version: beta
Location: Eindhoven. NL
Contact:

Re: Strange result via API with Evohome

Post by philchillbill »

Answering my own question, by examining the Domoticz source code I figured out that the JSON API docs were incorrectly updated after the recent API update. The parameter name should be setsetpoint and not setused.
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
User avatar
philchillbill
Posts: 397
Joined: Monday 12 September 2016 13:47
Target OS: Linux
Domoticz version: beta
Location: Eindhoven. NL
Contact:

Re: Strange result via API with Evohome

Post by philchillbill »

Now I notice that when I use the setsetpoint parameter with the API call, the mode is always PermanentOverride and the until is ignored. Hmm :?:
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
janpep
Posts: 225
Joined: Thursday 14 March 2024 10:11
Target OS: Linux
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Strange result via API with Evohome

Post by janpep »

philchillbill wrote: Wednesday 13 November 2024 10:16 Now I notice that when I use the setsetpoint parameter with the API call, the mode is always PermanentOverride and the until is ignored. Hmm :?:
I ran in the exact same thing.
Found out (with developper mode of the browser) when doing setting manually until a time and took the resulting URL.

This included also the name of the device, a description field (empty), but difference with the wiki was mainly the format of the date and time!
So I put the entire URL in and it worked.
Then I removed name and description it still working.
Here the remaining result that works for me.

Code: Select all

local setidx=999
local setpoint=2
local setuntil="2025-01-15T23:14:00.000Z"

dz.executeShellCommand( 'curl "http://LOCALIP:PORT/json.htm?type=command&param=setused&idx=' .. setidx .. '&setpoint=' .. setpoint .. '&mode=TemporaryOverride&until=' .. setuntil .. '&used=true" ' )
Hope this helps you.

However.... Actually I was not only looking for the UNTIL time setting but FROM and UNTIL.
Domoticz in Ubuntu virtual machine on Synology DS718+ behind FRITZ!Box.
Using: EvoHome; MELCloud; P1 meter; Z-Stick GEN5; Z-Wave-js-ui; MQTT; Greenwave powernodes 1+6; Fibaro switch, plugs, smoke; FRITZ!DECT 200. Scripts listed in profile interests.
User avatar
philchillbill
Posts: 397
Joined: Monday 12 September 2016 13:47
Target OS: Linux
Domoticz version: beta
Location: Eindhoven. NL
Contact:

Re: Strange result via API with Evohome

Post by philchillbill »

Good find. I used to have the :00.000Z a long time ago and cannot remember why I removed it. I can confirm it all works when this is the time format used.

You cannot specify FROM together with UNTIL as the only way Evohome can handle that is by editing the schedule. TemporaryOverrides always start now, not at a future date.

I'm the author of the EvoControl Alexa skill and I do have commands like "Alexa, make it 22 deg in the Office from 12:00 for 2 hours" and the only way I can do it is to edit the schedule. EvoControl allows you to save 4 schedules for each zone so you can switch back to the 'real' schedule after your intended diversion has ended. Because if you dont' that modified schedule wil lrepeat again next week.
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
janpep
Posts: 225
Joined: Thursday 14 March 2024 10:11
Target OS: Linux
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Strange result via API with Evohome

Post by janpep »

philchillbill wrote: Thursday 16 January 2025 11:44 You cannot specify FROM together with UNTIL as the only way Evohome can handle that is by editing the schedule. TemporaryOverrides always start now, not at a future date.
I am thinking of adding a custom setpoint device in between to add timer setting and times to.
(In my case in the morning for the coming day based on the events that I get out of a calendar.)
When triggered by the timer the setpoint changes, this can trigger a script.
The script than can get the next scheduled "until time" out of the EVOhome device and then (at that timer moment) it sets the EVOhome temperature UNTIL.
The UNTIL time is then to be set as the first time that is found.
- OR the EVOhome next schedule time.
- OR the next time in the timer.
I think that shoud work.
Domoticz in Ubuntu virtual machine on Synology DS718+ behind FRITZ!Box.
Using: EvoHome; MELCloud; P1 meter; Z-Stick GEN5; Z-Wave-js-ui; MQTT; Greenwave powernodes 1+6; Fibaro switch, plugs, smoke; FRITZ!DECT 200. Scripts listed in profile interests.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests