Skip to content
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] When Addon is connected to i4, no channels are created for the external sensors #15615

Open
div-co opened this issue Sep 18, 2023 · 12 comments
Assignees
Labels
awaiting feedback bug An unexpected problem or unintended behavior of an add-on

Comments

@div-co
Copy link

div-co commented Sep 18, 2023

Expected Behavior

Discover channels and link them to the things' items when Shelly Plus i4 DC has Shelly Plus Add-On connected to it.

Current Behavior

The device (i4DC) has been discovered by the binding but no Add-On channels, like sensors, configured to the thing (i4DC’s ones are OK). However, OH Shelly Binding docs completely missing this scenario - attaching Shelly Plus Add-On to Shelly Plus i4 DC.
logs

Steps to Reproduce (for Bugs)

  • Attach Shelly Plus Add-On to Shelly Plus i4 DC
  • Initiate things discovery
    Could be reproduced with:
  • Shelly Binding 4.02, 4.0.3, 4.1.0.M4
  • org.openhab.binding.shelly-4.1.0-SNAPSHOT, 4.1.0-SNAPSHOT (202312011056).
  • Shelly Beta with Plus/Pro and BLU.

Context

Get sensors data.

Your Environment

  • Version used: openHAB 4.0.3
  • Environment name and version: Java 17.0.7; OpenJDK 11.0.12.7
  • Operating System and version: Synology DSM 7.2
@div-co div-co added the bug An unexpected problem or unintended behavior of an add-on label Sep 18, 2023
@lsiepel
Copy link
Contributor

lsiepel commented Sep 18, 2023

Do you know the prior version that worked?

@div-co
Copy link
Author

div-co commented Sep 19, 2023

Do you know the prior version that worked?

Unfortunately no.

@markus7017 markus7017 self-assigned this Dec 2, 2023
@markus7017
Copy link
Contributor

Could be. I never tried the Add-On with i4.

Please provide DEBUG log from initialization

@stuetzomat
Copy link

this also happens with the shelly plus 1.
if i reset the shelly and then integrate the temperature sensors, it works for the first 3 sensors.
from the fourth onwards everything hangs. it becomes slow and sensors 4 and 5 do not work, although data is supplied from the cloud.
I am using -> org.openhab.binding.shelly-4.1.0-SNAPSHOT

Debug log from initialization:

