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.

Dyson Pure Hot+Cool
#4
Use standard MQTT example without encryption. Username is device serial number, password value are device credentials.

This resident script will connect to MQTT and subscribe to status topic. See logs tab for output result.

Code:
-- product types
DYSON_PURE_COOL_LINK_TOUR = '475'
DYSON_PURE_COOL_LINK_DESK = '469'
DYSON_PURE_HOT_COOL_LINK_TOUR = '455'
DYSON_360_EYE = 'N223'

broker = '192.168.1.1' -- default port is 1883
username = '...' -- device serial
password = '...' -- device credentials
producttype = DYSON_PURE_HOT_COOL_LINK_TOUR

topic = producttype .. '/' .. username .. '/status'

mqtt = require('mosquitto')
client = mqtt.new()

client.ON_CONNECT = function(status, rc, err)
  if status then
    log('connect ok')
    client:subscribe(topic)
  else
    log('connect error', rc, err)
  end
end

client.ON_MESSAGE = function(mid, topic, data)
  log('message', topic, data)
end

client:login_set(username, password)
client:connect(broker)
client:loop_forever()
Reply


Messages In This Thread
Dyson Pure Hot+Cool - by gjniewenhuijse - 13.02.2019, 16:04
RE: Dyson Pure Hot+Cool - by admin - 15.02.2019, 08:34
RE: Dyson Pure Hot+Cool - by gjniewenhuijse - 11.07.2019, 08:18
RE: Dyson Pure Hot+Cool - by admin - 11.07.2019, 08:41
RE: Dyson Pure Hot+Cool - by gjniewenhuijse - 12.07.2019, 09:41
RE: Dyson Pure Hot+Cool - by admin - 12.07.2019, 09:47
RE: Dyson Pure Hot+Cool - by gjniewenhuijse - 12.07.2019, 09:55
RE: Dyson Pure Hot+Cool - by admin - 12.07.2019, 10:00
RE: Dyson Pure Hot+Cool - by gjniewenhuijse - 30.01.2020, 12:16
RE: Dyson Pure Hot+Cool - by gjniewenhuijse - 15.07.2019, 11:25
RE: Dyson Pure Hot+Cool - by gjniewenhuijse - 15.07.2019, 12:48
RE: Dyson Pure Hot+Cool - by admin - 15.07.2019, 13:27
RE: Dyson Pure Hot+Cool - by gjniewenhuijse - 15.07.2019, 14:34
RE: Dyson Pure Hot+Cool - by gjniewenhuijse - 24.09.2019, 06:16
RE: Dyson Pure Hot+Cool - by admin - 16.07.2019, 07:59
RE: Dyson Pure Hot+Cool - by gjniewenhuijse - 16.07.2019, 08:32
RE: Dyson Pure Hot+Cool - by admin - 16.07.2019, 09:09
RE: Dyson Pure Hot+Cool - by gjniewenhuijse - 16.07.2019, 09:53
RE: Dyson Pure Hot+Cool - by admin - 16.07.2019, 10:49
RE: Dyson Pure Hot+Cool - by gjniewenhuijse - 16.07.2019, 13:44
RE: Dyson Pure Hot+Cool - by gjniewenhuijse - 17.07.2019, 14:39
RE: Dyson Pure Hot+Cool - by admin - 18.07.2019, 09:29
RE: Dyson Pure Hot+Cool - by gjniewenhuijse - 19.07.2019, 11:54
RE: Dyson Pure Hot+Cool - by admin - 19.07.2019, 12:28
RE: Dyson Pure Hot+Cool - by gjniewenhuijse - 20.08.2020, 08:33
RE: Dyson Pure Hot+Cool - by admin - 26.09.2019, 08:07
RE: Dyson Pure Hot+Cool - by gjniewenhuijse - 27.09.2019, 07:01
RE: Dyson Pure Hot+Cool - by admin - 01.10.2019, 06:46
RE: Dyson Pure Hot+Cool - by gjniewenhuijse - 01.10.2019, 08:00
RE: Dyson Pure Hot+Cool - by gjniewenhuijse - 04.10.2019, 08:49
RE: Dyson Pure Hot+Cool - by gjniewenhuijse - 09.10.2019, 12:16
RE: Dyson Pure Hot+Cool - by admin - 30.01.2020, 18:24
RE: Dyson Pure Hot+Cool - by admin - 20.08.2020, 08:34
RE: Dyson Pure Hot+Cool - by gjniewenhuijse - 20.08.2020, 08:41
RE: Dyson Pure Hot+Cool - by admin - 20.08.2020, 08:42
RE: Dyson Pure Hot+Cool - by gjniewenhuijse - 20.08.2020, 08:59
RE: Dyson Pure Hot+Cool - by gjniewenhuijse - 02.10.2021, 08:54
RE: Dyson Pure Hot+Cool - by admin - 04.10.2021, 06:41
RE: Dyson Pure Hot+Cool - by gjniewenhuijse - 04.10.2021, 12:58
RE: Dyson Pure Hot+Cool - by gjniewenhuijse - 12.10.2021, 11:32

Forum Jump: