Open zabaya opened 4 years ago
Did you install the Mozilla IOT Gateway shown here https://iot.mozilla.org/gateway/ ?
Yes on a separate pi
Did you put in that information on the Bridge Control Tab for the Mozilla IOT gateway so it can bring up the helper?
Yes, I've successfully connected a hub, I can see the devices on the hub:
Let's say I want to add the Bulb, what do I fill in these fields:
I feel like a noob, usually I can figure stuff like this out, but now I don't know what I'm doing wrong. I also tried to use Postman and this example to see what is what. If I send the same command to through that then I get an error.
So basicly I'm stuck.
Alright so I got a little bit further. I found out that my property links were wrong so I now can successfully send commands through Postman without error's:
PUT
http://gateway.local/things/homekit-CC%3A22%3A3D%3AE3%3ACE%3A31-17/properties/17-17
contenttype: application/json
body: {"17-17":50}
will set the bulb to 50%
But now i don't know what to fill in where in ha-bridge.
Here is all the info i got with the GET
method:
{
"title": "Bulb",
"@context": "https://iot.mozilla.org/schemas",
"@type": [
"Light",
"OnOffSwitch"
],
"description": "Default-Model",
"href": "/things/homekit-CC%3A22%3A3D%3AE3%3ACE%3A31-17",
"properties": {
"17-16": {
"title": "On",
"type": "boolean",
"@type": "OnOffProperty",
"description": "On",
"links": [
{
"rel": "property",
"href": "/things/homekit-CC%3A22%3A3D%3AE3%3ACE%3A31-17/properties/17-16"
}
]
},
"17-17": {
"title": "Brightness",
"type": "integer",
"@type": "BrightnessProperty",
"unit": "percent",
"description": "Brightness",
"minimum": 0,
"maximum": 100,
"multipleOf": 1,
"links": [
{
"rel": "property",
"href": "/things/homekit-CC%3A22%3A3D%3AE3%3ACE%3A31-17/properties/17-17"
}
]
}
},
"actions": {},
"events": {},
"links": [
{
"rel": "properties",
"href": "/things/homekit-CC%3A22%3A3D%3AE3%3ACE%3A31-17/properties"
},
{
"rel": "actions",
"href": "/things/homekit-CC%3A22%3A3D%3AE3%3ACE%3A31-17/actions"
},
{
"rel": "events",
"href": "/things/homekit-CC%3A22%3A3D%3AE3%3ACE%3A31-17/events"
},
{
"rel": "alternate",
"mediaType": "text/html",
"href": "/things/homekit-CC%3A22%3A3D%3AE3%3ACE%3A31-17"
},
{
"rel": "alternate",
"href": "ws://gateway.local/things/homekit-CC%3A22%3A3D%3AE3%3ACE%3A31-17"
}
],
"layoutIndex": 3,
"selectedCapability": "Light",
"iconHref": null,
"id": "http://gateway.local/things/homekit-CC%3A22%3A3D%3AE3%3ACE%3A31-17",
"base": "http://gateway.local/",
"securityDefinitions": {
"oauth2_sc": {
"scheme": "oauth2",
"flow": "code",
"authorization": "http://gateway.local/oauth/authorize",
"token": "http://gateway.local/oauth/token",
"scopes": [
"/things/homekit-CC%3A22%3A3D%3AE3%3ACE%3A31-17:readwrite",
"/things/homekit-CC%3A22%3A3D%3AE3%3ACE%3A31-17",
"/things:readwrite",
"/things"
]
}
},
"security": "oauth2_sc"
}
Once you hit build item and it goes to the screen with the details, just hit the save device at the top of the screen and then it adds it with the correct commands. It is then available the devices tab. The helper sets it up for you.
I've tried that, but it doesn't do anything. It sees the device, and if i click add, it doesn't work. I even tried to make it work like this with an bearer authorization like this one. I send both screenshots and logs:
Mozilla log:
HTTP response code was not an expected successful response of between 200 - 299, the code was: HTTP/1.1 400 Bad Request with the content of <<<Invalid property name>>>
But it is exactly the same as the Postman method I've send earlier
HTTP log:
On/Off Request failed with: [{"error":{"type":"6","address":"/lights/108","description":"Error on calling url to change device state","method_name":"/lights/108/state"}}]
Same as above
will need to take a look
I've setup succesfully the bridge to ha-bridge i can see all the bridged devices but the on/off/dim/color state section is a mystery for me. I've searched in the faq between all the issues. But can't seem to get it to work.