Hi, @Andremain.
Have you tried to print a log here to see if the response of the Evohome Hot Water device is received before or after the generateEvent() function is executed?
There, it also mentions that the update takes some time on the Evohome side, so, when the poll gets the current status:
It receives the previous value (before sending the command from ST)
It generates the events to set the value received in ST (and it goes back to the initial value)
After some time, the new status is effective in Evohome (the poll receives now the correct value)
I suggest you print some logs to track the events flow, this way we can know better whatâs going on.
About the 8-32Âș range in Alexa. Iâve verified this is a default range based on how all the known thermostats by the platform work. Iâm trying to see if this can be modified, I havenât been able to do so yet.
Ok, in the SmartApp logs, I can see thereâs no response for the HTTP request to update the status on Evohomeâs side, there should be a log similar to this one.
The command to change the Switch status was issued at 4:15:50.
Then the SmartApp setDHWSwitchState() function was called at 4:15:51
At 4:15:56 getEvohomeStatus function is executed(and still no response from the command sent)
The Status on the Evohome device takes that long to be updated or only the response is delayed?
What I meant before was adding a line to print a log when the response is received on the DTH side here, something like:
log.info "Switch Command successful, sending state update to the API"
Thank you @nayelyz . So i need to just add the log.info line inside the if statement of the // Send update via parent: section and that should enable it to send the logs over to the ide?
log.info creates a log exactly in that part of the execution, you can show whatever text you want (even concatenate variables), it should be something to guide you on where this log comes from and some important results.
As you can see in the IF statement, it compares if the value returned by parent.setDHWSwitchState() doesnât exist. This is because when the command is successful, the value returned is ânullâ
So, if this condition is met and you indicated to print a log inside, you should see it in the log section of the DTH.
But, itâs important to notice if the state on Evohome changed but the response hasnât been received.
Ok i think i understand. I have added the line at the hot water dth but just to make sureâŠ
If i go on the ide and copy and paste the new dth inside the existing device handler, save it and publish it again, delete the device and reinitialize the evohome smartapp, it should start getting the new logs?
Or do in need to delete everything, create them again in the ide and do the whole process over?
Yes, it was helpful, thank you.
I think I got it. I think I cannot see the last version (3.3) in your repository, but based on 3.2, there are two things:
This event is sending the âCelsiusâ unit to all the attributes.
a. In Evohome, this was applied only for the temperature attribute.
b. For the Hot Water zone, it should be applied for those who work with temperature, eg. thermostatHeatingSetpoint
A new poll is executed when the success response is received here.
a. This triggers the status query and the change is not effective yet.
b. If you remove that line, the other event should not be generated.
Sorry. I added the 3.3 Release in Github.
Also as i have replaced the 3.2 release, the links no longer open. Can you please update them to work with the new release?
When you say in Evohome, you mean the smartapp or the DTH?
So If i go and comment out that line, once i send the on command, because it will no longer poll the api for the on / off status, it will become a dumb switch and stay at the position set by the user. Correct?
Hi, can you share the logs of the switch actions, please?
This means, the events generated when you click on the switch control and the scheduled poll, from both, the SmartApp and Hot Water DTH.
Sorry, but no. This range canât be configured from the device handler so far.
Can you explain more whereâs the issue with the Switch, please? I see the events are being sent, changing from On to Off. However, in generateEvents(), you keep sending the âCâ unit for every attribute, including switch, I just want to discard this can cause an issue.
@nayelyz sorry for not being clear. I meant that the icon for the hot water is always showing as on and does not change in the Smartthings Dashboard. Any chance we could get that to work properly?
oooh, now I get it. Sadly, the only way to control the device icon is by using a capability in the Dashboardâs state section with âactiveâ and âinactiveâ alternatives.
As you are using the Temperature capability, the icon remains active.