This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Waterkotte Ecotouch Heatpump
#2
Try running this code and post what you get in Logs. Change ip, user and pwd variables as needed.
Code:
http = require('socket.http')

ip = '192.168.178.100' -- ip address of Waterkotte heat pump
user = 'XXX' -- username of web interface
pwd = 'XXX' -- password of web interface

url = 'http://' .. ip .. '/cgi/login?username=' .. user .. '&password=' .. pwd

res, code = http.request(url)

log('login request', res, code)

if res and code == 200 then
  token = res:match('%x+')

  log('token', token)

  if type(token) == 'string' and #token == 32 then
    storage.set('ecotouch-token', token)
  end
end

if token then
  url = 'http://' .. ip .. '/cgi/readTags?n=1&t1=A1'

  res, code = http.request({
    url = url,
    headers = {
      ['Cookie'] = 'IDALToken=' .. token
    }
  })

  log('read request', res, code)
end
Reply


Messages In This Thread
RE: Waterkotte Ecotouch Heatpump - by admin - 07.03.2022, 08:27
RE: Waterkotte Ecotouch Heatpump - by admin - 08.03.2022, 08:09
RE: Waterkotte Ecotouch Heatpump - by admin - 08.03.2022, 09:46
RE: Waterkotte Ecotouch Heatpump - by admin - 11.03.2022, 09:22

Forum Jump: