Shelly Binding

It is a sensor setting, kind of calibration i guess, since the terms dark and dusk are subjective.

I suppose that those are the Lux levels to report the status. Any other settings / status displays?

Yes, the illumination value is subjective and determined by the illumination definitions. Those are the only settings for the sensor. The rest of the interface is generic shelly.

I’m looking for the status values of “illumination”, so far we have

  • dark
  • bright
  • twilight
    and
  • open
  • close
    for state

Those are the things, which need mapping to the channels.

I also expect “twilight” in the morning (sunrise) and evening (sunset).

I start on the integration and then we’ll ser if we need more.

ok, first build
https://github.com/markus7017/myfiles/blob/master/shelly/org.openhab.binding.shelly-2.5.2-SNAPSHOT.jar?raw=true

Please make sure that TRACE log is enabled
log:set TRACE org.openhab.binding.shelly

PR #6985 has been opened:


including

waiting on feedback

work in progress

Please make sure to provide feedback on issues listed above

1 Like

I digged a bit deeper into the timeout topic and found somthing interesing.
I still use the official snapshot build.
The target is a Shell 2 with 1.5.7 (newest build for this device type).
Before the test I disabled all events in the binding and enabled ColoT.

  1. I send permanent pings to the Shelly from my Raspberry hosting Openhab, 1 per second.
  2. As soon the Shelly sends COAP messages, no more pings are replied by the Shelly unless a “Membership Report Group” message is sent by the Shelly.

I attach a screenshot from my Wireshark trace.

did you tried the build with DE support

strange, the binding doesn’t send pings

I sent the pings manually.
But I can also see that TCP SYNC Requests towards the Shelly were repeted due to timeout which could explain the log file entries with timeouts in the binding.

Hi, I have been facing some problems
using shelly em. It seems that total energy
channel is not working correctly. Can you
help me with this?

By using another Shelly em flash tasmota
i have all the measurments correctly.


Thank you very much and hope to
hear from you soon.

open a browser, open uri /status and provide the output here

Hello @markus7017
Don’t know Programming.
You could guide me How to get
open uri /status
Thank you for your time.


(upload://ll4Xk6UFa4csnkoUO8N5pFEBPef.jpeg)

This has nothing to do with programming.
Open your web browser and enter your Shellys ip address followed by /status and post the output ad text here, No Screenshot please.

Thanks @hmerk

 {"wifi_sta":{"connected":true,"ssid":"My Home ","ip":"192.168.0.112","rssi":-45},"cloud":{"enabled":true,"connected":true},"mqtt":{"connected":false},"time":"12:00","serial":21198,"has_update":false,"mac":"8CAAB5062017","relays":[{"ison":true,"has_timer":false,"overpower":false,"is_valid":true}],"emeters":[{"power":644.89,"reactive":365.48,"voltage":233.41,"is_valid":true,"total":75635.2,"total_returned":0.0},{"power":2.59,"reactive":0.00,"voltage":233.41,"is_valid":true,"total":3260.1,"total_returned":0.0}],"update":{"status":"idle","has_update":false,"new_version":"20200206-083637/v1.5.10@e6a4205e","old_version":"20200206-083637/v1.5.10@e6a4205e"},"ram_total":49904,"ram_free":33340,"fs_size":233681,"fs_free":162648,"uptime":264934}

Hi there,
I installed a Shelly 3EM today. OpenHAB has integrated it as a thing, but treats it like a Shelly EM.
Are you planning to integrate the Shelly 3EM into the binding?shelly_3em

yes, I‘m waiting on shipping

please send /settings and /status output

I have a strong feeling that the packet losses are caused by my mesh network.
I will dig into it during the weekend.

/settings:

{"device":{"type":"SHEM-3","mac":"DC4F2276467A","hostname":"shellyem3-DC4F2276467A","num_outputs":1, "num_meters": 0, "num_emeters":3},"wifi_ap":{"enabled":false,"ssid":"shellyem3-DC4F2276467A","key":""},"wifi_sta":{"enabled":true,"ssid":"xxxxx","ipv4_method":"static","ip":"xxx.xxx.xxx.xxx","gw":"xxx.xxx.xxx.xxx","mask":"255.255.255.0","dns":null},"wifi_sta1":{"enabled":false,"ssid":null,"ipv4_method":"dhcp","ip":null,"gw":null,"mask":null,"dns":null},"mqtt": {"enable":true,"server":"xxx.xxx.xxx.xxx:1883","user":"xxx","id":"shellyem3-DC4F2276467A","reconnect_timeout_max":60.000000,"reconnect_timeout_min":2.000000,"clean_session":true,"keep_alive":60,"max_qos":0,"retain":false,"update_period":30},"coiot": {"update_period":15},"sntp":{"server":"time.google.com","enabled":true},"login":{"enabled":true,"unprotected":false,"username":"xxxxx","password":"xxxxxxx"},"pin_code":"","name":"","fw":"20200205-183800/master@fa9ba943","discoverable":false,"build_info":{"build_id":"20200205-183800/master@fa9ba943","build_timestamp":"2020-02-05T18:38:00Z","build_version":"1.0"},"cloud":{"enabled":false,"connected":false},"timezone":"Europe/Amsterdam","lat":xx.xxxxxx,"lng":xx.xxxxxx,"tzautodetect":true,"tz_utc_offset":3600,"tz_dst":false,"tz_dst_auto":true,"time":"08:18","hwinfo":{"hw_revision":"prod-2020-1", "batch_id":1},"max_power":120,"relays":[{"name":null,"ison":false,"has_timer":false,"overpower":false,"default_state":"off","auto_on":0.00,"auto_off":0.00,"max_power":0,"out_on_url":null,"out_off_url":null,"schedule":false,"schedule_rules":[]}],"emeters":[{"ctraf_type":50},{"ctraf_type":120},{"ctraf_type":120}]}

And /status:

{"wifi_sta":{"connected":true,"ssid":"xxxxxx","ip":"xxx.xxx.xxx.xxx","rssi":-57},"cloud":{"enabled":false,"connected":false},"mqtt":{"connected":true},"time":"08:23","serial":1,"has_update":false,"mac":"DC4F2276467A","relays":[{"ison":false,"has_timer":false,"overpower":false,"is_valid":true}],"emeters":[{"power":30.63,"pf":0.32,"current":0.40,"voltage":236.41,"is_valid":true,"total":26560.9,"total_returned":0.0},{"power":316.27,"pf":0.69,"current":1.92,"voltage":237.27,"is_valid":true,"total":67514.3,"total_returned":0.0},{"power":-56.44,"pf":-0.20,"current":1.21,"voltage":237.57,"is_valid":true,"total":21726.1,"total_returned":33183.2}],"fs_mounted":true,"update":{"status":"idle","has_update":false,"new_version":"20200205-183800/master@fa9ba943","old_version":"20200205-183800/master@fa9ba943"},"ram_total":48704,"ram_free":30744,"fs_size":233681,"fs_free":162146,"uptime":651613}

thx, I’ll be out of town until Monday, so I will work on it next week
Your are lucky: you already got one; they are facing production problems in China due to Corona Virus leading into a production bottleneck…