Shelly Binding

Sending UP/DOWN works fine. Sending 100 or 0 does not work since the Switch is not calibrated:

09:17:51.228 [WARN ] [ly.internal.handler.ShellyBaseHandler] - shellyswitch25-68c63af93d76: Device is not calibrated, use Shelly App to perform initial roller calibration.

Same behavior before/after update of binding.

Sequence: OH stop, clear cache and tmp, replace with new Shelly binding. Start OH.

New log:
Shelly_Log_5.txt (24.6 KB)

ok, I could handle 0/100 not as a position, but like UP/DOWN
UP/DOWN are mapped to API commands TURN_OPEN/TURN_CLOSE
a numerical value is mapped to SET_POSITION, this needs calibration
but 0 could be mapped to TURN_CLOSE and 100 to TURN_OPEN

Yes, but this is not really the problem. The problem is that the state is repeated over and over again as you see in the logs. I totally understand that 0 and 100 does not work since it is not calibrated. The only problem I have is that the state is repeated and filling up the logs. But maybe that is not possible to do anything about unless it is calibrated - since the other switch does not generate this minor inconvenience and that one is calibrated.

sorry for dumb question
 what’s is the correct COIOT PEER address?
IP of OpenHAB?
Shelly GUI adds automatically Port 5685 - is this correct?

You say “Sending UP/DOWN works fine.” - do you still see the 0/100 flipping (I didn’t checked the log)?

I already made a chance to handle 0/100 the same way as OPEN/CLOSE. This reduces the need of calibration if you want to set 1
99%.

Correct syntax is:
<openhab ip>:5683 (not 5685!)

You could use the Shelly Manager to do that

  • launch browser at http:<openhab ip>/shelly/manager
  • Go to the device row, column Actions and click the drop-down
  • Select Action “Set CoIoT Peer”
    this will send the config change to the device.

In addition you could see the current status by hovering over the device status icon (column 1). It should show “CoIoT Mode: Peer” (something like that)

Important: Shelly Motion does no longer support CiIoT multicast. Therefore “” is not valid for the address, which switches back to Multicast in the upcoming firmware for other devices. Nevertheless, the Motion UI allows this, which in fact means that no CoIoT updates will be send.

1 Like

Thanks for your fast reply, Markus :slight_smile:
I was able to do the steps you described.

Just the info while hovering over ShellyMotion in column 1 doesn’t appear:

(yes, I also rebooted ShellyMotion :innocent: )

What I can see is that openHAB does receive motion-alerts again :slight_smile: :heart_eyes: Thanks Markus! :smiling_face_with_three_hearts: :kissing_heart:

Hi Markus, yes, it is absolutely flipping either way. The only way I can control it (via OH) is via UP/DOWN, 0/100 similar does not work because of lack of calibration. You have all that in the log. So the control of the switch does not change anything with the flipping so to speak, two different things.

Ok, I understand. That is surely helpful in some instances. The question is if the flipping is there or not. Is this included in the latest dev-build?

What do you mean with column 1?
and keep in mind you could hover over

  • the status icon: displays additional status information
  • the device name: display additional information on device settings

Did you explored the Shelly Manager? What’s your feedback a) in general b) ideas to improve the UX

1 Like

sure, I found everything, Markus. All good and working perfect again. Thanks again for your support!
My feedack to the UX: my first impression: I was overwhelmed how much info is available. But after exploring it I like it very much! :slight_smile:

good :slight_smile: let me know if you have additional ideas

1 Like

Next PR - call to action

I’m preparing the next PR. This is the chance to bring in pending fixes. Is there anything open?
The PR will take a while given the backlog for the general release. I created on to submit changes in the base code, which could receive additional fixes, but Shelly Manager will not be included to keep the PR small. This will then be the next one


1 Like

I have a Shelly 2.5 setup as a rollershutter. Recently I noticed that my Shelly thinks the rollershutter is blocked when opening or closing. This is not the case, so I’ve disabled that.

Still every 15 sec I see this in my log:

shelly25-roller-10521cf990b8: Event triggered: ROLLER_OBSTACLE

Shouldn’t this only be triggered when the rollershutter is actually opening or closing? The only way to stop this, that I’m aware of, is to reboot the Shelly.

