Shelly driver input monitoring?

I'm using the custom Shelly Plus driver by Scott Grayban. It works great. However It only controls the Shelly output... has anyone found a way to monitor the input of a Shelly Plus 1?

Try alternative driver in the same thread. It is not tested on Shelly Plus 1, but on Shelly Plus i4 and Shelly Pro 2PM. Should scale automatically.

I've been trying to use this method, but it sais: just install the whole bundle.... No idea how i install that bundle in its total all at once....

Here is the post with explanation

Let me know if you need any help

thanks for the fast reply, succeeded in doing this.
obviously, I'm new to all this.

maybe you can help me out. I don't get a child device when I add a shelly 1 plus.
what are the things I should look out for? the Shelly itself does what it is supposed to do.
but when I want to use the info coming from the input, I don't know what to do.

I configured the shelly in detached mode and all...

You need to press 'configure' button on the device/driver pager after settin ip address.

On this button driver pulls the device for available components and spawns know child devices accordingly.

(assuming driver is set for the device)

that's exactly what I have done, doesn't seem to work for me




After page update should be something like this

If it fails somehow check logs for errors. Would be nice to see 'debug' mode logs.

I just copied everything:

2024-02-04 19:01:23.173debugparseShellyWifiStatus [sta_ip:192.168.0.206, status:got ip, ssid:Dr Nick, rssi:-63, ap_client_count:0, ts:null]

dev:552024-02-04 19:01:23.171debugConfiguration revision 41

dev:552024-02-04 19:01:23.167info(null) Sensor generic report: Air temperature:temperature 53.7°C

dev:552024-02-04 19:01:23.164debug(null) parseShellyTemperatureSensorStatus [tC:53.7, tF:128.7]

dev:552024-02-04 19:01:23.161debug(null) parseShellyCommonStatus [id:0, source:init, output:true, temperature:[tC:53.7, tF:128.7], ts:null]

dev:552024-02-04 19:01:23.159debug(null) parseShellySwitchStatus [id:0, source:init, output:true, temperature:[tC:53.7, tF:128.7], ts:null]

dev:552024-02-04 19:01:23.156info(null) Script running true

dev:552024-02-04 19:01:23.154debug(null) parseShellyScriptStatus [id:1, running:true, mem_used:420, mem_peak:602, mem_free:24780, ts:null]

dev:552024-02-04 19:01:23.149debug(null) parseShellyCommonStatus [id:0, state:false, ts:null]

dev:552024-02-04 19:01:23.147debug(null) parseShellyInputStatus [id:0, state:false, ts:null]

dev:552024-02-04 19:01:23.137debugparseShellyCloudStatus [connected:true, ts:null]

dev:552024-02-04 19:01:23.131debugparseShellyStatus [ble:[:], cloud:[connected:true], input:0:[id:0, state:false], mqtt:[connected:false], script:1:[id:1, running:true, mem_used:420, mem_peak:602, mem_free:24780], switch:0:[id:0, source:init, output:true, temperature:[tC:53.7, tF:128.7]], sys:[mac:A0A3B3C30DE8, restart_required:false, time:19:01, unixtime:1707069683, uptime:9321, ram_size:245868, ram_free:127752, fs_size:458752, fs_free:143360, cfg_rev:41, kvs_rev:0, schedule_rev:0, webhook_rev:12, available_updates:[beta:[version:1.2.0-beta1]], reset_reason:3], wifi:[sta_ip:192.168.0.206, status:got ip, ssid:Dr Nick, rssi:-63, ap_client_count:0], ws:[connected:false]]

