-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shelly BLU Door/Window #164
Comments
Hm good question ... never tried that... I will check it out |
@runcioa |
@windkh /rpc/BTHome.GetStatus contains an error property if bthome is not enabled |
I enable the BTHome and registered the device on components via mac address, If i try:
{
"id": 1,
"src": "shelly1minig3-ecda3bc252b0",
"result": {
"id": 200,
"value": false,
"last_updated_ts": 1720552148
}
}
{
"id": 1,
"src": "shelly1minig3-ecda3bc252b0",
"result": {
"id": 201,
"value": 4.7,
"last_updated_ts": 1720552422
}
} The value 4.7 is degree angle. And so on. |
If i make a post request like this: {
"id": 1,
"method": "BTHomeDevice.GetKnownObjects",
"params": {
"id": 200
}
} the response is: {
"id": 1,
"src": "shelly1minig3-ecda3bc252b0",
"result": {
"id": 200,
"objects": [
{
"obj_id": 45,
"idx": 0,
"component": "bthomesensor:200"
},
{
"obj_id": 63,
"idx": 0,
"component": "bthomesensor:201"
},
{
"obj_id": 5,
"idx": 0,
"component": "bthomesensor:202"
},
{
"obj_id": 1,
"idx": 0,
"component": "bthomesensor:203"
},
{
"obj_id": 58,
"idx": 0,
"component": "bthomesensor:204"
}
]
}
} With an obj_id you can use it to make a request with method BTHome.GetObjectInfos {
"id": 1,
"method": "BTHome.GetObjectInfos",
"params": {
"obj_ids": [
45,
63,
5,
1
]
}
} and the result is: {
"id": 1,
"src": "shelly1minig3-ecda3bc252b0",
"result": {
"objects": [
{
"obj_id": 45,
"obj_name": "window",
"type": "binary_sensor",
"unit": ""
},
{
"obj_id": 63,
"obj_name": "rotation",
"type": "sensor",
"unit": "°"
},
{
"obj_id": 5,
"obj_name": "illuminance",
"type": "sensor",
"unit": "lux"
},
{
"obj_id": 1,
"obj_name": "battery",
"type": "sensor",
"unit": "%"
}
],
"offset": 0,
"count": 4,
"total": 4
}
} |
Well, the question is. Is it compatible with the blugateway or is it just another way to communicate with bt devices. |
I don't have a blugateway, so i can't try. The Bluegateway require a callback, i think is a bit more compicated. |
I have another solution that require only one Post Request: {
"id": 1,
"method": "Shelly.GetComponents"
} the complete response is: {
"id": 1,
"src": "shelly1minig3-ecda3bc252b0",
"result": {
"components": [
{
"key": "ble",
"status": {},
"config": {
"enable": true,
"rpc": {
"enable": true
},
"observer": {
"enable": true
}
}
},
{
"key": "bthome",
"status": {},
"config": {}
},
{
"key": "bthomedevice:200",
"status": {
"id": 200,
"rssi": -72,
"battery": 100,
"packet_id": 90,
"last_updated_ts": 1720634555
},
"config": {
"id": 200,
"addr": "38:39:8f:74:b1:4f",
"name": null,
"key": null,
"meta": {
"ui": {
"view": "Last updated",
"icon": null
}
}
}
},
{
"key": "bthomesensor:200",
"status": {
"id": 200,
"value": 100,
"last_updated_ts": 1720634555
},
"config": {
"id": 200,
"addr": "38:39:8f:74:b1:4f",
"name": "Battery",
"obj_id": 1,
"idx": 0,
"meta": {
"ui": {
"icon": null
}
}
}
},
{
"key": "bthomesensor:201",
"status": {
"id": 201,
"value": 22.00,
"last_updated_ts": 1720634555
},
"config": {
"id": 201,
"addr": "38:39:8f:74:b1:4f",
"name": " illuminance",
"obj_id": 5,
"idx": 0,
"meta": {
"ui": {
"icon": null
}
}
}
},
{
"key": "bthomesensor:202",
"status": {
"id": 202,
"value": false,
"last_updated_ts": 1720634555
},
"config": {
"id": 202,
"addr": "38:39:8f:74:b1:4f",
"name": null,
"obj_id": 45,
"idx": 0,
"meta": null
}
},
{
"key": "bthomesensor:203",
"status": {
"id": 203,
"value": 0.0,
"last_updated_ts": 1720634555
},
"config": {
"id": 203,
"addr": "38:39:8f:74:b1:4f",
"name": null,
"obj_id": 63,
"idx": 0,
"meta": null
}
},
{
"key": "cloud",
"status": {
"connected": true
},
"config": {
"enable": true,
"server": "shelly-35-eu.shelly.cloud:6022/jrpc"
}
},
{
"key": "input:0",
"status": {
"id": 0,
"state": false
},
"config": {
"id": 0,
"name": null,
"type": "switch",
"enable": true,
"invert": false,
"factory_reset": true
}
},
{
"key": "mqtt",
"status": {
"connected": true
},
"config": {
"enable": true,
"server": "192.168.2.60:1883",
"client_id": "shelly1minig3-ecda3bc252b0",
"user": null,
"ssl_ca": null,
"topic_prefix": "shelly1minig3-ecda3bc252b0",
"rpc_ntf": false,
"status_ntf": false,
"use_client_cert": false,
"enable_rpc": false,
"enable_control": true
}
},
{
"key": "script:1",
"status": {
"id": 1,
"running": false,
"mem_free": 25200
},
"config": {
"id": 1,
"name": "abc",
"enable": false
}
},
{
"key": "script:2",
"status": {
"id": 2,
"running": false,
"mem_free": 25200
},
"config": {
"id": 2,
"name": "script_2",
"enable": false
}
},
{
"key": "switch:0",
"status": {
"id": 0,
"source": "SHC",
"output": false,
"temperature": {
"tC": 59.1,
"tF": 138.4
}
},
"config": {
"id": 0,
"name": null,
"in_mode": "follow",
"initial_state": "match_input",
"auto_on": false,
"auto_on_delay": 60.00,
"auto_off": false,
"auto_off_delay": 60.00
}
}
],
"cfg_rev": 331,
"offset": 0,
"total": 16
}
} with all parameters (name and value) that i need. |
Good idea. So the only thing to find out is how the shelly will forward the changes in the sensor data like for the callback mode... |
I added the option to install the blu gateway script to a standard gen2+ device. |
@runcioa first iteration was added to V11.2.0. Now let's talk about what else we could do here. Any idea? |
I can't understand if it's already possibile to retrive Shelly BLU Window data from a node of a plus device.
In my case the Shelly BLU Window is connected via a Shelly Plus 1 Mini Gen3.
The text was updated successfully, but these errors were encountered: