CreationDate
stringlengths
23
23
Answer
stringlengths
60
24k
Tags
stringlengths
5
68
Title
stringlengths
15
140
Id
stringlengths
1
4
Body
stringlengths
106
19.3k
2017-08-15T21:33:02.520
<p>In any case, a 6LoWPAN enabled Sensor Network needs a Gateway to interact with an end user who might be using a standard 802.11 WLAN or a 802.3 Ethernet based network. </p> <p>The Gateway needs to translate the 6LoWPAN enabled IPv6 addresses into addresses that standard networks can understand and communicate. For instance, if a node with 6LoWPAN enabled on it with Header Compression has Address <code>::1</code> there needs to be some defined way to know how to access this sensor node over a connected network. For that you need a gateway which does translation for you.</p> <p>Have a look into <a href="https://github.com/cetic/6lbr/wiki" rel="noreferrer">6lbr by CETIC</a> for some more implementation specific example.</p> <p>Read this Awesome <a href="https://github.com/alignan/IPv6-WSN-book" rel="noreferrer">IPv6-WSN-Book</a> for better understanding of 6LoWPAN</p>
|networking|6lowpan|
Does 6LowPAN stack helps in requirement of gateway?
1918
<p>After 6LowPAN stack. Every node can have the different internet IPv6 address. So,</p> <ol> <li><p>Is 6LOWPAN stack is present in GATEWAY or sensor mote as well?</p></li> <li><p>In a case of sensor mote, is a GATEWAY required? Can't 6LOWPAN enable sensor to directly connect to IPv6 Router?</p></li> </ol> <p>Correct me if I am missing some fact or data.</p>
2017-08-18T12:48:16.673
<p>Answer to your main question:</p> <blockquote> <p>I want to know if it is possible to call a friend who has another Google Home</p> </blockquote> <p>is no, you cannot do that exactly. In the link by @Bence Kaulics in comments it is said you can call outbound (to a phone) but inbound calls are not possible. That means the destination cannot be another Google Home but only owners phone. </p> <p>Making an outbound call is as easy as saying Hello Google, call NN, where NN is one of your contact or a phone number. </p> <p>At the moment though 911 calls aren't possible. Another issue is that for normal user your number is not shown to the responding phone, which may feel embarrassing. </p>
|google-home|
How do you do a Google Home call?
1925
<p>I am aware that you can do Alexa calling: we've even had numerous questions about it. Is it possible to do something similar with the Google Home? If so, how would it be done?</p> <p>Particularly, I want to know if it is possible to call a friend who has another Google Home and if so, how it would be done.</p>
2017-08-22T20:32:03.120
<p>To get Alexa to play music similar to an artist say:</p> <pre><code>&quot;Alexa, play songs similar to &lt;artist name&gt;&quot; </code></pre> <p>In addition, you can get Alexa to play music that is trending in a particular city. For example:</p> <pre><code>&quot;Alexa, play top songs in Tokyo.&quot; </code></pre>
|alexa|amazon-echo|
How to get Alexa to play music like <insert artist> using Amazon Music
1937
<p>I have Amazon Prime music. Is it possible to ask Alexa to play music similar to or like a particular artist? When I ask her to play music by [artist name], they are only songs by that artist (obviously).</p> <p>I'm looking for something similar to the same thing on Pandora or Spotify, but for Amazon Prime music (and not from my own uploaded songs). Is there a Skill available that provides this?</p>
2017-08-27T15:17:48.150
<p>Pushbullet has a Tasker plugin embedded with the android application which allows to filter incoming messages and (regex) parse text within.</p> <p>A program can for example</p> <ul> <li>push a pushbullet via pushbullet's api</li> <li>on the phone a tasker profile can intercept the incoming message and regex match the message with a known patern (I'm on vacation, Intrusion,...)</li> <li>and the phone could trigger a task accordingly (notify, ring,...)</li> </ul>
|android|tasker|
Input signal for Tasker on an external network
1949
<p>I have a standard Android smartphone connected to 4G (yes it can connect to my house's WIFI but the point of this question is to work from outside).</p> <p>I would like to trigger a task on demand for an external source (website click on my server, mail, iCal event, opened door) onto a <a href="https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm" rel="noreferrer">Tasker task</a>.</p> <blockquote> <p>Sidenote : Tasker works with a profile / task system : a profile is when an event occurs (date, phone event,...), then several tasks can be bound to this profile as start and end tasks.</p> </blockquote> <p>The particular test case is : "When I click on 'I'm on vacation' on my server's webpage, it should send something to my phone to switch a 'Vacation' variable on tasker" (yes my phone is nearby but I am THAT lazy ;))</p> <p>I known that there are already some alternatives like</p> <ul> <li>Pushbullet => 3rd party app</li> <li>(G)Mail => the better but might be overkill</li> <li>SMS => needs a SMS sender</li> <li>Periodic HTTP GET => I want immediate, too periodic GET might drain battery</li> </ul> <p>I would like to know if there is a "simple" solution, preferably without a 3rd party and I would like to keep the task bound to a simple profile, not multi-profile like "hey a mail","hey a sms",...</p> <p>Reminder : </p> <ul> <li>External 4G network (but I can forward ports)</li> <li>Immediate action (let's say 10s latency is acceptable)</li> <li>I already use Tasker for other things so I would like to avoid depending on other services/apps such as IFTTT or Trigger for example</li> </ul>
2017-08-28T18:49:35.910
<p>By far the easiest method would be to use a library such as <a href="https://pypi.python.org/pypi/paho-mqtt/1.3.0" rel="nofollow noreferrer">paho-mqtt</a> or the AWS IoT SDK for Python (see the bottom of this post), which are MQTT client libraries for Python.</p> <p>Usage guidance is provided in the linked documentation. Here is an example, for reference, which you may find useful to adapt to your purposes (it's loosely based on the documentation provided):</p> <pre class="lang-py prettyprint-override"><code>import paho.mqtt.client as mqtt import time # Runs when the client receives a CONNACK connection acknowledgement. def on_connect(client, userdata, flags, result_code): print "Successful connection." # Subscribe to your topics here. client.subscribe("sensor/topic_you_want_to_subscribe_to") # Runs when a message is PUBLISHed from the broker. Any messages you receive # will run this callback. def on_message(client, userdata, message): if message.topic == "sensor/topic_you_want_to_subscribe_to": if message.payload == "START": # We've received a message "START" from the sensor. # You could do something here if you wanted to. elif message.payload == "STOP": # Received "STOP". Do the corresponding thing here. client = mqtt.Client() client.on_connect = on_connect client.on_message = on_message client.connect("yourbrokerurl.com", 1883, 60) client.loop_start() while True: # Your script must loop here, and CAN block the thread. # For example, you could take a measurement, then sleep 5 seconds # and publish it. data_to_broadcast = get_data() client.publish("cnc/data", data_to_broadcast) time.sleep(5) </code></pre> <p>This example looks a little overwhelming... But it's quite easy when you take it in bits. Start by looking at the line <code>client = mqtt.Client()</code>. Here we create an MQTT client. We then register <em>callbacks</em> for connecting and receiving a message (these are just functions that run when an event occurs).</p> <p>In our connect callback, we subscribe to the sensor topic. Then, in the message received function, we check if the message is telling our CNC to do something, then do it (<em>the implementation of that is left to the reader</em>).</p> <p>Then, in the <code>while True:</code> loop, we publish data every 5 seconds. That's just an example—you can do whatever you want there. Just remember <code>client.publish</code> is the function you need to publish something.</p> <hr> <p>Alternatively, if you're looking for a library <em>specifically for AWS IoT</em>, you can use <a href="https://github.com/aws/aws-iot-device-sdk-python" rel="nofollow noreferrer">aws-iot-device-sdk-python</a>. This builds on Paho, but makes the extra requirements and features (such as the Device Shadow) more easily accessible from the library.</p> <p>Remember also that AWS IoT requires a device certificate for each device—their SDK will help you handle this, but Paho alone won't.</p> <p><a href="https://github.com/aws/aws-iot-device-sdk-python/blob/master/samples/basicPubSub/basicPubSub.py" rel="nofollow noreferrer">Here</a> is a basic pub/sub sample for Amazon's SDK. You'll notice it's broadly similar to the example above, and might be quicker to start from.</p>
|mqtt|aws-iot|
Connect CNC machine to AWS IoT
1953
<p>I want to connect my CNC machine with AWS IoT within a system that contains a robotic arm and sensor. The CNC machine is connected to a laptop and runs with Python code. I want to use MQTT to make the CNC machine a publisher and subscriber but I don't know how to do that. Here is the CNC Python code. </p> <pre class="lang-py prettyprint-override"><code>import serial import time # Open grbl serial port s = serial.Serial('COM3',9600) # Open g-code file f = open('grbl.gcode.txt','r'); # Wake up grbl s.write("\r\n\r\n") time.sleep(2) # Wait for grbl to initialize s.flushInput() # Flush startup text in serial input # Stream g-code to grbl for line in f: l = line.strip() # Strip all EOL characters for consistency print 'Sending: ' + l, s.write(l + '\n') # Send g-code block to grbl grbl_out = s.readline() # Wait for grbl response with carriage return print ' : ' + grbl_out.strip() # Wait here until grbl is finished to close serial port and file. raw_input(" Press &lt;Enter&gt; to exit and disable grbl.") # Close file and serial port f.close() s.close() </code></pre>
2017-08-30T12:35:01.387
<p>Blindly you can choose Node MCU , especially ESP8266 , that’s one of the easiest wifi module that we can connect and that’s the cheapest in market,hardly you can get it for 400 Rupees and the good thing is ESP 8266 having full TCP/IP stack and required power is 3.3V ,it has 16 GPIO pins so that you can connect multiple sensors with it, don’t forget to give external power source if you add more number of I/O devices</p>
|microcontrollers|wifi|power-consumption|
What is the simplest programmable IoT device that can connect to Wi-Fi?
1963
<p>I am trying to build a cheap asset tracker that can be powered by a battery pack. All I need the IoT device to do, is to connect to known WiFi network access points. I have access to the backend system that manages the WiFi access points.</p> <p>I considered a CHIP computer or PiZero W but both have processing power that I don't need. Looking for a complete board with Wi-Fi. </p>
2017-09-04T11:56:46.197
<p>Google Assistant recently added the ability to execute multiple commands in a shortcut, which solves this problem for me. I was able change my "tea time" shortcut to look like:</p> <blockquote> <p>"Set a 4 minute timer called tea and turn on the 4 minute timer light."</p> </blockquote>
|google-home|samsung-smartthings|google-assistant|philips-hue|ifttt|
Google Assistant Timer + Action with One Command
2002
<p>I'm trying to figure out a clever way to set a Google Home timer and perform another action in one command.</p> <p>I currently have a shortcut called "tea time" which sets a timer for my tea. I would really like to have it <em>also</em> trigger an IFTTT (or something) to make a light dim with it as a visual representation of the timer. I also have a smart things hub integrated. In the case of my light script, that's where the script actually runs.</p> <p>Does anybody have any thoughts on how I could make that work so that I can run the timer <em>and</em> the light script?</p>
2017-09-07T17:59:38.977
<p>@hardillb gave a good answer but let me try to add a few details adding some &quot;real-life&quot; touch:</p> <ol> <li>Choose some MQTT broker available to the public. <a href="http://www.hivemq.com" rel="nofollow noreferrer">HiveMQ</a> can be a good example and you can start with the <a href="http://www.hivemq.com/try-out/" rel="nofollow noreferrer">try-out</a> page describing how to connect to the broker:</li> </ol> <blockquote> <p>Connect to Public Broker</p> <p>Host: broker.hivemq.com</p> <p>Port: 1883</p> <p>Websocket Port: 8000</p> </blockquote> <ol start="2"> <li><p>Choose which client best fits to you and use it for internal broker interconnection with the public MQTT broker. For example your C client could be <a href="http://www.hivemq.com/blog/mqtt-client-library-pahocclient" rel="nofollow noreferrer">Paho MQTT</a>. The client has support for SSL/TLS so your security remains on a high level.</p> </li> <li><p><a href="http://www.hivemq.com/blog/mqtt-client-library-encyclopedia-paho-embedded" rel="nofollow noreferrer">Paho MQTT embedded</a> can be your choice for external devices.</p> </li> <li><p>HiveMQ has a pay-as-you-go licencing policy so you can consider it with care. Anyway you can check out <strong><a href="https://diyprojects.io/8-online-mqtt-brokers-iot-connected-objects-cloud/#.WbxFfYGKHVM" rel="nofollow noreferrer">this page</a></strong> for a list of cloud available and testing available MQTT brokers.</p> </li> </ol>
|mqtt|
MQTT broker accessible from outside without opening port in firewall?
2021
<p>I'd like my MQTT broker to be accessible from outside my home network, but I'm a bit reluctant to open a port in the firewall. And I'd like to avoid using my home IP.</p> <p>It's pretty convenient to have an unencrypted open broker at home, but that doesn't work if I am going to expose it. What other options do I have?</p>
2017-09-11T17:57:39.660
<p>Unfortunately, any Action that is intended to imitate Google Home system functionality is explicitly banned, and the API doesn't really facilitate doing that (not surprising, I suppose, that the API doesn't let you do something that Google doesn't want you to do!):</p> <blockquote> <p>We don't allow actions that <strong>mimic or interfere with device or Assistant functionality</strong>. Examples of prohibited behaviour include:</p> <ul> <li>Using a voice for your action that mimics the Google Assistant's voice.</li> <li>Mimicking system notifications or warnings.</li> <li><strong>Pretending to be Google or another Google action.</strong></li> </ul> </blockquote> <p>(<a href="https://developers.google.com/actions/policies/general-policies#naming" rel="nofollow noreferrer">Actions on Google: Policies for Actions on Google</a>)</p> <p><a href="https://developers.google.com/actions/discovery/#action_invocation" rel="nofollow noreferrer">There is a fixed invocation pattern</a> that Actions use to be invoked, generally. The image in their documentation explains most clearly:</p> <p><a href="https://i.stack.imgur.com/OC4j9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OC4j9.png" alt="Invocation Discovery Grammar" /></a></p> <p><sup>Image from <a href="https://developers.google.com/actions/discovery/#action_invocation" rel="nofollow noreferrer">Actions on Google documentation</a>; <a href="https://creativecommons.org/licenses/by/3.0/" rel="nofollow noreferrer">CC BY 3.0</a>.</sup></p> <p>You can also use <a href="https://developers.google.com/actions/discovery/#providing_good_action_phrases" rel="nofollow noreferrer">action phrases</a>, such as &quot;&quot;hear a fun fact&quot; or &quot;give me a 5 minute workout&quot;, but undoubtedly the Google Action takes precedence to yours.</p> <p>As an aside, it appears <a href="https://www.reddit.com/r/amazonecho/comments/67jrzw/override_alexas_built_in_commands_with_your/" rel="nofollow noreferrer">you can override Alexa Skills</a> in the way you're hoping.</p>
|google-home|google-assistant|
As a software developer, is there a way I can restrict Google Home to only play certain music?
2040
<p>I have a Google Home. As a joke, I would like to program mine to answer any requests to play music with something like "Sorry, I can only play music by Taylor Swift" or some artist or playlist of my choice. I have Spotify premium as my music service. </p> <p>I looked briefly at the Google Home API, and it looks like you can program new actions. Is there some way I can intercept requests for music and filter them with this message?</p>
2017-09-12T09:03:42.863
<p>There are generally 2 ways to control TVs:</p> <ol> <li>IR</li> <li>RS-232</li> </ol> <p>Newer TVs might have Ethernet or Wi-Fi connections available, and also some level of support for CEC. You might be able to control them over the network with a manufacturer-specific app, but probably not via a documented protocol. CEC control was very spotty when it came out. I'm not sure if it's gotten more robust in the past couple of years.</p> <p>There are DIY and commercial options for IR and RS-232. The internet has no shortage of DIY guides for Arduinos and Raspberry PIs over IR.</p> <p>In the Professional AV field, RS-232 control is what's most often used. Basically, you open a telnet session on a com port, spew some commands, and the TV does stuff. The protocol documents for the 232 ports are usually available on the manufacturers website, or as part of a users manual, and there's usually a section for the command protocol. You may need a physical adapter for the RS-232 port. For example, 3.5mm to DB9, or RS-232c to DB9. Keep in mind that RS-232 and network based control gives your program feedback, while IR does not.</p> <p>The OP settled on CEC, but anyone else will need to start with the specific make/model of the TV before you can attempt to figure out what its control options are (IR, 232, network, etc). Commercial TVs always have 232 ports, while residential TVs might or might not.</p> <p>If you want to futz with ProAV stuff, you can usually get it online for pretty cheap. However, the software is harder to come by. Most often, the manufacturer won't give you their free software unless you're in a business relationship with them. Brands to look for: <a href="https://www.savant.com/" rel="noreferrer">Savant</a>, <a href="http://www.crestron.com/" rel="noreferrer">Crestron</a>, <a href="http://www.extron.com/" rel="noreferrer">Extron</a>, <a href="http://www.control4.com/" rel="noreferrer">Control4</a>, or a company that has a booth at <a href="http://www.infocommshow.org/" rel="noreferrer">Infocomm</a> (AV tradeshow).</p> <p>I don't feel like I need a disclaimer, but I do work in Professional AV. Not at any of the companies listed.</p>
|smart-home|software|microsoft-windows|
How can I control my TV from my computer?
2046
<p>I have a TV as secondary PC monitor and console output, and I would like to build something to control it from the PC sources—turning on and off, volume and such. In short, a program to emulate my TV remote control.</p> <p>I have no idea where to start, any suggestion?</p>
2017-09-12T19:33:54.020
<p><em>[disclaimer: I'm a security / crypto professional and deal with security architecture questions like this every day.]</em></p> <p>You have stumbled onto the problem of storing credentials in such a way that an unattended process can access them, but an attacker cannot. This is a well known and very difficult problem to solve.</p> <p>If your IoT device has a hardware keystore built-in to the motherboard, like some TPMs, or the equivalent to the <a href="https://source.android.com/security/keystore/" rel="nofollow noreferrer">Android Hardware-backed Keystore</a> or Apple Secure Enclave, then you can use that.</p> <p>With traditional servers you can use HSMs or Smart Cards, but the only full software solution that I'm aware of is to derive an AES key from some sort of "hardware fingerprint" built by combining serial numbers of all the hardware devices. Then use that AES key to encrypt the credentials. A process running on the same server can reconstruct the AES key and decrypt the credentials, but once you extract the file from the server, it's essentially un-decryptable.</p> <p>IoT throws a wrench into that for two reasons: </p> <ol> <li><p>The assumption that hardware serial numbers are unique probably does not hold, and</p></li> <li><p>Unlike servers, attackers have physical access to the device, therefore can probably get a shell on the device to run the decryption program.</p></li> </ol> <p>Both hardware encryption (TPMs) and "hardware fingerprint" encryption are obfuscation at best because, fundamentally, if a local process can decrypt the data, then an attacker able to run that local process can also decrypt it.</p> <hr> <p>So the standard trick looks like it doesn't work here. The first question you need to need to ask yourself is:</p> <ul> <li>What is my threat model / where does this project sit on the <code>Secure &lt;--&gt; Convenient</code> scale ?</li> </ul> <p>Ultimately, I think you either need to decide that <code>security &gt; convenience</code> and have a human enter the credentials after each boot-up (using something like <a href="https://iot.stackexchange.com/a/2059/4082">@BenceKaulics's answer</a>), or you decide that <code>security &lt; convenience</code> and just put the credentials on the device, maybe using some obfuscation if you feel that makes a difference.</p> <hr> <p>This is a hard problem made harder by the nature of IoT devices.</p> <p>For completeness, the full-blown industrial solution to this problem is:</p> <ul> <li>Give each IoT device a unique RSA public key at manufacture time. Record this public key in a db against the device serial number.</li> <li>Store the sensitive credentials on a proper server, let's call it a "gateway".</li> <li>When an IoT device authenticates to the gateway (using its RSA key), the gateway opens a session for it using the stored credentials and hands the session token back to the device.</li> <li>For best security, the gateway is a physical (or VPN) gateway so that all traffic from the IoT device passes through the gateway and you have more control over firewall rules and stuff - ideally preventing the device from having direct (non-VPN tunneled) access to the internet.</li> </ul> <p>This way, and attacker who compromises a device can get a session opened, but never has direct access to the credentials.</p>
|security|
Can programs loaded onto NodeMCU board be extracted?
2053
<p>I am using a NodeMCU board with WiFi capabilities to build a simple asset tracker. I have managed to find a few Arduino sketches that enables connectivity to Azure IoT Hub and post messages. </p> <p>One of the keys I need to "load" onto the board is the Azure Device Connection string and of course a WiFi SSID and password. </p> <p>My fear is someone might simply take the board and "download" the files to get access to the security credentials. </p> <p>Is my fear unwarranted or is the loss of credentials a real threat I need to mitigate? </p>
2017-09-13T21:07:20.433
<p>If you consider that the internet is a mesh network of sorts, you should see your answer in the broadest terms.</p> <p>Asking is a <em>specific</em> mesh network has any scalability issues is slightly different. There is plenty of scope to architect a modified network protocol to address a specific implementation, with the right sort of optimisations.</p> <p>At some point, you might also want to consider if the mesh approach is best, or maybe a hybrid approach has some value.</p> <p>Factors to consider are:</p> <ul> <li>Latency requirements (related to number of hops)</li> <li>Cross Network bandwidth (e.g. how much traffic crosses from one half to the other, as opposed to just talking to a neighbour). Saturation of key nodes might be a limiting factor.</li> <li>Deployment structure. If you have regularly distributed nodes (e.g. on streetlamps), this is different to a distribution that has sparse areas.</li> </ul> <p>It feels that the example you describe <em>should</em> scale to an apartment block. Any one second shouldn't see more than a handful of data transactions. It might scale to a few blocks, but not a street or city. Proving an architecture at the scale of millions of devices or transactions is hard.</p>
|zigbee|mesh-networks|6lowpan|
Are wireless mesh networks limited to PAN applications?
2068
<p>Reading about Zigbee, I see it <a href="https://en.wikipedia.org/wiki/Zigbee" rel="noreferrer">described as a technology for creating personal area networks</a>. I've also been reading about 6lowPAN, which seems to crop up in mesh settings, cementing the idea, at least in my mind, that mesh is limited to PAN applications.</p> <p>Is there something about mesh networking that makes it inherently limiting in terms of network size?</p> <p>Since I already have some home automation gadgets using Zigbee, I already know that a Zigbee network is good at least for an apartment sized wireless network with ten to fifteen nodes.</p> <p>If I extended my Zigbee network to, say, provide smart lighting for an apartment block of 100 apartments, would I start to feel some limitations?</p>
2017-09-13T22:48:25.923
<p>It is actually possible to allow for sleeping nodes without the need for time synchronization. The basic idea is to send a message multiple times until the node finally wakes up. There is of course a lot of room for clever optimization, so there are hundreds of MAC layer approaches based on this idea.</p> <p>But since your question specifically asks for MAC layers, where a node knows when to transmit in advance, i.e. Time Division Multiple Access (TDMA), I will focus on those approaches.</p> <p>As you already mentioned, one problem is clock drift, so the devices have to wake up regularly for time synchronization. In the typical short-range wireless applications we are talking about, signal propagation duration itself over a single hop is not a big problem. So it is sufficient that a central coordinator sends a beacon, including the current time, in regular time intervals that are known to the nodes.</p> <p>In a multi-hop network it gets more complicated. Just forwarding the beacon will not work, because the latency is too high. The solution is that multiple (if not all) nodes send beacons, i.e. receive a beacon from a node closer to the coordinator, correct the own clock drift with it and send out an own beacon with the corrected time. You just have to avoid building circles (been there, done that....).</p> <p>Since now every node in the network has the same notion of time, there is a second problem: How does a node know when he should wake up to transmit or receive? There are basically four approaches, that can also be combined:</p> <ul> <li><p><strong>Common Slot</strong>: All nodes wake up at the same time and use a contention based access method to transmit their packets <em>Advantage</em>: Easy (if you know how to do CSMA/CA). <em>Disadvantage</em>: Prone to collisions, lower throughput.</p></li> <li><p><strong>Predefined</strong>: For a restricted number of nodes you can just assign fixed slots to the nodes. For example, node 2 can send to node 1 in the first timeslot and node 3 can send to node 2 in the second timeslot. <em>Advantage</em>: Dedicated slots and no collisions. <em>Disadvantage</em>: The topology has to be fixed (very difficult in wireless mesh networks).</p></li> <li><p><strong>Centralized</strong>: A central coordinator requests information from the nodes about the topology, calculates a global schedule and distributes it again to the nodes. <em>Advantage</em>: No predefined topology required. <em>Disadvantage</em>: Scales poorly and is prone to topology changes (the whole process has to be restarted).</p></li> <li><p><strong>Decentralized</strong>: Two nodes that want to communicate negotiate the slot themselves. It is quite complex, because they have to make sure no neighboring devices transmit at the same time. <em>Advantage</em>: Scales well because the negotiation is local. <em>Disadvantage</em>: Complex to implement.</p></li> </ul> <p>There are two related techniques included in the IEEE 802.15.4 standard that currently find much research attention: TSCH and DSME.</p> <p>TSCH itself is quite basic. It only solves the time synchronization problem, but leaves the slot assignment problem for an upper layer. There is 6TiSCH that tries to fill this gap, but it is still work-in-progress. There are implementations, for example included in <a href="http://www.contiki-os.org/" rel="noreferrer">Contiki</a> or <a href="https://openwsn.atlassian.net/wiki/spaces/OW/overview" rel="noreferrer">OpenWSN</a>.</p> <p>DSME on the other hand already provides a mechanism for decentralized slot negotiation. We have actually build an open-source implementation of this called <a href="http://opendsme.org/" rel="noreferrer">openDSME</a>. While there is a video tutorial for running a simulation, the hardware implementation is unfortunately still underdocumented. Ask another question or contact us directly if you want to use it.</p>
|zigbee|power-consumption|mesh-networks|
Is wireless mesh a poor choice for sleepy devices?
2069
<p>I've been thinking about what it would take to build a temperature sensor network for the block of apartments I live in. A wireless mesh, <a href="https://iot.stackexchange.com/q/2068/2225">if it would work at all</a>, would have some nice features. In particular, I could place sensors in the garage and cellar storage areas where no mobile or Wi-Fi signals would otherwise reach.</p> <p>A possible reason not to use mesh is that I would probably also want to use sleepy end devices to avoid changing batteries often. From what I can see, the only way this is going to work is with clock synchronisation so that the devices wake up at the same time and long enough for the signal to propagate through the network. </p> <p>While I've heard such a solution described, I wonder how well that would work out in practice. Presumably periodic clock synchronisation needs to be added to the protocol to avoid drift. Does anyone have experience with this, and are there other strategies for using mesh and sleepy devices together apart from clock sync?</p>
2017-09-13T23:31:23.877
<p>I had an Ubuntu system with X10, CM11A, and heyu for several years and switched it all over to a Raspberry Pi about 4 years ago. I then replicated it twice for my parents, and a sibling.</p> <p>It can be a pain to get it all working, but once it does, it's great.</p> <p>I have Python scripts that follow the heyu log files to generate alarms. Other scripts use heyu for control.</p>
|raspberry-pi|mesh-networks|
Sensor using X10 power line protocol connection to Raspberry Pi
2071
<p>I'm on connecting my Raspberry Pi 3B board with <a href="http://www.ebay.com/itm/X10-EagleEye-Motion-Sensor-Indoor-Outdoor-MS14A-New-No-Box-30-day-Warranty-/282373088489?_trksid=p2349526.m2548.l4275" rel="noreferrer">X10 EagleEye Motion Sensor</a> using <a href="https://rads.stackoverflow.com/amzn/click/B00VQZ62RS" rel="noreferrer">X-10 CM11A ActiveHome</a> Serial interface. </p> <p>Can anybody share a library(C/C++, Java, Python) or open source tool used to control <a href="https://en.wikipedia.org/wiki/X10_(industry_standard)" rel="noreferrer">X10 power line</a> sensors with X-10 CM11A and Raspberry Pi?</p>
2017-09-14T15:56:18.137
<p>You say you built a Zigbee network using Digimesh protocol. The thing is that this is an impossibility: Zigbee and Digimesh are competing solutions for mesh network, not something you use together.</p> <p>See this link: <a href="https://www.digi.com/blog/networking/what-are-the-differences-between-digimesh-and-zigbee-mesh/" rel="nofollow noreferrer">Digimesh manufacturer explains the difference between Zigbee and Digimesh</a></p> <p>Digimesh uses Sleep Modes 7 and 8 whereas Zigbee uses 4 and 5. Have you accidentally changed to use Zigbee instead of Digimesh? That would be the reason why you don't see SM 7 and 8 anymore. </p> <p><strong>Edit:</strong></p> <p>Looking docs of XB24c they have now also adopted SM numbers 4 and 5.</p> <p>Look: <a href="https://www.digi.com/resources/documentation/digidocs/pdfs/90001506.pdf" rel="nofollow noreferrer">https://www.digi.com/resources/documentation/digidocs/pdfs/90001506.pdf</a></p>
|zigbee|mesh-networks|
ZigBee sleep problem
2075
<p>I recently built a XBee network (using Firmware version 9000 of Digimesh 2.4 TH function set of XB24c family). Currently I use the DTR pin to put XBee to sleep, and this configuration works perfectly. But I read that this is not a good solution as the mesh must be made again when a node leaves or joins network.</p> <p>DigiMesh 2.4 allows an Sleep mode with SM=7 or SM=8 where they sleep synchronously. When updating the firmware with XCTU, it does not show SM 7 and 8 options. </p> <p>Is there any other thing I should set, or is there something else I am missing?</p>
2017-09-17T02:31:47.050
<p>Check this out: <a href="https://github.com/martin-ger/uMQTTBroker" rel="nofollow noreferrer">https://github.com/martin-ger/uMQTTBroker</a></p> <p>It probably won't be as powerful as an Raspberry pi but it gets the job done.</p>
|smart-home|mqtt|esp8266|
Can I use an ESP8266 as an MQTT broker?
2088
<p>I am making a home automation project based on star topology. What I am trying to achieve is that one of the nodemcu/ESP8266 acts as a server which is accessible for the outside world and other nodemcu/ESP8266 acts as clients which are connected to relays or sensors.</p> <p>Upon receiving the command from the server, the relays must be triggered accordingly and update the status back to the server. I read lots of tutorial via different methods. MQTT seems good but I don't want to use any third party broker like Adafruit. I want to host the web server either on my nodemcu or my web host. The sad part is I don't own a Raspberry Pi. </p> <p>Can I use one of my ESP8266 devices as an MQTT broker, or is there a suitable alternative?</p>
2017-09-17T15:17:08.383
<p>The answer is no and yes.</p> <p>Flows in node-red are pretty static, there is no notion of instantiating a flow when the first requests comes in such that you might have an instance of a flow per request.</p> <p>There is also no built-in notion of a session that would allow you to associate messages flowing through flows with a session.</p> <p>However, you can relatively easily construct these things yourself. Node-red provides a notion of flow and global state, which is accessed using the <code>flow</code> and <code>global</code> objects, see <a href="https://nodered.org/docs/writing-functions#storing-data" rel="nofollow noreferrer">https://nodered.org/docs/writing-functions#storing-data</a>. What you would do is send a cookie to clients and then explicitly associate an incoming request with saved global or flow state. You can then write code that is "session aware" based on the saved session state. This works well in function nodes, but you will hit some issues with the built-in nodes that do things like rate limit or split &amp; merge messages because these are not generally aware of the session notion.</p> <p>In the pizza example you would maintain the state of an order in the flow or global context and you would access the appropriate order's state based on the cookie value.</p>
|software|system-architecture|visualization|node-red|
Does Node-Red support multi-request flows (i.e. sessions)?
2092
<p>I gave <a href="https://nodered.org" rel="noreferrer">Node-Red</a> a short test-run this week. It is not clear to me whether it supports flows that encompass more than one request. Does Node-Red have a request-per-flow or a session-per-flow model?</p> <p>Having worked with data-flow based programming tools for <a href="https://en.wikipedia.org/wiki/Business_process_modeling" rel="noreferrer">Business Process Modeling</a> (webMethods and Tibco), I see one of their key features is the ability to model sessions and workflows. These tools are, however, rather large for the purposes of most IoT projects so it would be great if something similar could be accomplished with Node-Red.</p> <p>A follow-up question, in case Node-Red does not support this, is whether there are some simple tools that <em>do</em> support graphical modeling of session flows?</p>
2017-09-17T17:06:58.083
<p>The Z-Wave Alliance have <a href="https://z-wavealliance.org/z-wave_plus_certification/" rel="noreferrer">a page explaining the differences</a> pretty nicely:</p> <blockquote> <p>Z-Wave Plus™ is a new certification program designed to help consumers identify products that take advantage of the recently introduced 'Next Gen' Z-Wave hardware platform, also know as 500 Series or 5th Generation Z-Wave. [...]</p> <p>With the introduction of the Next-Gen, Z-Wave 500 series hardware platforms, Z-Wave saw its ecosystem bolstered with new capabilities, including increased range, extended battery life, Over The Air upgrading (OTA), additional RF channels and more — all of which are fully backwards compatible with existing Z-Wave products. [...]</p> <p><strong>Features</strong></p> <ul> <li>50% improvement in battery life</li> <li>67% improvement in range</li> <li>250% more bandwidth</li> <li>Three RF channels for improved noise immunity and higher bandwidth</li> <li>New Plug-n-Play Network-wide Inclusion feature</li> <li>Improved self-healing and fault tolerance with Explorer Frame feature</li> <li>Standardized method for Over the Air firmware updates (OTA)</li> <li>Improved product information capture for product certification database</li> </ul> </blockquote> <p>Some miscellaneous differences are noted in a <a href="https://www.techhive.com/article/2031180/sigma-designs-announces-next-gen-z-wave-home-control-product-family.html" rel="noreferrer">TechHive report</a>:</p> <blockquote> <p>The new chips also boast dramatically smaller packages. Sigma’s SD3502, for instance, is a general-purpose Z-Wave system-on-a-chip that integrates a microcontroller, RF transceiver, 128-bit AES security engine, and memory in a package that measures just 7mm square.</p> </blockquote> <p>From the perspective of a consumer, Z-Wave Plus' main benefits are battery life and range. Many hubs (e.g. <a href="https://support.smartthings.com/hc/en-gb/articles/115003226203-SmartThings-Hub-Miscellaneous-FAQ#zwaveplus" rel="noreferrer">SmartThings</a>) already support Z-Wave Plus, and many sensors and other nodes support it too. The Z-Wave Alliance <a href="https://z-wavealliance.org/z-wave_plus_faq/" rel="noreferrer">claim</a> that Z-Wave Plus devices generally won't cost a lot more, either, so in that case, it's probably beneficial to pick Z-Wave Plus <em>if possible</em>.</p> <p>As a developer, the OTA updates and smaller chip are likely to be useful. I can't say much about the technical details, because the <a href="http://z-wave.sigmadesigns.com/design-z-wave/z-wave-quick-start-guide/" rel="noreferrer">specifications</a> are secured and require the signature of a non-disclosure agreement. If anyone has any additional information, I'd be interested to hear.</p>
|zwave|
What's the difference between Z-Wave and Z-Wave Plus?
2095
<p>What are the technical differences between Z-Wave and its Plus alternative? Is Plus just a stronger signal?</p>
2017-09-17T20:09:01.083
<p>Azure IoT Hub has a concept of direct methods:</p> <blockquote> <p>IoT Hub gives you ability to invoke direct methods on devices from the cloud. </p> </blockquote> <p>This is implemented over MQTT (AMQP is not supported), where </p> <blockquote> <p>Devices receive direct method requests on the MQTT topic: </p> </blockquote> <pre><code>$iothub/methods/POST/{method name}/?$rid={request id}. </code></pre> <p>They've wrapped this in their SDK, so developers don't need to worry about specifically monitoring the topic. You could implement a similar approach.</p> <p>As per other answers, pub-sub does not lend itself to RPC, and there are not any standards, as far as I'm aware.</p> <p>More documentation is <a href="https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-direct-methods" rel="nofollow noreferrer">here</a>.</p>
|mqtt|standards|
Is there a standardized RPC mechanism for MQTT?
2097
<p>Over on Stack Overflow there is <a href="https://stackoverflow.com/q/20483012/224380">a question</a> about implementing request/response interaction over MQTT. As one answer notes, you can do it by publishing the request on one topic and listening for the response on another token that was included in the request. It's a little awkward, but it works.</p> <p>As MQTT is used extensively throughout IoT, I wonder, have there been any attempts to standardize this RPC type interaction for the sake of interoperability?</p>
2017-09-19T12:54:51.567
<p>Xtensa have just released an official ESP32/Espressif LLVM backend and clang front end. See their announcement here: <a href="https://esp32.com/viewtopic.php?p=38466" rel="noreferrer">https://esp32.com/viewtopic.php?p=38466</a> Repos: <a href="https://github.com/espressif/llvm-xtensa" rel="noreferrer">https://github.com/espressif/llvm-xtensa</a> &amp; <a href="https://github.com/espressif/clang-xtensa" rel="noreferrer">https://github.com/espressif/clang-xtensa</a> As rust is based on LLVM, this new ESP32 LLVM backend should help make Rust support for the ESP32 more likely. The announcement even hints at this future Rust support.</p>
|esp32|
Working with Rust on the ESP32
2102
<p>I would like to build a gateway device which will use the ESP32. This should connect to the ModBus TCP port of a Sensor. For this purpose, I would like to use the Modbus Rust implementation, which already exists. But there is very little information on how I could get Rust code running on the ESP32. </p> <p>Can anyone shed some light on this topic?</p>
2017-09-19T18:13:07.960
<p>That is one of the many problems with IoT devices: The operating systems are proprietary, and you do not have root access to them. Furthermore, disabling kernel modules is generally too complex for most users. </p> <p>Additionally there's a large number of models, and updates typically stops before the end of life for the product, leading to unpatched code in the wild. As they are internet connected, they may be attacked remotely, and may even participate in new attacks, as they are in essence full computers with a network stack.</p> <p>Bruce Schneier has written a good <a href="https://www.schneier.com/blog/archives/2017/10/iot_cybersecuri.html" rel="nofollow noreferrer">essay about IoT security</a> where he hilights many of these problems.</p> <p>So TL;DR: As a consumer, there's nothing you can do.</p>
|security|bluetooth|
How to secure a Samsung Smart Refrigerator against BlueBorne?
2106
<p><a href="https://www.armis.com/blueborne/" rel="noreferrer">Armis Labs</a> lately revealed a new attack vector that attacks essentially all major OS including those used on IoT devices via Bluetooth. BlueBorne is reported to spread malware laterally to adjacent devices - which sounds pretty much like an IoT nightmare to me.</p> <p>According to Armis Labs' website the Linux based Tizen OS, a consumer-oriented platform for things like smart refrigerators, is affected. Things like my<sup>1</sup> Samsung RB38K7998S4/EF are supposedly vulnerable. </p> <p>Given that any official patch to fix the bug may take Samsung some time, how can one secure the refrigerator meanwhile against BlueBorne?</p> <p>Is it possible to completely disable Bluetooth as a mere user? I.e. can one blacklist the core Bluetooth modules, disable and stop the Bluetooth service, and remove the Bluetooth modules as outlined in this general Linux question (<a href="https://unix.stackexchange.com/a/392008/82256">How do I secure Linux systems against the BlueBorne remote attack?</a>)?</p> <hr> <p><sup>1: Just kidding of course, I would not buy a fridge worth 3+ k€... but the question still stands.</sup></p>
2017-09-20T04:12:22.590
<p>Yes you could add a relay that disconnect the telephone wires and control that with a IoT device or ex. a Arduino with a a GSM module like SIM800/900 and control the relay.</p>
|smart-home|
How to control my telephone via Mobile/IoT?
2107
<p>I have a telephone at home which is an electronic instrument connected via wire.</p> <p>It is not a cordless but a corded phone comes with a telephone wire.</p> <p>Is there a way to lock or unlock it via mobile or IoT? A telephone code can be used to lock the phone. However if I forget to do it then how to do it?</p>
2017-09-21T14:35:06.320
<p>Tor seems overkill for what you're trying to do. If you want to prevent sniffing of data on the network, simply communicate with the server using SSL by installing a certificate on the server. You may also want to pay more attention to firewall rules to block incoming traffic using </p> <blockquote> <p>netsh advfirewall firewall</p> </blockquote> <p>The pi is not very secure if anyone can get physical access as the SD card can be removed/replaced, so Tor won't help you much there. With physical access, it is possible for someone to get access to the token that you use for the service - it may be difficult but they could find it on the SD card.</p>
|security|raspberry-pi|microsoft-windows-iot|azure|
Creating a Tor 'hidden service' on Windows IoT Core
2116
<p><strong>The Background</strong></p> <p>I'm prototyping some basic home automation software using Windows IoT Core and Azure.</p> <p>I have built a Windows Universal Application that sends data to a Web App hosted in Azure via Web API. (token based auth)</p> <p><strong>The Problem</strong></p> <p>I don't want people sniffing my network and trying to breach either the Pi or the WebApp/database!</p> <p><em>- The data sent via API is very sensitive and should be untraceable.</em></p> <p><strong>Is it possible? If so, how?</strong></p> <p>I've done some research into ways to secure a Pi by creating a 'Tor Hidden Service'.</p> <p><a href="https://www.youtube.com/watch?v=iKBKtDbhDko" rel="nofollow noreferrer">This video</a> explains how to set up a <em>Hidden Service</em> when running a LINUX based OS.</p> <p><strong>THE QUESTION</strong></p> <p>How would you go about creating a Tor Hidden Service in Windows IoT Core, and route the Universal Application traffic through Tor to Azure?</p>
2017-09-22T15:26:28.500
<p>Oh man, don't ask me how but I think I figured it out.</p> <p>Let's have a look:</p> <p><a href="https://i.stack.imgur.com/Ri0cG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ri0cG.png" alt="enter image description here"></a></p> <p>Basically you split the data up into packets of 4 bits each. You then concat each first, second, third and fourth letter together separately. This can be seen in the 1, 2, 3 and 4 columns. Afterwards you count the 1s in each of them (the number of ones is written beside each of them). If they are even it's a 0 for the parity bit, if they are odd it's a one. So before you are finished you now have to binary add 1 to the result from before (!). That matched every single time and I was successfully able to generate my own frames that way. Problem solved it seems. Perfect. Thanks a lot everybody for contributing.</p>
|smart-home|data-transfer|interfacing|
Parity calculation problem
2123
<p>I’ve been doing a fair bit of DIY home automation (RF; 433MHz) lately across many different devices - which worked well for all except one. It's basically a pool robot with some really crappy remote control.</p> <p>I collected some data using a BladeRF SDR and GNU Radio. The &quot;other 3&quot; column is basically the action, while &quot;other 1&quot; seems to be some serial and &quot;other 2&quot; defines the robot if you have multiple in use I guess (some friend of mine who has the same has a different value there). I'm not sure what purpose the count suits but I would guess it's so the robot knows when the range gets too wide eventually (missing some information?). I've narrowed down the bytes and their meanings, however I fail at calculating the correct CRC (checksum) for the data.</p> <p>OLD - PLEASE SEE UPDATE BELOW!!</p> <p>Here is some sample data:</p> <pre><code>&lt;other1 &gt; &lt;other2&gt; &lt;other3&gt; &lt;count &gt; &lt;crc &gt; 10110100 00111110 10001111 11001000 00000001 11110111 01011110 10110100 00111110 10001111 11001000 00000001 11111000 01010011 10110100 00111110 10001111 11001000 00000001 11111001 01010100 10110100 00111110 10001111 11001000 00000001 11111010 01010001 10110100 00111110 10001111 11001000 00000001 11111011 01010010 10110100 00111110 10001111 11001000 00000001 11111100 01010111 10110100 00111110 10001111 11001000 00000001 11111101 01011000 10110100 00111110 10001111 11001000 00000001 11111110 01010101 10110100 00111110 10001111 11001000 00000001 11111111 01010110 10110100 00111110 10001111 11001000 00000001 00000000 01100111 10110100 00111110 10001111 11001000 00000001 00000001 01101000 10110100 00111110 10001111 11001000 00000001 00000010 01100101 10110100 00111110 10001111 11001000 00000001 00000011 01100110 10110100 00111110 10001111 11001000 00000001 00000101 01100100 10110100 00111110 10001111 11001000 00000001 00000111 01100010 added data: 10110100 00111110 10001111 11001000 00000010 00000110 01100100 10110100 00111110 10001111 11101010 00000010 01100101 10011010 10110100 00111110 10001111 11101010 00000001 01100100 10011100 10110100 00111110 10001111 11101010 00000001 01100011 10011101 10110100 00111110 10001111 11101010 00000001 01100110 10011010 </code></pre> <p>There is a count for each request that must be changed and some commands to be sent, e.g. the &quot;other 3&quot; column could read 00000010 instead of 00000001.</p> <p>It would be very helpful if somebody could give me some hints on where to look at. I've tried different techniques like XOR across the bytes or calculating modulo etc. - I even tried different CRC algorithm brute force tools - unfortunately to no success yet.</p> <p>EDIT: I've put the data into excel and added some function (it basically compares each 4 bit with the ones from above - the last transmission). I've done that as I recognized the CRC stayed the same once. This was the case when both action and count were raised by 1. Please have a look:</p> <p><a href="https://i.stack.imgur.com/oXCyU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oXCyU.png" alt="data" /></a></p> <p>UPDATE:</p> <p>I've found some other more detailed spec. from the same vendor on the net after searching for hours and it came out the so thought CRC is in fact a parity. I also fine tuned my gnu radio capture flowgraph and collected some new data. Please disregard the data above and have a look here:</p> <pre><code>other 1&gt; other 2 &gt; other 3&gt; other 4 &gt; parity 10110100 001111101000111111101010 00000001 011110101001 0101 10110100 001111101000111111101010 00000001 011110111001 0110 10110100 001111101000111111101010 00000001 011111001001 0011 10110100 001111101000111111101010 00000001 011111011001 0100 10110100 001111101000111111101010 00000010 011111101001 0100 10110100 001111101000111111101010 00000010 011111111001 0011 10110100 001111101000111111101010 00000010 100000001001 0011 10110100 001111101000111111101010 00000010 100000011001 0100 10110100 001111101000111111101010 00000001 100000101001 0100 10110100 001111101000111111101010 00000001 100000111001 0011 10110100 001111101000111111101010 00000001 100001001001 0110 10110100 001111101000111111101010 00000001 100001011001 0101 10110100 001111101000111111101010 00000010 100001101001 0101 10110100 001111101000111111101010 00000010 100001111001 0110 10110100 001111101000111111101010 00000010 100010001001 1011 10110100 001111101000111111101010 00000010 100010011001 1100 10110100 001111101000111111101010 00000001 100010101001 1100 10110100 001111101000111111101010 00000001 100010111001 1011 10110100 001111101000111111101010 00000001 100011001001 1110 10110100 001111101000111111101010 00000001 100011011001 1101 </code></pre> <p>And here is it again as fancy excel:</p> <p><a href="https://i.stack.imgur.com/cUDBM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cUDBM.png" alt="enter image description here" /></a></p> <p>Does anybody know how to calculate that parity? I've tried splitting the data etc. and using usual parity calculations but unfortunately with no success yet.</p>
2017-09-25T12:29:04.027
<p>Personally I use an Arduino for prototyping an IoT idea. There are far fewer overheads to getting a basic concept up and running plus the licenced 3rd party boards are extremely cheap. Once the idea has been proven I then migrate it over to a Pi, which in itself is a challenging activity. There are probably people out there who do it the other way round but from a hardware perspective, Arduino always wins for me as it's had built in analogue to digital capability (something sadly lacking from the Pi). </p>
|hardware|
Arduino Uno Vs Raspberry Pi
2133
<p>There are two common platforms which seem very common for IoT projects: Arduino Uno and Raspberry Pi. How would I decide which one would be most suitable for a specific project?</p> <p>I haven't got a specific problem in mind, rather I'm trying to understand what the difference between these types of product are, and how I should go about starting to chose the best hardware for building a project if I want to do it 'right'.</p> <p>To clarify on the 'different models of Raspberry Pi', this question is more about the OS that the platform runs, Bare-metal/RTOS, or a conventional Linux distribution. Accept that within both SBC and MCU categories, there is a large spread of performance and peripherals to chose from in focusing on any one precise device.</p>
2017-09-29T07:58:15.020
<p>This is now possible with the <a href="https://www.cnet.com/news/google-home-continued-conversation-setting-keeps-the-mic-hot/" rel="nofollow noreferrer">continued conversations feature</a> is deployed, announced at Google I/O 2018.</p> <p>If continued conversations are enabled on your Google Home, the microphone will continue to listen for 8 seconds after the reply (or until you say "thank you", if you wish to prematurely stop it listening). A demonstration of the new flow is avaiable <a href="https://www.androidpolice.com/2018/05/08/google-assistant-gets-conversational-will-soon-listen-consecutive-requests/" rel="nofollow noreferrer">here, at AndroidPolice</a>, where it's demonstrated that the following conversation could work:</p> <blockquote> <p>Hey Google, did the Warriors win?</p> <p><em>Yes, the Warriors won 118 to 92 last Sunday against the Pelicans.</em></p> <p>Nice, when's their next game?</p> <p><em>The Warriors' next game is today at 7:30pm, where they will be playing the Pelicans.</em></p> </blockquote>
|google-home|google-assistant|
How to ask Multiple questions to Google Home
2147
<p>I would like to set up the assistant so that I can have a conversation with it.</p> <p>Right now, it gives :</p> <ul> <li>"Hey Google, what is the weather forecast for tomorrow in HongKong?"</li> <li>"Tomorrow in Hong Kong, it will be rainy with a max of 35°C and a min of 29°C"</li> <li>"<strong>Hey Google,</strong> what about the weather forecast for sunday?"</li> <li>"Sunday, it will be sunny with a max of 35°C and a min of 29°C"</li> <li>"<strong>Hey Google,</strong> what was the maximum temperature today?"</li> <li>"Today, the maximum temperature was 35°C"</li> </ul> <p>I would like to find a way so that I do not need to say the trigger word every time, that would then give.</p> <ul> <li>"Hey Google, what is the weather forecast for tomorrow in HongKong?"</li> <li>"Tomorrow in Hong Kong, it will be rainy with a max of 35°C and a min of 29°C"</li> <li>"What about the weather forecast for sunday?"</li> <li>"Sunday, it will be sunny with a max of 35°C and a min of 29°C"</li> <li>"What was the maximum temperature today?"</li> <li>"Today, the maximum temperature was 35°C"</li> </ul> <p>Is that possible? if yes, can I set the delay during which the Google home remains listening.</p>
2017-09-29T19:28:57.030
<p>If you are using wiz connected lights then this (<a href="https://extensions.gnome.org/extension/4436/wiz-light/" rel="nofollow noreferrer">Control Wiz Connected Lights Through Gnome Shell</a>) Gnome shell extension can help you out.</p>
|smart-home|wifi|linux|lighting|
Is there a way to control my lights from my Linux desktop?
2150
<p>I have just started investigating smart lights.</p> <p>I am interested in using some Wi-Fi sockets in some lamps in my office to automate the lights.</p> <p>I am curious if there is a way to turn my lights on from my PC, and ultimately turn them on when my Linux machine wakes from suspension. Then turn them off when the Linux machine suspends.</p> <p>Are there Wi-Fi sockets that use a certain messaging protocol that is open, for which I could write an app to use with them?</p>
2017-10-02T16:30:26.580
<p>Yes, Windows 10 IoT runs on any x86 or x64 processor running faster than 400 Mhz and 256 MB of RAM. The SoC compatibility list is for the unusual and non-x86 processors that it supports.</p> <p>Windows IoT Core only supports running a single UWP app that launches at startup, which could work for your webserver use. IoT Enterprise supports a more typical Windows desktop experience. </p> <p>Windows 10 Home is less resource intensive than Win 7 and usually performs about as well as Windows XP, which as released in 2001, so if your machine is &lt; 15 years old then plain old Windows 10 should function on it.</p> <p><a href="https://docs.microsoft.com/en-us/windows-hardware/design/minimum/minimum-hardware-requirements-overview#a-href-idiotcoreasection-50---minimum-hardware-requirements-for-iot-core" rel="noreferrer">Windows IoT Hardware Requirements</a></p>
|microsoft-windows-iot|
Windows 10 IoT on "regular" PC?
2160
<p>Is it possible to install and run Windows 10 IoT on an "regular" workstation/device/PC? With this I'm talking about an old laptop which I want to use as an IoT Device just running a website (or maybe an app) [display unit of my smart home system] but don't need all the overhead from Windows itself.</p>
2017-10-02T18:49:15.377
<p>Requirements: Multiple rooms, spotify, airplay mini-jack.</p> <p>Functionalities: Activating speakers on presence/motion. Playing Spotify when you get home.</p> <p>This is actually a very broad question that can have a very broad set of answers. However, let me explain how I would do this.</p> <hr> <p><strong>Audio</strong></p> <p>For up to about 4 rooms, you could use an amplifier that has different "zones". Be sure to get an amplifier that has an open API.</p> <p>You can wire the speakers up that each "zone" is connected to one room. And you can simply control the volume for each room to when you walk in/out.</p> <p>If you have multiple amplifiers, you can use the output of one amplifier as an input to the other amplifier. Then you'll have to switch to the correct inputs when changing rooms.</p> <p>Another option could be using a setup like "MusicCast" where one amplifier streams his music to others. But I haven't yet found a fancy way to control MusicCast.</p> <hr> <p><strong>Motion detection</strong></p> <p>There really are hundreds of devices for this. You could get an ESP8266 (wifi module) and hook up an PIR module. If you program the ESP8266 to send a volume "80%" command to the amplifier whenever it registers motion (and send mute when it doesn't register for quite some time) you have a very cost effective setup.</p> <p>However, you should look into having a central (Home automation) server to parse all inputs and control the amplifiers, because the behaviour will be easier to change through the servers' interface as when you're using dedicated modules themselves.</p> <p>I would suggest using Node-red with Yamaha or Denon modules and MQTT. Your motion sensors would publish MQTT messages for it's motion. node-red will parse them and apply logic, to control the amplifier. This way you can "reprogram" your logic, withouth having to reprogram the ESP8266's. Or you could more easily integrate an app (there are a lot of MQTT button apps).</p> <hr> <p>I must note that the company I work for is affiliated with Yamaha and thus my answer may be a bit biased. But you should always opt for an amplifier that has an open API (Denon's have it as well) if you want to control the amplifier over IP.</p>
|smart-home|audio|sound|
Creating smart multi-room audio system
2162
<p>I want to build an audio system for my apartment, that would have speakers in multiple rooms, and that would activate corresponding speakers automatically upon entering a room. It would have to be connected to Spotify, AirPlay and support mini jack input. </p> <p>Is this possible? Is there some system that has this implemented already (I saw Sonos has multi-room support, but not the automation that I think of). I can do some coding if needed. </p> <p>The ideal scenario would be system made of some motion/infrared sensors, that would remember which ones activated in what order, therefore it can memorize if there is somebody in the room or not. I think I'll choose HomeKit for my system, so I expect that it will be able to start playing Spotify playlist automatically on some HomeKit trigger. The example of the above system is: I listen to a podcast in the living room, but when I go to the bathroom is starts playing there as well, as long as I'm there.</p> <p>A project expanding this one I have in mind, is automatically playing a specific Spotify playlist when I get home. </p>
2017-10-04T10:52:10.447
<p>You have already capability to publish data over MQTT protocol, even a broker and way to forward certain requests to Spring from the socket.</p> <p>I see no point of taking the responsibility of knowing whether socket is plugged for some requests for Spring. MQTT broker does that under the hood, you don't have to invent the wheel again.</p> <p>So, I would create some more publishers and subscriptions to Spring and socket and use MQTT as the protocol there, not touching to http this time at all. </p>
|system-architecture|smart-plugs|
Server to handle connections with smart sockets
2170
<p>Right now I'm working on architecture for application that will manage smart sockets and I need advice. This is what I have for now:</p> <p><a href="https://i.stack.imgur.com/b1HdO.png" rel="noreferrer"><img src="https://i.stack.imgur.com/b1HdO.png" alt="system architecture"></a></p> <p>I'm not sure how to handle connection between Spring and smart socket (I want to be able to turn on/off socket from my web app). I communicate with my sockets via HTTP. My idea is to have server that will manage connections and commands between Spring and sockets:</p> <ol> <li>When socket will be turned on, it will try to connect to the server.</li> <li>Server will wait for new connections from smart sockets, to save them. Also it will wait for commands from Spring to change state of the socket.</li> </ol> <p>Is it a good idea? If yes, is there any tool that will help me do that (maybe build in in Spring), or should I write it on my own?</p>
2017-10-07T15:31:31.197
<p>As far as I can tell from the documentation, the Echo Plus will at least have a ZigBee radio and the ability to act as a hub for those devices, according to <a href="https://www.amazon.co.uk/b?node=14178233031" rel="noreferrer">Simple setup devices compatible with Echo Plus</a>:</p> <blockquote> <p>Echo Plus has a built-in hub that seamlessly connects and controls ZigBee smart devices such as light bulbs and plugs without the need for separate hubs or apps. With simple setup, connecting Echo Plus to the devices below is easy. Just say &quot;Alexa, discover my devices&quot; and Echo Plus will discover and set up your devices.</p> <p>Like other Echo devices, Echo Plus can connect to hundreds of Wi-Fi and Bluetooth smart home devices with the Alexa app, such as lights, outlets, TVs, thermostats, cameras, and more. Shop all smart home products.</p> </blockquote> <p>It sounds like the software will also be upgraded to match expectations of a smart hub, according to the <a href="https://www.amazon.co.uk/dp/B075RLRGB5/ref=s9_acss_bw_cg_ASHBan_2a1_w?pf_rd_m=A3P5ROKL5A1OLE&amp;pf_rd_s=merchandised-search-1&amp;pf_rd_r=WD29793P3VND6VGSQK7G&amp;pf_rd_t=101&amp;pf_rd_p=404cb02b-efa2-40cf-8045-3204afe3c8bf&amp;pf_rd_i=11385940031" rel="noreferrer">info page</a>:</p> <blockquote> <p>Group multiple actions together at scheduled times or with a single voice command, like securing your home by locking the doors and turning off the lights when you go to bed.</p> </blockquote> <p>The scheduling and grouping would seem to reduce the need for a hub if you're just setting up a basic home automation system.</p> <hr /> <p>For you, if you're hoping to control lights, it <em>might</em> be worth having an Echo Plus. Some of the <a href="https://www.amazon.co.uk/b?node=14178233031" rel="noreferrer">lighting</a> devices that support the new 'simple setup' might be interesting to you, particularly if you don't already have any hubs set up. However, many smart lights and switches are already compatible with the original Echo, so check with the products you're interested in to see if they'd benefit from an Echo Plus.</p>
|smart-home|alexa|amazon-echo|
What is the difference between Echo and Echo Plus?
2180
<p>I wonder what the difference between the Amazon Echo and the Echo Plus is. Of course I know that the Echo Plus has a Smart Home Hub integrated but for what exactly is it? I can not find any information about that on the internet.</p> <p>I am asking because I want to buy an Amazon Echo/Plus for some simple automation tasks which involve, for example, switching the lights on and off or playing music. It would also be great if I could regulate my heater and so on when I am not at home.</p> <p>Do I need the Plus version or is the normal version suitable for my purposes?</p>
2017-10-08T07:26:04.990
<p>You can</p> <ul> <li>program the UART to not use handshaking,</li> <li>or even use software handshaking.</li> <li>or connect them permanently to GND.</li> </ul> <p>But for high speed and reliable communication, its best to use the handshaking lines.</p>
|microcontrollers|linux|microsoft-windows-iot|intel-galileo|
Is it okay to use the 4 pin USB TTL cable instead of the recommended 6 pin USB TTL cable for Intel Galileo?
2184
<p>I have only the 4 pin USB TTL cable which has the Rx, Tx, Vcc and GND pins. The 6 pin includes the CTS and RTS pins also, and is specified for use with Intel Galileo board. My question is if I can still use it for normal serial data communications and what will be the difference?</p> <p>Cable specifics mentioned here: <a href="https://www.intel.com/content/www/us/en/support/boards-and-kits/intel-galileo-boards/000006343.html" rel="nofollow noreferrer">https://www.intel.com/content/www/us/en/support/boards-and-kits/intel-galileo-boards/000006343.html</a></p>
2017-10-14T07:06:46.047
<p>You could, but you'd need a radio transceiver with compatible frequency range, modulation, and data rate. </p> <p>Typically radios with those capabilities are either sold as Zigbee radios, or for the underlying 802.15.4 layer. Sometimes they can do some additional custom modes of communication as well (though often available software stacks force you to pick a mode at compile time) </p> <p>Truly "generic" radios are typically "software defined" with early conversion of the RF or IF signal to digital, computational signal processing, and then a conversion back to IF or RF if there is a transmit path. While you <em>could</em> speak Zigbee with a suitable SDR, the hardware tends to be a bit expensive and power hungry for typical embedded applications compared to a radio specifically designed for 802.15.4</p>
|microcontrollers|protocols|zigbee|data-transfer|
Can I implement ZigBee with generic hardware?
2199
<p>As I understand ZigBee is only a specification of a data transfer protocol. So I was expecting to find some library that implements this protocol to use it with my MCU and RF transceiver. Instead, I only have found specific ZigBee devices (e.g. XBee). </p> <p>What I'm asking is: Can I implement the ZigBee protocol using only an MCU and RF transceiver?</p> <p>If not, what hardware do I need to create a ZigBee node? Are there any ZigBee libraries that I can use with generic hardware?</p>
2017-10-15T21:07:49.543
<p>Yes. AWS IoT uses MQTT, which follows a <a href="https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern" rel="noreferrer">topic-based publish-subscribe pattern</a>. This allows multiple subscribers to a topic, and multiple clients can even publish to the same topic (a topic is not specifically designated for one client to publish or subscribe to).</p> <p>To subscribe, a client must <a href="http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718063" rel="noreferrer">send a SUBSCRIBE packet</a>:</p> <blockquote> <p>The SUBSCRIBE Packet is sent from the Client to the Server to create one or more Subscriptions. Each Subscription registers a Client’s interest in one or more Topics. The Server sends PUBLISH Packets to the Client in order to forward Application Messages that were published to Topics that match these Subscriptions. The SUBSCRIBE Packet also specifies (for each Subscription) the maximum QoS with which the Server can send Application Messages to the Client.</p> </blockquote>
|mqtt|aws-iot|aws|publish-subscriber|
Can multiple subscribers subscribe to the same topic from AWS IoT?
2208
<p>Just like what the question asks, can multiple subscribers subscribe to the same topic reading the same message from AWS IoT?</p>
2017-10-26T07:12:03.303
<p>Indeed, the whole point of "The Things Network" (TTN) is that multiple LoRa gateways are used to transfer messages between LoRa radio signals and the Internet based routing.</p> <p>And these don't even have to be gateways owned by you - by registering your device on TTN you have access to all gateways in the public system, and by making your gateway part of TTN, it is available for all other users' nodes.</p> <p>Otherwise you'd just have a point-to-point LoRa link or a private LoRaWan, not "The Things Network".</p>
|lora|lorawan|
Is it possible to share an Application between two or more LoRa Gateways using TTN?
2222
<p>I have a GPS Tracker application which periodically sends Latitude, Longitude, Altitude to a LoRa Gateway. </p> <p>I am using the <a href="https://thethingsnetwork.org" rel="noreferrer">The Things Network</a> and sending the data via the <strong>OTAA</strong> method which provides me the Application EUI and Application Key that can be used to program my LoRa device to connect to the Gateway. </p> <p>But is it possible to connect to a new LoRa Gateway with the same GPS Tracker which for instance, can be placed in some other location of the city?</p>
2017-11-02T16:53:21.563
<p>You have the options of either using an activity service based on an existing device (i.e. a phone), or reverse engineering an existing device (fitbit or derivative).</p> <p>This is well established technology, you're likely to find some patented ideas, and some open source code relating to the signal processing.</p> <p>The actual sensor ought not to be posing a challenge - accelerometers are not new or novel.</p> <p>Here is a <a href="https://www.microbit.co.uk/iet/stepometer" rel="nofollow noreferrer">micro:bit stepometer</a> lesson plan, using a cheap board which has all the hardware you need to prototype with. The lesson even has an extension which covers building a commercial product. This hardware is an mcu, BLE, accelerometer and a few LEDs (basically an instance of <a href="https://iot.stackexchange.com/users/4515/cujo">cujo</a>'s answer) but I think it is the lesson plan that you are really looking for.</p>
|hardware|sensors|wireless|bluetooth|
Motion sensor to monitor the movement of people
2239
<p>I'm about to start an investigation about people movement after a surgery (walk basically). I would like to know where should I start to look for movement sensors (pedometer/accelerometer). This sensor basically has to be installed on the patient and has to monitor his movement.</p> <p>I need something affordable, efficient, lightweight and non intrusive. I don't know where I should start to search for sensors.</p> <p>This sensor also needs to be accessed from outside, for example: a custom iOS app that asks for the sensor information and store information on a database on the cloud.</p> <p>The sensor has to be accessed via wireless (bluetooth or lte) or some kind of api.</p>
2017-11-04T07:12:16.900
<p>I suggest the <a href="https://thelightbug.com/" rel="nofollow noreferrer">Light Bug</a>.</p> <p>It features:</p> <ul> <li>8 day battery life</li> <li>Solar recharging</li> <li>Relatively small size (53 x 27 x 15mm)</li> <li>Transmission every 15 minutes</li> <li>Global satellite coverage (for GPS)</li> <li>Low weight (33 grams)</li> </ul> <p>The only thing I have not managed to determine is what happens if it loses contact with cell towers. I don't know if it would log location data points and retroactively transmit them. However, I have a feeling you'll have a hard time getting anything better than that, without designing something custom from a custom chip. </p> <p>It <em>may</em> theoretically be possible to flash your own software to the light bug, but I failed to find any information on that, and being a proprietary device, it is fairly doubtful.</p>
|gps|
GPS Transmitter that works without Mobile Networks
2245
<p>I need a device which can remotely tell me its location, either in realtime or with some delay. So, I naturally googled for GPS transmitters. The <a href="https://rads.stackoverflow.com/amzn/click/B00JG8KCLO" rel="nofollow noreferrer">top product</a> has much too large a thickness (I need it so that, it can be undetected through a few layers of cloth on both sides).</p> <p>Then I thought of a small mobile phone, with which I would use Android Device Manager to locate. But problem is, internet connectivity is gonna be scarce. Nonexistent. So not that, either. </p> <p>Here's my situation:</p> <p>A group of objects is going to be delivered to a group of persons, by means of placing said objects in a large sack, or similar. I need to track this sack. Therefore, I must place in it a device that transmits to me its location. Since it needs to be undetected, it must be thin. Since networks will be nonexistent, it must report over some other long-distance network, or, alternatively, store a list of locations every [30 mins/hour/few hours] which are transmitted when it finally reaches network connectivity. This device must have a battery life of a few days.</p> <p>That it be undetected is imperative. Should it be discovered, there will be loss of life. The bags may be similar to <a href="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ9sap5ZRXA1fqsPchJpBB0Fo042FGCAJDy7jKfF_1xZYwq_HH34Q" rel="nofollow noreferrer">this</a> or <a href="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSGeAYbSZUK1APe0r4F-Y-62PEYSeuveTrDQrdz7WXXlCBWjtTEnQ" rel="nofollow noreferrer">this</a>.</p> <p>So, is either my GPS or Mobile idea usable? If not, can you suggest anything?</p>
2017-11-05T09:51:24.983
<p>If the firmware of your device can be made less complex than the bootloader required for a secured remote update, then <em>do not implement remote update</em>.</p> <p>I know the consensus is to have a secured and robust bootloader, with strong public crypto authentication, safe rollover mechanisms, maybe a basic network stack, and then put on top of that a RTOS, with a full IP+TLS network stack, then add on top of that your application. This is pure insanity for a low-cost low-power device. IMHO, this leads to products that are updated every week or so, which tend to bother users because sometimes updates start at the wrong moment, fail or break something. Updates drain a lot of power too, so user have to charge more often. And security is still far from guaranteed as the attack surface is large.</p> <p>Your device is doing basic sensing/actuating, maybe some local triggering/displaying but not much? Skip all that.</p> <p>Write bare metal code, use a very basic stack, audit it thoroughly, do some formal verification if possible. And then you can be relatively confident that your device will not have security issues for the next decade.</p> <p>If all you have is a hammer, everything looks like a nail. And that's why most coder try to write code to secure their unsecured existing code. Writing <em>less</em> code doesn't always come naturally.</p>
|security|over-the-air-updates|
Standards for keeping devices' security up-to-date
2249
<p>With IoT devices typically being built with low profit margins and low power specifications, functionality is typically limited to that which is needed. But for a device that is expected to last a number of years, there will be security vulnerabilities and issues that need fixing (see the Mirai botnet as an example)</p> <p>As an IoT manufacturer, how can I enable patching or upgrading of encryption algorithms or security protocols remotely, or simply ensure that the device is kept secure? What standards should I follow?</p>
2017-11-06T20:43:32.763
<p>While it will be possible to cut into the wires and build a device that will publish state and trigger the solenoid that opens the door, it's probably not a good idea.</p> <p>Firstly you have no idea what voltages it all works at, it could very well be mains AC power.</p> <p>You then have to design a network service that securely exposes the interface for the app (assuming mobile phone). This is most likely internet facing (definitely for an Alexa Skill) so needs to be done properly to stop just anybody opening the door.</p> <p>There is also the question of the audio, that will need something more powerful than a esp8266 as it will need to do audio encoding/decoding in near real time then forwarded to the app.</p> <p>So yes it is all possible, but probably not worth the effort unless you really like a challenge. You would be better buying off the shelf solution. I've not looked at combined systems but something like the Ring doorbell with camera and app deals with knowing who is at the door. Then a number of companies make smart locks, e.g Yale or Abloy.</p> <p>And if you are truly mad you could always sign up for Amazons new Key service that lets Amazon let their delivery drivers into your house when your not there....</p>
|sensors|door-sensor|
Modernise old door opening office system
2257
<p>Is there a way to relatively easily modernise an old door opening system in the office (like on the image) and make it work with IoT? Build an app to open the door (in the first place) and if possible even build an Alexa skill (not necessary).</p> <p>Or maybe it would be easier to install a new system (IoT) with a new lock, etc?</p> <p>Do you know any systems like this that you can recommend?</p> <p><a href="https://i.stack.imgur.com/8ecHl.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8ecHl.jpg" alt="Old system"></a></p>
2017-11-14T20:44:33.087
<p>It looks like the 'Industrial Internet Consortium' have simply shortened the name from something slightly more self-explanatory: <em>Industrial Internet of Things</em>. Note in their footer:</p> <blockquote> <p>The Industrial Internet Consortium is the world’s leading organization transforming business and society by accelerating the Industrial Internet of Things (IIoT).</p> </blockquote> <p>In a nutshell, IIoT is just the use of 'smart' devices, sensors and machinery in industry, rather than in the home environment for consumers.</p> <p>For a real-world, tangible example, take <a href="https://www.rolls-royce.com/" rel="noreferrer">Rolls-Royce</a>, who, among other things, produce aircraft engines. It was announced relatively recently that they were <a href="https://www.computerworlduk.com/iot/rolls-royce-uses-microsoft-iot-tools-cut-down-on-engine-faults-3648777/" rel="noreferrer">equipping their latest engines</a> with sensors in order to monitor performance remotely and predict engine faults before they happen. This is done by transmitting sensor data to Azure IoT Suite and processing it from there, in order to make business decisions without having to physically check the engines.</p> <p>For a specific definition, I find <a href="http://internetofthingsagenda.techtarget.com/definition/Industrial-Internet-of-Things-IIoT" rel="noreferrer">TechTarget's article</a> pretty useful:</p> <blockquote> <p>The Industrial Internet of Things (IIoT) is the use of Internet of Things (IoT) technologies in manufacturing.</p> <p>Also known as the Industrial Internet, IIoT incorporates machine learning and big data technology, harnessing the sensor data, machine-to-machine (M2M) communication and automation technologies that have existed in industrial settings for years.</p> </blockquote> <p>An article on <a href="http://www.electronicdesign.com/iot/what-s-difference-between-consumer-and-industrial-iot" rel="noreferrer">Electronic Design</a> discusses the differences between consumer, commercial and industrial IoT. The key point they raise is:</p> <blockquote> <p>IoT systems and platforms are not created equal. The types of communication and operations used by consumer, commercial, and industrial IoT are very similar if not identical. The differences concern those who procure, and are allowed to procure, information or control within the system.</p> </blockquote> <p><strong>In brief</strong>: The <em>Industrial Internet</em> is just IoT concepts applied specifically to industry and manufacturing rather than any other application. This can, of course, bring benefits in many situations to business (although, as with much of IoT, it's important to actually evaluate whether connecting everything to the Internet is a good idea, or even useful at all!)</p>
|definitions|
Industrial Internet vs IoT
2284
<p>Wikipedia on my mother tongue Finnish about Internet of Things (sorry, in Finnish language, but I'll translate the essential) mentions IoT as a synonym or closely related to Industrial Internet. </p> <p>As translated to English the paragraph starts:</p> <blockquote> <p>Internet of Things (in English Internet of Things, more shortly IoT, also Industrial Internet)... </p> </blockquote> <p>Industrial Internet Consortium describes Industrial Internet so lightly, that the butterfly picture on the page was the most concrete description of the term itself (that means I have no clue about what the concept means after reading, only the definition seems similar to that of every IoT ads Google can tell me about IoT). So I am confused with these two terms.</p> <p>Are the terms in any connection together, or is the Wikipedia writer just mixing concepts? I like to get answer on conceptual and definitional level, if in English there is some reference what the terms mean and how they differ each other. </p> <p>[1] <a href="https://fi.m.wikipedia.org/wiki/Esineiden_internet" rel="noreferrer">https://fi.m.wikipedia.org/wiki/Esineiden_internet</a></p> <p>[2] <a href="http://www.iiconsortium.org/about-industrial-internet.htm" rel="noreferrer">http://www.iiconsortium.org/about-industrial-internet.htm</a></p>
2017-11-15T08:55:30.503
<p>You probably already know more about this, than even 3GPP does. Looking at their documentation, which is not to be read by the faint-harted, it seem that <a href="https://en.wikipedia.org/wiki/NarrowBand_IOT" rel="nofollow noreferrer">NB-IoT</a> is using a new special category of the <code>LTE Advanced Pro</code>, in 3GPP <a href="http://www.3gpp.org/ftp/Information/WORK_PLAN/Description_Releases/" rel="nofollow noreferrer">Release 13</a>. Again, note that release 13, does not mean LTE <code>UE Cat 13</code>, but the new <a href="https://en.wikipedia.org/wiki/E-UTRA#User_Equipment_.28UE.29_categories" rel="nofollow noreferrer">category</a> <code>NB1</code>. For further info, look <a href="http://www.3gpp.org/news-events/3gpp-news/1785-nb_iot_complete" rel="nofollow noreferrer">here</a> and <a href="http://www.3gpp.org/news-events/3gpp-news/1766-iot_progress" rel="nofollow noreferrer">here</a>, and links therein.</p> <p>So this seem to indicate that in practice, your hardware (and its radio firmware) must support <code>LTE Cat NB1</code> and you must use a SIM compatible with that network. Thus, for the low-end hardware you mentioned, <strong>it is probably not supported.</strong> If you want to do more magic than that, you may consider getting into SDRs.</p> <p>Q: <strong>What is an embedded SIM (eSIM/eUICC)?</strong></p> <p>A: Please post your questions separately... But, it's just a software <a href="https://www.gsma.com/iot/embedded-sim/" rel="nofollow noreferrer">emulated SIM</a>, where the SIM file system is all handled by software. (Did you even bother to google for it?)</p>
|gsm|
2G-4G SIM Cards for Cellular Modules, specifically the new NB-IoT
2286
<p>I'm trying to connect to the NB-IoT network in my city, and I've already gotten the hardware as well as the confirmation that there is an NB-IoT cell tower in my neighborhood.</p> <p>Naturally, there's an NB-IoT SIM card as well that is used to connect to the network, but I have not received that unfortunately.</p> <p><strong>Question:</strong> Is it somehow possible to connect to that guardband network which piggybacks (CMIIW) of the LTE network by using a 4G/LTE SIM card though? Since if I recall correctly, the base station only has its firmware renewed so that the NB-IoT radiowave can be recognized.</p> <p><strong>Additional question:</strong> There's SIM 800 and SIM900 shield for GSM modules. Can I theoretically use a 4G/LTE SIM card and utilize the 2G Network? I'm not quite sure I can just ask the kiosk owner next to my house the question "Hey is this data only 4G card 2G compatible?" cause I'm also not quite sure what that means.</p> <p>So, if I were to use the 3G 4G module, like <a href="https://www.tme.eu/de/details/l810-gl/gsmgpsgprshspaedgelte-module/fibocom/" rel="nofollow noreferrer">this one</a> for example...the communications type is LTE, but the transmission type is GPRS and EDGE (and HSP+ as well as LTE), according to the data sheet. AFAIK, that transmission is the architecture of the network as it travels from the base station towards the internet (CMIIW), but would our type SIM card be relevant for that?</p> <p><strong>One more question</strong> I've never used a module with an embedded SIM before. How does that work? Am I subscribing to an ISP until a certain time? I'm rather new with cellular modules for microcontrollers, I only understand the connection service like how our mobile phones work.</p>
2017-11-23T13:36:48.187
<p>Okay, done a bit of research, and here's what I've found:</p> <p><a href="https://www.thestar.com/business/tech_news/2017/11/21/apples-homepod-to-have-fewer-features-than-competitors-google-home-amazon-echo.html" rel="nofollow noreferrer">TheStar.com</a> writes:</p> <blockquote> <p>As a result, when the $350 (U.S.) gadget debuts early next year (Apple recently delayed the launch from December), the HomePod won’t be able to do many of the things the Echo can. Amazon offers thousands of “skills” (voice-activated apps) that let users do a range of things (including buy stuff from Amazon). The Google Home, which debuted earlier this year, is similarly endowed.</p> <p>The HomePod will be mostly limited to playing tunes from Apple Music, controlling Apple-optimized smart home appliances and sending messages through an iPhone.</p> </blockquote> <p>Looks like my friends were right: it's basically going to be a music playing device with none of the impressive capabilities of the Google Home or the Amazon Echo. It will have the capacity to send messages through a synced iPhone, but it won't be able to answer your questions like Alexa or Google.</p>
|smart-home|amazon-echo|google-home|apple-homepod|
What will the Apple HomePod be able to do?
2309
<p>A friend told me that Apple is finally releasing a competitor for the Google Home and the Amazon Echo, called the Apple Homepod. A lively discussion ensued, in which several people were quite certain that the Apple Homepod has far fewer features than either the Amazon Echo or the Google Home.</p> <p>What will the Apple Homepod actually feature? How versatile will it be? Will it actually be less feature laden than the Google Home and the Amazon Echo?</p>
2017-11-26T09:17:11.517
<p>Nice question, love it! I've found some information on <a href="https://www.reddit.com/r/Hue/comments/5r420j/once_my_lights_are_set_up_can_i_disconnect_the/" rel="noreferrer">reddit</a>. Someone asked,</p> <blockquote> <p>[I am] wondering what happens if my network goes out. Can the lights and switches operate without the Bridge?</p> </blockquote> <p>The answer given was,</p> <blockquote> <p>No. The bridge is essential to controlling the lights. Without a bridge they are &quot;dumb&quot; lights that merely invoke their default behavior when powered on: bulbs to a warmish white light and light strips to their last activated colour.</p> <p>Without the bridge any kind of color control, or any other behavioral control whatsoever beyond turning on/off by flipping the light switch or unplugging, is entirely unavailable.</p> <p>The bridge is the brain of the operation. The bulbs just receive instructions from it; they have zero intelligence of their own. Your smartphone can be used to program/control the bridge, but cannot in any form address the lights directly: they speak a different protocol altogether from wifi called ZigBee.</p> </blockquote> <p>In other words, the light does not know the schedule; it is very much the bridge that sends the instructions to the light. The light is basically an endpoint in the system with no intelligence of its own: it depends on the Bridge system to turn it on and off.</p>
|philips-hue|bridge|
Can Philips Hue bulbs run schedules while the bridge is off?
2315
<p>I understand I need the Philips Hue Bridge to control Philips Hue lights. </p> <p>Let's say I set everything up and configure a light to go on/off on a schedule (turn on light in evening, turn off in morning). Then I disconnect the Bridge (unplug/power off). Will the light still go on/off on the schedule, or do I need the Bridge connected for this to work?</p> <p>I guess what I'm asking is: Is the light itself aware of the time and schedule, or is it the Bridge which knows about the time/schedule and just sends on/off instructions to the light?</p>
2017-11-26T12:12:46.827
<p>To control fluorescent lights, you should look for a device called an "appliance switch". This will control any load by switching the power on or off; it does not "dim" the load. With it, your fluorescent lights will work just like your ordinary switch does today.</p> <p>Be aware that home automation systems generally do not consider appliance switches to be in the same category as "light" switches. This is only an issue if you say "Hey Google, turn all the lights on" and expect this switch to be included. But you can name it "bedroom light", and say "Hey Google, turn the bedroom light on", and it will work.</p> <p>(Also note that some very old fluorescent light fixtures have a manual starter. You must press and hold a button until the lights come on. If that's what you have, no commercial home automation electronics are designed to control them.)</p>
|smart-home|google-home|lighting|
Smart fluorescent strip lights
2317
<p>Is there a way to turn on and off fluorescent strip lights using google home.</p> <p>Most IoT light solutions I have found require bulb replacement, are dimmer switches or are not compatible with this type of lighting. The current switch controls 2 different strip lights to make things more complicated. We are in the UK.</p>
2017-11-26T17:58:21.457
<p>Yes, the Google Assistant supports <a href="https://developers.google.com/actions/" rel="nofollow noreferrer">Actions</a> which allow developers to respond to requests from users. Actions can only respond if prompted, <strong>they cannot speak unannounced</strong> at this time.</p> <p>Using the Actions SDK, you must first <a href="https://developers.google.com/actions/sdk/define-actions" rel="nofollow noreferrer">define some actions</a>:</p> <pre class="lang-js prettyprint-override"><code>{ "actions": [ { "name": "MAIN", "intent": { "name": "actions.intent.MAIN" }, "fulfillment": { "conversationName": "demoApp" } } ], "conversations": { "demoApp": { "name": "demoApp", "url": "https://example.com/demoApp" } } } </code></pre> <p>This would use the <em>fulfillment</em> <code>demoApp</code> to respond to the command 'Ok Google, talk to [action name]'. This essentially amounts to a request to the specified URL.</p> <p>You then need to <a href="https://developers.google.com/actions/sdk/fulfillment" rel="nofollow noreferrer">write some server code</a> to handle these requests. Google provide a library for <a href="https://github.com/actions-on-google/actions-on-google-nodejs" rel="nofollow noreferrer">Node.js</a> which might be helpful. I'm just going to quote the example code there as it's sufficiently clear and helpful to point you in the right direction.</p> <pre class="lang-js prettyprint-override"><code>'use strict'; const ActionsSdkApp = require('actions-on-google').ActionsSdkApp; exports.&lt;insertCloudFunctionName&gt; = (req, res) =&gt; { const app = new ActionsSdkApp({request: req, response: res}); function mainIntent (app) { // Put your message here, using app.tell. app.tell('Hello, world!'); } let actionMap = new Map(); actionMap.set(app.StandardIntents.MAIN, mainIntent); app.handleRequest(actionMap); } </code></pre> <p>You then just need to <a href="https://developers.google.com/actions/sdk/deploy-fulfillment" rel="nofollow noreferrer">deploy</a> and <a href="https://developers.google.com/actions/sdk/submit-app" rel="nofollow noreferrer">submit</a> your app. You would need to put your logic to determine what text to say inside of <code>mainIntent</code>, or create new intents as necessary. </p>
|google-home|google-assistant|
Send Google Assistant text to read out via the SDK
2319
<p>I want to write an app that will relay information about public transport via the Google Assistant if prompted.</p> <p>Does the Google Assistant SDK allow an app to send text to be read out?</p>
2017-11-27T23:30:37.360
<p>Most of the telematic devices used by insurance companies use cellular phone devices (mostly using 2G which is fairly commonly used for low cost, low data requirement devices) to communicate with a couple of different sensors such as accelerometer. Most also plug into the OBDII vehicle diagnostics port to collect data on the car as well.</p> <p>From <a href="https://www.forbes.com/sites/ptc/2014/06/27/in-car-sensors-put-insurers-in-the-drivers-seat/#8ce667475bd7" rel="noreferrer">In-Car Sensors Put Insurers In The Driver's Seat</a>:</p> <blockquote> <p>The palm-sized devices plug into a car’s data port, the same spot mechanics use for vehicle diagnostics. (All cars made since 1996 have the ports.) The devices record information about mileage and speed, which is then used to calculate data about acceleration and braking trends. Some systems also have GPS capability that is relayed to insurance companies for research purposes — or to owners like Branson who opt for driver monitoring.</p> </blockquote> <p>There has been some concern about security expressed, for instance see <a href="https://jalopnik.com/progressive-insurances-driver-tracking-tool-is-ridicul-1680720690" rel="noreferrer">Progressive Insurance's Driver Tracking Tool Is Ridiculously Insecure</a>. This article has a number of links to other articles and has this synopsis of the Progressive dongle that was investigated.</p> <blockquote> <p>The dongle doesn't use any kind of network authentication to encrypt the data, the firmware isn't signed or validated, and it uses the infamously insecure FTP – the same protocol to upload and download files from your home server – to keep the bits flowing.</p> </blockquote> <p>The bottom line so far as this article is concerned is:</p> <blockquote> <p>Instead, it's more proof that security in the era of the Internet of Things – where everything you own is somehow connected – is woefully lacking.</p> </blockquote> <p>See as well <a href="https://qz.com/230055/car-insurance-companies-want-to-track-your-every-move-and-youre-going-to-let-them/" rel="noreferrer">Car insurance companies want to track your every move—and you’re going to let them</a>.</p> <p>Since smart phones have a fairly nice sensor package of acceleromater, GPS, etc. a smart phone app can provide much of the information needed by an insurer. See <a href="https://www.computerworld.com/article/2600344/telematics-insurers-will-now-be-able-to-track-driver-behavior-via-smartphones.html" rel="noreferrer">Insurers will now be able to track driver behavior via smartphones</a>.</p> <blockquote> <p>UBI offers the insurance industry new opportunities for tailored discount programs. Notably, they can switch from relying OBDII dongles plugged into the customer's car and instead use mobile apps that travel with the driver, whether he's traveling in his own car or another vehicle.</p> </blockquote>
|security|communication|
How do car insurance tracking devices connect to the internet?
2327
<p>There are these devices that you can plug into your car and the insurance company can get real time data to &quot;lower&quot; your insurance cost.</p> <p><img src="https://cars.usnews.com/static/images/article/201610/126179/Bloomberg_Contributor.jpg" alt="" /></p> <p><sup>Image from <a href="https://cars.usnews.com/cars-trucks/best-cars-blog/2016/10/how-do-those-car-insurance-tracking-devices-work" rel="noreferrer">U.S.News</a>, 2016.</sup></p> <p>How do they connect to the internet? Satellites? Mobile network? Searching on Google doesn't give much information:</p> <blockquote> <p>Once the device is plugged into the car’s computer, it can see all the data the computer collects and it grabs whatever the insurance company has programmed it to find. <em>It then uses wireless technology to transmit that information to the insurance company.</em></p> <p><sub><a href="https://cars.usnews.com/cars-trucks/best-cars-blog/2016/10/how-do-those-car-insurance-tracking-devices-work" rel="noreferrer">U.S.News.</a>, <em>How Do Those Car Insurance Tracking Devices Work?</em>, 2016</sub></p> </blockquote> <p>Other than that, how safe are those devices? Are man in the middle attacks possible and can they possibly change the data that are being sent?</p>
2017-11-29T02:42:17.730
<p>The core idea of the Internet of Things is to have small computing devices which provide a specific, targeted interface to some thing or event or device. The small computing device collects measurements of various kinds and/or it is used to modify the state of the thing or event or device.</p> <p>A specific example is an automated weather station in which a small computing device has various sensors attached and the computing device samples the sensors and collects the various measurements reported by the sensors and then provides those measurements to some other device.</p> <p>Another would be an automated digital camera that is set up so that when wildlife passes by the camera takes photographs and then sends the photographs to some of device for processing or review.</p> <p>What you have done is no different than what could be done and often is done with a standard workstation. It is not really an Internet of Things application as something similar is available on my Windows 10 desktop computer for instance.</p> <p>I will tell you what I am doing with my Raspberry Pi.</p> <p>My first application was something exactly like what you describe, PiClock is the actual application and the source code is available on the internet. It display an analogue clock along with weather forecast and driving conditions.</p> <p>The next thing I did was to purchase an Osoyoo Raspberry Pi Starter Kit from Amazon. This kit contains a variety of components, sensors, a servo motor, etc. and the manufacturer has projects that start off simple on their web site. I am using this to learn the basics of electronics for IoT devices.</p> <p>I have started a GitHub repository so that I can keep my notes and source code in a safe place. <a href="https://github.com/RichardChambers/raspberrypi/" rel="nofollow noreferrer">https://github.com/RichardChambers/raspberrypi/</a></p> <p>Once I have gained some degree of knowledge concerning the electronics of IoT I am going to take a look at some of the projects that others have done and give one a shot.</p> <p>Here is a list of resources on IoT projects for Raspberry Pi:</p> <p><a href="https://www.informationweek.com/software/enterprise-applications/10-raspberry-pi-projects-for-learning-iot/d/d-id/1320757?" rel="nofollow noreferrer">10 Raspberry Pi Projects For Learning IoT</a></p> <p><a href="https://www.hackster.io/raspberry-pi/projects" rel="nofollow noreferrer">hackster.io projects for Raspberry Pi</a></p> <p><a href="https://circuitdigest.com/internet-of-things-iot-projects" rel="nofollow noreferrer">IoT Projects based on Raspberry Pi, Arduino, ESP8266, etc.</a></p> <p><a href="http://www.electronicshub.org/iot-project-ideas/" rel="nofollow noreferrer">100+ Ultimate list of IoT projects for engineering students</a></p>
|raspberry-pi|
Raspberry Pi Monitor: Qualify as IoT device?
2334
<p>Not sure if this is the right platform (please let me know any recommendations if not), but I made a display monitor in the Raspberry Pi to pull in information such as news feeds, weather, local news and sports scores. I'm trying to learn more about IoT for an assignment and would like to use my Pi project as an example.</p> <p>As of now, it's just a monitor that pulls in feeds. Does this constitute an IoT device or does the information need to be relayed back somewhere?</p> <p>I'm a beginner, but I was hoping someone might have some recommendations in how I could make this a true IoT device if it isn't currently. Thank you.<a href="https://i.stack.imgur.com/Y76yQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Y76yQ.png" alt="enter image description here"></a></p>
2017-11-30T22:45:53.993
<p>That's a very strange protocol combination for a smart plug to use. <a href="https://en.wikipedia.org/wiki/Signalling_System_No._7" rel="noreferrer">SS7</a> and <a href="https://en.wikipedia.org/wiki/Internet_Protocol_Device_Control" rel="noreferrer">IPDC</a> are—as you already point out yourself—protocols for VoIP communication. I can't say that I've come across those two in particular in the IoT environment. There might be one reasoning behind that however. Do keep in mind that the following is just a guess one that makes certain sense. But I can't offer any proof for this.</p> <p>Since smart plugs don't care about any of the usual low power considerations of IoT protocols since they are mains powered they might choose their protocols for other reasons. One reason that seems to be likely when VoIP protocols are used (besides arbitrary picking by the developer because (s)he knows it) is quality of service. Almost any router will prioritize via QoS VoIP packages. That reduces latency and increases reliability for the application on top. Maybe they tried to game that system with the plug.</p>
|smart-home|wifi|protocols|smart-plugs|
Wi-Fi Plug uses IPDC (Internet Protocol Device Control) for controlling via App?
2341
<p>I'm struggling at the moment with reversing the commands between a Wi-Fi Plug ( <a href="https://www.amazon.de/Cozyswan-intelligente-Steckdose-Wireless-Erforderliche/dp/B071Z2Y2NH/" rel="nofollow noreferrer">Amazon-Link for Wi-Fi Plug</a>) and the associated phone app. It looks like the app controls the plug via a IPDC (IP device control) packet. This protocol seems to be used for VoIP and telephone networks. Did somebody ever came across this protocol on IoT Smart Home devices?</p> <p><a href="https://i.stack.imgur.com/7jCgQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7jCgQ.png" alt=".28 is Phone and .78 is WiFi Plug"></a></p> <p>In the screenshot .28 is the phone and .78 is the Wi-Fi plug.</p>
2017-12-04T18:37:20.713
<p>So after reading Helmar and Ghanima's excellent answers, I doubled down and did some research. After a little bit of work and research I came up with the following solution. Images are available <a href="https://i.stack.imgur.com/EDkPb.jpg" rel="nofollow noreferrer">here, in an Imgur album.</a></p> <ol> <li><p><a href="https://rads.stackoverflow.com/amzn/click/B01MZ8LFWU" rel="nofollow noreferrer">Purchase a flush mount reed switch</a> and a <a href="https://rads.stackoverflow.com/amzn/click/B0155HSUUY" rel="nofollow noreferrer">z-wave dry contact sensor</a> from Amazon</p></li> <li><p>Drill a hole in the back of the deadbolt cavity to place the flush mount reed sensor</p></li> <li><p>Pull the wires through the side of the door casing</p></li> <li><p>Drill a small cavity in the deadbolt itself and place a magnet in it (I used a bucky ball)</p></li> <li><p>Wire the reed switch to the dry contact sensor</p></li> <li><p>Bang the door casing back together</p></li> <li><p>Use packing tape or glue to secure magnet in deadbolt.</p></li> </ol>
|hardware|google-home|
Smart deadbolt without motor -- Read-only Access
2351
<p>I have some needs</p> <ul> <li>I'd like to ask my Google Home if my front door is locked.</li> <li>I don't want my Google Home to be able to unlock my front door.</li> <li>I don't even want my front door to be unlockable remotely.</li> <li>IoT and unlocking my door should not mix.</li> </ul> <p>Does a read only deadbolt exist, or are all smart locks motor equipped to allow them to be opened remotely?</p>
2017-12-05T05:33:35.267
<p>Despite what Belkin says on <a href="http://www.belkin.com/us/resource-center/wemo/works-with-google-home/" rel="nofollow noreferrer">their website</a>, Wemo and Google Home aren't fully compatible.</p> <p><a href="https://i.stack.imgur.com/LB4Ri.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LB4Ri.png" alt="Belkin Lies"></a></p> <p><em>Some</em> Wemo smart home products are natively compatible with Google Assistant / Home. These include:</p> <ul> <li><p>Belkin Wemo Mini Smart Plug,</p></li> <li><p>Belkin Wemo Insight Smart Plug,</p></li> <li><p>Belkin Wemo Light Switch. </p></li> </ul> <p><strong>It does <em>not</em> include Belkin Wemo Bulbs</strong> or anything not on that list. It doesn't say this on the website, but after consulting with their helpdesk (for hours), that is what I was told.</p> <h2>But I already spend hundreds of dollars on Belkin Wemo Bulbs...</h2> <p>Yeah, me too. There are a couple of work arounds. </p> <p><strong>Option 1</strong> - Get a Samsung SmartThings hub.</p> <p>Apparently if you use a SmartThings hub you can control your Wemo "Smart" Bulbs natively from the Google Assistant. I didn't test this out because I'm already too committed to this and don't want to spend more money on reversing the future proofing of my home.</p> <p><strong>Option 2</strong> - The smart/free option: Use IFTTT</p> <p>Using IFTTT you can control your Wemo Bulbs. And IFTTT is natively supported by Google. Yeh.</p> <h2>Other options</h2> <p>A better option is to avoid Belkin like the plague and stick to Philips or Samsung for your smart lighting.</p>
|google-assistant|wemo|
How do I connect Wemo Bulbs to Google Home
2352
<p>I'm trying to connect my Belkin Wemo smart bulbs to my Google Home (really my Google Assistant via the Google Home app). </p> <p><a href="https://i.stack.imgur.com/BrYxw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BrYxw.png" alt="Wemo ready to verify Screenshot"></a></p> <p>I'm following the steps lists on <a href="http://www.belkin.com/us/support-article?articleNum=224185" rel="nofollow noreferrer">Belkin's Support Site</a> but after I click "Ready to Verify" (step 4), it asks for the name of my network and MAC address. After a little research I found them but it's saying I've entered the wrong details.</p> <p>How do I make Wemo and Google play nice?</p> <hr> <ul> <li>I've tried to update the firmware on my Wemos, but it looks like they're up to date. </li> <li>I'm running the latest versions of all apps. </li> <li>I've also tried to connect my Amazon Alexa to the Wemos and got stopped on the same screen.</li> </ul>
2017-12-07T15:07:33.733
<p>The MooMonitor use accelerometers to monitor the physical activity level of a cow, using their measurements to determine if the cow is in heat or not. It appears that research shows that cows entering estrous become more active than normal.</p> <p>See <a href="http://www.icar.org/wp-content/uploads/2015/09/T2-Harty_PPT.pdf" rel="nofollow noreferrer">Dairymaster MooMonitor: The app for heat detection &amp; results of on-farm studies.</a></p> <p>Also see <a href="https://www.siliconrepublic.com/innovation/moomonitor-is-a-real-cash-cow" rel="nofollow noreferrer">MooMonitor is a real cash cow</a>, which says:</p> <blockquote> <p>Explaining the MooMonitor, a device that sits around a cow’s neck and uses accelerometers to tell if the cow is in heat, Harty said: “There are lots of jokes that go around the place about alternative uses for it, but basically in order to produce milk farmers need to be producing calves and that’s why the fertility cycle is so important to milk production. There is a narrow window of opportunity that farmers need to get right.</p> <p>“Believe it or not, we were inspired by the technologies the military put in torpedoes and rockets to hit targets – the accelerometer technology we take for granted in phones today – to quantify cow behaviour. When the cow is in heat they tend to be more active so we have algorithms built in that watch for changes in behaviour.”</p> </blockquote>
|agriculture|
How does the MooMonitor detect bovine heats?
2359
<p>I am always interested in Internet of Things applications in agriculture, and I recently read about the MooMonitor on <a href="https://www.independent.ie/business/farming/agri-business/bringing-the-internet-of-things-into-the-farmyard-36375087.html" rel="noreferrer">independent.ie</a>. They claim that the MooMonitor can keep tabs on cow health, fertility, and heats.</p> <p>My question is, how does the MooMonitor keep tabs on a cow being in heat? Is it simply physical comportmental difference from the norm that it is detecting, or is there something else it actually measures, like body temperature? Also, does it take the 3 week cycle into account to help predict when to look for differences in whatever signs it is looking for?</p>
2017-12-09T03:02:52.153
<p>Finally I found out the cause of error.</p> <p>I was trying to connect to 5.0GHz wifi network, but Wio node can only connect 2.4GHz network.</p> <p>I just need to connect 2.4GHz WiFi. That's all.</p>
|hardware|
Wio Node setup failed
2366
<p>To setup <em>Wio Node</em>, I installed the <em>Wio</em> Android app. The procedure doesn't end when I try to connect Wio Device like the image.</p> <p><a href="https://i.stack.imgur.com/56S94.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/56S94.png" alt="Wio connection wizard screenshot"></a></p> <p>After that I installed <a href="https://github.com/Seeed-Studio/wio-cli" rel="nofollow noreferrer">wio-cli</a> and <a href="https://www.silabs.com/documents/public/software/Mac_OSX_VCP_Driver.zip" rel="nofollow noreferrer">a driver</a> for Mac.</p> <p>Then logged in.</p> <pre><code> % wio login 1.) Global Server (New)[https://us.wio.seeed.io] 2.) Chinese Server [https://cn.wio.seeed.io] 3.) Customize Server ? Please choice server: 1 ? First get wio user token from https://wio.seeed.io/login ? Then enter token: xxxxxxxxxxxx &gt; Successfully completed login! Check state, see 'wio state' </code></pre> <p>and run <code>wio setup</code>.</p> <pre><code> % wio setup &gt; Setup is easy! Let's get started... ! PROTIP: Hold the Configure button ~4s into Configure Mode! ! PROTIP: Please make sure you are connected to the Server ? Would you like continue? [Y/n]: y 0.) Wio Link v1.0 1.) Wio Node v1.0 ? Please choice the board type: 1 ! PROTIP: Wireless setup of Wio! ! PROTIP: You need manually change your Wi-Fi network to Wio's network. ! PROTIP: You will lose your connection to the internet periodically. ? Please connect to the Wio_* network now. Press enter when ready: y ? Would you like to manually enter your Wi-Fi network configuration? [y/N]: y &gt; Please enter the SSID of your Wi-Fi network: TANEMAKI &gt; Please enter your Wi-Fi network password (leave blank for none): ilovemoguko &gt; Please enter the name of a device will be created: winnode_tetsu &gt; Here's what we're going to send to the Wio: &gt; Wi-Fi network: xxxxxxx &gt; Password: xxxxxxxxx &gt; Device name: winnode_ironsand ? Would you like to continue with the information shown above? [Y/n]: y </code></pre> <p>But <code>wio list</code> shows no device.</p> <pre><code>% wio list No Wio devices could be found. </code></pre> <p>What am I doing wrong? What can I do to solve the problem?</p>
2017-12-10T05:20:47.813
<p>While watching JoJo's Bizzare Adventure - Golden Wind - Episode 22 &quot;G in Guts&quot; at 18:28 in a character says &quot;So Bucciarati&quot; this activated my google home. I tested and replayed it and even said it and it consistently works.. However it must be pronounced correctly to work.</p>
|google-home|google-assistant|
Is there a known list of wake words for Google Home?
2374
<p>While playing with my Google Home I discovered apart from "Okay Google" and "Hey Google" my Home responds to "Okay Doodle" and "Hey Doodle".</p> <p>Officially, "Okay Google" and "Hey Google" are documented wake words. Is there an alternate list of wake words, even if unofficial?</p>
2017-12-11T20:12:29.483
<p>Not an Alexa specific answer, but look into support for soundex and similar phonetic hashing systems in your platform and/or database. For example the MySQL database has a soundex() function that can be used for this. BMPM is another algorithm supported out of the box by Apache Solr/Lucene, along with a number of others.</p> <p><a href="https://lucene.apache.org/solr/guide/6_6/phonetic-matching.html" rel="noreferrer">https://lucene.apache.org/solr/guide/6_6/phonetic-matching.html</a></p>
|alexa|amazon-echo|voice-recognition|
How can I match database records (e.g. names) with voice input from an Alexa Skill?
2381
<p>I'm building an Alexa skill, and I have a slot called 'Name' where I want to capture a name. I want to find in the database the matching name. But let's say that I have in the database a name "Alex Baumgartner". But Alexa returns in a slot "Alex Baugartner". </p> <p>Obviously, it doesn't match exactly but it matches with 0.95 probability. How can I check this probability or in some way verify that the voice input matches with the database record?</p> <p>Is there a service online, a tool or algorithm for checking the probability of matching words that I should use, or is there another approach?</p>
2017-12-12T11:29:39.443
<p><strong>According to Jeff Bezos, it's a hardware button, and various sources seem to agree from the teardowns</strong></p> <p>A <a href="https://www.eevblog.com/forum/projects/amazon-echo-is-the-mic-disabled-via-analog-circuit/" rel="noreferrer">forum post</a> at the EEVblog forums quotes a video featuring Jeff Bezos, the founder of Amazon:</p> <blockquote> <p>In this video about <a href="https://dp8hsntg6do36.cloudfront.net/5801499afd2e616c66000029/d92b17fb-e5bb-4f90-86e7-a2adc2b08bbdlow.webm" rel="noreferrer">Jeff Bezos being interviewed by Walter Isaacson</a> at around the 6 min mark, Bezos claims the mute button on the Amazon Echo is physically connected to the mic amplification circuit, making it impossible to enable again via software.</p> </blockquote> <p>This is also supported by a <a href="https://www.reddit.com/r/amazonecho/comments/5lc5q5/effectiveness_of_mute_button/?st=jb3ql4ze&amp;sh=70b1fc75" rel="noreferrer">reddit thread</a> in which it is said that <em>"Basically it is a physical analog connection that cuts off circuit flow to the mic."</em> Another commenter added:</p> <blockquote> <p>No voltage to mics when mute is on. You're correct as well about the state of mute being software controllable. That said, the state of the LED under the button is tied electrically to if the mics are on (same circuit), so there's no possible way the mics can be powered without you knowing it.</p> </blockquote> <p>That said, those sources aren't particularly clear on which models they're referring to. Taking a further look at the <a href="https://www.eevblog.com/forum/reviews/teardown-amazon-echo-dot-2/" rel="noreferrer">teardown linked in the forum post</a> may be interesting to verify this.</p> <p>Another source that supports the 'hardware button' theory is the <a href="https://forums.appleinsider.com/discussion/201160/amazon-echo-vulnerability-allows-hackers-to-eavesdrop-with-always-on-microphone" rel="noreferrer">Apple Insider</a> site, which discusses a previous Echo vulnerability. It notes that:</p> <blockquote> <p>Despite gaining access to the "always-on" microphone, the hack cannot get around the physical mute button on the device, which disables the microphone completely. This switch is a hardware mechanism that cannot be altered with software, though it is feasible that with extra work this button could be physically disabled by a determined attacker. </p> </blockquote> <p>Disappointingly, the <a href="https://www.ifixit.com/Teardown/Amazon+Echo+Teardown/33953" rel="noreferrer">iFixit</a> teardown doesn't include a good image or any commentary on the mute button circuitry for the proper Echo device. Even so, there's a substantial amount of evidence that it may be a hardware button after all.</p>
|alexa|amazon-echo|privacy|microphones|
Is the Amazon Echo mic mute a hardware switch?
2382
<p>I recently got my hands on an Echo Dot.<br> I'm hesitating to install it, since I'm concerned about my privacy. According to Amazon's privacy notice, they may use all data they capture.</p> <p>I've noticed that the Amazon Echo comes with a mic mute button, which would be perfect for cutting down on voice data. But since Alexa is closed-source, I wouldn't be convinced that this button will keep my mic off <em>under all circumstances</em>.</p> <p><strong>Is the Echo mic mute button a software or hardware kill switch?</strong></p> <p>My searches didn't turn out much, mainly because the web is filled with low-quality news and non-technical articles. </p>
2017-12-13T03:43:36.160
<p>To interact with IOTA, you must be running or have access to an IRI node, which usually has its API exposed. IOTA is still in a heavy development phase, and an embedded linux device such as Raspberry Pi doesn't have the resources to run an IRI node. The open source Ruuvi tag is a good example of IoT device pushing data onto the IOTA tangle. The tags are basically bluetooth enabled sensors, and will usually be tethered to a RaspPi. The Raspberry Pi then relays this data to a public IRI server. </p>
|raspberry-pi|arduino|iota|
IOTA on Arduino or Raspberry Pi or Similar Board?
2389
<p>I'm new to the world of IoT, I don't even have an Arduino or similar board yet... but I am very interested, especially with cryptocurrency such as IOTA making such things potentially profitable. Sadly, this also seems like a really new field too, because I have been unable to find any resource, such as a tutorial, for getting an Arduino or similar device to be able to accept IOTA as payment to access some sort of sensor on it. My questions are:</p> <ol> <li>Can Arduino, Raspberry Pi or some other board be programmed and has the sufficient specs to do this. If so, which?</li> <li>Are there any guides, tutorials, "Hello World" or other such "Get Started" guides to help implement such a thing? Anything in this sphere would probably be helpful to me as a true newb to this stuff.</li> </ol>
2017-12-13T16:17:01.337
<p>I know this is an older thread, but thought this may be helpful.</p> <p>Technically, only the Z-WAVE portion of SmartThings is illegal in Australia. The band used is unlicensed, but still managed under legislation.</p> <p>The band does not interfere with any licenced bands, such as mobile or TV, but can interfere with Radar and the like and as there is no ability for the overseas hub to monitor this, it would make you liable for interference.</p> <p>Zigbee and IP protocol use 2.4GHz same as WiFi so they are perfectly legal and usable in Australia.</p> <p>You have two options. Both include disabling the inbuilt Z-Wave in SmartThings.</p> <p>Option 1) Buy only Zigbee or IP based products.</p> <p>Option 2) buy a Z-Wave USB dongle on the Australian Frequencies.</p> <p>Also note that SmartThings and Samsung will not provide any technical support to Australia.</p>
|samsung-smartthings|zwave|
Can I use a US or UK SmartThings hub in Australia?
2392
<p>In Australia, the SmartThings hub <a href="https://www.lifehacker.com.au/2016/06/setting-up-your-first-smart-home/" rel="noreferrer">isn't currently on the market</a>:</p> <blockquote> <p>Not yet released in Australia, Samsung’s SmartThings platform promises loads of great home automation.</p> </blockquote> <p>If I have some products in mind that use ZigBee and Z-Wave and want to benefit from the features of SmartThings, can I order a SmartThings hub from another country, like the US, and then use it in Australia? </p> <p>Will Australian smart devices be compatible with this imported hub, or will I need to import the devices too?</p>
2017-12-13T19:35:53.977
<p>Unfortunately, it doesn't look like your goal of just one hub is achievable. According to the <a href="https://kb.arlo.com/1005072/When-do-I-need-a-base-station" rel="nofollow noreferrer">Arlo documentation</a>:</p> <blockquote> <h3>When do I need a base station?</h3> <p>You need a base station to connect Arlo Wire-Free and Arlo Pro Wire-Free cameras.</p> <p>You don't need a base station to connect Arlo Q and Arlo Q Plus cameras. They connect directly to your Wi-Fi router.</p> </blockquote> <p>It is confirmed in the support forum that the <a href="https://community.netgear.com/t5/Buying-Options-Tips/Do-I-need-a-Arlo-base-station-to-use-the-cameras-Is-the-base/td-p/1005295" rel="nofollow noreferrer">base station <strong>is required</strong></a> unless you have an Arlo Q camera.</p> <p>It's a similar case with the Lutron Caseta: <a href="https://community.smartthings.com/t/lutron-caseta-integration-do-i-need-a-smart-bridge/94532" rel="nofollow noreferrer">they can't integrate directly with your SmartThings hub</a> and the Lutron SmartBridge is needed.</p> <p>So, as you suspect, there is no way to get rid of the hubs, however ludicrous it may seem. If this isn't palatable for you, it would seem that returning them is the only option, unfortunately, and you'll have to take a look at replacements.</p> <p>Since you expressed interest in the Echo Plus, <a href="https://www.amazon.co.uk/b?node=14178233031" rel="nofollow noreferrer">here</a> is the list of compatible devices from Amazon. As you can see, the list isn't huge, but it does vastly simplify your setup if you are able to use them. Interestingly, there aren't any switches listed, so you might have to resort to at least one hub like the <a href="https://community.smartthings.com/t/best-in-wall-light-switches/72292" rel="nofollow noreferrer">SmartThings hub</a> which tends to have pretty good support for many ZigBee and Z-Wave devices.</p> <p>It seems that great care is needed to avoid having dozens of hubs in your house — and <a href="https://www.reddit.com/r/homeautomation/comments/7e0w2c/dear_companies_stop_making_hubs/?st=jb863b52&amp;sh=f51f0417" rel="nofollow noreferrer">many home automators</a> notice this. It's simply a case <a href="https://xkcd.com/927/" rel="nofollow noreferrer">of competing standards</a>...</p>
|smart-home|samsung-smartthings|zigbee|zwave|tp-link|
Reducing the number of Hubs in a DIY Smart Home Automation project?
2394
<p>I'm doing some very basic automation - lights, cameras, motion sensors. My key requirement is to be able to turn certain lights on or off based on motion and time of day, with the ability to add more complex logic later via custom programming.</p> <p>I bought some products without much planning, just based on individual product reviews and recommendations, and ended up with 3 hubs - NetGear (Arlo cameras), Lutron Smart Bridge (light dimmer), SmartThings (motion sensors). I also have an Amcrest camera because one area requires TPZ functionality for proper monitoring. Lutron integrates with SmartThings but has to go through the Lutron Bridge. I also bought a TP-Link device advertised as "no hub required", only to find out after delivery that the advanced functionality requires yet another hub.</p> <p>The excessive number of hubs is insane and I'd like to consolidate everything down into <strong>one</strong> hub (or even better, <strong>zero</strong> hubs, as my Wi-Fi mesh has better coverage throughout the house than any of the proprietary networks).</p> <p>I'm still within the return window for most of the stuff I bought, so the cost of switching some of the products is reduced. Is getting down to one hub possible at this time? I'm really intrigued by the new Echo Hub with ZigBee support.</p>
2017-12-18T03:05:02.430
<ol> <li><p>You have to provide an endpoint of some sort to allow control over a given device.</p></li> <li><p>Port forwarding is not the only option, the device could connect out to a publicly accessable server on the internet, once this connection is created then commands can be sent via this to the device. This is how many IoT devices work. Example protocols used for this include MQTT, but <a href="https://en.wikipedia.org/wiki/Push_technology" rel="noreferrer">long poll HTTP</a> is also an option.</p></li> <li><p>Look at something called UPnP, this is a way for devices to request a router sets up a specific set of port forwarding rules for a given device.</p></li> </ol>
|networking|wifi|communication|esp8266|
Is there any way to access local server from outside without port forwarding?
2409
<h1>Situation</h1> <p>I need to access an <em>ESP8266</em>'s Wi-Fi local server from outside.</p> <p>Like Xiaomi Yeelight (<a href="https://www.yeelight.com/en_US/product/wifi-led-c" rel="noreferrer">YeeLight Introduction Web Site Link</a>) or LOHAS LED (<a href="http://www.lohas-led.com/" rel="noreferrer">LOHAS LED Web Site</a>), I have to control it from outside <strong>not in same Wi-Fi</strong>. </p> <p>I can only think of <em>port forwarding</em>, but I don't think Yeelight uses port forwarding (just my opinion).</p> <p>I don't know whether YeeLight forces one to activate port forwarding or not using port forwarding, but I wonder how YeeLight can control the light bulb from the outside.</p> <h1>Question</h1> <ol> <li><p>In order to control Wi-Fi IoT product like YeeLight, I have to create local server which can control Wi-Fi IoT product's GPIO. Is it right?</p></li> <li><p>If question 1 is right, how I can access to Wi-Fi IoT product's local server from outside <strong>without port forwarding</strong>?</p></li> <li><p>Is there any way to force to activate <em>port forwarding</em> in end-point (not in router)?</p></li> </ol>
2017-12-18T06:49:53.673
<p>I finally implemented this using the Samsung SmartThings hub and Samsung motion sensor, using a cloud-to-cloud connection from SmartThings to the Lutron SmartBridge. Did not find a simpler solution.</p>
|smart-home|alexa|sensors|samsung-smartthings|
Lutron switch - turn off lights when nobody is in the room?
2411
<p>I have a room where the lights are controlled by a Lutron Caseta switch connected to a Lutron SmartBridge and Amazon Alexa. UPDATE: I don't require the use of Alexa in the solution, I'm just saying I have it, in case it helps.</p> <p>What is the simplest way (with the least amount of additional hardware) to automatically turn off the lights when the room is vacant?</p> <p>Additional info</p> <ul> <li>The room is relatively small (typical kid's bedroom in a U.S. home).</li> <li>The switch's line-of-sight to the room is obstructed, so a traditional motion-sensor switch is not an option. The motion sensor has to be placed on a different wall from where the switch is located.</li> </ul> <p>Some quick research on the Internet indicates Lutron motion sensors don't work with Lutron Caseta or SmartBridge and the most popular way to implement this requirement is with a Samsung SmartThings hub and Samsung motion sensor, using a cloud-to-cloud connection from SmartThings to the Lutron SmartBridge. Is there a simpler solution?</p>
2017-12-19T17:32:48.400
<p>There a million ways to skin this cat. Best for you at this stage to just try to get something working. Beyond that you can worry about "right" and "suitable" ways.</p> <p>Your setup is feasible and makes sense.</p> <p>Maybe you're running into trouble because you're expecting to find some software off the shelf? Since the DHT22, the Uno, the HC-05 and the Pi are all disparate devices with their own particular requirements, it's highly unlikely you'll find something plug and play. That's okay, it just means you have to write the glue software yourself.</p> <p>Consider each of the interfaces from sensor to cloud and tackle each one in turn. Start by getting the Uno polling the DHT22 for a value. Then get the Bluetooth comms working. Then the Wifi and MQTT. Fire up Thingworx and ingest some MQTT packets. Then put it all together. You'll find lots of examples of each bit, so concentrate on one at a time.</p>
|raspberry-pi|bluetooth|arduino|
IoT Setup: Bluetooth Sensor -> IoT Gateway -> IoT Platform
2427
<p>I want to get started implementing IoT stuff. I do not have experience with it so far, but am learning fast.<br> I am imagining my setup as follows: </p> <p><strong>Proposed Setup</strong></p> <p>Different wireless sensors (Temperature, Humidity, ...) should be connected to an IoT Gateway via BL (or BLE). The IoT Gateway should push the sensor information to an Open-Source IoT Platform - probably via Wi-Fi &amp; MQTT. The Open-Source IoT Platform should feature a Rule Engine &amp; expose a REST API. </p> <p><strong>Hardware</strong></p> <ul> <li><p>Arduino Uno R3 with DHT22 (Temperature Sensor) &amp; HC-05 (Bluetooth Slave) as my Sensor.</p></li> <li><p>Raspberry Pi 3B with HC-05 (Bluetooth Master) as IoT Gateway.</p></li> <li><p>IoT Platform should be hosted in the Cloud on AWS or somewhere.</p></li> </ul> <p><strong>Questions:</strong> </p> <ul> <li>Is this setup feasible and does it make sense?</li> <li>What Software to use for the IoT Gateway?</li> <li>Is the IoT Gateway software dependent on the IoT Platform that I use? </li> <li>What Open Source IoT Platform to use?</li> </ul> <p>I was thinking about "thingworx", as it is kind of the biggest one. "Kaa" does not have a rule engine as far as I read. "thingboards.io" also looks really nice from what I can see.<br> What steps do I need to take to implement this? How do I actually do this?</p> <p>While these questions might be rather specific, keep in mind, I have absolutely no idea about this stuff. I don't own anything besides the Raspberry Pi 3B - which I won at a hackathon and haven't used so far. </p> <p>Once I have the information in the IoT Platform and can access it with REST (or can publish it from the platform to an MQTT Broker), I will be able to implement my application. Ideally the setup would allow me to change the IoT Platform with minimal effort. I mean that's what standards (IoT Gateway, Bluetooth, MQTT) are for, right?</p> <p>P.S.: IoT Gateway and IoT Platform tags are missing</p>
2017-12-27T08:24:23.590
<p>You can make things a little bit complicated for others by disturbing the I2C bus in some way. Lock the bus from other I2C masters by your controller, but this is not much as anyone can easily remove your MCU from the board and free the bus.</p> <p>I recommend to remove the markings from the EEPROM's package, this will make harder to interface the EEPROM with another MCU, but not impossible. Also you should enable read-out protection on your MCU so they cannot use your firmware to reverse-engineer the interface of the EEPROM.</p> <p>But all of the above mentioned items are just tricks, none of them offer real protection. If you want real protection you should use encryption.</p> <p>You did not mentioned why the data cannot be encrypted, so I assume that your MCU is not able to handle such task.</p> <p>So you could consider using secure EEPROM, such as Atmel's <a href="http://www.atmel.com/products/security-ics/secure-memory/default.aspx" rel="nofollow noreferrer">CryptoMemory</a> family.</p> <blockquote> <p>CryptoMemory is designed to keep contents secure, whether operating in a system or removed from the board and sitting in the hacker’s lab.</p> </blockquote> <p>Here is an <a href="http://www.atmel.com/Images/crypto_und_3_04.pdf" rel="nofollow noreferrer">overview</a> and a chip <a href="http://www.atmel.com/Images/Atmel-2024S-CryptoMem-AT88SC0808C-Datasheet-Summary.pdf" rel="nofollow noreferrer">datahseet</a>. It offers four levels:</p> <ol> <li>First Option: No Security</li> <li>Second Option: Password Protection</li> <li>Third Option: Authentication</li> <li>Fourth Option: Data Encryption and MACs</li> </ol>
|security|flash-memory|
Secure EEPROM Reading from Another Device
2454
<p>We are working on some Embedded device (Tag, the Tag hardware is: MCU, external EEPROM, Temperature and Humidity sensors) that collects temperature and humidity, the Tag save the samples in the EEPROM, the connection between the MCU and the EEPROM is I2C.</p> <p>My questions is:</p> <p>Is there a way to secure the EEPROM that only my MCU is able to connect and extract logged data? My concerned is that someone connects a DevelopmentKIT with an I2C driver to the Tag EEPROM and extracts the data. </p>
2017-12-28T15:21:51.453
<p>Change the last line from</p> <pre><code>client.start_loop() </code></pre> <p>To</p> <pre><code>client.loop_forever() </code></pre>
|mqtt|paho|
The MQTT Paho Python code doesn't work properly
2464
<p>This question is related to <a href="https://iot.stackexchange.com/questions/1953/connect-cnc-machine-to-aws-iot/1954">this one</a>, I created the code below:</p> <pre class="lang-py prettyprint-override"><code>import paho.mqtt.client as mqtt import time import serial # Open grbl serial port s = serial.Serial('COM3',9600) # Wake up grbl s.write("\r\n\r\n") time.sleep(2) # Wait for grbl to initialize s.flushInput() # Flush startup text in serial input f = """ O1000 T1 M6 (Linear / Feed - Absolute) G0 G90 G40 G21 G17 G94 G80 G54 X-75 Y-75 S500 M3 (Position 6) G43 Z100 H1 Z5 G1 Z-20 F100 X-40 (Position 1) Y40 M8 (Position 2) X40 (Position 3) Y-40 (Position 4) X-75 (Position 5) Y-75 (Position 6) G0 Z100 M30 """ # Runs when the client receives a CONNACK connection acknowledgement. def on_connect(client, userdata, flags, result_code): print "Successful connection." # Subscribe to your topics here. client.subscribe("hi") # Runs when a message is PUBLISHed from the broker. Any messages you receive # will run this callback. def on_message(client, userdata, message): if message.topic == "hi": if message.payload == "run": # Stream g-code to grbl for line in f: l = line.strip() # Strip all EOL characters for consistency print 'Sending: ' + l, s.write(l + '\n') # Send g-code block to grbl grbl_out = s.readline() # Wait for grbl response with carriage return print ' : ' + grbl_out.strip() # Close file and serial s.close() # You could do something here if you wanted to. elif message.payload == "STOP": # Received "STOP". Do the corresponding thing here. # Close file and serial s.close() print "CNC is stopped." client = mqtt.Client() client.on_connect = on_connect client.on_message = on_message client.connect("iot.eclipse.org", 1883, 60) client.loop_start() </code></pre> <p>But when I run it I got nothing but <code>Successful connection.</code> and then the code ended. Can you please tell me what's going on?</p>
2017-12-30T18:00:04.337
<p>Subscribing to <code>$SYS/#</code> topic will provide some information about the broker and maybe about the clients. Detailed description of these items can be found <a href="https://github.com/mqtt/mqtt.github.io/wiki/SYS-Topics" rel="noreferrer">here</a>.</p> <p>There are three main categories to highlight:</p> <blockquote> <ul> <li><strong>Static Topics</strong>: Messages on a static <code>$SYS</code> topic are not required to be sent on every <code>$SYS</code> topic update interval. These messages are sent once the broker subscribes to the $SYS topic</li> <li><strong>Required Topics</strong>: Every broker which claims to support the <code>$SYS</code> topics should support these topics.</li> <li><strong>Optional Topics</strong>: A broker implementation may decide if it implements an optional topic.</li> </ul> </blockquote> <p>The one needed to for client status check falls into the "Optional Topics" category.</p> <ul> <li><p><code>$SYS/clients/[client-id]/ip</code></p></li> <li><p><code>$SYS/clients/[client-id]/connectedtime</code></p></li> </ul> <p>Also, based on this <a href="http://www.steves-internet-guide.com/mosquitto-logging/" rel="noreferrer">description</a> about Mosquitto's logging, the console log can be logged into a topic (<code>$SYS/broker/log/#</code>) as well.</p> <blockquote> <p>Two common question are:</p> <ul> <li>Can I see all connected clients?</li> <li>Can I list all topics?</li> </ul> <p>The broker doesn’t let you do this directly but by enabling logging to a a topic and monitoring the topic with an MQTT client you can get a good idea.</p> </blockquote> <p>Probably for privacy and/or security reasons iot.eclipse.org does not have topics for these log entries.</p> <ul> <li><p>No topics for <code>$SYS/clients/</code></p> <p><a href="https://i.stack.imgur.com/f6NqN.png" rel="noreferrer"><img src="https://i.stack.imgur.com/f6NqN.png" alt="enter image description here"></a></p></li> <li><p>No topics for <code>$SYS/broker/log/#</code></p> <p><a href="https://i.stack.imgur.com/B7MTh.png" rel="noreferrer"><img src="https://i.stack.imgur.com/B7MTh.png" alt="enter image description here"></a></p></li> </ul> <p>For other public brokers these optional topics may exist, you can check them easily with <a href="https://kamilfb.github.io/mqtt-spy/" rel="noreferrer">mqtt-spy</a> for example.</p>
|mqtt|mosquitto|eclipse-iot|
How can I get access to a public MQTT broker's (like iot.eclipse.org) logs?
2475
<p>There was this recent <a href="https://iot.stackexchange.com/q/2464/14">question</a> in which the OP used <a href="https://iot.eclipse.org/getting-started#sandbox-mqtt" rel="noreferrer">iot.eclipse.org</a> as an MQTT broker. This server actually runs the latest released version of <a href="https://mosquitto.org/" rel="noreferrer">Mosquitto</a> broker.</p> <p>I have advised to check the connection on the broker side and I have checked what are the possibilities. I could not find a way to access the <a href="https://iot.stackexchange.com/questions/956/how-to-enable-detailed-logging-of-mosquitto-broker-on-windows-7">logs</a> provided by iot.eclipse.org's Mosquitto broker.</p> <p>Anyway does someone know a way to get information about my client from a public broker?</p>
2018-01-02T02:55:57.667
<p>Try enabling TCP keep alive with a shorter period than 15 minutes, you should be able to enable TCP keep alive from your server and/or from your device (SIM5320), enabling either one should solve your problem.</p> <p>In the SIM5320 you can use <code>AT+CTCPKA</code> to enable TCP keep alive.</p> <p>In your server, enable <code>socket.SO_KEEPALIVE</code></p> <p>This is transparent to the TCP user (you), so it should not interfere with your application, as opposed to the accepted answer.</p>
|mqtt|networking|
SIM5320 MQTT TCP connection closing unexpectedly after time
2480
<p>I have been working on an MQTT protocol using the SIM5320. I am familiar with the AT command documentation, and have a working implementation with an Arduino.</p> <ol> <li>I open a network socket with <code>AT+NETOPEN</code></li> <li>Then I open a TCP connection with <code>AT+CIPOPEN=0,&quot;TCP&quot;,&quot;ip address&quot;,port</code>.</li> <li>I then transmit data for the MQTT protocol using <code>AT+CIPSEND</code>, which executes successfully.</li> </ol> <p>If I send data to the SIM module through MQTT, it is also received and the message is detected.</p> <p>With MQTT, there is a Keep-Alive interval which specifies how long the server will keep a connection open between communication, basically how long the client can idle before being forcibly disconnected from the server. However, I have set this value to the maximum of 18 hours, which is far longer than the ~15 minute disconnections.</p> <p>My issue arises after ~15 minutes, when I try sending a command to the server, and no response is given. The SIM has not issued a &quot;+IPCLOSE: 0,4&quot;, which usually occurs when the server forcibly disconnects the client, or any other sort of indicator.</p> <p>Additionally, I am still able to send data and it appears that the CIP connection is still open, as indicated by <code>AT+CIPOPEN</code>?. When I try and close the connection with <code>AT+CIPCLOSE=0</code>, I receive <code>+CIPCLOSE: 0,4</code> and &quot;ERROR&quot;. There is no mention of what <code>+CIPCLOSE: 0,4</code> means in the documentation, however it does not seem to close the connection, as it cannot be opened or used.</p> <p>I would really love to know what is happening in this 15 minutes, between establishing a connection and sending data, to attempting to send data again. There is no alert or any indication of anything going wrong, so I am seriously confused.</p> <p>I initially asked <a href="https://electronics.stackexchange.com/questions/347368/sim5320-tcp-connection-closing-unexpectedly-after-time">this question</a> on Electrical Engineering stack exchange, but was advised to ask it here as well.</p> <p>I've attached the code I wrote <a href="https://drive.google.com/drive/folders/1QkGD0ZuCiwCtm6IHB4ll3EehJko9VITx?usp=sharing" rel="nofollow noreferrer">here</a> for anyone who would like to take a look, and there aren't any libraries you need to run it.</p>
2018-01-02T20:38:20.090
<p>If you want to use a RESTlike Environment, you can setup: PHP CodeIgniter + MariaDB But you need to reconsider your requirements. Using REST over HTTP may require the use of intermediate techniques and a webservice based implementation. If you are planning a real-time application, it would be better to use a telemetry messaging protocol, as MQTT.</p> <p>In our IoT Lab we're implementing this configuration for a real-time solution:</p> <ul> <li>Fedora 26 Server</li> <li>Mosquitto MQTT Broker</li> <li>MongoDB</li> <li>Izmailoff's MQTT-Mongo (<a href="https://github.com/izmailoff/mqtt-mongo" rel="nofollow noreferrer">https://github.com/izmailoff/mqtt-mongo</a>)</li> </ul> <p>The IOT devices are "Adafruit Feather Huzzah" ESP8266, using arduino PubSubClient.h</p> <p>The Mosquitto MQTT Broker has not (by now) any security configuration, and every port of MongoDB and MQTT is set by default.</p> <p>Should work out of the box by setting up the data collections and documents on "application.conf" on Izmailoff's GitHub.</p>
|mqtt|web-services|open-source|rest-api|
Recommendation to choose API development open source Language, Framework and Database
2484
<p>I'm working in a IoT project and my role is to provide APIs to allow devices to communicate with server/database. I have decided to use MySql for relational data like user details etc.. and MongoDb for other data like device data (Multi tenant data), and PHP Laravel framework for API development.</p> <p>I just want to know if this is good combination of Language, Framework and Databases? if not then what is the good combination of Language, Framework and Database, as per my requirement.</p> <p>As of now devices are limited but in future it may goes into thousands and can send data frequently (Once in a minute or once in 5 seconds). Most of the devices will be running on low power and memory, ex., Temperature, Humidity, Heart Beats sensors. Same time APIs will be used for web portal as well. End of the day Rest APIs will get used by Devices, WebPortal, MobileApp.</p> <ol> <li>Is it good to use MongoDb+MySql over other databases like PostgresSQL? or any other suggestions.</li> <li>Is it good to use two different platforms for API development, one for devices (MQTT+Mosquitto) and another for web portal and mobile app (Laravel). Or any suggestion to make this system better.</li> <li>What programming language would you suggest in open source?</li> </ol>
2018-01-06T11:44:50.173
<p><a href="https://github.com/mkovatsc/Copper" rel="nofollow noreferrer">Copper</a> actually is a tool for sending CoAP requests; it is a simpler implementation of REST service. If you want to work with another protocol (not HTTP) then you should look for another tool.</p>
|contiki|
How to create external client for cooja?
2503
<p>I designed an authentication protocol for IoT. Now I want to emulate my protocol with the Cooja simulator, in order to test power consumption.</p> <p>My scheme is gateway-based, so I used the RPL-Border-Router sample as gateway. and some motes as sensors. I used the Tunslip tool to connect my network to internet.</p> <p>Now I want to implement my client, so that it communicate to my RPL network in order to key agreement.</p> <p>As I searched I found that the client should be on a Firefox plugin Copper. (Is there any other way to implement client? if yes, what is that?)</p> <p>As I told before in my own protocol, there is key agreement phase between client and Cooja motes. But I have problem to handle this phase in Copper. It seems that the requests and responses from client (Copper) send as a packet (with get, post,..) to Cooja motes. So how to implement packets in copper?</p>
2018-01-08T10:37:20.100
<p>The boxes are Intrusion Prevention Systems (IPSs) that work by monitoring for "Indicators of Compromise" (IoC). This would be network traffic that is unexpected in your environment; network traffic that goes to a known bad destination; or network traffic that contains packets consistent with malware. </p> <p>Typically, these boxes come with a subscription. The company selling them sends out frequent updates (daily or more often) that refresh the IoC database. If they discover that some ransomware reaches out to <a href="https://ransom.keyserver.evil.example.com" rel="nofollow noreferrer">https://ransom.keyserver.evil.example.com</a>, they might immediately add the network address to the IPS blacklist, and publish it to their customers as soon as they can. If you have a device on your network that tries to connect to get a ransomware key, their IPS will break the connection so you don't get infected.</p> <p>Some of these boxes also come with software that maintains an inventory of your devices. You can take a look at all of the little IoT things on your network today, and bless them all. Tomorrow, if it detects there's a new node on your network, it can pop up a warning on your mobile phone that says "New thing detected on your network, authorize (yes/no)?" This might help you block someone borrowing your wifi, or hacking into your network. </p> <p>There isn't a direct open source replacement for all of these functions; not because the technology is so special, but because the constant updating of the IoC database requires intel constantly gathered by humans responding to new incidents, and paying a bunch of humans is expensive. You can achieve some of this functionality with an open source IPS system like <a href="http://www.snort.org" rel="nofollow noreferrer">Snort</a>, but the Snort "community" subscription is updated 30 days after their commercial subscription. That's quite slow when today's common threats include 0-day based malware. </p>
|smart-home|security|
How do Smart Home Security Boxes work?
2517
<p>With the increased security risks against IoT based smart homes, many security appliances have been commercialized. These appliances or boxes claim to protect the home network from malware, cyber-attacks, and preserve consumer’s data privacy.</p> <p>There is a growing list of entrants in this space, including <a href="https://www.f-secure.com/en/web/home_global/sense" rel="nofollow noreferrer">F-Secure (SENSE)</a>, <a href="https://www.bitdefender.com/box/" rel="nofollow noreferrer">BitDefender BOX</a>, and many others.</p> <p>I would like to know how these boxes work, technically. Is there an open source among them?</p> <p>Do they simply work like traditional IDS/IPS/Firewall? I am sure there are many differences and the <code>cloud support</code> is one of them. Are there other differences?</p>
2018-01-10T08:12:30.603
<p>There is no problem with almost any kind MQTT broker to handle this load, especially for qos=0 (probably in your case) messages. We have constant load to our broker with incoming 100.000 messages (0.5KB) per second (+SSL). The problem may appear from traffic side, not from pps.</p> <p>Regarding architecture of your system my personal advice - try to make it as simple as possible. And simple mean - just a few intermediate components/services. If you can connect directly two services - do it. You will always have the possibility to make it more complex when you will start adding features.</p>
|mqtt|protocols|data-transfer|
Should I use the MQTT protocol?
2528
<p>I am planning to start to implement the below IoT use case.</p> <p><strong>Use case</strong></p> <p>The IoT devices will send 100k messages/minute to the gateway via repeaters and the gateway will transfer the messages to the cloud. I want to track the employees in an organization. The sensors will be fixed on their ID card. The sensor sends the location related data (approx. 15KB/message) to the gateway via repeaters. It's for the analytical purpose. After the data passed to the cloud, I'll do some analytics and store into the DB and display on a web page. Based on this analytics data, I'll show the user's current location and also the user's moving locations of a certain passed time span (last 1hr or 2hr or 1day).</p> <p>I'll do some processing over the data and send it to the front end/DB.</p> <p>I have gone through the IoT basics and its architecture. Then I decided to use "SMACK" stack (Spark, Mesos, Akka, Cassandra, Kafka) architecture.</p> <p>I decided to use "Kafka native client" in the gateway to publishing the messages to the cloud.</p> <p>Should I use MQTT protocol to transfer the message to Kafka? Or MQTT is not needed for the above use case?</p> <p>If yes, what would be the benefit of using MQTT with the "SMACK" architecture?</p>
2018-01-10T10:34:40.210
<p>Configuring the USB port as Ethernet only complicates things. Not only does is throw the uncommon, proprietary RNDIS protocol into the mix, but then you need to add an IP server/client application on top.</p> <p>The Micro USB connector on the Edison is already configured to provide a bridge to a UART using an FTDI chip. The Raspberry Pi already comes with (equally proprietary, but hugely common) FTDI drivers. The drivers will create a <code>/dev/ttyUSB</code> device on the Pi when the Edison is plugged in that you can talk to like any other serial port.</p> <p>Create a server for the serial port on the Edison that responds to simple commands (or simply periodically sends data) and create a client for the virtual serial port on the Pi that handles the other end.</p>
|raspberry-pi|intel-edison|usb|
Connecting Raspberry Pi and Intel Edison
2529
<p>I have a GPS unit with an IMU based on the Intel Edison I want to used alongside a Raspberry Pi for a robotics project. The general idea is that I want to use the Edison unit to provide the Pi with sensor data (gps, gyro, compass, ++) on a standardised format, and use the Pi to drive the robot itself. This will allow me to add further Edisons in the future, and/or replace them with newer and improved sensors without having to modify the computer driving the robot. </p> <p>However, I'm stuck on how to integrate the two. My initial idea was to use the onboard USB ports for communications, but I don't quite know where to start. Reconfiguring the USB port to provide ethernet over USB is an alternative if that simplify things. </p> <p>Having the Edison write continuously to the usb port with no other communication between the two is no problem, but there are scenarios where the Pi should send commands to the Edison in order to reset or calibrate one or more sensors or disable them during testing. </p> <p>Is the best option to write a custom driver for this, or would I be better off using ethernet over USB and simply implement a server/client model using TCP? </p> <p>If the USB driver option is the best, where would be a good place to look? This driver would essentially have to run one or more programs/commands on the Edison returning the output to the Pi. </p> <p><strong>Edit</strong>: As mentioned USB is the preferred method for connection, as it allows for both data and power to the Edison (driving it from the Pi) so I can avoid having to add a separate power source for the Edison. The messages will ideally be simple json strings going at a rate of approx 100/sec. The Edison is running Busybox and the Pi is on a Debian-based distro. Neither will have access to an external network while running, so they will be limited to USB or Ethernet over USB as there are no other physical connectors found on both units. </p>
2018-01-11T14:19:04.190
<p>Wow ! 5 to 8 kn is quite a distance.</p> <p>If you are willing to spend in order of US $500 per sensor, then I can recommend a solution using an inexpensive satellite modem. Although this might sound expensive, think of the cost spread over many years, and be aware that in addition to the sensors, you can program the satellite modems themselves, if need be.</p> <p>I have had lots of fun with Skywave’s offerings (they have now rebranded as OrbComm), and you might like to look at the <a href="http://www.orbcomm.com/en/hardware/devices/skywave-idp-800" rel="nofollow noreferrer">IDP_800</a>.</p> <p>Read <a href="http://www.orbcomm.com/PDF/datasheet/IDP-800-Trailer-Tracking.pdf" rel="nofollow noreferrer">the datasheet</a>.</p> <p>Mass: with batteries: 1.3 Kg (with integrated antenna Dimensions : 43.2 cm x 14.7 cm x 2.5 cm and it runs on 6 AA batteries, which can be bought almost anywhere. </p> <p>I send only one 50 byte message a day &amp; they tell me that I can except a three year battery life. Their units generally cost US $500 - $1,000 (with discount for bulk purchases), and their airtime rates are competitive.</p> <p>The device has built in GPDS and is fully programmable in the LUA scripting language.</p> <p>Obligatory picture follows: <a href="https://i.stack.imgur.com/CR4RO.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CR4RO.jpg" alt="enter image description here"></a></p> <hr> <p>If you are looking for something cheaper, then II would recommend <a href="http://flutterwireless.com/" rel="nofollow noreferrer">Flutter</a> (see also completed <a href="https://www.kickstarter.com/projects/flutterwireless/flutter-20-wireless-arduino-with-half-mile-1km-ran" rel="nofollow noreferrer">Kickstarter page</a> for more info).</p> <p>It's a US $20 Arduino board with 1kmn wifi range, so you would still need to use repeaters, but you would certainly need fewer than with conventional WiFi. I would suggest a mesh network, which Flutter supports, and would recommend that you mount them on posts, as high above the ground as you can. </p> <p>Whatever solution you go for, don't accept manufacturers claims as to range - start with one Flutter/whatever, and start adding more, checking as you go how good communication is. <strong><em>DO NOT</em></strong> put hem all in place first &amp; then go for a big bang turn on.</p> <p>That's about it really, so now for the obligatory graphic</p> <p><a href="https://i.stack.imgur.com/mtScu.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mtScu.jpg" alt="enter image description here"></a></p>
|networking|raspberry-pi|agriculture|
Raspberry Pi outdoor connectivity for large farm
2537
<p>I have several raspberry pi zeros connected to agricultural sensors in a large farm(1500+ acres). What is my best solution for getting the agricultural data from them wirelessly? I want to get the data to a central internet connected server which will be approximately 5-8km away from the sensor.</p>
2018-01-12T19:14:34.540
<p>To make this kind of experiment most easy is to use API.ai (a tool acquired by Google just before Google Home was born [1]).</p> <p>In API.ai you can very easily imitate the flow with data that is given with one command and read with another, but with actual Google Drive it is also possible to build the exact flow you have.</p> <p>Your described flow is done like this:</p> <ol> <li>Use an Intent to wake up API.ai and an Action to do sth with the data in Response [1]. In Action you will create a custom Fulfillment with for example Node.js [2] and there..</li> <li>..get use of Node.js version of the REST api of Google Drive to handle the document.</li> <li>Use another Intent in API.ai to generate another Action and call another Fulfillment and to call another action..</li> <li>..in Node.js to communicate to other direction and fetch the data from Google Drive REST API and call out the data in Response to the Intent in API.ai.</li> </ol> <p>[1] <a href="https://www.smashingmagazine.com/2017/05/build-action-google-home-api-ai/#google-actions-and-api-ai" rel="noreferrer">https://www.smashingmagazine.com/2017/05/build-action-google-home-api-ai/#google-actions-and-api-ai</a></p> <p>[2] <a href="https://medium.com/google-cloud/how-to-create-a-custom-private-google-home-action-260e2c512fc" rel="noreferrer">https://medium.com/google-cloud/how-to-create-a-custom-private-google-home-action-260e2c512fc</a></p> <p>[3] <a href="https://developers.google.com/drive/v3/web/quickstart/nodejs" rel="noreferrer">https://developers.google.com/drive/v3/web/quickstart/nodejs</a></p>
|google-home|google-assistant|
Google Assistant read custom phrase
2542
<p>I'm looking at getting a very quick prototype together for a piece of software I'm demoing, and I'd like to be able to say a phrase to the Google Assistant and have it read back a phrase that's been set on the fly from the software.</p> <p>I'm thinking of something along the lines of:</p> <ol> <li>I enter a phrase into my software and click some save button.</li> <li>My software saves this phrase in a document on Google Drive.</li> <li>I say a certain phrase to the assistant.</li> <li>The assistant reads back phrase from the Google Drive document.</li> </ol> <p>Just to clarify, I'm only looking for help with point 4. The rest should be straightforward.</p> <p>Is this possible at all? I don't mind a hacky solution as it's just for a short proof-of-concept demo.</p>
2018-01-03T22:47:52.980
<p>More realistically, this delay encompasses the time to register on the wifi network. </p> <p>In order to minimize power consumption (that's an officially irreplaceable battery) the device is normally completely dormant - it cannot afford the energy cost of maintaining a wifi network connection, and instead only starts trying to obtain one after the button has been pushed and it has traffic to send.</p> <p>Comparatively speaking, five seconds to wake up, authenticate and transmit a message is fairly reasonable.</p> <p>If you want something faster, you'll probably have to look at a different technology for the first "hop" from battery to mains powered infrastructure - perhaps propriety 2.4 GHz RF where you can simplify the association process. Or provide a power source which can accommodate a system that maintains a connections even when not being actively used.</p>
|aws-iot|amazon-iot-button|
How to decrease AWS IoT button press delay before message publishing?
2553
<p>I am using two AWS IoT buttons to increment a scoreboard. The system works, but there is about a <em>5 second delay from the button being pressed to until the message from the button is actually published to AWS</em>, which makes the scoreboard less responsive than I would like.</p> <p>I'm having trouble finding information about this delay between the initial button press and the message being published. I think I remember seeing in the documentation or on a blog that the delay exists to prevent an accidental double tap from being recorded, but I haven't been able to find where I read that.</p> <p>I have two questions:</p> <ol> <li>Is there any documentation or explanation of this delay that I'm missing?</li> <li>Is it possible to change this delay? Or is this built in to IoT buttons?</li> </ol>
2018-01-15T19:06:16.337
<p>I will post an answer, just to make it clear what your problem is.</p> <p>However, this is not really my answer - you ought to have been able to see it when @hardillb said "Hint: your Main loop is still never getting executed".</p> <p>Since it is never getting executed, I looked at the line above it which says <code>mqttc.loop_forever()</code>. Then I Googled for that function ans the 2nd or 3rd answer was <a href="http://www.steves-internet-guide.com/loop-python-mqtt-client/" rel="noreferrer">Understanding The Loop -Using The Python MQTT Client</a>, which clearly says</p> <blockquote> <p>The loop_forever() method <strong><em>blocks the program</em></strong>, and is useful when the program must run indefinitely.</p> </blockquote> <p>So, obviously the following statement will never be reached. There is your answer.</p> <hr> <p>What I am not going to do, is to fix your program for you, but I will give you some hints (<a href="https://en.wiktionary.org/wiki/give_a_man_a_fish_and_you_feed_him_for_a_day;_teach_a_man_to_fish_and_you_feed_him_for_a_lifetime" rel="noreferrer">teach a man to fish</a>).</p> <ul> <li><p>perhaps you don't need to call <code>mqttc.loop_forever()</code>. I don't know enough about what you want your program to do to figure it out (receive one laser signal, or loop receiving many). Maybe you can remove that. If you need it, then you need to learn about <a href="https://en.wikipedia.org/wiki/Thread_(computing)" rel="noreferrer">threading</a>. Some people have difficulty with the subject at first, but sometimes you just have to use it.</p></li> <li><p>someone mentioned debugging by inserting print statements. <strong><em>DO NOT</em></strong> do this. Get yourself a proper IDE. For Python, I do not know of any better than the excellent <a href="https://www.jetbrains.com/pycharm/" rel="noreferrer">Pycharm</a>. It is free, even for commercial use. Feel free to look for other options <a href="https://softwarerecs.stackexchange.com/search?q=python+ide">on our sister site</a>.</p> <p>Once you have a good IDE, learn about setting <a href="https://en.wikipedia.org/wiki/Breakpoint" rel="noreferrer">breakpoints</a>, which is the core concept of good debugging. The code will run until the breakpoint and stop. Then you can examine and even change the values of your variables, examine the call stack, seeing which function called which, and with which parameters, and you can step through the code a line at a time. </p> <p>In this case, you would have seen that the code would not step beyond that call to <code>mqttc.loop_forever()</code>, which should have caused you to examine he documentation and discover that your problem is that it is a blocking call.</p></li> <li><p>actually, this looks like a pure software problem, rather than anything IoT specific. I do understand that it is difficult to tell that, and to know which site to post on, but, in general, if I am going to post code, then I think that <a href="https://stackoverflow.com/">Stack Overflow</a> is the correct site.</p> <p>When posting there, you should post your code, explain what it is supposed to do, and what it is doing wrongly. Only with that information can others help you.</p></li> <li><p>and, finally, when your code is working correctly, if you are new to the language, you might want to post it to our <a href="https://codereview.stackexchange.com/">code review</a> site. <strong><em>DO NOT</em></strong> post non-working code. If you post working code, people there will help you to understand how it could have been more efficient, better laid out, easier to understand and maintain, etc, which can be a really good learning aid.</p></li> </ul> <p>I hope that this has been of some help, and look forward to seeing you at the various SE sites :-) </p>
|mqtt|raspberry-pi|
Program with MQTT hanging after starting, LDR processing is not working with no MQTT messages
2557
<p>I am trying to connect the LDR sensor to IoT by using GPIO pins (pin 4) of Raspberry Pi kit and publish MQTT messages. I am using a laser as a transmitter and the LDR sensor as a receiver, the output signal from LDR sensor is (0 or 1), if something passed through laser line, the output of LDR sensor will be 1, then the code must publish an MQTT message.</p> <p>I tried this code:</p> <pre class="lang-python prettyprint-override"><code>import paho.mqtt.client as mqtt import RPi.GPIO as GPIO import time import ssl GPIO.setmode(GPIO.BCM) GPIO.setup(4, GPIO.IN) # Define Variables MQTT_PORT = 1883 MQTT_KEEPALIVE_INTERVAL = 60 MQTT_TOPIC = &quot;ldr&quot; MQTT_MSG = &quot;there is a product&quot; MQTT_HOST = &quot;iot.eclipse.org&quot; # Define on_publish event function def on_publish(client, userdata, mid): print (&quot;Message Published...&quot;) # Initiate MQTT Client mqttc = mqtt.Client() # Register publish callback function mqttc.on_publish = on_publish # Connect with MQTT Broker mqttc.connect(MQTT_HOST, MQTT_PORT, MQTT_KEEPALIVE_INTERVAL) print (&quot;Connected Successfully&quot;) mqttc.loop_forever() #Main Loop while True input_value = GPIO.input(4) if input_value == 1: mqttc.publish(MQTT_TOPIC,MQTT_MSG,qos=1) print (&quot;message published&quot;) time.sleep(1) </code></pre> <p>When I run it I only see the printed output text <em>&quot;successful connection&quot;</em> and I am not seeing any of the expected MQTT messages.</p> <p>Can you please tell me what's wrong with this code? i create the main loop depending on this idea: <code>input_value = GPIO.input(4)</code> should enter the signal if the value of signal is 1 then it should publish the message what's wrong with my code?</p>
2018-01-17T13:15:24.007
<p>The data sheet is not too forthcoming on their expectation for connecting an antenna (other than suggesting that a matching network is mandatory if you run high power). However, from the photos in the linked article, it's clear that what was used in this example was a 50 ohm coax to SMA 'pigtail'. You can get a short coax pre-connected to an SMA (with maybe a 2nd connector on the other end which you can cut). Keep the bare wires at the end of the coax where it solders on to the module as short as possible and take care not to melt the insulation (heatsink with pliers).</p> <p>You shouldn't expect optimum performance like this, unless you're lucky (but it may be close).</p> <p>The quoted 50km range seems to be in free-space, to an aircraft. On the ground, you will experience attenuation and reflection (trees, buildings, etc) and these can have a huge impact on range. This goes some way to explaining the difference between the module's data-sheet performance, and the best-case that can be achieved in perfect conditions.</p> <p>You can also sometimes get increased range by using a more directional antenna. This rapidly becomes much more specialist though. I don't know what the LoRa protocol assumes, but radio protocols typically make some assumptions about time-of-flight in a duplex system, and this can also hard-limit the achievable range.</p>
|lora|lorawan|
Increasing the range of an RF module
2560
<p>I am working with a <a href="https://www.rfsolutions.co.uk/radio-modules-c10/frequency-c57/fm-lora-transceiver-module-pre-set-to-868mhz-p468" rel="noreferrer">RF-LORA-SO 868Mhz module.</a></p> <p>I read <a href="https://www.rs-online.com/designspark/rf-lora-the-50km-radio-module" rel="noreferrer">this article</a> that says the range of this module could go up to 50km. But I would need to connect an antenna to my LoRa module. This article I mentioned above doesn't seem to talk much about wiring.</p> <p>Most of these antennas have SMA.</p> <p>How do I connect an antenna like this to my radio module?</p> <p><a href="https://i.stack.imgur.com/FSGsy.png" rel="noreferrer"><img src="https://i.stack.imgur.com/FSGsy.png" alt="antenna"></a></p>
2018-01-19T16:36:11.493
<p>In addition to the two most common methods:</p> <ol> <li>Customer enters serial number printed on device into company portal.</li> <li>Device exposes WiFi AP for initial registration.</li> </ol> <p>is a third method that's not uncommon:</p> <ol start="3"> <li>Device forms proximity connection in response to physical trigger.</li> </ol> <p>The trigger could be bringing a magnet nearby, tapping the device, shining an IR led into a window, or removing a single-use tab. Whatever the trigger is, it will cause the device to go into a commissioning or registration mode, which makes it responsive to some form of short-range communication. Usually Bluetooth but could be NFC or WiFi. The device is paired to the customer's smartphone or computer via this temporary communications channel, automatically informing it of its unique identify so the customer can complete the process of registering the device.</p>
|alexa|aws-iot|
How to link device with user?
2568
<p>I'm trying to learn IoT development using an Arduino and Amazon's menu of services—Alexa Skill Kit, AWS Lambda, and AWS IoT. I've been able to get come a long way, but when I think about implementing these for like a fleet of devices, I can't figure out how to approach this problem:</p> <p><strong>For a headless device, how do you link a customer's device with that customer?</strong></p> <p>You can readily get a userID from Alexa whenever a user invokes your Alexa skill, and you can match that in your database to a customer, and potentially match that with a device registered to that customer—but how do you register a device to a customer? Would it have to be like having the customer enter a serial number in a UI somewhere? I had a thought that you could potentially use OAUTH to get a token from, e.g., a customer's Amazon account, send that to the device, and then have the device present both the token and its own identifier to your database. That way you have at least a link between their linked account and the device.</p> <p>Does this sound like a reasonable approach? I haven't been able to find much about connecting particular devices to particular customer accounts, so any links with more information are very welcome.</p>
2018-01-19T17:31:29.147
<p>It seems <a href="http://forum.arduino.cc/index.php?topic=462819.15" rel="nofollow noreferrer">that a range of at least 440 km is possible</a> with the LoRa protocol (i.e. there is no time-of-flight assumption as in GSM).</p> <p>The correct way to answer this question is by looking at the link budget for your transmit/receive arrangement. Although the basic calculations are simple, knowing the right way to do the calculation is not so simple.</p> <p>To receive a usable signal, the receiver needs a certain signal-to-noise ratio (determined by the tolerable error rate and the modulation characteristics). You may find some online examples of how to calculate this (for LoRa or something similar).</p> <p>Signal comes from transmit power, plus antenna gain, minus free-space loss (the range calculation) minus any shading from non-line-of-sight, plus antenna gain.</p> <p>Noise comes from the receive environment or thermal noise (whichever is greatest) and amplifier noise figure, plus any multi-path interference which is not delay compensated in the receiver.</p> <p>Assuming a 16km range is possible with a simple antenna (spherical uniform radiation), you're asking for a 3.125 times range increase or a 9.77 times increase in power. This is conveniently about 10 dB, so as a rough approximation you need a 5 dB antenna gain above the 'trivial' antenna at each end. If you aim for 7 dB at each end, this gives you a small margin for other factors you've not accounted for, imperfections in your assembly, etc.</p> <p>A further complication is that the quoted 16km range is plausibly within the horizon of an antenna close to the earth, but to achieve 50km line of sight, you would need to raise one or both ends by many metres.</p>
|raspberry-pi|lora|lorawan|
Is a range of 50 km+ possible in LoRa?
2569
<p>I read this <a href="https://www.rs-online.com/designspark/rf-lora-the-50km-radio-module" rel="noreferrer">article</a> which said I could get upto 50 km with a LoRa module.</p> <p>But when I read the product description it says the in-built range is only 16 km, so I obviously need an antenna. But what kind of antenna can I use that can get my 16 km LoRa module to 50 km?</p> <p>Will <a href="https://www.rfsolutions.co.uk/antennas-c8/whip-antenna-90deg-hinged-868-mhz-sma-m-p150" rel="noreferrer">something</a> like this work?</p>
2018-01-20T18:35:43.667
<p>Lambda is for running tiny functions, not long-running processes.</p> <p>You should have your web page connect directly to AWS IoT using WebSockets. Then it can get messages directly when they happen and display them, etc.</p> <p>If you don't need to store your state, you don't need Dynamo or S3. (Although you may want to use S3 to host the JavaScript/HTML for your application.)</p>
|aws-iot|aws|
Using AWS Lambda function to create a monitoring website for IoT devices
2574
<p>I want to create a web site to monitor my IoT devices, so I went through many tutorials to achieve that.</p> <p>The most common way that is used in the tutorials is writing to DynamoDB from IoT then using Lambda to invoke the data from DynamoDB to Lambda and finally hosted by S3. But S3 hosted the static web while I need a dynamic web site in order to trigger the data from AWS IoT.</p> <p>Can you please help me with this or show me a tutorial makes same thing?</p>
2018-01-21T09:18:35.567
<p>I finally figured out what my mistake is. It was in the ARN Resources of policy I wrote a wrong topic in the end of policy resources line. I wrote ldr instead of LDRsensor. </p>
|aws-iot|aws|
My thing connected to AWS IoT but it does not publish messages
2577
<p>This question is related to this <a href="https://iot.stackexchange.com/questions/2557/program-with-mqtt-hanging-after-starting-ldr-processing-is-not-working-with-no/2558#2558">one</a> after you helped me to fix my mistake I have connected to Eclipse broker, it worked just fine, connection and publishing, then I switched to AWS IoT broker with this code</p> <pre class="lang-python prettyprint-override"><code>#!/user/bin/python3 import paho.mqtt.client as mqtt import RPi.GPIO as GPIO import time import ssl import _thread GPIO.setmode(GPIO.BCM) GPIO.setup(4, GPIO.IN) # Define Variables MQTT_PORT = 8883 MQTT_KEEPALIVE_INTERVAL = 45 MQTT_TOPIC = &quot;ldr&quot; MQTT_MSG = &quot;there is a product&quot; #MQTT_HOST = &quot;iot.eclipse.org&quot; MQTT_HOST = &quot;xxxxxxx&quot; THING_NAME = &quot;LDRsensor&quot; CLIENT_ID =&quot;LDRsensor&quot; CA_ROOT_CERT_FILE = &quot;xxxxxxx&quot; THING_CERT_FILE = &quot;xxxxxxxxxxxx&quot; THING_PRIVATE_KEY = &quot;xxxxxxxxxxx&quot; # Define on_publish event function def on_publish(client, userdata, mid): print (&quot;Message Published...&quot;) # Initiate MQTT Client mqttc = mqtt.Client() # Register publish callback function mqttc.on_publish = on_publish # Configure TLS Set mqttc.tls_set(CA_ROOT_CERT_FILE, certfile=THING_CERT_FILE, keyfile=THING_PRIVATE_KEY, cert_reqs=ssl.CERT_REQUIRED, tls_version=ssl.PROTOCOL_TLSv1_2, ciphers=None) # Connect with MQTT Broker mqttc.connect(MQTT_HOST, MQTT_PORT, MQTT_KEEPALIVE_INTERVAL) print (&quot;Connected Successfully&quot;) #mqttc.loop_forever() def publishMessage(Variable): while (1): input_value = GPIO.input(4) if input_value == 1: mqttc.publish(MQTT_TOPIC,MQTT_MSG,qos=1) #print (&quot;message published&quot;) time.sleep(1) _thread.start_new_thread(publishMessage,(&quot;publishMessage&quot;,)) mqttc.loop_forever() </code></pre> <p>But what I get is that, I can connect successfully but I can not publish the mesages. Is it because of forever loop or there is some thing else.I tried debug method, on line <code>_thread.start_new_thread(publishMessage,(&quot;publishMessage&quot;,))</code> i got <code>[Errno 32] Broken pipe</code> what is that mean and how i can fix it?</p> <p>should i install AWSIoTPythonSDK?</p>
2018-01-24T08:00:55.683
<p>You can use Over The Air updates (OTA). If you google esp8266 OTA you'll find several examples such as <a href="https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=3&amp;cad=rja&amp;uact=8&amp;ved=0ahUKEwjuoZis487ZAhUMslMKHdaTBUAQtwIIMjAC&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DgFK2EDNpIeM&amp;usg=AOvVaw3Im1wzYMoRcAIT11jdjOjf" rel="nofollow noreferrer">this one</a></p>
|esp8266|
Can I upload code to NodeMCU without using micro USB?
2584
<p>Is there any way for me to upload code to NodeMCU without using micro USB? I tried to connect RX TX (NodeMcu) along with TX RX (Arduino) but it failed.</p>
2018-01-24T20:20:06.310
<p>Most devices I bought (IP cameras, light switches, power sockets) were using ultrasonic communication behind the scenes. Have a look at brands such as Chromecast, Lisnr &amp; Chirp.</p> <p>When the device is in configure mode, you have to hold your smartphone close to the device and the client app will send out an audio signal (could be audible or inaudible), with the SSID and password modulated in. Sounds like stone age, but it works with no frills :)</p>
|networking|wifi|communication|protocols|
How can a device get the SSID and Password of my Network without WPS?
2586
<p>I'm studying ways to make an IoT device access an user´s wifi network. I know about the WPS way, where the device 'broadcast' a signal and the router, after being commanded to listen, 'receive' it and give the device it's access. There's also the way in which the device create it's own access point, the user connect to it to pass the SSID and Password of the home network. Are ther other ways to accomplish that?</p> <p>I've read this article that talks about this 'ProbMe' <a href="http://www.embedded-computing.com/embedded-computing-design/connecting-devices-to-the-internet-of-things-with-wi-fi" rel="noreferrer">method</a>:</p> <p>I may be wrong, but the Broadlink Rm Pro may do something like this. Recently I configured one of those and I just had to:</p> <ol> <li><p>Connect my smartphone to my wifi</p></li> <li><p>Scan an QR code or type a code in Broadlink App</p></li> <li><p>Input my network SSID and Password in Broadlink App</p></li> <li><p>And, I do not know how, device is connected to my network, the app even has its MAC address. </p></li> </ol> <p>Do any of you know more about this ProbMe method and/or other alternatives to give an IoT device access to an user wifi network?</p> <p>Edit: Searching about the ProbMe, I've found out that this is a technology from a company called <a href="http://www.econais.com/probme/" rel="noreferrer">Econais</a>, just sharing if any of you want to develope/produce something similar, the company works with IoT software/hardware. Disclaimer: I do not work at Econais nor I'm involved with it in any way.</p>
2018-01-25T02:58:46.057
<p>It seems the "lag" observation is just a side-effect of the logging process, and not a real delay in the data flow.</p> <p>Following the suggestion of @hardillb, I installed <a href="https://www.wireshark.org/docs/man-pages/tshark.html" rel="noreferrer">tshark</a> on the Raspberry Pi. By observing the request and response packets between the Pi (192.168.0.104) and the ESP8266 (192.168.0.117), I can see that they are within fractions of a second (i.e. there is no 15 second delay responding from the MQTT broker).</p> <p><a href="https://i.stack.imgur.com/azd1D.png" rel="noreferrer"><img src="https://i.stack.imgur.com/azd1D.png" alt="tshark capture"></a></p> <p><strong>steps taken:</strong></p> <pre><code>sudo apt-get install tshark cd /home/pi sudo nano espcapture.pcap sudo chown root:root espcapture.pcap (because tshark runs as root) sudo tshark -i wlan0 -w /home/pi/espcapture.pcap &lt;wait 2 min&gt; CTRL+C </code></pre> <p>I then transferred the resulting espcapture.pcap file to my PC, and opened it in Wireshark for analysis / filtering.</p>
|mqtt|mosquitto|
How long between PINGREQ and PINGRESP on Mosquitto broker?
2589
<p>I have been chasing a problem with seemingly-random and infrequent disconnects due to "Socket error on client" between my ESP8266 client (PubSubClient 2.6.0) and my Mosquitto broker on Raspberry Pi (mosquitto 1.4.10).</p> <p>I have been reviewing the various log files and debug statements to try and figure out what is going on. While following the log file (<code>tail -f /var/log/mosquitto/mosquitto.log</code>), <strong>I noticed that <code>PINGREQ</code> and <code>PINGRESP</code> record pairs are not populated at the same time, even though their timestamps are identical. <code>PINGRESP</code> does not show up until the <em>next</em> <code>PINGREQ</code> is received. Is this normal behaviour?</strong></p> <p>An example is provided in the screenshot below. The orange row showed up first. The blue rows were added together in the log file 15 seconds later, even though they do not have the same timestamp. In fact, the <code>PINGRESP</code> timestamp is identical (1516832931) to the <code>PINGREQ</code> above (in orange).</p> <p>I would expect <code>PINGRESP</code> to follow almost immediately behind <code>PINGREQ</code> (i.e .the timestamps make sense). I just want to make sure that is actually happening given the several seconds lag I observe in <code>tail</code>. I think this is important because I assume the disconnects are from a keepalive violation, with my keepalive timeout at 15s.</p> <p><a href="https://i.stack.imgur.com/Lwt05.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Lwt05.png" alt="enter image description here"></a></p>
2018-01-27T23:13:24.183
<p><a href="https://en.wikipedia.org/wiki/Thread_(network_protocol)" rel="noreferrer">Thread</a> is a 6LoWPAN-based protocol which is starting to get some adoption by manufacturers. As noted <a href="https://www.threadgroup.org/What-is-Thread/Overview" rel="noreferrer">on their website</a>, it's backed by various companies such as Nest, Yale, ARM and Qualcomm and is probably the most likely candidate for any 6LoWPAN implementations in future in the smart home.</p> <p>So far, adoption hasn't been great though. <a href="https://www.threadgroup.org/technology/ourtechnology#threadready" rel="noreferrer">Their website</a> advertises a grand total of <strong>two</strong> Thread-ready devices, and these are based on a proprietary extension to the open Thread protocol, called <a href="https://nest.com/weave/" rel="noreferrer">Nest Weave</a>.</p> <p><a href="https://www.fastcompany.com/40430631/eeros-new-wi-fi-routers-are-step-one-in-its-plan-to-become-a-smart-home-giant" rel="noreferrer">This article</a> talks about one of the first Thread border routers coming to market, produced by Eero, but the situation seems relatively unchanged in terms of adoption since that article was written a few months ago:</p> <blockquote> <p>Much like Wi-Fi, Bluetooth, ZigBee, and Z-Wave, [Thread] is another way for devices to communicate wirelessly throughout the home. But unlike those well-established protocols, Thread has practically no adoption among device makers right now.</p> </blockquote> <p>As for why that's the case, I think the obvious answer is that Thread is much 'younger' than its competitors, and the pieces needed to make it useful haven't existed for long, like the border router, so making a Thread device is a little risky for manufacturers. Hopefully this will change, and some think that Thread could potentially become very widely adopted... But it's impossible to say at the minute.</p> <p>It's worth noting that competitors like <a href="https://en.wikipedia.org/wiki/SmartThings" rel="noreferrer">SmartThings</a> hubs which support ZigBee and Z-Wave have been around since 2013, and the ZigBee protocol itself has existed <a href="https://en.wikipedia.org/wiki/Zigbee#History" rel="noreferrer">since 2005</a>. As Thread matures, perhaps it will supplant the existing options — or perhaps, manufacturers will stick to the 'safe' options of ZigBee and Z-Wave which are having more iterative improvements than radical changes of protocol.</p>
|smart-home|6lowpan|
Are there 6LoWPAN based smart home platforms?
2596
<p>Current smart homes are just a particular IPv4 private network comprising new embedded devices (e.g., Thermostat) as well as generic computing devices (e.g., PCs) connected to the Internet through gateways (Figure 1).</p> <p><a href="https://i.stack.imgur.com/VAexB.png" rel="noreferrer"><img src="https://i.stack.imgur.com/VAexB.png" alt="enter image description here"></a></p> <p>With the adoption of IPv6 protocol, thess embedded devices could be uniquely addressable, and are able to be connected directly to the Internet through 6LoWPAN Border Routers (Figure 2).</p> <p><a href="https://i.stack.imgur.com/EzrtW.png" rel="noreferrer"><img src="https://i.stack.imgur.com/EzrtW.png" alt="enter image description here"></a></p> <p>I found that all smart home platforms are implemented according to the first network architecture, either hub-based, cloud-based, or both (e.g., Samsung’s SmartThings).</p> <p><strong>I am wondering if there are also 6LoWPAN based smart home platforms in the market?<br> I can’t find them!</strong></p> <p><strong>Why is this type of topology not widely adopted?</strong></p>
2018-01-28T12:08:51.313
<p>3 ways: </p> <ol> <li><p>Wire themselves between supply-hot and neutral. They obtain power in the normal and ordinary way. </p></li> <li><p>Wire themselves between supply hot and <strong>Safety Ground</strong>. This is either illegal foreign dreck, or a reputable maker has appealed to Underwriter's Laboratories (UL) for a waiver to do this, because presumably they've shown UL that the device won't degrade grounding protection and electrify all the grounds e.g. if a ground wire breaks. NFPA has told UL to quit doing that. </p></li> <li><p>Wire their electronics <em>in series</em> with the incandescent bulb, and then leak power through the bulb to power themselves. This will make the incandescent glow, too dimly to be seen. CFL and LED driver circuits will have a different reaction. They will either </p> <ul> <li>glow visibly (because they are more efficient than incandescent) </li> <li>allow the trickle of current to pass, but only if they are designed to do this</li> <li>block the current and prevent the switch from working</li> <li>take damage or burn up, potentially starting a fire</li> </ul></li> </ol> <p>One solution to #3 is that a specially made "resistor" modules (it's not quite a resistor) can be added in parallel with the light(s) to facilitate that leakage current. Never use random electronics parts in mains electrical installation, always use products UL-listed for that use. Several companies make "resistor" modules that will solve this problem, and these are readily available. </p>
|smart-home|
How does a smart switch get its power?
2598
<p>I bought a <a href="http://www.ibroadlink.com/tc2/" rel="noreferrer">smart wall switch</a>.</p> <p>The switch it replaced had only 2 wires (in and out).</p> <p>My knowledge of electricity might be only limited, but how can this work?</p> <p>A normal switch just opens a circuit so the current no longer goes through right? So then if there is no longer any current, how does the smart switch gets power? </p>
2018-01-31T14:19:41.237
<p>Dropbear hard-codes the location <code>~/.ssh/authorized_keys</code> in its source code, where <code>~</code> is the home directory of the target user as read from the user database. If you can't change the user database and can't make the home directory read-write, then you need to modify the source code.</p> <p>You may be able to make the home directory read-write by mounting a different filesystem over it. That depends what tools are available on the device. For example, maybe you can arrange to mount an in-memory filesystem:</p> <pre><code>mount -t tmpfs root /root cp -Rp /somewhere/writable/root/.ssh /root/ dropbear </code></pre> <p>Or maybe you can make a <a href="https://unix.stackexchange.com/questions/198590/what-is-a-bind-mount">bind mount</a>:</p> <pre><code>mount --bind /somewhere/writable/root /root dropbear </code></pre>
|arm|
Running Dropbear SSH server completely from SD card because filesystem is read only
2617
<p>I want to exploit a specific binary on a embedded device <a href="https://herrfeder.github.io/embeddedsec/2017/10/19/Hacking-A-IP-Camera-Part1.html" rel="noreferrer">First Part of Examining IP Camera</a>. As this binary won't execute outside the embedded device I'm heading to examine it remotely. It has an SD card slot for storing pictures and videos. I cross compiled dropbear statically for this platform and executed it with success.</p> <p>For allowing my host to ssh into the target device I have to add the id_rsa key into the ~/.ssh/authorized_keys of the device. As root is mounted completely read only</p> <pre><code>/mnt/disc1/dropbear_armv5 # touch ~/.ssh touch: /root/.ssh: Read-only file system </code></pre> <p>I would like to find a way to specify the location of the keys elsewhere or execute it without using any keys. Knows someone a way of achieving this? In case I misunderstood principles of doing this help would be appreciated too.</p> <p>On the target</p> <pre><code>/mnt/disc1/dropbear_armv5 # ./dropbear_static -r dropbear_dss_host_key -r dropbear_rsa_host_key -B -E /mnt/disc1/dropbear_armv5 # [27893] Jan 31 22:09:57 Running in background [28019] Jan 31 22:10:28 Child connection from 192.168.12.1:47398 [28019] Jan 31 22:10:29 Login attempt for nonexistent user from 192.168.12.1:47398 [28019] Jan 31 22:10:29 Login attempt for nonexistent user from 192.168.12.1:47398 [28019] Jan 31 22:10:32 Exit before auth: Exited normally </code></pre> <p>On the host</p> <pre><code># ssh -i ip_cam_rsa root@192.168.12.176 :( root@192.168.12.176's password: Permission denied, please try again. </code></pre>
2018-02-03T20:19:13.487
<p>The closest thing to what you appear to be looking for is probably the <a href="https://www.iridium.com/" rel="noreferrer">Iridium</a> satellite network. This system is used by tracking/data logging products that need to work pretty much everywhere (including the middle of the ocean where there is no cell coverage).</p> <p>Examples of systems using Iridium include things like the Rock7 <a href="http://www.rock7mobile.com/products-rockblock" rel="noreferrer">RockBLOCK</a>. The link provides details of power/cost requirements</p> <blockquote> <p>your host needs to supply a minimum of 100mA @ 5V.</p> </blockquote> <p>...</p> <blockquote> <p>Line rental costs £10.00 per month</p> </blockquote> <p>...</p> <blockquote> <p>Credits are used each time you transmit. 1 credit is used per 50 bytes (or part thereof) of message sent or received. </p> </blockquote>
|gps|
GPS ground communications expensive (financially and power requirement)?
2621
<p>I hadn't realised that the <a href="http://www.argos-system.org/argos/how-argos-works/" rel="noreferrer">Argos satellite network</a> existed and animal trackers communicated with it.</p> <p><a href="https://www.bto.org/science/migration/tracking-studies/cuckoo-tracking/tracking-technology" rel="noreferrer">Tracking technology</a>.</p> <p>Does anyone know how much it costs and what level of power is required to communicate with GPS satellites?</p>
2018-02-11T16:34:33.197
<p>Finally I managed to record and successfully playback the rf signals using this <a href="https://github.com/ikkentim/rpi-rftransmitter" rel="nofollow noreferrer">git repo</a>.</p>
|smart-home|raspberry-pi|
Unable to receive RF signals from a remote using a RF receiver
2638
<h1>Problem</h1> <p>I am unable to receive the signals sent with a KaKu APA3-1500R remote with a RF receiver connected to a Raspberry Pi 3.</p> <h1>Hardware</h1> <p>-<a href="https://iprototype.nl/products/components/communications/rf-receiver-434mhz" rel="noreferrer">RF Receiver</a> (in Dutch)<br /> -<a href="https://www.klikaanklikuit.nl/nl/apa3-1500r-starterset.html" rel="noreferrer">KaKu APA3-1500R</a> (in Dutch)</p> <h1>Additional info</h1> <ul> <li>The receiver works correctly. This I know because I also have a transmitter and am able to transmit/receive signals correctly.</li> <li>The KaKu system works correctly. I am able to control the KaKu switch with the supplied remote.</li> <li>Using libraries like <a href="https://www.pilight.org/" rel="noreferrer">pilight</a> or <a href="https://pypi.python.org/pypi/rpi-rf" rel="noreferrer">rpi-rf</a> I am able to send and receive codes from a RF transmitter to the RF receiver. However, both libraries are unable to pick up the signal sent with the KaKu remote. This is especially surprising as the KaKu system in question is in the <a href="https://wiki.pilight.org/devices" rel="noreferrer">list</a> with compatible devices of the pilight library.</li> </ul> <h1>Question</h1> <p>How should I proceed to solve this problem? Perhaps there is a way to read the &quot;raw&quot; values received by the RF receiver, without specifying any protocol?</p>
2018-02-13T14:45:21.210
<p>It seems that the app or firmware has been updated now. It is working perfectly, using the process I described in the question (i.e. using <em>control devices</em>).</p>
|smart-home|alexa|amazon-echo|ikea-tradfri|
How to use Tradfri Lights with Ikea Tradfri Gateway within Alexa routines?
2641
<p>I am using Echo Dots and the Tradfri Gateway and have seven Ikea Tradfri bulbs in two rooms. These bulbs show up under devices and can be put into groups, which work perfectly with Alexa voice commands.</p> <p>I'm trying to create a <strong>routine</strong> using these bulbs that would involve turning on the TV/Stereo and dimming the lights. The scene from my Harmony Hub for controlling the TV/Stereo works perfectly. My problem comes from the bulbs. They don't show up when I go to <em>Add Action</em> → <em>Smart Home</em> → <em>Control device</em>. The only smart home device showing up is the Harmony Hub.</p> <p>Since they are definitely detected by the app and on the device list, I'm wondering if anyone has a suggestion for how to get them to show up under routines.</p>
2018-02-14T10:54:45.667
<p><strong>The Hue bulb must be connected to the Echo Plus itself.</strong></p> <p>Philips Hue bulbs communicate using a protocol called <a href="https://en.wikipedia.org/wiki/Zigbee" rel="noreferrer">ZigBee</a> (as explained in a little more detail <a href="https://developers.meethue.com/zigbee3" rel="noreferrer">here</a>). The Echo Plus <a href="https://www.amazon.co.uk/Echo-Plus-With-Built-In-Smart-Home-Hub-White/dp/B01J4IYBI0" rel="noreferrer">has a built-in radio/smart hub</a> to communicate using ZigBee with other ZigBee-compatible devices, but all other Echo devices do not have any support for ZigBee — they operate using Wi-Fi only.</p> <p>Your other Echos physically can't communicate with the light bulb — they don't 'speak' the correct language, so it's not just the hub features that are required from the Echo Plus; it's the actual wireless connection that's required.</p> <p>You can probably expect about a 10 to 20 metre range, perhaps less in a challenging environment, from a ZigBee hub. Your bulb needs to be within that range to be able to communicate with your Echo Plus and connect to the network. This might involve moving either the bulb or the Echo Plus itself.</p>
|smart-home|alexa|amazon-echo|philips-hue|
Do Hue bulbs need to be connected to an Echo Plus directly?
2644
<p>I have a multi-Alexa setup at home. It's a three storey house, so an Echo Plus on the bottom floor and 2nd gen Echos on the other floors.</p> <p>The hue bulb that came with it worked fine when it was plugged in on the bottom floor. I've now moved it to the top floor, and it no longer connects. I've tried removing the device from Alexa and adding it again, but when I search for devices, it doesn't find any.</p> <p>So my question is this: Does the Hue bulb need to be connected to an Echo Plus? Or if there's an Echo Plus in the network, it should be able to connect (my original assumption)?</p>
2018-02-14T19:36:03.153
<p>You can not change the type from the app side, it needs updating from the Alexa skill.</p> <p>So you will need to wait for IKEA to update the cloud side of their app to include device types.</p>
|smart-home|alexa|amazon-echo|ikea-tradfri|
IKEA Tradfri bulbs showing up as "other" in the Alexa App, instead of "light."
2647
<p>I have my IKEA Tradfri bulbs connected through the Tradfri Gateway. They are all showing version 1.2.214, which the app says is the latest version, as well as the gateway which is 1.3.14.</p> <p>Inside the Alexa app, I've installed the bulbs and they show up and work perfectly (outside of routines), but the <strong>Type</strong> listed under device settings is <em>other</em>. If they were showing up as <em>light</em> instead of <em>other</em>, I would be able to just say, "Alexa, lights on." vs "Alexa, turn on Bedroom/Living Room" as they would be associated with the Echo Dot in each room's group.</p> <p>Has anyone figured out a way to change the <strong>Type</strong> from <em>other</em> to <em>light</em>? </p>
2018-02-18T01:10:03.270
<p><strong>For iOS users, an option to disable &quot;<em>Find Your Phone</em>&quot; was added in Tile <a href="https://i.stack.imgur.com/LzwnV.png" rel="nofollow noreferrer">v2.28.1</a>.</strong></p> <ul> <li><p>Open the Tile device list</p> </li> <li><p>Press <code>...</code> on a tile and select <em>Edit Tile Details</em></p> </li> <li><p>Under <em>Actions</em>, unselect the option for <em>Find Your Phone</em></p> <img src="https://i.stack.imgur.com/9xral.png" width="300" /> </li> </ul> <p>According to <a href="https://iot.stackexchange.com/questions/2658/how-do-i-disable-phone-ringing-from-my-tile/2877#comment11847_2877">a comment by Geoff</a>, this feature was also added to Android sometime prior to May 4, 2021</p>
|bluetooth|ios|tile|
How do I disable phone ringing from my Tile?
2658
<p>When a Tile tracker is paired with a phone, double tapping a button on the Tile will make the phone ring. This happens <a href="https://support.thetileapp.com/hc/en-us/articles/207274527-Use-Tile-to-Ring-your-Phone" rel="noreferrer">even if the phone is on silent mode</a>. I’ve accidentally rung my iPhone at work multiple times, disturbing the people around me.</p> <p>I want to leave the Tile paired to my phone so I can track my personal belongings, but I don’t want my phone to ring. Hiding my phone in the Tile app had no effect.</p> <p>How can I disable the option to ring my phone from a Tile?</p>
2018-02-18T09:19:49.210
<p>You can use persistent sessions from clients, e.g. clean flag set to false upon connect. In that scenario event when your client is offline broker will buffer message for it into own cache and deliver it once device will connect.</p> <p>About the quantity - 10K is a relatively low amount even for one server. You can configure Linux server to hold 500K active connections and if your broker will be cloud-based, e.g. provided as service by some provider, then you can hold even millions of active connections to it. </p> <p>By the way, I think Mosquitto or any other local installation is perfect choice for development and testing, but when you will go in production you need SaaS MQTT broker with all features like HA, redundancy, failover, etc.</p>
|mqtt|wifi|routers|
Is MQTT scalable with 1000+ clients?
2659
<p><strong>Scenario</strong><br> IoT device (currently IPv4 device) that sends via TCP socket a payload to a server once per day. The server has a public IP address, the device is behind a router/NAT. I'm going to use a module based upon ESP8266 (i.e. Olimex one)</p> <p><strong>Goal</strong><br> The <em>server</em> should be able to send data to any client whenever it needs to. I'm no interested in direct client-to-client communication (i.e. connect to a device from my smartphone) like the hole punching is supposed to do.</p> <p><strong>Other requirements</strong><br> The IoT devices might grow up to several thousands. Their Internet connection is provided by many 4G-enabled routers/modems. Each one will handle 10-20 clients.</p> <p><strong>Proposed solution</strong><br> As far as I understand a common solution is MQTT. The clients periodically send data to the broker (i.e. Mosquitto running on the hosting server), that in turn updates the main web app that runs on the same server.</p> <p><strong>Question</strong><br> Is MQTT approach suitable for a "large" number of devices (1000+) most of them behind a 4G router?</p>
2018-02-18T10:00:55.357
<p>Any MQTT client can both subscribe and publish, there is no distinction between them (only possible ACL rules controlling which users can do what).</p> <p>Also there is no concept of a given client sending data to another client. Messages are published to topics, not other clients. There is nothing to stop a given client subscribing to a specific topic that other clients can then use to send messages to that client.</p> <p>There is also no need to wait for a incoming subscription before publishing a message on a topic.</p> <p>MQTT v5 adds the concept of request/reply style messaging, but the way it does this is by including an extra topic field in a message. This extra topic can be read by a subscriber and used to publish a reply message. But it is only there as a hint not a hard requirement.</p> <p>Web Apps can use MQTT over Websockets to connect to the broker and behave in just the same way as any other MQTT client.</p>
|mqtt|
MQTT: Can a subscriber send data to a producer asynchronously?
2660
<p><strong>Scenario</strong> IoT device (currently IPv4 device) that sends via TCP socket a payload to a server once per day. The server has a public IP address, the device is behind a router/NAT. I'm going to use a module based upon ESP8266 (i.e. Olimex one)</p> <p><strong>Goal</strong> The <em>server</em> should be able to send data to any client whenever it needs to. I'm no interested in direct client-to-client communication (i.e. connect to a device from my smartphone) like the hole punching is supposed to do.</p> <p><strong>Other requirements</strong> The IoT devices might grow up to several thousands. Their Internet connection is provided by a 4G-enabled router/modem. </p> <p><strong>Proposed solution</strong> As far as I understand a common solution is MQTT. The clients periodically send data to the broker (i.e. Mosquitto running on the hosting server), that in turn updates the main web app that runs on the same server.</p> <p><strong>Question</strong> Can the web app send data to any client whenever it needs through the broker? In other words: can a subscriber send back data to a specific publisher asynchronously (i.e. without waiting for the next transmission) ? </p>
2018-02-18T14:43:54.680
<p>This <a href="https://learn.adafruit.com/pir-passive-infrared-proximity-motion-sensor?view=all" rel="noreferrer">Adafruit article, PIR Motion Sensor</a>, provides a description of a PIR sensor and the basic mechanics of how a PIR sensor works. A synopsis of the how a PIR sensor is designed.</p> <blockquote> <p>PIRs are basically made of a pyroelectric sensor (which you can see below as the round metal can with a rectangular crystal in the center), which can detect levels of infrared radiation. Everything emits some low level radiation, and the hotter something is, the more radiation is emitted. The sensor in a motion detector is actually split in two halves. The reason for that is that we are looking to detect motion (change) not average IR levels. The two halves are wired up so that they cancel each other out. If one half sees more or less IR radiation than the other, the output will swing high or low.</p> </blockquote> <p>Later in the article which is explaining in more detail about the design of the PIR sensor.</p> <blockquote> <p>The PIR sensor itself has two slots in it, each slot is made of a special material that is sensitive to IR. The lens used here is not really doing much and so we see that the two slots can 'see' out past some distance (basically the sensitivity of the sensor). When the sensor is idle, both slots detect the same amount of IR, the ambient amount radiated from the room or walls or outdoors. When a warm body like a human or animal passes by, it first intercepts one half of the PIR sensor, which causes a positive differential change between the two halves. When the warm body leaves the sensing area, the reverse happens, whereby the sensor generates a negative differential change. These change pulses are what is detected.</p> </blockquote> <p>So obviously a PIR sensor will not fit your requirements since a PIR sensor depends on motion of an infrared (IR) source that is moving across the field of view of the sensor.</p> <p>However there are IR cameras, FLIR (Forward Looking InfraRed) cameras is the standard name, which can be used with the appropriate image processing software to "see" IR emitting objects.</p> <p>This <a href="https://learn.sparkfun.com/tutorials/flir-lepton-hookup-guide?_ga=2.112962564.1885374847.1519467362-802977009.1510893729&amp;_gac=1.212069792.1519467362.EAIaIQobChMI4uiK3Ke-2QIVRp7ACh1NMwWUEAQYASABEgJqtPD_BwE" rel="noreferrer">SparkFun article, FLIR Lepton Hookup Guide</a>, describes using a FLIR camera along with the <a href="http://simplecv.org/" rel="noreferrer">SimpleCV open source framework</a> to build a computer vision device which in this case would be "seeing" in the infrared spectrum.</p> <p>Here is a PDF of a slide package, <a href="http://homepage.cem.itesm.mx/carbajal/EmbeddedSystems/SLIDES/Computer%20Vision/Computer%20Vision%20using%20SimpleCV%20and%20the%20Raspberry%20Pi.pdf" rel="noreferrer">Computer Vision Using SimpleCV and the Raspberry Pi</a>, which provides a nice overview of using the SimpleCV framework to do camera image processing.</p> <p>Here is a wiki with a detailed article, <a href="http://www.appropedia.org/How_to_install_FLIR_Lepton_Thermal_Camera_and_applications_on_Raspberry_Pi" rel="noreferrer">How to install FLIR Lepton Thermal Camera and applications on Raspberry Pi</a>, which may be helpful.</p> <p>There is also the <a href="https://www.mouser.com/new/omronelectronics/omron-d6t/" rel="noreferrer">Omron D6T series of thermal sensors</a> which may provide what you need.</p> <blockquote> <p>Omron's D6T Series MEMS Thermal Sensors are a super-sensitive infrared temperature sensor that makes full use of Omron's proprietary MEMS sensing technology. Unlike typical pyroelectric human presence sensors that rely on motion detection, the D6T thermal sensor is able to detect the presence of stationary humans by detecting body heat, and can therefore be used to automatically switch off unnecessary lighting, air conditioning, etc. when people are not present.</p> </blockquote> <p>You may also find this <a href="https://hackaday.io/project/10391-automated-elephant-detection-system" rel="noreferrer">Automated Elephant Detection project</a> helpful.</p>
|sensors|
How to detect a presence (not motion) of anyone in a room?
2663
<p>I'd like to monitor a state of rooms in my apartment and turn off heating/cooling/lights when nobody is there.</p> <p>I see there is a bunch of PIR sensors on the market, however I don't understand why some of them are labeled as "motion sensors" and some as "presence sensors", and whether there a real difference between them.</p> <p>The experience with motion sensors usually installed on the stairs outside of apartments clearly tells me that motion sensors are not good for the task.</p> <p>So, are there sensors which can reliably detect presence/absence of people in a room?</p>
2018-02-19T17:45:01.037
<p>First of all, note that I'm not a lawyer. Get one if you think you need legal advice. Licensing is one such area where I'd recommend one.</p> <p>Open source licenses vary greatly in what they allow. Let's use the example of a library that you're using (unmodified) in your project. Two common licenses you might find are GPL and LGPL, which vary on how they treat this issue. From <a href="https://www.gnu.org/licenses/why-not-lgpl.html" rel="noreferrer">this article</a>, for example:</p> <blockquote> <p>The GNU Project has two principal licenses to use for libraries. One is the GNU Lesser GPL; the other is the ordinary GNU GPL. The choice of license makes a big difference: using the Lesser GPL permits use of the library in proprietary programs; using the ordinary GPL for a library makes it available only for free programs.</p> </blockquote> <p>Other license examples which are a bit more open in this regard include MIT and BSD.</p> <p>A lot of Linux software is GPL, and this will likely include components of any OS you select (e.g. Ubuntu Core). However, as long as your project isn't considered a derivative work from these projects you shouldn't be affected. More info in <a href="https://opensource.stackexchange.com/q/1579">this answer</a>.</p> <p>From this perspective, using Ubuntu Core for your product shouldn't affect whether or not the application you ship on it is open or closed. Indeed, packaging your application as a snap is a good way to distribute binary blobs.</p> <p>You've probably considered this, but from a technical perspective, if you ship a Python snap using Django, the snap won't be binary blobs-- by default your code will be sitting there for anyone who wants to see it (either by dumping the disk contents or by gaining shell access somehow). You may want to obfuscate or ship bytecode instead, etc.</p>
|hardware|ubuntu-core|
Building an IoT product - what is the best way to avoid sharing in-house proprietary code?
2666
<p>I think it was hard for me to formulate the title. However, I can still explain my problem in more detail in here.</p> <p>I am designing an embedded product which consists of cloud service and embedded hardware. The cloud service will have a REST-api (though it being available is not the selling point) and it will communicate with the embedded hardware. Ideally, the embedded hardware would also have a REST-like interface for communication. The problem is finding good software stack for it (or that's what I think is the problem). </p> <p>The best option in my opinion would be some kind of embedded Linux distribution with its own web app installed inside (Ubuntu Core + Django...?). Is it somehow possible to use this combination in a commercial product but at the same time keep the webapp inside closed?</p> <p><a href="https://www.ubuntu.com/internet-of-things" rel="noreferrer">The Ubuntu website</a> provides multiple supported platforms and some of them look ideal for my use case. Like I said before, my main concern at the moment is licensing.</p>
2018-02-26T03:00:28.620
<p>I used the SIM5320 in a product and none of the modules I bought have the MQTT functionality so you must implement the MQTT protocol in a external processor or MCU. Maybe you have to request a different firmware at the moment of purchase.</p> <p>About the reliability, I think that the modem functionality is reliable enough, I sometimes find that the modem gets stuck (could be linux driver or modem firmware) and a hard reset makes everything work again, no data loss.</p> <p>I think that the GPS works fine <em>most</em> of the time, sometimes it stops sending useful NMEA sentences, it just sends a propietary one ($PSTIS*61), sometimes it losses the fix and its unable to recover by itself and I have to reset the module (a lot of the times it doesn't work) and sometimes it gives wrong fixes, about 1000 km wrong but this can be filtered in software.</p> <p>The GPS part of these modems lack configuration options and commands, you can't change the fix rate, you can't make a cold start without first disabling the GPS and this is problematic because if you have no fix the GPS can refuse to be disabled with the excuse to be downloading ephemeris data for faster next startup.</p> <p>I think your best option would be to try the SIM5360, as it has two serial ports, one for modem/GPS and one exclusive for GPS and also supports GLONASS. The SIM5320 has only one serial port and only supports GPS.</p> <p>Anyway I would include in the design an optional independent GPS module (u-blox, simcom, etc). I think that using a SIMCOM 3g module and a independent GPS module is still cheaper than using a 3g modem from other manufacturer (at least for small scale).</p> <p>About the support, they seem to not offer direct support, however the distributor I bought from offered plenty of support free of charge, they asked me for logs, pass me tools for the operating system I was using and answered very technical questions.</p>
|mqtt|mobile-data|
3G SIM5320 support for MQTT
2679
<p>Looking for feedback from others who have been using the SIM53xx series modules for IoT solutions over the 3G network. I have an MQTT broker on the internet to collect data for a fleet tracking system being developed. There is a lot of information about this type of solution with 2G connections but as 2G is being phased out I don't have choice but use 3G as the newer NB1 / CAT M1, sigfox etc. solutions aren't available on the small Pacific island this solution is targeted to and LoRa doesn't have sufficient range (the island isn't that small!).</p> <p>After a lot of research it seems the SIM5320 is the most applicable solution (reasonable cost, popular, small, has GPS features) and there is also a whitepaper that states extensions to the AT command set has extensions for MQTT session setup, pub/sub etc. Perfect for my application, however it is only referred to in an isolated whitepaper <a href="http://www.microchip.ua/simcom/WCDMA/APPNOTES/SIMCom_3G_MQTT_Application%20Note_V1.00.pdf" rel="noreferrer">simcom mqtt 3g</a> and there is no other references to it in other simcom documentation or on the net.</p> <p>Before I go out and purchase a couple for testing, can anyone confirm if the MQTT extensions actually exist and if they are reliable?</p> <p>Also any feedback on reliability / support for simcom modules would be appreciated as I'm new to IoT over 3G.</p>
2018-03-01T22:12:55.667
<p>They are handled by the device connecting out and maintaining an on going TCP connection.</p> <p>TCP connections are bi-directional once opened so as long as the device opens the connection outbound through the NAT gateway the cloud can push information/commands back down that link.</p>
|smart-home|system-architecture|
Should I keep open a socket between IoT NAT device and server?
2683
<p>I am implementing a light controlling with MQTT/node which consists of some elements mainly these: <strong>device</strong> (behind a NAT), <strong>server</strong> (mqtt/broker), <strong>client</strong> (web browser)</p> <p>Part of the architecture/process I came up with was: The <strong>device</strong> needs to open a socket with the <strong>server</strong> and keep it open (and not the other way because of NAT), so whenever the <strong>client</strong> sends a control command to the <strong>server</strong>, the <strong>server</strong> sends it to the <strong>device</strong> via the opened websocket.</p> <p>So my broader question would be: How are device-behind-NAT/server connections handled normally in IoT?</p> <p>NOTE: I’ve seen lots of questions explaining the case when a device writes to the cloud and then a client reads from it, which doesn’t need the socket open all the time (just when the device writes) But haven’t seen the case when the server/client want to write to the device (from outside the NAT)</p>
2018-03-04T11:36:43.707
<p>Turns out that the ground cable between the two microcontrollers had been dislodged. Putting that back in place fixed my problem.</p>
|sensors|microsoft-windows-iot|gpio|
Polling multiple GPIOs
2695
<p>I am trying to pull a few bytes per second from a microchip board attached to a temperature sensor and a photodiode, using Windows 10 IoT on a Dragonboard 410c. It seems like there's either interference when I attempt to read from more than one GPIO at a time. How can I get input from these GPIOs without messing up my clock signal?</p> <pre><code>namespace DashWall { public sealed partial class MainPage : Page { private const int CLOCK_PIN = 12; private const int TEMP_PIN = 34; private const int PHOTO_PIN = 33; private const int START_PIN = 36; private GpioPin clockPin; private GpioPinValue clockPinValue; private GpioPin tempPin; private GpioPinValue tempPinValue; private GpioPin photoPin; private GpioPinValue photoPinValue; private GpioPin startPin; private GpioPinValue startPinValue; private DispatcherTimer timer; private GpioController gpio; public MainPage() { InitializeComponent(); timer = new DispatcherTimer(); timer.Interval = TimeSpan.FromMilliseconds(10); timer.Tick += Timer_Tick; InitGpio(); timer.Start(); } private void InitGpio() { gpio = GpioController.GetDefault(); clockPin = gpio.OpenPin(CLOCK_PIN); tempPin = gpio.OpenPin(TEMP_PIN); photoPin = gpio.OpenPin(PHOTO_PIN); startPin = gpio.OpenPin(START_PIN); clockPin.SetDriveMode(GpioPinDriveMode.InputPullUp); tempPin.SetDriveMode(GpioPinDriveMode.InputPullUp); photoPin.SetDriveMode(GpioPinDriveMode.InputPullUp); startPin.SetDriveMode(GpioPinDriveMode.InputPullUp); } bool isReading = false; bool bitRead = false; uint curPhoto; uint curTemp; uint bitCount = 0; bool start; bool clock; bool photo; bool temp; private void Timer_Tick(object sender, object e) { handleInput(); Time.Text = "" + clock; Temp.Text = "" + temp; if (start &amp;&amp; clock &amp;&amp; !isReading) { Temp.Text = "" + start; isReading = true; curPhoto = 0; curTemp = 0; } if (isReading) { if (clock &amp;&amp; !bitRead) { ReadBit(); bitRead = true; } if (!clock) { bitRead = false; } } } private void ReadBit() { uint photoBit = 0; uint tempBit = 0; if (photo) { photoBit = 1; } if (temp) { tempBit = 1; } curPhoto = curPhoto &lt;&lt; 1; curPhoto = curPhoto + photoBit; curTemp = curTemp &lt;&lt; 1; curTemp = curTemp + tempBit; bitCount++; if (bitCount &gt;= 8) { isReading = false; bitCount = 0; //Time.Text = "" + Convert.ToString(curPhoto, 2); //Temp.Text = "" + curTemp; } } private void handleInput() { clockPinValue = clockPin.Read(); clock = clockPinValue == GpioPinValue.High; startPinValue = startPin.Read(); start = startPinValue == GpioPinValue.High; photoPinValue = photoPin.Read(); photo = photoPinValue == GpioPinValue.High; tempPinValue = tempPin.Read(); temp = tempPinValue == GpioPinValue.High; } } } </code></pre>
2018-03-07T19:36:50.047
<p>This.</p> <p><a href="https://i.stack.imgur.com/LePyJ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LePyJ.jpg" alt="tcp_keepalive_time"></a></p> <p>I can't remember where I captured this from, so I'm unable to link to source. All pinpoint accurate information though.</p> <p>Yes, Microsoft should bake in more appropriate values into their Azure Linux images.</p>
|mqtt|mosquitto|emq|azure|
MQTT Connection Using Keep-Alive > 5 Minutes Silently Disconnects on Azure VM Broker?
2706
<p>Summary of the issue:</p> <ol> <li><p>Connecting to test.mosquitto.org or iot.eclipse.org with a keep alive of more than 5 minutes, and everything seems to work just as expected.</p></li> <li><p>Connecting to my broker (both on Azure hosted VMs - one is Mosquitto and one is Emqttd), my clients don't send a ping if the keep-alive is longer than 5 minutes. They just die. The broker disconnects them eventually for not pinging. I'm not using an Azure load balancer, I'm connecting directly to the VM).</p></li> </ol> <p>The thing is, the connected device doesn't know it's been disconnected if its over a cell network (not sure why?)</p> <p>Over an Ethernet network, it'll reconnect itself as it should.</p> <p>Not sure if there is something unique about the Azure VM's that is causing my disconnection/timeout issue with longer keep-alives?</p> <p>Lastly, if I use a 2 minutes or shorter keep-alive, everything works.</p>
2018-03-08T16:06:06.883
<p>Yes, when using LTE-M's eDRX mode, the TCP connection is still open, but there are some complications depending on which carrier you are using.</p> <p>First of all, sending data from the server to the mobile device will never wake up the mobile device instantly. The mobile device will wake up at the next eDRX interval (although some other <em>non-cellular</em> event could also cause it to wake sooner).</p> <p>Now, the confusing part is whether or not your mobile device will receive the data from the server when it wakes at that next eDRX interval. The <a href="https://www.gsma.com/iot/wp-content/uploads/2018/04/LTE-M_Deployment_Guide_v2_5Apr2018.pdf" rel="noreferrer">GSMA LTE-M Deployment Guide</a> actually discusses this in sections 6.2 and 6.4. The troubling line is in section 6.4: </p> <blockquote> <p>Thus, it means that in case when a LTE-M device is in either PSM or eDRX, mobile terminating messages, depending on MNO choice the messages will either be buffered or discarded</p> </blockquote> <p>To put it in different terms, the cell service provider (e.g. Verizon, AT&amp;T, etc) gets to decide whether they want to buffer the TCP packets to forward your device when it wakes up later, or just discard them.</p> <p>Even on carriers which do buffer data during eDRX sleep periods, they tend to have an upper time limit on the order of minutes.</p> <p>However, your server is likely unaware of the intermittent nature of the eDRX connection, and will be doing it's normal TCP retries, and there is always the chance that one of those retries will be sent during the eDRX window and get through to the mobile device. When this happens, it looks like it "just works" even on networks which do discard data, but it's more luck than anything else. (Shortening the eDRX cycle time and using faster TCP retry rates on the server will both improve your luck in this setup.)</p>
|networking|power-consumption|
When using LTE-M's eDRX mode, is the TCP connection still open?
2711
<p>We currently have an IoT device, that connect to our servers using a raw TCP connection over 2G, and from times to times the device send a "keep-alive"-ish message , as we've seen it's consume less battery rather than to reopen the connection everytime we need to send a message (~once every 1 to 5 minutes)</p> <p>We're thinking about switching to LTE-M, especially as we've seen the eDRX mode would permit us to save potentially a lot on the battery life, however I have the following question:</p> <p>When in eDRX mode, is the TCP connection still open, i.e if I send from the server some data, will the client receive it when it awakes?</p>