dev:552024-02-04 19:01:23.124debugHTTP Async Response: [id:122, request:[uri:http://192.168.0.206, path:/rpc/Shelly.GetStatus, requestContentType:application/json]] ::: [ble:[:], cloud:[connected:true], input:0:[id:0, state:false], mqtt:[connected:false], script:1:[id:1, running:true, mem_used:420, mem_peak:602, mem_free:24780], switch:0:[id:0, source:init, output:true, temperature:[tC:53.7, tF:128.7]], sys:[mac:A0A3B3C30DE8, restart_required:false, time:19:01, unixtime:1707069683, uptime:9321, ram_size:245868, ram_free:127752, fs_size:458752, fs_free:143360, cfg_rev:41, kvs_rev:0, schedule_rev:0, webhook_rev:12, available_updates:[beta:[version:1.2.0-beta1]], reset_reason:3], wifi:[sta_ip:192.168.0.206, status:got ip, ssid:Dr Nick, rssi:-63, ap_client_count:0], ws:[connected:false]]

dev:552024-02-04 19:01:22.986debugHTTP Async query: Shelly.GetStatus([:])

dev:552024-02-04 19:01:22.983infoConnection open.

dev:552024-02-04 19:01:22.979infoConnection open.

dev:552024-02-04 19:01:22.957debugwebSocketStatus status: open; keepAlive=true

dev:552024-02-04 19:01:20.897infoVersion Report Generic - FirmwareVersion: 1.1.0, ProtocolVersion: 2, HardwareVersion: SNSW-001X16EU

dev:552024-02-04 19:01:20.892infoDevice info response [name:null, id:shellyplus1-a0a3b3c30de8, mac:A0A3B3C30DE8, slot:1, model:SNSW-001X16EU, gen:2, fw_id:20231219-133950/1.1.0-g34b5d4f, ver:1.1.0, app:Plus1, auth_en:false, auth_domain:null]

dev:552024-02-04 19:01:20.888debugHTTP Async Response: [id:121, request:[uri:http://192.168.0.206, path:/rpc/Shelly.GetDeviceInfo, requestContentType:application/json]] ::: [name:null, id:shellyplus1-a0a3b3c30de8, mac:A0A3B3C30DE8, slot:1, model:SNSW-001X16EU, gen:2, fw_id:20231219-133950/1.1.0-g34b5d4f, ver:1.1.0, app:Plus1, auth_en:false, auth_domain:null]

dev:552024-02-04 19:01:20.829debugHTTP Async query: Shelly.GetDeviceInfo([:])

dev:552024-02-04 19:01:20.827errorconfigure: No signature of method: java.lang.NullPointerException.getResponse() is applicable for argument types: () values: []
Possible solutions: getMessage(). Can't configure child devices. Please, re-try.

dev:552024-02-04 19:01:20.788debughttpGet incident: java.lang.NullPointerException: Cannot invoke method setLabel() on null object

dev:552024-02-04 19:01:20.763debugparseShellyConfig [ble:[enable:false, rpc:[enable:true], observer:[enable:false]], cloud:[enable:true, server:shelly-52-eu.shelly.cloud:6022/jrpc], input:0:[id:0, name:KnopKlerenShelly, type:switch, enable:true, invert:false, factory_reset:true], mqtt:[enable:false, server:null, client_id:shellyplus1-a0a3b3c30de8, user:null, ssl_ca:null, topic_prefix:shellyplus1-a0a3b3c30de8, rpc_ntf:true, status_ntf:false, use_client_cert:false, enable_rpc:true, enable_control:true], script:1:[id:1, name:KnopDressingOnline, enable:false], switch:0:[id:0, name:Knop kleren, in_mode:detached, initial_state:restore_last, auto_on:false, auto_on_delay:60.00, auto_off:false, auto_off_delay:60.00], sys:[device:[name:null, mac:A0A3B3C30DE8, fw_id:20231219-133950/1.1.0-g34b5d4f, discoverable:true, eco_mode:false, addon_type:sensor], location:[tz:Europe/Brussels, lat:50.905900, lon:3.655300], debug:[level:2, file_level:null, mqtt:[enable:false], websocket:[enable:false], udp:[addr:null]], ui_data:[:], rpc_udp:[dst_addr:null, listen_port:null], sntp:[server:time.google.com], cfg_rev:41], wifi:[ap:[ssid:ShellyPlus1-A0A3B3C30DE8, is_open:true, enable:true, range_extender:[enable:true]], sta:[ssid:Dr Nick, is_open:false, enable:true, ipv4mode:dhcp, ip:null, netmask:null, gw:null, nameserver:null], sta1:[ssid:null, is_open:true, enable:false, ipv4mode:dhcp, ip:null, netmask:null, gw:null, nameserver:null], roam:[rssi_thr:-80, interval:60]], ws:[enable:false, server:null, ssl_ca:ca.pem]]

dev:552024-02-04 19:01:20.705debugHTTP Sync Response: [ble:[enable:false, rpc:[enable:true], observer:[enable:false]], cloud:[enable:true, server:shelly-52-eu.shelly.cloud:6022/jrpc], input:0:[id:0, name:KnopKlerenShelly, type:switch, enable:true, invert:false, factory_reset:true], mqtt:[enable:false, server:null, client_id:shellyplus1-a0a3b3c30de8, user:null, ssl_ca:null, topic_prefix:shellyplus1-a0a3b3c30de8, rpc_ntf:true, status_ntf:false, use_client_cert:false, enable_rpc:true, enable_control:true], script:1:[id:1, name:KnopDressingOnline, enable:false], switch:0:[id:0, name:Knop kleren, in_mode:detached, initial_state:restore_last, auto_on:false, auto_on_delay:60.00, auto_off:false, auto_off_delay:60.00], sys:[device:[name:null, mac:A0A3B3C30DE8, fw_id:20231219-133950/1.1.0-g34b5d4f, discoverable:true, eco_mode:false, addon_type:sensor], location:[tz:Europe/Brussels, lat:50.905900, lon:3.655300], debug:[level:2, file_level:null, mqtt:[enable:false], websocket:[enable:false], udp:[addr:null]], ui_data:[:], rpc_udp:[dst_addr:null, listen_port:null], sntp:[server:time.google.com], cfg_rev:41], wifi:[ap:[ssid:ShellyPlus1-A0A3B3C30DE8, is_open:true, enable:true, range_extender:[enable:true]], sta:[ssid:Dr Nick, is_open:false, enable:true, ipv4mode:dhcp, ip:null, netmask:null, gw:null, nameserver:null], sta1:[ssid:null, is_open:true, enable:false, ipv4mode:dhcp, ip:null, netmask:null, gw:null, nameserver:null], roam:[rssi_thr:-80, interval:60]], ws:[enable:false, server:null, ssl_ca:ca.pem]]

dev:552024-02-04 19:01:20.690warnConnection reset

dev:552024-02-04 19:01:20.656debugHTTP Sync query: Shelly.GetConfig([:])

dev:552024-02-04 19:01:20.651infoVersion Report Generic - FirmwareVersion: 1.1.0, ProtocolVersion: 2, HardwareVersion: SNSW-001X16EU

dev:552024-02-04 19:01:20.631infoDevice info response [name:null, id:shellyplus1-a0a3b3c30de8, mac:A0A3B3C30DE8, slot:1, model:SNSW-001X16EU, gen:2, fw_id:20231219-133950/1.1.0-g34b5d4f, ver:1.1.0, app:Plus1, auth_en:false, auth_domain:null]

dev:552024-02-04 19:01:20.628debugHTTP Sync Response: [name:null, id:shellyplus1-a0a3b3c30de8, mac:A0A3B3C30DE8, slot:1, model:SNSW-001X16EU, gen:2, fw_id:20231219-133950/1.1.0-g34b5d4f, ver:1.1.0, app:Plus1, auth_en:false, auth_domain:null]

dev:552024-02-04 19:01:20.607warnReconnecting in 30 seconds.

dev:552024-02-04 19:01:20.605infoConnection failure: Connection reset

dev:552024-02-04 19:01:20.603warnConnection failure: Connection reset

dev:552024-02-04 19:01:20.602debugwebSocketStatus failure: Connection reset; keepAlive=true

dev:552024-02-04 19:01:20.575debugHTTP Sync query: Shelly.GetDeviceInfo([:])

dev:552024-02-04 19:01:17.049debugparseShellyWifiStatus [sta_ip:192.168.0.206, status:got ip, ssid:Dr Nick, rssi:-64, ap_client_count:0, ts:null]

dev:552024-02-04 19:01:17.047debugConfiguration revision 41

dev:552024-02-04 19:01:17.043info(null) Sensor generic report: Air temperature:temperature 53.9°C

dev:552024-02-04 19:01:17.033debug(null) parseShellyTemperatureSensorStatus [tC:53.9, tF:129.0]

dev:552024-02-04 19:01:17.028debug(null) parseShellyCommonStatus [id:0, source:init, output:true, temperature:[tC:53.9, tF:129.0], ts:null]

dev:552024-02-04 19:01:17.022debug(null) parseShellySwitchStatus [id:0, source:init, output:true, temperature:[tC:53.9, tF:129.0], ts:null]

dev:552024-02-04 19:01:17.017info(null) Script running true

dev:552024-02-04 19:01:17.014debug(null) parseShellyScriptStatus [id:1, running:true, mem_used:420, mem_peak:602, mem_free:24780, ts:null]

dev:552024-02-04 19:01:17.008debug(null) parseShellyCommonStatus [id:0, state:false, ts:null]

dev:552024-02-04 19:01:17.002debug(null) parseShellyInputStatus [id:0, state:false, ts:null]

dev:552024-02-04 19:01:16.996debugparseShellyCloudStatus [connected:true, ts:null]

dev:552024-02-04 19:01:16.979debugparseShellyStatus [ble:[:], cloud:[connected:true], input:0:[id:0, state:false], mqtt:[connected:false], script:1:[id:1, running:true, mem_used:420, mem_peak:602, mem_free:24780], switch:0:[id:0, source:init, output:true, temperature:[tC:53.9, tF:129.0]], sys:[mac:A0A3B3C30DE8, restart_required:false, time:19:01, unixtime:1707069677, uptime:9314, ram_size:245932, ram_free:132204, fs_size:458752, fs_free:143360, cfg_rev:41, kvs_rev:0, schedule_rev:0, webhook_rev:12, available_updates:[beta:[version:1.2.0-beta1]], reset_reason:3], wifi:[sta_ip:192.168.0.206, status:got ip, ssid:Dr Nick, rssi:-64, ap_client_count:0], ws:[connected:false]]

dev:552024-02-04 19:01:16.969debugHTTP Async Response: [id:122, request:[uri:http://192.168.0.206, path:/rpc/Shelly.GetStatus, requestContentType:application/json]] ::: [ble:[:], cloud:[connected:true], input:0:[id:0, state:false], mqtt:[connected:false], script:1:[id:1, running:true, mem_used:420, mem_peak:602, mem_free:24780], switch:0:[id:0, source:init, output:true, temperature:[tC:53.9, tF:129.0]], sys:[mac:A0A3B3C30DE8, restart_required:false, time:19:01, unixtime:1707069677, uptime:9314, ram_size:245932, ram_free:132204, fs_size:458752, fs_free:143360, cfg_rev:41, kvs_rev:0, schedule_rev:0, webhook_rev:12, available_updates:[beta:[version:1.2.0-beta1]], reset_reason:3], wifi:[sta_ip:192.168.0.206, status:got ip, ssid:Dr Nick, rssi:-64, ap_client_count:0], ws:[connected:false]]

dev:552024-02-04 19:01:16.855debugHTTP Async query: Shelly.GetStatus([:])

dev:552024-02-04 19:01:16.837infoConnection open.

dev:552024-02-04 19:01:16.835infoConnection open.

dev:552024-02-04 19:01:16.774debugwebSocketStatus status: open; keepAlive=true

Thanks for the logs.

There is a small typo in the code that prevents it from finishing configuration. Let me update the bundle to fix the issue.

The bundle is updated. Just reimport it. No need to reinstall device/driver. Configuration should now just work.

The typo was in the script naming code. So the issue occured only when script slots were allocated,

thanks man, that did the trick!

There is a shelly script support in the driver:
Scripts are exposed as switches (start/stop script execution) to be presentable as a dashboard tiles.

Also there are 3 attributes that can be modified from within shelly scripts:

Trese are mainly for rule machine interaction:

    attribute("customNumericAttribute", "NUMBER") <-- Shelly.emitEvent("number", value);
    attribute("customTextAttribute", "STRING") <-- Shelly.emitEvent("string", value), Shelly.emitEvent("text", value);

And one specifically to be exposed as a dashboard tile

    attribute("variable", "STRING")  <-- Shelly.emitEvent("variable", value);