jghaanstra / cloud.shelly

Homey app to control Shelly Cloud devices
GNU General Public License v3.0
21 stars 14 forks source link

Support for the Pro 3EM Switch add-on #211

Closed oh2th closed 8 months ago

oh2th commented 9 months ago

Add detection for the switch add-on on Pro 3EM devices: https://shelly-api-docs.shelly.cloud/gen2/Addons/ShellyProOutputAddon

And control for the detected relay switch(100) https://shelly-api-docs.shelly.cloud/gen2/ComponentsAndServices/Switch

Would be nice, if maintenance repair could be run against the already configured device, if it was previously already in Homey to detect the add-on.

jghaanstra commented 9 months ago

Please post the output of /rpc/Shelly.GetStatus of the device with the connected add on.

oh2th commented 9 months ago
{
    "ble": {},
    "cloud": {
        "connected": true
    },
    "em:0": {
        "id": 0,
        "a_current": 0.05,
        "a_voltage": 228.1,
        "a_act_power": 2.5,
        "a_aprt_power": 11.4,
        "a_pf": 0.21,
        "a_freq": 50,
        "b_current": 0.036,
        "b_voltage": 229.8,
        "b_act_power": 5,
        "b_aprt_power": 8.4,
        "b_pf": 0.71,
        "b_freq": 50,
        "c_current": 0.029,
        "c_voltage": 235.1,
        "c_act_power": 2,
        "c_aprt_power": 6.7,
        "c_pf": 0.61,
        "c_freq": 50,
        "n_current": null,
        "total_current": 0.115,
        "total_act_power": 9.454,
        "total_aprt_power": 26.496,
        "user_calibrated_phase": []
    },
    "emdata:0": {
        "id": 0,
        "a_total_act_energy": 0.07,
        "a_total_act_ret_energy": 0,
        "b_total_act_energy": 0.14,
        "b_total_act_ret_energy": 0,
        "c_total_act_energy": 0.26,
        "c_total_act_ret_energy": 0.96,
        "total_act": 0.47,
        "total_act_ret": 0.96
    },
    "eth": {
        "ip": null
    },
    "modbus": {},
    "mqtt": {
        "connected": true
    },
    "switch:100": {
        "id": 100,
        "source": "init",
        "output": false,
        "temperature": {
            "tC": 32.5,
            "tF": 90.5
        }
    },
    "sys": {
        "mac": "E05A1B334800",
        "restart_required": false,
        "time": "09:55",
        "unixtime": 1702281352,
        "uptime": 540,
        "ram_size": 241032,
        "ram_free": 97796,
        "fs_size": 524288,
        "fs_free": 192512,
        "cfg_rev": 24,
        "kvs_rev": 0,
        "schedule_rev": 0,
        "webhook_rev": 0,
        "available_updates": {
            "beta": {
                "version": "1.1.0-beta2"
            }
        }
    },
    "temperature:0": {
        "id": 0,
        "tC": 40.9,
        "tF": 105.6
    },
    "wifi": {
        "sta_ip": "192.168.4.31",
        "status": "got ip",
        "ssid": "V7IOT",
        "rssi": -50
    },
    "ws": {
        "connected": true
    }
}
jghaanstra commented 9 months ago

Hopefully working support has been added with release 3.24.0. Please test it.

oh2th commented 9 months ago

Toggle on off results with missing listener

image

Changing state from shelly device directly is reflected properly as a state change.

jghaanstra commented 9 months ago

Ok thanx, will be fixed with the next release.