<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How To Send a command from Omega2+ to another via Network]]></title><description><![CDATA[<p dir="auto">Hi Everybody,<br />
I have one omega2+ with a sensor that will give +3.3v to GPIO.<br />
I have other 3 Omega2+ with relay expansion that are used to control Plugs using the relay.<br />
all 4 controllers are connected to the same WIFI network.</p>
<p dir="auto">how can I send command from the Master Controller (the one connected to the sensor) to switch on all the 3 relays on the other controllers via the network (when the sensor give +3.3v signal to GPIO)?</p>
<p dir="auto">Thank you in advance.</p>
]]></description><link>http://community.onion.io/topic/2057/how-to-send-a-command-from-omega2-to-another-via-network</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Apr 2026 18:49:32 GMT</lastBuildDate><atom:link href="http://community.onion.io/topic/2057.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 16 May 2017 12:52:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How To Send a command from Omega2+ to another via Network on Tue, 16 May 2017 12:55:12 GMT]]></title><description><![CDATA[<p dir="auto">Hi Everybody,<br />
I have one omega2+ with a sensor that will give +3.3v to GPIO.<br />
I have other 3 Omega2+ with relay expansion that are used to control Plugs using the relay.<br />
all 4 controllers are connected to the same WIFI network.</p>
<p dir="auto">how can I send command from the Master Controller (the one connected to the sensor) to switch on all the 3 relays on the other controllers via the network (when the sensor give +3.3v signal to GPIO)?</p>
<p dir="auto">Thank you in advance.</p>
]]></description><link>http://community.onion.io/post/13132</link><guid isPermaLink="true">http://community.onion.io/post/13132</guid><dc:creator><![CDATA[Wyvern IQ]]></dc:creator><pubDate>Tue, 16 May 2017 12:55:12 GMT</pubDate></item><item><title><![CDATA[Reply to How To Send a command from Omega2+ to another via Network on Sun, 21 May 2017 13:52:21 GMT]]></title><description><![CDATA[<p dir="auto">too much help in here, shifted to particle photon ...........</p>
]]></description><link>http://community.onion.io/post/13187</link><guid isPermaLink="true">http://community.onion.io/post/13187</guid><dc:creator><![CDATA[Wyvern IQ]]></dc:creator><pubDate>Sun, 21 May 2017 13:52:21 GMT</pubDate></item><item><title><![CDATA[Reply to How To Send a command from Omega2+ to another via Network on Sun, 04 Jun 2017 07:00:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/3866">@Wyvern-IQ</a><br />
<strong>Broadcasting UDP package(s)</strong> might be an option for you.<br />
Here you are some python drafts (a working demo ;-).<br />
Probably your favorite programming language has similar capabilities too.</p>
<blockquote>
<p dir="auto">(when the sensor give +3.3v signal to GPIO)</p>
</blockquote>
<p dir="auto">I think this means a digital High level.</p>
<p dir="auto">master_controller.py</p>
<pre><code># importing packages
import sys, time, onionGpio
from socket import *

# using GPIO0 as input
gpioNum = 0
gpioObj = onionGpio.OnionGpio(gpioNum)
gpioObj.setInputDirection()

# sender
s = socket(AF_INET, SOCK_DGRAM)
s.bind(('', 0))
s.setsockopt(SOL_SOCKET, SO_BROADCAST, 1)

# reading the sensor once a second
while 1:
    state = gpioObj.getValue()
    if (int(state) == 1):
        for i in range(0,3):
            s.sendto(state, ('&lt;broadcast&gt;', 50000))
        sys.exit()
    time.sleep(1)
</code></pre>
<p dir="auto">other_controllers.py</p>
<pre><code># importing packages
import sys
from OmegaExpansion import onionI2C
from OmegaExpansion import relayExp
from socket import *

# Relay Expansion device address is 0x20
addr = 0
channel = 0
relayExp.driverInit(addr)

# listener
s = socket(AF_INET, SOCK_DGRAM)
s.bind(('', 50000))

while 1:
    state, wherefrom = s.recvfrom(1500, 0)
    relayExp.setChannel(addr, channel, state)
</code></pre>
<p dir="auto">Unfortunately I have no Relay expansion.<br />
Please take a high resolution (macro) photo from its SMD area if you can and share with us.</p>
]]></description><link>http://community.onion.io/post/13344</link><guid isPermaLink="true">http://community.onion.io/post/13344</guid><dc:creator><![CDATA[György Farkas]]></dc:creator><pubDate>Sun, 04 Jun 2017 07:00:50 GMT</pubDate></item><item><title><![CDATA[Reply to How To Send a command from Omega2+ to another via Network on Sun, 04 Jun 2017 12:16:17 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">You can use ssh to run command on another Omega.</p>
<p dir="auto">Example:<br />
sshpass -p "PASSWORD" root@REMOTE_IP COMMAND</p>
<p dir="auto">PASSWORD - default is onioneer<br />
REMOTE_IP - remote device address<br />
COMMAND - app/script etc. to run on remote device (you can use parameters to enable/disable relay)</p>
]]></description><link>http://community.onion.io/post/13352</link><guid isPermaLink="true">http://community.onion.io/post/13352</guid><dc:creator><![CDATA[Krzysztof Skiba]]></dc:creator><pubDate>Sun, 04 Jun 2017 12:16:17 GMT</pubDate></item></channel></rss>