homebridge-melcloud
homebridge-melcloud copied to clipboard
'ContextKey' of null
Hello I am very new to this but I have had home bridge up and running for a while now. I have just tried to add in the melcloud plugin and I get the following when I try and run homebridge.
TypeError: Cannot read property 'ContextKey' of null
at Request._callback (/usr/local/lib/node_modules/homebridge-melcloud/index.js:77:32)
at Request.self.callback (/usr/local/lib/node_modules/homebridge-melcloud/node_modules/request/request.js:188:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request.
Can someone help me out here?
Can you show me your config.json ?
Thanks for your time.
I am in New Zealand.
This is my config.json { "bridge": { "name": "Homebridge", "username": "CC:22:3D:E3:CE:30", "port": 49860, "pin": "031-45-154" },
"platforms": [
{
"platform" : "BelkinWeMo",
"name" : "WeMo Platform"
},
{
"platform": "Melcloud",
"name": "Melcloud",
"language": "0",
"username": "user_name_which_is_an_e-mail",
"password": "Password"
}
],
"accessories": [
{
"accessory": "SamsungTV2016",
"name": "Lounge TV",
"ip_address": "192.168.2.5",
"mac_address": "xx:xx:xx:xx:xx:xx"
}
]
}
- on which platform are you running homebridge ?
- which version of node.js do you have ?
I am running homebridge on a mac book pro for testing I normally run homebridge on a raspberry pi.
I have v6.10.3 node.js running on the mac
When I try to debug using node-debug I get the following
Detached from the Target Remote debugging has been terminated with reason: web socket_closed Please reattach to the new target.
It seems that you are not able to login. Are you sure you are using valid credentials for Melcloud service?
I can login using the APP ok with the credentials I have. Is the user name always an e-mail address? Is it an issue with the @ symbol?
I think I have found the problem in New Zealand and Australia it looks like we have to access the service here. http://www.mitsubishi-electric.co.nz/wifi/#online
not
Not "https://app.melcloud.com/Mitsubishi.Wifi.Client/Login/ClientLogin";
or this http://app.melview.net/login.html
Version: 3.0.539
https://github.com/lennyby93/node-mmcontrol for Australia and New Zealand Is there a way to make the homebridge work for New Zealand?
It require a complete refactoring. I will put this request in my to do list.
Thanks for your time I just tried to register one of my units with Melcloud but it was unable to find my unit. Once again thanks for your time and I look forward to you getting to you getting down your to do list.
Do you think it would be possible to get my adapter to register with the Melcloud servers?
I have found out the following
URL : https://api.melview.net/api/Login.aspx Method : POST Retour : JSON
Para : {"user":"login_mame_as_email","pass":"password","appversion":"3.0.558a"}
Unitcapabilities
https://api.melview.net/api/unitcapabilities.aspx
POST {"unitid":0} { "id": "000000", "unitname": "00:00:00:00:00:00", "userunits": 1, "modeltype": 1, "adaptortype": "me", "localip": "xxx.xxx.xxx.xxx", "fanstage": 3, "hasairdir": 0, "hasswing": 0, "hasautomode": 0, "hasautofan": 1, "hasdrymode": 1, "hasairauto": 1, "hasairdirh": 0, "max": { "3": { "min": 16, "max": 30 }, "1": { "min": 17, "max": 28 }, "8": { "min": 19, "max": 28 } }, "time": "01:16 Sat", "error": "ok" }
Unit command https://api.melview.net/api/unitcommand.aspx
POST {"unitid":0,"v":2} { "id": "000000", "power": 1, "standby": 0, "setmode": 1, "automode": 0, "setfan": 0, "settemp": "23", "roomtemp": "19", "airdir": 3, "airdirh": 1, "sendcount": 0, "fault": "", "error": "ok" }
Unit command2 https://api.melview.net/api/unitcommand.aspx
POST {"unitid":000000,"v":2} { "id": "000000", "power": 1, "standby": 0, "setmode": 1, "automode": 0, "setfan": 0, "settemp": "23", "roomtemp": "19", "airdir": 3, "airdirh": 1, "sendcount": 0, "fault": "", "error": "ok" } Unit command Fan Speed https://api.melview.net/api/unitcommand.aspx
POST {"unitid":000000,"v":2,"commands":"FS5"} { "id": "000000", "power": 1, "standby": 0, "setmode": 1, "automode": 0, "setfan": 5, "settemp": "23", "roomtemp": "19", "airdir": 3, "airdirh": 1, "sendcount": 0, "fault": "", "error": "ok" } Unit command Temp Set to 28 https://api.melview.net/api/unitcommand.aspx
POST {"unitid":000000,"v":2,"commands":"TS28"}
Unit command Mode Change https://api.melview.net/api/unitcommand.aspx
POST {"unitid":000000,"v":2,"commands":"MD2"}
Unit command Power off https://api.melview.net/api/unitcommand.aspx
POST {"unitid":000000,"v":2,"commands":"PW0"}
Will this help
+1 would also like the ability to use the Australia+New Zealand API!
+1 me too