Shelly door window sensor - rest

Hi,

I try to use shelly door window sensor on ha connecting trough rest sensor

But probelm is that this sensor saves energy and is in deep sleep and wakes every few minutes or when is triggered.

Is ther a way to set rest sensor to get data when shelly sensor is triggered?

Why are you even trying this way?
Most efficient way for this type of sensors (and for others too) is MQTT.
But you can call url from Shelly sensor - maybe it helps your workflow

Hi @maxym

I try to use rest because If I enable mqtt I can’t use shelly cloud app with mqtt enabled.

Can you explain more or show me example what you mean by that:

But you can call url from Shelly sensor - maybe it helps your workflow

Every shelly device is able to call URLs if some event occurs, like door open. They can even call other shelly device this way.

Out of curiosity: why to use Shelly cloud if you use HA?

For now I don’t have ha accessible from outside :slight_smile:

Now I have another problem on mqtt. I need to send mqtt immediately on lux or illumination change.

By default mqtt sends command only on open/close

Is this possible?

from what I know it is possible since it appeared to be main root cause of battery drain (I don’t think the only one).
Anyway, check settings for option which disables reporting on lux changes.

I can’t find this setting, I’m using the latest software.

check the settings for an option that disables luxury change reporting.

Due to problems with discharging the batteries, the use of lighting may be a better way. But I don’t find that possibility either.

What are you using for setting it?
I’m using WEB GUI (not Shelly app). The setting I mentioned can be found in Settings or Sensor Settings option. It has been added with firmware v1.8

BTW are you mentioning lux and light intensity as distinct features? IMO it’s only one: lux measurment.

I am using web gui, but there is no setting for triggering on illumination.

Can you give me link for IMO device.

try http://device_ip/settings in browser
It will return json response. You should find lux_wakeup_enable parameter.
You can change using this HTTP interface by calling http://device_ip/settings?lux_wakeup_enable=X where X can be 0 or 1.
See API refs: https://shelly-api-docs.shelly.cloud/#shelly-door-window-settings

1 Like

I will try and report back. thx

I checked lux_wakeup_enable and is already set to true.

Do you think I have to set some other parameter to?

Here are my settings:

{"device":{"type":"SHDW-2","mac":"D8BFC01A92D5","hostname":"shellydw2-D8BFC01A92D5","sleep_mode":true},"wifi_ap":{"enabled":false,"ssid":"shellydw2-D8BFC01A92D5","key":""},"wifi_sta":{"enabled":true,"ssid":"itsAUTO","ipv4_method":"dhcp","ip":null,"gw":null,"mask":null,"dns":null},"wifi_sta1":{"enabled":false,"ssid":null,"ipv4_method":"dhcp","ip":null,"gw":null,"mask":null,"dns":null},"mqtt": {"enable":true,"server":"192.168.200.202:1883","user":"saso","id":"home/rooms/hallway/door_main","reconnect_timeout_max":60.000000,"reconnect_timeout_min":2.000000,"clean_session":true,"keep_alive":60,"max_qos":0,"retain":true,"update_period":30},"coiot": {"update_period":15},"sntp":{"server":"time.google.com","enabled":true},"login":{"enabled":true,"unprotected":false,"username":"admin"},"pin_code":"GGOn6p","name":null,"fw":"20200818-120407/v1.8.2@36539b0b","discoverable":false,"build_info":{"build_id":"20200818-120407/v1.8.2@36539b0b","build_timestamp":"2020-08-18T12:04:07Z","build_version":"1.0"},"cloud":{"enabled":true,"connected":true},"timezone":"Europe/Ljubljana","lat":500.000000,"lng":500.000000,"tzautodetect":true,"tz_utc_offset":0,"tz_dst":false,"tz_dst_auto":true,"time":"","unixtime":0,"led_status_disable":true,"actions":{"active":false,"names":["dark_url","twilight_url","open_url","close_url","vibration_url"]},"dark_threshold":100,"twilight_threshold":300,"sleep_mode":{"period":6,"unit":"h"},"led_status_disable":true,"dark_url":"","twilight_url":"","close_url":"","vibration_url":"","tilt_enabled":false,"tilt_calibrated":false,"vibration_enabled":false,"reverse_open_close":false,"lux_wakeup_enable":true,"sensors":{"temperature_threshold":1.0,"temperature_unit":"C"},"temperature_offset":0.0}

TBH I don’t know. I suppose there must be some delay/threshold/hysteresis otherwise the sensor would never go to sleep. How long you was waiting after changing lighting conditions?
Also I suggest to ask on shelly support forum (Facebook)

I didn’t change setting. Setting si already set to true.

I will try shelly support.

thx for your time @maxym