detached switch mode

Posted on
Wed Jul 08, 2020 8:58 pm
agame offline
Posts: 514
Joined: Jul 13, 2017
Location: Melbourne, Australia

detached switch mode

I've set up a device in detached switch mode (to monitor gate open/close status with a reed switch).

The reed switch/shelly integration is fine - I can see the reed switch on/off status reflected on the shelly UI. But I'm not seeing any status changes in the Indigo shelly device (consequently, a mascquerade device I've set up to reflect the switch status isn't working either). The Shelly actions for button on and button off look to be configured appropriately. The load switches on and off fine with through indigo, as do 3 temperature sensors.

Is the plugin intended to supress switch status when in detached mode? Or is something else wrong.

(in an ideal world, a secondary device would be created when using a shelly in detached mode?)

Posted on
Thu Jul 09, 2020 2:26 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: detached switch mode

.. I am checking
Karl

Posted on
Thu Jul 09, 2020 5:14 pm
agame offline
Posts: 514
Joined: Jul 13, 2017
Location: Melbourne, Australia

Re: detached switch mode

thanks.

I've now taken a look at a couple of other Shelly devices (switches inputs wired conventionally)...and changed the switch mode of the problem device.... I'm thinking this problem has nothing to do with detached mode, I'm wondering if 'actions' aren't working properly here..

Firstly, changing the input to toggle button results in gate open/close switching my attached lighting circuit off and on as you'd expect...but still no joy on seeing a state change - 'input=off" never changes on the indigo device.

But-looking at another (conventionally configured) shelly device, also in toggle button mode, I see "input=on" appear momentarily when the switch is toggled. However this also isn't what I'd expect as it should remain in the appropriate state until the button state reverses? Also I'm not seeing any value in the 'Action from Device' state on any devices....I assume that should be the last action received? On the problem Shelly I'm not seeing even the momentary 'input' state change.

I note that all the devices have been configured by the plugin with identical URL actions, eg for button press
http://192.168.1.22:7987/?input=on
There's no device ID in the action, is that right?

presumably I've done something odd here.....

Posted on
Fri Jul 10, 2020 9:25 am
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: detached switch mode

!! It looks as if the default return port to indigo 7987 does not work anymore !!

In config change
Screen Shot 2020-07-10 at 10.19.28.png
Screen Shot 2020-07-10 at 10.19.28.png (5.17 KiB) Viewed 3177 times
to eg 7980
then do a push config to ALL device and restart the plugin after 1 minute ( the other way around also works , first restart plugin, then do a push, but no wait)

That port seems to work for me

I have no clue why port# 7987 is now not working anymore..

ALSO re "There's no device ID in the action, is that right?" yes that is correct. The plugin gets the IP# of the sending device. It used as the device IDkey (when ip # changes it will figure that out by looking at the device ID from the status request send to the device subsequently)

re making a new device if switch detached (makes sense) , will take a little more time, have to think about that one.

Karl

Posted on
Fri Jul 10, 2020 6:44 pm
agame offline
Posts: 514
Joined: Jul 13, 2017
Location: Melbourne, Australia

Re: detached switch mode

hmmm...still no joy. tried several ports, but no sign of an action actually being received by Indigo.

Given the plugin pushes the config to the Shelly I've assumed the URL etc should be configured correctly however as a test I
tried calling an Indigo action URL directly - works from browser but not seeing anything received from Shelly. The URL actions are definitely enabled on the Shelly UI.

So I'm assuming now the Shelly action URL may not even be firing for some reason.

I can always add another Shelly without a load and monitor the load switching I guess...

I'll try a bit more fiddling tonight.

Posted on
Fri Jul 10, 2020 9:09 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

detached switch mode

Please cHeck on the Shelly device the action page if the port# is correct

If it works using a browser the plugin is fine

Then the Shelly devices are not setup properly. Did you push the config to all devices after changing the port?

Also try: disable the plugin wait 20secs then start the plugin.


Sent from my iPhone using Tapatalk

Posted on
Sat Jul 11, 2020 2:11 am
agame offline
Posts: 514
Joined: Jul 13, 2017
Location: Melbourne, Australia

Re: detached switch mode