2023-12-08 00:23:53.120 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyplus1-083af2029ad0: Shutting down
2023-12-08 00:24:16.035 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyplus1-083af2029ad0: Using default userId admin from binding config
2023-12-08 00:24:16.036 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyplus1-083af2029ad0: Using default password from bindingConfig (userId=admin)
2023-12-08 00:24:16.037 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyplus1-083af2029ad0: Device config: Device address=###############, HTTP user######################, update interval=60
2023-12-08 00:24:16.038 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyplus1-083af2029ad0: Configured Events: Button: false, Switch (on/off): true, Push: true, Roller: true, Sensor: true, CoIoT: false, Enable AutoCoIoT: true
2023-12-08 00:24:16.038 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyplus1-083af2029ad0: Start initializing for thing Bodenheizung Büro, type shellyplus1, IP address ########, Gen2: true, CoIoT: false
2023-12-08 00:24:16.055 [DEBUG] [g.shelly.internal.api2.Shelly2ApiRpc] - shellyplus1-083af2029ad0: Connect Rpc Socket (discovery = false)
2023-12-08 00:24:16.139 [DEBUG] [g.shelly.internal.api2.Shelly2ApiRpc] - shellyplus1-083af2029ad0: BLU Gateway support is disabled for this device
2023-12-08 00:24:16.171 [DEBUG] [g.shelly.internal.api2.Shelly2ApiRpc] - shellyplus1-083af2029ad0: NotifyStatus update received: {"id":839708653,"src":"shellyplus1-083af2029ad0","dst":"shellyplus1-083af2029ad0","params":{"ble":{},"cloud":{"connected":true},"mqtt":{"connected":false},"sys":{"mac":"##########","restart_required":false,"time":"00:24","unixtime":1701991456,"uptime":610175,"ram_size":246020,"ram_free":138604,"fs_size":458752,"fs_free":147456,"cfg_rev":30,"available_updates":{"beta":{"version":"1.1.0-beta2"}},"webhook_rev":0},"wifi":{"sta_ip":"########","status":"got ip","ssid":"########","rssi":-55},"input:0":{"id":0,"state":false},"switch:0":{"id":0,"source":"HTTP_in","output":true,"temperature":{"tC":71.8,"tF":161.3}},"temperature:100":{"id":100,"tC":24.2,"tF":75.5},"temperature:101":{"id":101,"tC":24.2,"tF":75.5},"temperature:102":{"id":102,"tC":23.8,"tF":74.9},"temperature:103":{"id":103,"tC":24.4,"tF":76.0},"temperature:104":{"id":104,"tC":24.4,"tF":75.9}},"result":{"ble":{},"cloud":{"connected":true},"mqtt":{"connected":false},"sys":{"mac":"##########","restart_required":false,"time":"00:24","unixtime":1701991456,"uptime":610175,"ram_size":246020,"ram_free":138604,"fs_size":458752,"fs_free":147456,"cfg_rev":30,"available_updates":{"beta":{"version":"1.1.0-beta2"}},"webhook_rev":0},"wifi":{"sta_ip":"########","status":"got ip","ssid":"########","rssi":-55},"input:0":{"id":0,"state":false},"switch:0":{"id":0,"source":"HTTP_in","output":true,"temperature":{"tC":71.8,"tF":161.3}},"temperature:100":{"id":100,"tC":24.2,"tF":75.5},"temperature:101":{"id":101,"tC":24.2,"tF":75.5},"temperature:102":{"id":102,"tC":23.8,"tF":74.9},"temperature:103":{"id":103,"tC":24.4,"tF":76.0},"temperature:104":{"id":104,"tC":24.4,"tF":75.9}}}
2023-12-08 00:24:16.173 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyplus1-083af2029ad0: Channel relay#output updated with ON (type class org.openhab.core.library.types.OnOffType).
2023-12-08 00:24:16.175 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyplus1-083af2029ad0: Channel sensors#temperature1 updated with 24.2 °C (type class org.openhab.core.library.types.QuantityType).
2023-12-08 00:24:16.177 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyplus1-083af2029ad0: Channel sensors#temperature2 updated with 24.2 °C (type class org.openhab.core.library.types.QuantityType).
2023-12-08 00:24:16.178 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyplus1-083af2029ad0: Channel sensors#temperature3 updated with 23.8 °C (type class org.openhab.core.library.types.QuantityType).
2023-12-08 00:24:16.206 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyplus1-083af2029ad0: Channel device#wifiSignal updated with 4 (type class org.openhab.core.library.types.DecimalType).
2023-12-08 00:24:16.208 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyplus1-083af2029ad0: Channel device#internalTemp updated with 71.8 °C (type class org.openhab.core.library.types.QuantityType).
2023-12-08 00:24:16.211 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyplus1-083af2029ad0: Channel device#updateAvailable updated with ON (type class org.openhab.core.library.types.OnOffType).
2023-12-08 00:24:16.211 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyplus1-083af2029ad0: Initializing device shellyplus1-083af2029ad0, type SNSW-001X16EU, Hardware: Rev: , batch ; Firmware: 1.0.8- / 20231106
2023-12-08 00:24:16.213 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyplus1-083af2029ad0: Shelly settings info for shellyplus1-083af2029ad0: {"ble":{"enable":false},"cloud":{"enable":true,"server":"shelly-45-eu.shelly.cloud:6022/jrpc"},"mqtt":{"enable":false,"rpc_ntf":"true","status_ntf":"false"},"sys":{"cfg_rev":30,"device":{"mac":"#############","fw_id":"20231106-160328/1.0.8-gdba0ee3","eco_mode":false,"discoverable":true},"location":{"tz":"Europe/Vienna","lat":47.0005,"lon":15.4059},"sntp":{"server":"time.google.com"},"debug":{"mqtt":{"enable":false},"websocket":{"enable":false},"udp":{}},"ui_data":{},"rpc_udp":{}},"wifi":{"ap":{"enable":false,"ssid":"ShellyPlus1-083AF2029AD0","is_open":true,"range_extender":{"enable":false}},"sta":{"ssid":"########","is_open":false,"enable":true,"ipv4mode":"static","ip":"########","netmask":"255.255.255.0","gw":"########","nameserver":"########"},"sta1":{"is_open":true,"enable":false,"ipv4mode":"dhcp"},"roam":{"rssi_thr":-80,"interval":60}},"input:0":{"id":0,"type":"switch","invert":false,"factory_reset":true},"switch:0":{"id":0,"in_mode":"follow","initial_state":"match_input","auto_on":false,"auto_on_delay":60.0,"auto_off":false,"auto_off_delay":60.0}}
2023-12-08 00:24:16.214 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyplus1-083af2029ad0: Device hasRelays:true (numRelays=1),isRoller:false (numRoller=0),isDimmer:false,numMeter=1,isEMeter:true), ext. Switch Add-On: n/a,isSensor:false,isDS:false,hasBattery:false,isSense:false,isMotion:false,isLight:false,isBulb:false,isDuo:false,isRGBW2:false,inColor:false, BLU Gateway support: true,alwaysOn:70, updatePeriod:falsesec
2023-12-08 00:24:16.214 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyplus1-083af2029ad0: Shelly Add-On detected with at least 1 external sensor
2023-12-08 00:24:16.217 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyplus1-083af2029ad0: Thing successfully initialized.
2023-12-08 00:24:16.218 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyplus1-083af2029ad0: Update status job started, interval=20*3=60sec.
2023-12-08 00:24:18.330 [DEBUG] [g.shelly.internal.api2.Shelly2ApiRpc] - shellyplus1-083af2029ad0: BLU Gateway support is disabled for this device
2023-12-08 00:24:18.332 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyplus1-083af2029ad0: Unable to refresh status: Status konnte nicht aktualisiert werden
2023-12-08 00:24:18.357 [DEBUG] [g.shelly.internal.api2.Shelly2ApiRpc] - shellyplus1-083af2029ad0: NotifyStatus update received: {"id":276748792,"src":"shellyplus1-083af2029ad0","dst":"shellyplus1-083af2029ad0","params":{"ble":{},"cloud":{"connected":true},"mqtt":{"connected":false},"sys":{"mac":"##########","restart_required":false,"time":"00:24","unixtime":1701991458,"uptime":610177,"ram_size":246008,"ram_free":138344,"fs_size":458752,"fs_free":147456,"cfg_rev":30,"available_updates":{"beta":{"version":"1.1.0-beta2"}},"webhook_rev":0},"wifi":{"sta_ip":"########","status":"got ip","ssid":"########","rssi":-54},"input:0":{"id":0,"state":false},"switch:0":{"id":0,"source":"HTTP_in","output":true,"temperature":{"tC":71.8,"tF":161.3}},"temperature:100":{"id":100,"tC":24.2,"tF":75.5},"temperature:101":{"id":101,"tC":24.2,"tF":75.5},"temperature:102":{"id":102,"tC":23.8,"tF":74.9},"temperature:103":{"id":103,"tC":24.4,"tF":76.0},"temperature:104":{"id":104,"tC":24.4,"tF":75.9}},"result":{"ble":{},"cloud":{"connected":true},"mqtt":{"connected":false},"sys":{"mac":"##########","restart_required":false,"time":"00:24","unixtime":1701991458,"uptime":610177,"ram_size":246008,"ram_free":138344,"fs_size":458752,"fs_free":147456,"cfg_rev":30,"available_updates":{"beta":{"version":"1.1.0-beta2"}},"webhook_rev":0},"wifi":{"sta_ip":"########","status":"got ip","ssid":"########","rssi":-54},"input:0":{"id":0,"state":false},"switch:0":{"id":0,"source":"HTTP_in","output":true,"temperature":{"tC":71.8,"tF":161.3}},"temperature:100":{"id":100,"tC":24.2,"tF":75.5},"temperature:101":{"id":101,"tC":24.2,"tF":75.5},"temperature:102":{"id":102,"tC":23.8,"tF":74.9},"temperature:103":{"id":103,"tC":24.4,"tF":76.0},"temperature:104":{"id":104,"tC":24.4,"tF":75.9}}}
2023-12-08 00:24:18.358 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyplus1-083af2029ad0: Channel sensors#temperature1 updated with 24.2 °C (type class org.openhab.core.library.types.QuantityType).
2023-12-08 00:24:18.359 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyplus1-083af2029ad0: Channel sensors#temperature2 updated with 24.2 °C (type class org.openhab.core.library.types.QuantityType).
2023-12-08 00:24:18.360 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyplus1-083af2029ad0: Channel sensors#temperature3 updated with 23.8 °C (type class org.openhab.core.library.types.QuantityType).
2023-12-08 00:24:20.853 [DEBUG] [g.shelly.internal.api2.Shelly2ApiRpc] - shellyplus1-083af2029ad0: NotifyStatus update received: {"src":"shellyplus1-083af2029ad0","dst":"shellyplus1-083af2029ad0","method":"NotifyStatus","params":{"ts":1.70199146084E9,"temperature:103":{"id":103,"tC":24.62,"tF":76.33}}}
2023-12-08 00:24:22.763 [DEBUG] [g.shelly.internal.api2.Shelly2ApiRpc] - shellyplus1-083af2029ad0: NotifyStatus update received: {"src":"shellyplus1-083af2029ad0","dst":"shellyplus1-083af2029ad0","method":"NotifyStatus","params":{"ts":1.70199146276E9,"switch:0":{"id":0,"temperature":{"tC":72.64,"tF":162.76}}}}
2023-12-08 00:24:22.764 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyplus1-083af2029ad0: Channel sensors#temperature1 updated with 24.2 °C (type class org.openhab.core.library.types.QuantityType).
2023-12-08 00:24:22.765 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyplus1-083af2029ad0: Channel sensors#temperature2 updated with 24.2 °C (type class org.openhab.core.library.types.QuantityType).
2023-12-08 00:24:22.766 [DEBUG] [y.internal.handler.ShellyBaseHandler] - shellyplus1-083af2029ad0: Channel sensors#temperature3 updated with 23.8 °C (type class org.openhab.core.library.types.QuantityType).
2023-12-08 00:24:25.839 [DEBUG] [g.shelly.internal.api2.Shelly2ApiRpc] - shellyplus1-083af2029ad0: NotifyStatus update received: {"src":"shellyplus1-083af2029ad0","dst":"shellyplus1-083af2029ad0","method":"NotifyStatus","params":{"ts":1.70199146583E9,"temperature:102":{"id":102,"tC":23.69,"tF":74.64}}}
2023-12-08 00:24:25.870 [DEBUG] [g.shelly.internal.api2.Shelly2ApiRpc] - shellyplus1-083af2029ad0: NotifyStatus update received: {"src":"shellyplus1-083af2029ad0","dst":"shellyplus1-083af2029ad0","method":"NotifyStatus","params":{"ts":1.70199146585E9,"temperature:103":{"id":103,"tC":24.5,"tF":76.1}}}
2023-12-08 00:24:25.873 [DEBUG] [g.shelly.internal.api2.Shelly2ApiRpc] - shellyplus1-083af2029ad0: NotifyStatus update received: {"src":"shellyplus1-083af2029ad0","dst":"shellyplus1-083af2029ad0","method":"NotifyStatus","params":{"ts":1.70199146585E9,"temperature:104":{"id":104,"tC":24.31,"tF":75.76}}}
2023-12-08 00:24:35.829 [DEBUG] [g.shelly.internal.api2.Shelly2ApiRpc] - shellyplus1-083af2029ad0: NotifyStatus update received: {"src":"shellyplus1-083af2029ad0","dst":"shellyplus1-083af2029ad0","method":"NotifyStatus","params":{"ts":1.70199147582E9,"temperature:100":{"id":100,"tC":24.31,"tF":75.76}}}
2023-12-08 00:24:35.848 [DEBUG] [g.shelly.internal.api2.Shelly2ApiRpc] - shellyplus1-083af2029ad0: NotifyStatus update received: {"src":"shellyplus1-083af2029ad0","dst":"shellyplus1-083af2029ad0","method":"NotifyStatus","params":{"ts":1.70199147584E9,"temperature:103":{"id":103,"tC":24.38,"tF":75.88}}}
2023-12-08 00:24:40.853 [DEBUG] [g.shelly.internal.api2.Shelly2ApiRpc] - shellyplus1-083af2029ad0: NotifyStatus update received: {"src":"shellyplus1-083af2029ad0","dst":"shellyplus1-083af2029ad0","method":"NotifyStatus","params":{"ts":1.70199148084E9,"temperature:103":{"id":103,"tC":24.56,"tF":76.21}}}

