Shelly Toggle Fail

Posted on
Thu May 21, 2020 6:40 pm
mclass offline
Posts: 224
Joined: May 13, 2015
Location: Melbourne, Australia

Shelly Toggle Fail

Hi,

Great plugin, thanks!

I'm using Shelly 1's in a number of applications, and have been attempting integration into my control pages. However, I am unable to achieve a "toggle" action on devices. I have tried on two separate Shelly 1 devices. Note that the example below there is a delayed action on this particular device (to turn heater off after a preset time), but the same outcome occurs (or doesn't occur!) on the device without a delay set.

With all Shelly logging turned on I get the following:
Code: Select all
2020-05-22 10:06:27 ACTIONS:  Nobo Heater - Ensuite action=actionValue : 0
configured : True
delayAmount : 900
description : toggle device
deviceAction : Toggle
deviceId : 1102496162
replaceExisting : True
textToSpeak :
2020-05-22 10:06:27 ACTIONS: dev Nobo Heater - Ensuite sending  channel:0;  page:relay/0?turn=off deviceTypeId:shelly1
2020-05-22 10:06:27 shellyPollerThread  1102496162;  executing:10.10.10.XXX   status
2020-05-22 10:06:27  sbin/ping  -c 1 -W 40 -o 10.10.10.XXX return-code: 0
2020-05-22 10:06:27 Connection: /usr/bin/curl 'http://10.10.10.XXX:80/status'
2020-05-22 10:06:27 queue received: items:{'ipNumber': u'10.10.10.XXX', 'shellyIndigoDevNumber': 1102496162, 'page': 'status', 'data': {u'inputs': [{u'input': 0}], u'ext_sensors': {}, u'ext_temperature': {}, u'ram_total': 50568, u'ram_free': 40272, u'fs_size': 233681, u'unixtime': 1590141988, u'uptime': 925948, u'mac': u'BCDDC277CC49', u'update': {u'status': u'idle', u'new_version': u'20200320-123430/v1.6.2@514044b4', u'old_version': u'20200320-123430/v1.6.2@514044b4', u'has_update': False}, u'mqtt': {u'connected': False}, u'meters': [{u'is_valid': u'true', u'power': 0.0}], u'has_update': False, u'time': u'10:06', u'wifi_sta': {u'ip': u'10.10.10.XXX', u'connected': True, u'ssid': u'YYY', u'rssi': -69}, u'fs_free': 153361, u'serial': 1, u'relays': [{u'timer_remaining': 0, u'has_timer': False, u'ison': False}], u'cloud': {u'connected': False, u'enabled': False}, u'ext_humidity': {}}}
2020-05-22 10:06:27 shellyPollerThread  1102496162;  executing:10.10.10.XXX   relay/0?turn=off
2020-05-22 10:06:27  sbin/ping  -c 1 -W 40 -o 10.10.10.XXX return-code: 0
2020-05-22 10:06:27 Connection: /usr/bin/curl 'http://10.10.10.XXX:80/relay/0?turn=off'


Am I missing something, or is there a trick?!!

TIA

mclass

Posted on
Fri May 22, 2020 5:46 am
kw123 offline
User avatar
Posts: 7038
Joined: May 12, 2013
Location: Dallas, TX

Re: Shelly Toggle Fail

need a little bit more info..

here is how it works:
1. send eg on
2. wait for answer form device
3. set indigo dev status according to answer from device
indigo (on/off) state is NOT set when the command is send

So if you want to do a toggle on/off within a msec that will not work.

It was implemented as the connection to the device might not work and the indigo dev state should reflect what the actual state is, not what indigo believes it SHOULD be.

is that the problem you describe?

Karl

ps
what the log files shows: it is sending a single OFF to the relay.

Posted on
Fri May 22, 2020 11:58 pm
mclass offline
Posts: 224
Joined: May 13, 2015
Location: Melbourne, Australia

Re: Shelly Toggle Fail

Hi Karl,

Apologies for not explaining the situation fully.

I am attempting to include the Shelly controlled device on a control page. I have selected to show the device state with an image. This image accurately reflects the state of the relay when it is operated either via the switch connected to SW terminal, or by operation from indigo.

However, when in the control page editor, I assign a:
Code: Select all
Server action  > Edit Actions > Device Actions > Light/Appliance Actions > Toggle On/Off

I get the situation I describe in the original post ie only a "turn off" command is sent. It is unclear to me if this is an issue with the Shelly plugin or not.

In further testing if I assign a server action to either turn or turn off the device (by clicking on the image) it works as expected.

I trust that this provides more clarification of the issue!

Mclass

Posted on
Sat May 23, 2020 9:17 am
kw123 offline
User avatar
Posts: 7038
Joined: May 12, 2013
Location: Dallas, TX

Re: Shelly Toggle Fail

yes thanks, that clarified it

Should be fixed in v .14, just posted.

was a logic error .. double negative thing

Karl

Posted on
Sun May 24, 2020 5:43 am
mclass offline
Posts: 224
Joined: May 13, 2015
Location: Melbourne, Australia

Re: Shelly Toggle Fail

Works well!! Many thanks Karl.

mclass


Sent from my iPhone using Tapatalk

Posted on
Sun May 24, 2020 9:23 am
kw123 offline
User avatar
Posts: 7038
Joined: May 12, 2013
Location: Dallas, TX

Re: Shelly Toggle Fail

thanks for the feedback

It is always good to hear that the fixes actually work.

Karl

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 0 guests