Thanks for the ongoing suggestions...I've done all those with still no joy!

I realised that I hadn't added authentication credentials for my. earlier attempt at having the device directly control an Indigo device through the Indigo restful API. This is now working fine...so I can work around this issue by using the Indigo's native API for action groups.

I'll continue to poke around, but now this leads me back to thinking its more likely to be a problem with the plugin (or at least my configuration of it) rather than the Shelly.

Posted on
Sat Jul 11, 2020 2:15 am
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: detached switch mode

So you have the actions on the Shelly configured to go to the indigo web server ?
You can have only one action address active on the Shelly device either connect to port 798x or the indigo Webserver port.


Sent from my iPhone using Tapatalk

Posted on
Sat Jul 11, 2020 2:32 am
agame offline
Posts: 514
Joined: Jul 13, 2017
Location: Melbourne, Australia

Re: detached switch mode

yes I think we're on the same page - but for clarity, there's a discrete action URL for each Shelly event - given I'm having no success using the plugin to monitor the input (button) state (which I gather isn't part of the data available through polling), I'm pointing those button press actions to the indigo web server instead. I'm continuing to use the plugin for switching the load and monitoring temperature, they appear to work fine.

Posted on
Sat Jul 11, 2020 2:40 am
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: detached switch mode

Yes each action type has it own http field. So if you use it for indigo actions it can not be used for any other http address

And yes the plugin is polling the device on a regular basis. But that has nothing to do with the action info. It will get the current value of the button - and relay- that might be different than the the state at the time of the action

Also you should then set the properties of the actions in device edit to ignore otherwise it will set them to plugin values ever 30 minutes or so.


Sent from my iPhone using Tapatalk

Posted on
Sat Jul 11, 2020 2:52 am
agame offline
Posts: 514
Joined: Jul 13, 2017
Location: Melbourne, Australia

Re: detached switch mode

yes we are on the same wavelength, in the absence of the actions I recognise there would be a lag related to the polling frequency.
...except the plugin has never reported changes in input state (even when I ramp up the polling frequency). Given my device is in detached button mode, the button state is not relevant to the other functions...I've left all those actions pointing to the plugin (but not confident that's actually working).

Posted on
Sat Jul 11, 2020 2:54 am
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: detached switch mode

Just tried it and mine works fine.


Sent from my iPhone using Tapatalk

Posted on
Sat Jul 11, 2020 3:43 am
agame offline
Posts: 514
Joined: Jul 13, 2017
Location: Melbourne, Australia

Re: detached switch mode

kw123 wrote:
Yes each action type has it own http field. So if you use it for indigo actions it can not be used for any other http address

Also you should then set the properties of the actions in device edit to ignore otherwise it will set them to plugin values ever 30 minutes or so.




I missed that tip.... but I cant see that property under edit device? (though it hasn't [yet] overwritten).... which property field are you referring to?

Posted on
Sat Jul 11, 2020 3:49 am
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: detached switch mode

The fields At the bottom
One for each setting


Sent from my iPhone using Tapatalk

Posted on
Sat Jul 11, 2020 4:02 am
mclass offline
Posts: 315
Joined: May 13, 2015
Location: Melbourne, Australia

detached switch mode

Hi! I have been following this discussion with interest, as have 6 Shelly devices in various roles on my system.

One is used solely for motion detection using an existing conventional movement switch that originally controlled the light directly - the output is not (yet) used for anything.

Having had a play with one of the Relay 1 devices, I note that when in the detached switch mode, no Indigo log entry is registered.

However, the custom states input_long and input_short do record the time stamp of the last actuation of the detached switch depending on the physical type of switch used for the input ie toggle switch (long) or push button (short).

You may wish to try a trigger that records any change to that state - although it won’t give you direct feedback as to the. gate position - only that it has opened or closed - and you will need a variable to track gate position. The downside to this is that the variable may “get out of synch” with the actual gate position.

The alternative may be to use a separate Shelley 1 to monitor the gate, or perhaps a Shelly 2.5 with one switch monitoring and the other switching?

Good luck, and I’ll follow progress with interest!

mclass


Sent from my iPad using Tapatalk

Who is online

Users browsing this forum: No registered users and 0 guests