Would like to read device data with a simple webhook

When I execute a webhook on my TH20 device it returns: {“error”:0,“msg”:“”,“data”:{}}

It would be nice if ewelink would include the switch state, current temperature, and (if present) humidity in the data Json of that return?

Better yet, make one of the webhook actions = “return status” and return the switch state, temperature, and humidity.

As it is now the only option I have found is the API. It works but it is complicated. The webhook would be so much simpler and easier. and probably place less load on the servers.

3 Likes

Hi there, I’ve had our engineer take a look at your request. The current webhook response only shows the execution result of the webhook URL itself and does not include the state of the action being triggered. To have the webhook return this type of detailed status information, it would require additional API calls on the server side to fetch that data. I’ve forwarded this request to the WEB team, it would take some more time for us to research. If we have any updates on this, we’ll be sure to let you know.

That’s great Stephen! Thank you. I need this now more than ever because I need to be able to get the water temperature of my pond and post it on my weather site. I was using the v1 API for this but the credentials on the script I used were shut down. I applied for new credentials and received them but am unable to use the new v2 API without oAuth2 which requires a human login. So, at the moment I have no way to programmatically read and post the temperature.

I did manage to get the v2 OAuth code written and working but took well over 100 lines of PHP code to do it. I posted a link to it on the forum if anyone else is interested. That said, it would be a heck of a lot simpler to do this task with a webhook that returned the sensor status. I do hope the engineers can find a way to do this.

Hi there,

Thank you for bringing this request to our attention. I have just received the internal team’s evaluation result regarding this feature. Unfortunately, I regret to inform you that we will not be implementing this functionality at this time.

Well, thanks for the follow-up response. All I can say is that this would be a very attractive feature for the advanced plan. Webhooks themselves are one of the reasons I pay for it. Perhaps the team will reevaluate and decide to implement this simple enhancement in the future. The data:{} is already there in the return, it just needs populating.