Carrerahill Posted February 20, 2020 Share Posted February 20, 2020 Someone on this forum was using Shelly1PM for MVHR control with fire detection for automatic shutdown in the event of a fire. Anyway - I have bought several of these and I suspect I am now at an advanced level as more or less anything I want them to do now I can do, but I am struggling as there really is only very limited information from trawling through the internet for days! Basically I want to look into MQTT linking of two units, or using the actions setting and have them host their own network. This is what I am trying to do: I want to have a Shelly1 behind a retractive switch, this switch will connect to the input of the shelly. This device will simply be powered and control nothing itself locally. I want it to speak to a second Shelly some 4-5m away so that when the Shelly gets a switch pulse from the retractive switch it actually controls the relay on the remote Shelly. I need to be able to deliver from a single blip to a long press-and-hold. I have got that working using Scene rules and it does work, but it is too slow, I have read that linking them directly will have a reaction time of ms - that is ideal. My alternative option is to buy a little remote control unit with a momentary relay and a little fob, press the button, relay actuates... it's just not that clever or neat a solution and means losing keyfobs unless I hack the fob and solder the button pins to a faceplate switch - but then I still have fob batteries to replace. Link to comment Share on other sites More sharing options...
MikeSharp01 Posted February 20, 2020 Share Posted February 20, 2020 1 hour ago, Carrerahill said: but it is too slow, By slow what do you mean - seconds or just too many Milliseconds? Link to comment Share on other sites More sharing options...
Carrerahill Posted February 20, 2020 Author Share Posted February 20, 2020 (edited) 54 minutes ago, MikeSharp01 said: By slow what do you mean - seconds or just too many Milliseconds? Probably well onto the seconds scale. As I have it linked and setup just now, if I close the switch contacts on "Device 1" within about 1 second "Device 2" will also come on, if I open the switch contacts on "Device 1", then "Device 2" will follow within about 1 second - so sounds quick enough sure and that would be perfect if I just wanted to for example control several lighting circuits from a single switch or something while retaining individual control etc. but I need to be able to use the relay to go closed circuit for perhaps a single 250ms button pulse say within a 150ms tolerance. At the moment if I close the switch contacts on "Device 1" for say 250-500ms then it doesn't even register on "Device 2" so too slow and they are side by side! According to this page (https://shelly.cloud/support/direct-device-to-device-communication-ddd/) if you use DDD (Direct Device to Device) then the "speech" is extremely fast - just a few milliseconds. Sounds good to me. But I cannot get these actions to work. As I see if if I take the "Button Swiched on URL" and make that the IP address of the device I want to control I would make that: http://192.168.0.13/Red/0?turn=on - now assuming that syntax is correct then my thinking is that my device which is online and was at 192.168.0.13 would have come on - not a chirp. OK - so thinking about it all, first these 2 devices must be on the same network obviously, so they were both on the home wi-fi - both therefore I know could see each other as they were talking to each other. So I can only assume that the code is wrong. Then this got me thinking, that means this setup needs to sit on a WiFi network - routers changes, wifi drops out etc. so I was aiming to run them on their own little network - so I set one up as a wifi access point, I can then connect my iPad to its own wifi network and navigate to its little web-server and take command of it via 192.168.33.1 - I could then connect my iPad to the the wifi network of the second device and I could have then linked it to the wifi network of the first device - see where I am going? However, I had a sudden through before I hit yes - how would I then ever connect to that device again? My thinking was that if I then connected to the network formed of the first device, I would be able to see the second device also connected to it and presumably issued with it's own IP address from device 1 - but I wouldn't know what that IP address was and I am not sure how I would locate it as the discover app might not see it - that would then potentially give me a bricked Shelly! Now, I have looked into MQTT stuff and I understand that I could ping MQTT commands about from home automation software and that is something I am interested in for my own house (can anyone recommend good free software for this - Home Assistant? But otherwise how do I create and broadcast MQTT commands? Also, I want to make this 2 device setup as standalone as possible - so I like the idea of pre-configuring them on their own little wifi network then as soon as they power up they should just work. I need to make 4 of these sets. Edited February 20, 2020 by Carrerahill Link to comment Share on other sites More sharing options...
MikeSharp01 Posted February 20, 2020 Share Posted February 20, 2020 Sounds like the switch is polled too slowley or not latched on the input. Can the device it is connected to see the short pulse? Do you want to sent a 250ms pulse or an on / off command as they are different things realy. Link to comment Share on other sites More sharing options...
Carrerahill Posted February 20, 2020 Author Share Posted February 20, 2020 57 minutes ago, MikeSharp01 said: Sounds like the switch is polled too slowley or not latched on the input. Can the device it is connected to see the short pulse? Do you want to sent a 250ms pulse or an on / off command as they are different things realy. It will vary, I just need speed for the quick pulses, but there will also be the time when I need maybe a 2-5 second relay closed operation the relay is feeding into a control circuit and there is no way to wire it, so I need a wireless option and if I use Shelly units it allows for some other features. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now