Hallo
I want to get a value from a website (http) which I could get with JavaScript.
I get the website with HTTP Request (
192.168.0.221/index - it is a BL602 tasmotalike own flashed switch) and in the variable %http_data I have a <div> with id=state.
Inside that div there is a table where its first td-field is my searched value (contains ON or OFF, depending on the state of the switch).
JSON in Tasker doesnt work obviously, but Javascript does in Firefox Konsole:
document.getElementById("state").firstChild.firstChild.firstChild.firstChild.innerHTML
This gets me ON or OFF.
But how is that done in Tasker, a Javascriptlet on a variable (http_data)?
Thank for hints.
frank
PS.:
Yes, it seems the easiest way for me at the moment, to get the value of that switch, because I would need a firmware update to get a real answer for a status request (would be much easier).