Author Topic: [PLUGIN] Smarter iKettle | Release 24 Feb 2015 | 100% - UI5 | UI7  (Read 5550 times)

Offline mickesanda

  • Jr. Member
  • **
  • Posts: 60
  • Karma: +0/-0
Re: [PLUGIN] Smarter iKettle | Release 24 Feb 2015 | 100% - UI5 | UI7
« Reply #45 on: February 10, 2017, 07:16:58 am »
Hi, Jon.

I've added the old ikettle app for 1.0 and than started playing with the .xml files. At this point I'm able to to switch Ikettle 2.0 on/off. Please find the .xml file in the attachment. All you have to do is specify the ip address and that's it. For voice control I'm using imperihome app on android. After assigning virtual switch, I can control Ikettle 2.0 with voice using commands "switch on/off Kettle" (named the vswitch kettle). I've assigned scenes to vSwitch To switch Kettle between the states. For now that's it, but I will keep working on the project so when google home will arrive in UK I want to be able to ask kettle about the water level and perhaps pre set the temp with voice. As I  mentioned I'm new to lua coding therefore it might take some time :) . I'm only using the original app and changing some code to what I think might work :) (on/off works  ;D ) The owner of the app should take most of the credit as it is a lot of coding and I only added a couple of lines... I hope he is not offended by it.

BTW. I'm pretty sure that the original ikettle won't boil if anyone will chane the .xml file as the commands are different.

BTW2. The original app was using port 2000 to connect to ikettle, I'kettle 2.0 is using port 2081 to connect therefore you would not be able to send anything to it


Thank you m.zukowski, it worked for me as well.

Offline mickesanda

  • Jr. Member
  • **
  • Posts: 60
  • Karma: +0/-0
Re: [PLUGIN] Smarter iKettle | Release 24 Feb 2015 | 100% - UI5 | UI7
« Reply #46 on: February 10, 2017, 08:30:42 am »
Hi all,

I'm new to vera as I only have it for two days. I'm able to switch the Ikettle 2.0 with this luup code:

local hex = {
  "21", "7e",
}
local binary = "";
for i, v in ipairs(hex) do
  binary = binary .. string.char(tonumber(v, 16))
end
local socket = require("socket")
tcp = assert(socket.connect("xxx.xxx.xxx.xxx", 2081))
tcp:send(binary .. "\r\n")
luup.sleep(100)
tcp:close()
return true

(change ip address as needed)

But I don't know anything about lua coding, any help would be much appreciated :D


Thank you m.zukowski for posting this. I successfully got Alexa to start the iKettle 2.0. Any idea what the luup code for turning it off might be?
/Mike

Offline m.zukowski

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: [PLUGIN] Smarter iKettle | Release 24 Feb 2015 | 100% - UI5 | UI7
« Reply #47 on: March 16, 2017, 06:49:07 pm »
Hi Mike,

   local hex = {
  "16", "7e",
}
local binary = "";
for i, v in ipairs(hex) do
  binary = binary .. string.char(tonumber(v, 16))
end
local socket = require("socket")
tcp = assert(socket.connect("xxx.xxx.xxx.xxx", 2081))
tcp:send(binary .. "\r\n")
luup.sleep(100)
tcp:close()
return true

Offline mickesanda

  • Jr. Member
  • **
  • Posts: 60
  • Karma: +0/-0
Re: [PLUGIN] Smarter iKettle | Release 24 Feb 2015 | 100% - UI5 | UI7
« Reply #48 on: March 17, 2017, 12:52:51 am »
Thank you, I will try it this evening when I come home from work.
/Mike