@stuetzomat
Copy link

oh, i just found the other issue.
i think, this here is the (a better) answer for the issue #14969.
i hope, you can solve this problem. i really look forward that i will soon be able to control the underfloor heating with it.
thank you!

@div-co
Copy link
Author

div-co commented Dec 9, 2023

Hi @markus7017,
I'm updating the issue, according to our chat.
Same behaviour with OH to 4.1.0.M4 and the shelly-4.1.0-SNAPSHOT (202312011056).
shelly.log

@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/shelly-binding/56862/3570

@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/shelly-binding/56862/3571

@div-co
Copy link
Author

div-co commented Dec 20, 2023

@markus7017, I still see "awaiting feedback" label attached, so please let me know if additional input is required.
10x

@markus7017
Copy link
Contributor

@div-co Did you enabled the Addin in device UI and restarted the device? Then added the peripherals?

@div-co
Copy link
Author

div-co commented Jan 16, 2024

@div-co Did you enabled the Addin in device UI and restarted the device? Then added the peripherals?

@markus7017, sorry for the delay in my response.

I did try few options, like

  1. Add i4DC device from the UI (without attaching Addon module) -> add Addon module
  2. Attach Addon module to a different i4DC
  3. Remove thing -> attach Addon module to i4DC -> Power on and add the thing from the UI

all the above variants went trough a device reboot, I have even cleaned up the cache several times in between.

@markus7017
Copy link
Contributor

@div-co Please try updated DEV build, follow READMEbeta for installation

4.2-DEV | 4.1-DEV | 4.0.-DEV | 3.4.5-DEV | README | READMEbeta
Avdanced Users - Shelly Manager - Bugs/Features - API Doc | Firmware Index - Firmware Archive


Note: The DEV build is always newer than the version in the official Distro or Milestone builds. Current development is based on 4.2-SNAPSHOT, 4.0.x and 3.4.x are outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting feedback bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

No branches or pull requests

5 participants