openHAB 2.5.12

I never saw this. The event comes from the device so something seems to be wrong. Maybe do a new calibration.

hi just updated to your latest build ,
everything works as usual!

only my sehlly4 pro that I’ve always used is stuck in initialising, something you know might be the cause?

and my motion isn’t working but i updated to the new firmware to so it might be a setting :slight_smile: as mentioned above with the colot peer.

no Shelly Manager? What a pity :joy:
I fell in love with Shelly Manager :slight_smile: :smiling_face_with_three_hearts:

The DEV build keeps the Shelly Manager, but next PR not.

No, please remove and re-discover the thing

Shelly Motion is no longer supporting CoIoT Multicast (starting with FW 1.0.9). Use Shelly Manager or the device UI->Settings->COIOT to set the peer address pointing open openhab

1 Like

for the 4pro: remove and re-discover stil status pending,

for the motion sensors: yeah i read the topic and added the extra adres :slight_smile: thx for that

Please provide initialization log

Is the thing password protected?

the thing isn’t protected by password,
where can i find the log?

is this enough info:

23:01:35.439 [DEBUG] [ly.internal.handler.ShellyBaseHandler] - shelly4pro-4d02ec: Status update triggered thing initialization
23:01:35.441 [DEBUG] [ly.internal.handler.ShellyBaseHandler] - shelly4pro-4d02ec: Start initializing thing shelly4pro-4d02ec, type shelly4pro, ip address 192.168.0.212, CoIoT: true
23:01:35.442 [TRACE] [ing.shelly.internal.api.ShellyHttpApi] - shelly4pro-4d02ec: HTTP GET for http://192.168.0.212/shelly
23:01:35.756 [TRACE] [ing.shelly.internal.api.ShellyHttpApi] - shelly4pro-4d02ec: HTTP Response 200: {"type":"SHSW-44","mac":"E415F64D02EC","auth":false,"fw":"20201019-110845/v1.6.6_4Pro@bad181e4","num_outputs":4, "num_meters":4, "num_rollers":0}
23:01:35.758 [TRACE] [ing.shelly.internal.api.ShellyHttpApi] - shelly4pro-4d02ec: HTTP GET for http://192.168.0.212/settings
23:01:36.147 [TRACE] [ing.shelly.internal.api.ShellyHttpApi] - shelly4pro-4d02ec: HTTP Response 200: {"device":{"type":"SHSW-44","mac":"E415F64D02EC","hostname":"shelly4pro-4D02EC","num_outputs":4, "num_meters":4, "num_rollers":0},"wifi_ap":{"enabled":false,"ssid":"shelly4pro-4D02EC","key":""},"wifi_sta":{"enabled":true,"ssid":"Home_WIFI","ipv4_method":"static","ip":"192.168.0.212","gw":"192.168.0.1","mask":"255.255.255.0","dns":"8.8.8.8"},"wifi_sta1":{"enabled":false,"ssid":null,"ipv4_method":"dhcp","ip":null,"gw":null,"mask":null,"dns":null},"mqtt": {"enable":false,"server":"192.168.0.172:1883","user":"jeroenvdd","reconnect_timeout_max":60.000000,"reconnect_timeout_min":2.000000,"clean_session":true,"keep_alive":60,"will_topic":"shellies/shelly4pro/online","will_message":"false","max_qos":0,"retain":false,"update_period":30},"sntp": {"server":"time.google.com"},"login":{"enabled":false,"unprotected":false,"username":"admin","password":"admin"},"pin_code":"IrwKzy","coiot_execute_enable":true,"name":"","fw":"20201019-110845/v1.6.6_4Pro@bad181e4","build_info":{"build_id":"20201019-110845/v1.6.6_4Pro@bad181e4","build_timestamp":"2020-10-19T11:08:45Z","build_version":"1.0"},"cloud":{"enabled":false,"connected":false},"timezone":"Europe/Brussels","lat":50.860149,"lng":4.358050,"tzautodetect":true,"time":"23:01","hwinfo":{"hw_revision":"prod-2020-04-24","batch_id":1},"lat":50.860149,"lng":4.358050,"relays":[{"name":null,"ison":false,"has_timer":false,"overpower":false,"default_state":"off","btn_type":"toggle","auto_on":0.00,"auto_off":0.00,"max_power":2300,"schedule":false,"schedule_rules":[]},{"name":null,"ison":false,"has_timer":false,"overpower":false,"default_state":"off","btn_type":"toggle","auto_on":0.00,"auto_off":0.00,"max_power":2300,"schedule":false,"schedule_rules":[]},{"name":null,"ison":false,"has_timer":false,"overpower":false,"default_state":"off","btn_type":"toggle","auto_on":0.00,"auto_off":0.00,"max_power":2300,"schedule":false,"schedule_rules":[]},{"name":null,"ison":false,"has_timer":false,"overpower":false,"default_state":"off","btn_type":"toggle","auto_on":0.00,"auto_off":0.00,"max_power":2300,"schedule":false,"schedule_rules":[]}],"meters":[{"power":0.0,"is_valid":true,"timestamp":1614466897,"counters":[0.000, 0.000, 0.000],"total":0},{"power":0.0,"is_valid":true,"timestamp":1614466897,"counters":[0.000, 0.000, 0.000],"total":0},{"power":0.0,"is_valid":true,"timestamp":1614466897,"counters":[0.000, 0.000, 0.000],"total":0},{"power":0.0,"is_valid":true,"timestamp":1614466897,"counters":[0.000, 0.000, 0.000],"total":0}]}
23:01:36.158 [DEBUG] [ly.internal.handler.ShellyBaseHandler] - shelly4pro-4d02ec: Initializing device shelly4pro-4d02ec, type SHSW-44, Hardware: Rev: prod-2020-04-24, batch 1; Firmware: v1.6.6_4Pro / 20201019-110845 (bad181e4)
23:01:36.160 [DEBUG] [ly.internal.handler.ShellyBaseHandler] - shelly4pro-4d02ec: Shelly settings info for shelly4pro-4d02ec: {"device":{"type":"SHSW-44","mac":"E415F64D02EC","hostname":"shelly4pro-4D02EC","num_outputs":4, "num_meters":4, "num_rollers":0},"wifi_ap":{"enabled":false,"ssid":"shelly4pro-4D02EC","key":""},"wifi_sta":{"enabled":true,"ssid":"Home_WIFI","ipv4_method":"static","ip":"192.168.0.212","gw":"192.168.0.1","mask":"255.255.255.0","dns":"8.8.8.8"},"wifi_sta1":{"enabled":false,"ssid":null,"ipv4_method":"dhcp","ip":null,"gw":null,"mask":null,"dns":null},"mqtt": {"enable":false,"server":"192.168.0.172:1883","user":"jeroenvdd","reconnect_timeout_max":60.000000,"reconnect_timeout_min":2.000000,"clean_session":true,"keep_alive":60,"will_topic":"shellies/shelly4pro/online","will_message":"false","max_qos":0,"retain":false,"update_period":30},"sntp": {"server":"time.google.com"},"login":{"enabled":false,"unprotected":false,"username":"admin","password":"admin"},"pin_code":"IrwKzy","coiot_execute_enable":true,"name":"","fw":"20201019-110845/v1.6.6_4Pro@bad181e4","build_info":{"build_id":"20201019-110845/v1.6.6_4Pro@bad181e4","build_timestamp":"2020-10-19T11:08:45Z","build_version":"1.0"},"cloud":{"enabled":false,"connected":false},"timezone":"Europe/Brussels","lat":50.860149,"lng":4.358050,"tzautodetect":true,"time":"23:01","hwinfo":{"hw_revision":"prod-2020-04-24","batch_id":1},"lat":50.860149,"lng":4.358050,"relays":[{"name":null,"ison":false,"has_timer":false,"overpower":false,"default_state":"off","btn_type":"toggle","auto_on":0.00,"auto_off":0.00,"max_power":2300,"schedule":false,"schedule_rules":[]},{"name":null,"ison":false,"has_timer":false,"overpower":false,"default_state":"off","btn_type":"toggle","auto_on":0.00,"auto_off":0.00,"max_power":2300,"schedule":false,"schedule_rules":[]},{"name":null,"ison":false,"has_timer":false,"overpower":false,"default_state":"off","btn_type":"toggle","auto_on":0.00,"auto_off":0.00,"max_power":2300,"schedule":false,"schedule_rules":[]},{"name":null,"ison":false,"has_timer":false,"overpower":false,"default_state":"off","btn_type":"toggle","auto_on":0.00,"auto_off":0.00,"max_power":2300,"schedule":false,"schedule_rules":[]}],"meters":[{"power":0.0,"is_valid":true,"timestamp":1614466897,"counters":[0.000, 0.000, 0.000],"total":0},{"power":0.0,"is_valid":true,"timestamp":1614466897,"counters":[0.000, 0.000, 0.000],"total":0},{"power":0.0,"is_valid":true,"timestamp":1614466897,"counters":[0.000, 0.000, 0.000],"total":0},{"power":0.0,"is_valid":true,"timestamp":1614466897,"counters":[0.000, 0.000, 0.000],"total":0}]}
23:01:36.161 [DEBUG] [ly.internal.handler.ShellyBaseHandler] - shelly4pro-4d02ec: Device hasRelays:true (numRelays=4),isRoller:false (numRoller=0),isDimmer:false,numMeter=4,isEMeter:false),isSensor:false,isDS:false,hasBattery:false,isSense:false,isMotion:false,isLight:false,isBulb:false,isDuo:false,isRGBW2:false,inColor:false,alwaysOn:true, ,updatePeriod:70sec
23:01:36.163 [TRACE] [ing.shelly.internal.api.ShellyHttpApi] - shelly4pro-4d02ec: HTTP GET for http://192.168.0.212/status
23:01:36.407 [TRACE] [ing.shelly.internal.api.ShellyHttpApi] - shelly4pro-4d02ec: HTTP Response 200: {"wifi_sta":{"connected":true,"ssid":"Home_WIFI","ip":"192.168.0.212","rssi":-49},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":false},"time":"23:01","serial":2,"has_update":false,"mac":"E415F64D02EC","relays":[{"ison":false,"has_timer":false,"overpower":false,"is_valid":true},{"ison":false,"has_timer":false,"overpower":false,"is_valid":true},{"ison":false,"has_timer":false,"overpower":false,"is_valid":true},{"ison":false,"has_timer":false,"overpower":false,"is_valid":true}],"meters":[{"power":0.0,"is_valid":true,"timestamp":1614466898,"counters":[0.000, 0.000, 0.000],"total":0},{"power":0.0,"is_valid":true,"timestamp":1614466898,"counters":[0.000, 0.000, 0.000],"total":0},{"power":0.0,"is_valid":true,"timestamp":1614466898,"counters":[0.000, 0.000, 0.000],"total":0},{"power":0.0,"is_valid":true,"timestamp":1614466898,"counters":[0.000, 0.000, 0.000],"total":0}],"inputs":[{"input":0},{"input":0},{"input":0},{"input":0}],"update":{"status":"idle","has_update":false,"new_version":"20201019-110845/v1.6.6_4Pro@bad181e4","old_version":"20201019-110845/v1.6.6_4Pro@bad181e4"},"ram_total":47372,"ram_free":18692,"fs_size":83081,"fs_free":17821,"uptime":35483}
23:01:36.409 [DEBUG] [ly.internal.handler.ShellyBaseHandler] - shelly4pro-4d02ec: Update properties
23:01:36.411 [DEBUG] [ly.internal.handler.ShellyBaseHandler] - shelly4pro-4d02ec: Unable to refresh status: Unable to update status
java.lang.NullPointerException: null
        at org.openhab.binding.shelly.internal.handler.ShellyBaseHandler.initializeThing(ShellyBaseHandler.java:265) ~[bundleFile:?]
        at org.openhab.binding.shelly.internal.handler.ShellyBaseHandler.refreshStatus(ShellyBaseHandler.java:381) [bundleFile:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
        at java.lang.Thread.run(Thread.java:834) [?:?]

Did some extra testing reverted to:
208 │ Active │ 80 │ 3.1.0.202102220729 │ openHAB Add-ons :: Bundles :: Shelly Binding

and everything works again :slight_smile: