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
2019-07-19T08:35:46.333
<p>No, MQTT-SN doesn't supply any encryption at a protocol level, but you are free to encrypt the payload yourself how ever you want.</p> <p>Also since MQTT-SN doesn't make any requirements on what transport is used to carry the packets, but you could build a system that uses <a href="https://en.wikipedia.org/wiki/Datagram_Transport_Layer_Security" rel="nofollow noreferrer">DTLS</a> (similar to how CoAPS works)</p>
|mqtt|
MQTT-SN using any encryption?
4349
<p>Does MQTT-SN provide any encryption like AES-128 etc.? As I know, it's using a simple binary encryption but in my opinion this cannot be seen as a security feature. Many thanks in advance :)</p>
2019-07-23T10:51:11.337
<p>I read over your blocks, it seems to me that you have not included the "Connect to Wifi" block at the start of the block sequence. I included it in my own example and it worked perfectly.</p> <p><a href="https://i.stack.imgur.com/sHhpF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sHhpF.png" alt="enter image description here"></a></p>
|wifi|
Wia Dot One - PIR Events are not created?
4366
<p>Recently I have been building some projects using the Wia Dot One and the PIR module which I got with it. I am still new to electronics so I am using the "Blocks" feature on the Wia.io platform.</p> <p>Currently I am trying to receive events on the <a href="https://www.wia.io" rel="nofollow noreferrer">Wia</a> platform whenever motion is detected by the device. The code seems to upload fine, I know because the Dot One behaves as it did during previous successful deployments. However the events do not appear on the platform. I am working with the blocks arranged as shown below:</p> <p><a href="https://i.stack.imgur.com/cfaVe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cfaVe.png" alt="enter image description here"></a></p> <p>Is there anything I might be missing to get this to work? </p> <p>Thanks for your help!</p>
2019-07-24T14:48:05.630
<p>I found a good working system and added some Sonoff miniR2 behind some light switches. The Sonoffs are connected using MQTT (I installed Tasmota firmware on the Sonoff MiniR2) to my Home Assistant instance and there I can now switch some lights and I can also use the light switches on the wall.</p>
|smart-lights|
Build in light switches
4372
<p>We are building a home and I'm thinking to make the home a little smart. This by adding WiFi light switches and maybe a couple of other sensors. Now I'm looking for a light switch that can be build in the wall (like a normal light switch) and that can also be operatate like a normal light switch. Does someone knows a light switch that can do that? Also it should be integrated in Home Assistant software.</p>
2019-07-25T06:09:40.957
<p>My first thought was to delete this question in shame.</p> <p>Then I thought that I had better answer it, to help anyone else who makes the same silly mistake in future.</p> <p>To save on manufacturing costs, some USB cables have only two wires, rather than four, and are good only for powering devices, but not for transmitting data.</p> <p>I had bought some cheap ($1.49) USB cables with power on/off switch from AliExpress and attached one of those to my ESP32. Switched back to the previous cable and all is well.</p> <p>Exit, stage left, with burning face.</p> <p>(but, at least not <a href="https://www.shakespearesglobe.com/discover/blogs-and-features/2016/01/29/exit-pursued-by-a-bear/" rel="nofollow noreferrer">pursued by a bear</a> ;-)</p>
|microsoft-windows|
How can I get Windows 10 to recognize my IoT boards?
4375
<p>Tl;dr- how can I get Windows 10 to recognize my IoT boards?</p> <p>I bought a Heltec ESP32, installed the Arduino IDE, loaded a demo program to the board, ran it, edited it, loaded the new version and ran it.</p> <p>The I decided to try PlatformIO and repeated the process. Everything ran smoothly.</p> <p>Then "something happened" - I don't know what ("I didn't change anything" ;-) and suddenly PLatformIO would not load a program.</p> <p>I looked at the Windows device manager and saw two COM port devices. Perhaps stupidly, I removed them and detected new devices. Nothing. Then I attached my ESP32 and saw only one COM port device. <a href="https://i.stack.imgur.com/VaEtW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VaEtW.png" alt="enter image description here"></a></p> <p>I uninstalled the Arduino IDE and reinstalled it,but, even though I set preferences to COM3 in <code>c:\users\&lt;me&gt;\AppData\Arduino15\preferences.txt</code> :</p> <pre><code>serial.databits=8 serial.debug_rate=115200 serial.line_ending=1 serial.parity=N serial.port=COM3 serial.port.file=COM3 serial.port.iserial=null serial.show_timestamp=true serial.stopbits=1 </code></pre> <p>I get </p> <pre><code>the selected serial port Failed to execute script esptool does not exist or your board is not connected Board at COM3 is not available </code></pre> <p>And, in PlattformIO, my platformio.ini contains</p> <pre><code>[env:heltec_wifi_kit_32] platform = espressif32 board = heltec_wifi_kit_32 framework = espidf upload_protocol = esptool ; COM3 or COM3 upload_port = COM[34] </code></pre> <p>I tried a different ESP32, of the same model; even attached a BBC Micro:bit, but nothing changed in device manager, even when scanned for hardware changes.</p> <p>Question (finally): how can I get Windows 10 to recognize my IoT boards?</p>
2019-07-25T11:56:37.387
<p>UPDATE:</p> <p>The energy supplier have updated their web app to include a GraphQL query (made in the form of a <code>query</code> parameter in a <code>POST</code> request. It is a client-side query, so all the necessary data is there.</p> <p>Depending on supplier, your <em>mileage may vary</em>.</p>
|smart-home|
How can I access data from my In-Home Display?
4378
<p>I have my electricity and gas meters connected to an IHD (In-Home Display), and the IHD is connected to my router. I have access to all of the address of the IHD.</p> <p>I am wanting to get the energy data from the Smart Meters, in order to integrate it within an app.</p> <p>I have experience with Javascript, and Python. So, if there is a way to get the data using those languages, then my life would be easier.</p> <p>IHD: Chameleon IHD6 <a href="https://s3-eu-west-2.amazonaws.com/chameleontechnology.co.uk/wp-content/uploads/2019/03/IHD6-Technical-overview10.1.19.pdf" rel="noreferrer">Technical Overview</a><br> Smart Meter: ZigBee EDMI</p> <p>Any ideas as to how I could access the data from my Smart Meters?</p>
2019-07-25T20:57:10.437
<p>On TTN console:</p> <ul> <li>create a new application</li> <li>within the application select &quot;integration &gt; webhooks&quot;</li> <li>finally specify the URL of you application server For more details please check the <a href="https://www.thethingsnetwork.org/docs/applications/http/" rel="nofollow noreferrer">this</a> link.</li> </ul> <p>On Loriot console:</p> <ul> <li>create a new application</li> <li>within the application select &quot;output &gt; new output&quot;</li> <li>select HTTPS</li> <li>finally specify the URL of you application server For more details please check <a href="https://docs.loriot.io/display/LNS/HTTP+PUSH" rel="nofollow noreferrer">this</a> link:</li> </ul>
|lora|lorawan|https|
Can I send messages from LORIOT to an HTTP web server?
4380
<p>I actually send data packet from LORIOT and TTN to Cayenne. I would understand if is possible to send instead data from Loriot or TTN to my custom http web server, if there is any procedure around explaining how to manage this?</p>
2019-07-26T13:08:35.407
<p>As hinted at in the comments, this is a soil moisture sensor. The demo in a houseplant may be rather trivial, but moisture sensing is one of the more valuable aspects of smart agriculture.</p> <p>Typically you would want to measure soil moisture at multiple depths (depending on the specific crop), and multiple locations (assuming that there is varying solar exposure across a field). This allows you to decide where to use the constrained volume of water available, and make some value trade-offs based on the data (and forecasts).</p> <p>Agricultural IoT does not get as much press as the smart-home applications or more exciting industrial applications, but it is a significant market.</p>
|sensors|
What Is This IoT Project from Maker Faire Detroit? Connected Aloe?
4384
<p>At 2:27 in this teaser/promo video for Maker Faire Detroit, there's a brief clip of an aloe plant with some IoT type stuff. Presumably this is from either Maker Faire Detroit 2018, or a previous year. </p> <p>What's the project, and what's its purpose? </p> <p><a href="https://youtu.be/N5bPgrJ0YTw" rel="nofollow noreferrer">https://youtu.be/N5bPgrJ0YTw</a></p> <p><a href="https://i.stack.imgur.com/tfouI.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tfouI.jpg" alt="Connected Aloe"></a></p>
2019-07-29T20:09:39.143
<p>Just in case it helps anyone ...</p> <p>74880 baud works and I see output.</p> <p>BUT, I have to Ctrl-c in PlatformIO’s terminal and issue the command platformio device monitor --baud 74880</p> <p>that means that I miss output from the startup sequence.</p> <p>Why does the build not honour the platformion.ini file and its monitor_speed entry? I would expect that to generate some code in the hidden main() function to set the baud rate.</p> <p>Oh, well, it's an imprefect solution, but it' a sort of solution </p>
|esp32|platform-io|
Heltec WiFi Kit 32 and PlaftormIO configuration (baud rate?)
4392
<p>I am just getting started with PlatformIO and have chosen a <a href="https://heltec.org/project/wifi-kit-32/" rel="nofollow noreferrer">Heltec WiFi Kit 32</a>.</p> <p>I loaded the PlatformIO demo <code>espidf-http-request</code>, built it and loaded it, but the serial terminal shows </p> <blockquote> <p>�␄@�␀␙␔␄␔␀�␀ @���H␂␐␀␀␄␀<code>␀␀␀ ␎0␀␀�␒ bd␋�␒␔Q� �␀␕��bH�A�Pb(,␒�0�␒P␀␒���Ȑ2&lt;U�␄␂� ␄␓␒"␃␀``␀��PI␅ "J␆I�␄␀��␀�2,␑$�␌B</code>␁␄+����</p> </blockquote> <p>which seems to be a baud rate problem.</p> <p>My platformio.ini contains </p> <blockquote> <p>[env:heltec_wifi_kit_32]<br> platform = espressif32<br> board = heltec_wifi_kit_32<br> framework = espidf<br> monitor_port = COM3<br> monitor_speed = 115200<br> upload_port = COM3<br> upload_speed = 115200</p> </blockquote> <p>any idea what I am doing wrongly?</p>
2019-07-30T23:49:27.727
<p>I custom mapped the four colour remote buttons to the number pad (1-4) on my Harmony Elite and long press launches the shortcuts fine.</p>
|logitech-harmony|smart-tv|
Starting LG Smart TV apps (other than Netflix & Amazon) with Harmony
4398
<p>The <a href="https://www.lg.com/us/tv-audio-video-accessories/lg-AN-MR18BA-magic-remote-control" rel="nofollow noreferrer">LG Magic Remote</a> has dedicated buttons for the Netflix and Amazon apps, and they are built-in commands in the Logitech Harmony vocabulary, so the command list for the LG Smart TV device includes those two commands, and you can easily assign them to hard or soft buttons, add them to sequences, etc.</p> <p>But I would like to do the same with apps like YouTube and Hulu that LG didn’t give dedicated buttons to. Since the LG TV’s on-screen interface automatically re-orders its home menu based on usage recency and frequency, there’s no way to start these apps via a single unchanging sequence of directional button presses (short of using the search function, typing in “YouTube” or “Hulu”, and using the result, which is <em>much</em> too slow to be practical).</p> <p>But you <em>can</em> assign nine apps to “Quick Access” buttons, meaning a long hold of any of the number keys 1 through 9. So, for instance, right now I can hold the button 2 to launch YouTube and 3 to launch Hulu. (A long-hold on 0 allows editing of these buttons.)</p> <p>A single remote button-press <em>seems</em> like it should be easily automatable. But I can’t for the life of me figure out how to use this functionality via Harmony.</p> <p>I’ve tried creating a “command sequence” named YouTube and assigning the 2 button to it, but there’s no way I can see to adjust the duration of the 2 button press so it’s correctly interpreted as a Quick Access command rather than as a number 2.</p> <blockquote> <p><strong>Note:</strong> For what it’s worth, with my Harmony Elite remote, which has a capacitive touch screen instead of a number pad, you can’t hold a number soft button, either—the remote just gives a quick haptic feedback once to let you know it’s sent a single button press. This is unlike the hard buttons, which you can hold down to <em>either:</em></p> <ol> <li>cause built-in long-hold commands to happen on the commanded device, just as for the native remote (such as long-holding a skip-back button to go to the beginning of chapter or title), or</li> <li>tell Harmony to treat a long hold as an entirely separate command. (For instance, in my set-top box layout, I use a single button with a short press for “Program guide” and a long press for “Video on demand”, two commands I don’t use that often—and certainly not with a durational component.)</li> </ol> <p>Obviously, perhaps, you can’t use these together—a button programmed with a long-press action in Harmony can no longer send variable-duration commands to the remote device.</p> <p>Some Harmony remotes have a physical number pad; I don’t know whether they allow sending long-duration number presses to remote devices or not by physically holding those buttons.</p> </blockquote> <p>I’ve also tried “adding a missing command”, but this requires “teaching” Harmony the command by pointing the IR remote at the Harmony Hub (or, if so equipped, Harmony remote) IR sensor—and it appears that, while the Magic Remote has IR codes that are loaded into the Harmony online vocabulary, it uses Bluetooth to talk to the LG TV itself, so the IR sensor picks up nothing if I point the Magic Remote at it and long-press 2.</p> <p>(If I had a spare universal remote, perhaps I could teach it the IR for “2” that Harmony already knows, and then use that remote to teach the Harmony what a long-press “2” looks like? But I don’t have a spare learning remote, and don’t want to buy one just for this unless I’m <em>sure</em> it would work.)</p> <p>Is there some other way I can set it up so that I can command a particular LG TV app to launch via Harmony?</p>
2019-08-01T10:15:58.263
<p>You could use the <a href="https://github.com/Koenkk/zigbee2mqtt" rel="nofollow noreferrer">zigbee2mqtt</a> project. It supports a ton of zigbee <a href="https://www.zigbee2mqtt.io/information/supported_devices.html" rel="nofollow noreferrer">devices</a> including your remote and socket, as far as I can tell. </p> <p>However, you need an CC2531 USB Stick, which acts as zigbee gateway, plugged into a computer (a Raspberry Pi will do). </p> <p>Control of the devices is via MQTT as the name implies. </p> <p>Nice side-effect: now you can add any kind of supported devices, freely mixing and matching different brands.</p>
|google-home|ikea-tradfri|xiaomi-mi|bridge|
How to connect these different smart home devices?
4401
<p>Somehow I ended up with a mix of smart home devices. What hub/bridge/connector device should I use to connect the ones below?</p> <p>My devices:</p> <ol> <li>Google Home</li> <li>Google Home - Mini</li> <li>Xiaomi (Mijia) Gateway v.2 EU-Version</li> <li>Osram smart socket</li> <li><p>Ikea TRÅDFRI remote </p> <ul> + </ul></li> <li>Arduino</li> <li>Raspberry Pi</li> </ol> <hr> <p>Can be a device from my list, an app or something else.</p> <p>EDIT: <strong>What I want to achieve</strong>: Most importantly I would like to control the <code>Osram smart socket</code> (turn it on/off) through the <code>Ikea TRÅDFRI</code> remote and/or the <code>Xiaomi (Mijia) Gateway</code>.</p>
2019-08-02T14:29:57.900
<p>Not sure if you found the answer you were looking for, but thought I'd actually sign up and give you some pointers since I've just been down this path myself.</p> <p>The tool you need is 'dcc.cctk' which can be used to view and change the mode of each GPIO.</p> <p>For example, the following command would show the current mode of GPIO0</p> <pre><code> dcc.cctk --adimodechannel1 </code></pre> <p>You can also change the mode with one of the following options (unused|adcinput|dacoutput|dacandadc|gpio), e.g.:</p> <pre><code> dcc.cctk --adimodechannel1=adcinput </code></pre> <p><strong>Note:</strong> You must use 'sudo' or login as root to issue these commands, and you must also reboot the Dell once you have changed the mode before it takes effect.</p> <p>To change the mode of other GPIO pins, you need to use 'adimodechannelX' where X is the channel number between 1-8. GPIO0 is 'adimodechannel1', GPIO1 is 'adimodechannel2', etc.</p> <p>If you need to print help and usage instructions to screen, then use:</p> <pre><code> dcc.cctk -h </code></pre> <p>or for more specific help with this method:</p> <pre><code> dcc.cctk -h --adimodechannel1 </code></pre> <p>Hope this helps.</p>
|linux|gpio|energy-monitoring-systems|snappy|
How to change dell edge gateway 3001 gpio pin to analog
4409
<p>In dell edge gateway how we can change the <code>gpio</code> pin from digital to analog? It has Ubuntu core as OS. It has 8 <code>gpio</code> pins only some of them I want to make digital and some of them analog. I have checked the <code>Dell edge gateway 3001</code> manual but they have not given anything about it though they mentioned we can make a <code>gpio</code> pin either digital or analog.</p>
2019-08-05T06:46:58.177
<p>Mediatek provide it's own binary wifi driver in its feeds based on old 15.05 OpenWrt version. It seems not updated since years (<a href="https://github.com/MediaTek-Labs/linkit-smart-7688-feed" rel="nofollow noreferrer">https://github.com/MediaTek-Labs/linkit-smart-7688-feed</a>). Hard to know it they still support it or not.</p> <p>Luckily, some nice people build a new driver, more open called mt76 (<a href="https://github.com/openwrt/mt76" rel="nofollow noreferrer">https://github.com/openwrt/mt76</a>). It's included in OpenWrt 18.06 (Kernel modules > Wireless Drivers) and it should work better then Mediatek one. Use last version (18.06.4) as it contains improvement of this driver.</p>
|linux|
Is the LinkIt 7688 Unofficially Unsupported?
4415
<p>I'm working on a device powered by the LinkIt Smart 7688 at the moment, and having some driver issues with building a new OpenWRT image from scratch for it. One of those issues is that the WiFi driver blobs don't seem to have been updated for some time (~2017?), and won't work with the current kernel.</p> <p>Has MediaTek stopped supporting the Linkit Smart 7688?</p>
2019-08-05T09:58:41.887
<p>Welcome. I love your question, and have marked it a favo(ur)ite. However, it will probably be closed as far too broad. If you can narrow down your requirements, you will probably get a good answer (try to avoid GIGO). Here is <strong><em>one of many</em></strong> possible paths that you could take:</p> <blockquote> <p>My end goal is to be able to develop applications for collecting data from IOT devices and presenting it to a client</p> </blockquote> <p>Collect data only (<a href="https://en.wikipedia.org/wiki/Telemetry" rel="nofollow noreferrer">telemetry</a>) or also control the devices (<a href="https://en.wikipedia.org/wiki/SCADA" rel="nofollow noreferrer">SCADA</a>)?</p> <blockquote> <p>So I signed up to AWS</p> </blockquote> <p>Why? Is AWS a hard requirement, to did you just associate it with IoT and think “why not”?</p> <p>You certainly don't need AWS, and I would suggest starting with the simplest system you can think off and working your way into something more complicated.</p> <p>What do you need?</p> <ol> <li>Some hardware to measure something</li> <li>A way to send the measurements to a client</li> <li>A way to display the data to a client (presumably a human client?)</li> </ol> <p>1) The <a href="https://www.raspberrypi.org/" rel="nofollow noreferrer">Raspberry Pi</a> is very popular and has a lot of support an tutorial; it even has <a href="https://raspberrypi.stackexchange.com/">its own Stack Exchange site</a> At less than US $10, it has WiFI, BlueTooth and GPIO pins for your sensors (you can also buy Hats with sensors to fit those pins, if you are way of soldering or even breadboards). The Raspberry Pi Zero W is the cheapest with internet connection and should be enough for any IoT project you are considering.</p> <p>Having said that, I personally (and YKmH may vary), I find the Pi to be overkill, as I do not see that you need Linux. If you give more detailed requirements, we can point you at a processor. A good starter would be the ESP32, which you can pick up on AliExpress from about $7, maybe $14 with display. I also like the <a href="https://www.raspberrypi.org/" rel="nofollow noreferrer">STM32</a>, which I am about to look into because of its support for Ada 2012, but that might be a tad esoteric for you. Consider also the <a href="https://microbit.org/" rel="nofollow noreferrer">BBC Micro:bit</a> which is expressly designed for leaners (they gave one to every school kid in the UK), and can be programmed in Python (as can the others I mentioned), or Ada ;-) or in a graphical language.</p> <p>If you want a recommendation of ESP32, take a look at <a href="https://m5stack.com/" rel="nofollow noreferrer">M5stack</a> which is a modular system and allows you to easily combine (stack) devices and accessories (e.g device battery) and has a dozen or more sensors to measure many things. It is cheap (IMO) and easy to get to grips with, and I bought the lot, just to have a play. Once bonus is that you don't need to do any soldering or breadboarding (although you can); everything is plug 'n' play. You might be interested in <a href="https://www.aliexpress.com/item/32994893797.html?spm=a2g1y.12024536.productList_12432753.pic_2" rel="nofollow noreferrer">the wrist “wearable”</a>, which looks pretty cool &amp; which I am using to track employees. See below for image</p> <p>2) So, now you have programmed your device to read some sensor data, and want a way to send it to a server. There an numerous ways to do this, but personally I see it as a choice between developing a RESTful HTTP API, or using something FOSS and off the shelf. For the latter, there are a few options, but <a href="http://mqtt.org/" rel="nofollow noreferrer">MQTT</a> is very popular &amp; well documented, and there are lots of examples. It is also very simple to learn. </p> <p>3) Displaying the data. Again, there is a plethora – nay, a cornucopia – of choices for reports. However, the FOSS <a href="https://nodered.org/" rel="nofollow noreferrer">Node-RED</a> is simple to use and very popular with good support.</p> <p>You mentioned AWS, but that’s just one more thing to confuse yourself with at the start (not to say that you shouldn’t get into it later). Simpler is to run your own server, on your own PC. If you run Linux, you aleady have Apache installed. If Windows, then install something like <a href="https://www.apachefriends.org/index.html" rel="nofollow noreferrer">Xampp</a> which will run an Apache server on Linux and doesn’t require much/any knowledge.</p> <p>That, as I said, is just one of many, many, many, many, many, many, many, many, many, many, many options, but it will get you started &amp; allow you to pick up some other skills along the way.</p> <p>If you do go for ESP32, then, in addition to many great free tutorials, I personally recommend reading <a href="https://leanpub.com/kolban-ESP32" rel="nofollow noreferrer">Kolban's book on ESP32</a> and <a href="https://leanpub.com/esp32_IoT" rel="nofollow noreferrer">ESP32 Programming for the Internet of Things</a>. For good tutorials, look at <a href="https://randomnerdtutorials.com/" rel="nofollow noreferrer">Random Nerd</a> and <a href="https://randomnerdtutorials.com/" rel="nofollow noreferrer">Hackster</a>. As an IDE, I <strong><em>strongly</em></strong> recommend <a href="https://platformio.org/" rel="nofollow noreferrer">PlatformIO</a>_ over the Arduino IDE, as it supports debugging on many boards, plus lots more, and it has a great support community.</p> <p><a href="https://i.stack.imgur.com/a3y9y.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/a3y9y.jpg" alt="enter image description here"></a></p> <p>Did I miss any general advice?</p> <p>I encourage others to expand on this answer. While the question is too broad to stay open, an answer would be very useful on the community wiki.</p>
|aws|
I am new to IOT and am looking for some platform I can use to learn how to create IOT applications
4417
<p>I am very new to IOT and don't have much knowledge of anything to do with it. I have spent a long time trying to learn more about it but everywhere I go to try to learn about IOT, there is always way too much assumed knowledge that I don't have. My end goal is to be able to develop applications for collecting data from IOT devices and presenting it to a client and I've decided the best way to do this is to get some practical experience. So I signed up to AWS and want to begin using the IOT service to get some idea of how its done. I want to learn how to create applications that collect data from IOT devices but I need some devices to do this with but I don't have any. Is there anywhere that allows me to may be play around with some fake devices or practice devices or something?</p>
2019-08-06T12:15:48.370
<p>Yes</p> <p>(I'm not sure what else to say here, what you have described is true).</p> <p>HTTP is a transactional request/response protocol:</p> <ul> <li>A client opens a connection to the server</li> <li>The client sends a request for a specific resource</li> <li>The server replies with that request and closes the connection <sup>*</sup></li> </ul> <p><sup>*</sup> Yes I know you can set the Keep-Alive header and the connection will be kept open while the server waits for another request, but it's still request driven.</p> <p>MQTT is a Pub/Sub protocol</p> <ul> <li>A client opens a connection to the broker</li> <li>The client sends a subscription request for a topic pattern (this can be an exact topic or a wild card)</li> <li>A second client (already connected) publishes a new messages to the broker with a topic that matches the first client.</li> <li>The broker checks the topic pattern lists for all connected client and delivers the message to all the matching clients.</li> </ul> <p>The connection is persistent for the lifetime of the client. Because the connection is initiated by the client (it opens the outbound connection) this works when the client is behind a NAT gateway. As long as the Broker is publicly available then this all works fine.</p> <p>In the situation you have described the "Server" would just be another client connected to the Broker that publishes messages that other clients are subscribed to.</p>
|mqtt|
MQTT vs HTTP Connection - Server to Client
4420
<p>I need to understand the difference between HTTP and MQTT connection.</p> <p>I want to send data from a Server to a Client without using port forwarding.</p> <p>If I understand, using HTTP is not possible; so with HTTP the client will connect to the server and ask( i.e. GET or POST request ) and receive data from it.</p> <p>But with MQTT is possible the opposite? I mean that the server could send data to the client without having received a request? Simply because the client has subscribed to the broker topic?</p>
2019-08-10T18:02:39.920
<p>The first problem we have here is: <em>ESP32 may not have enough RAM to do it.</em> </p> <p>There are a few examples on the web on how to save data collected from the ESP32-CAM to a microSD card. If you are familiar with that, you can now take a look on the <strong>base64.h</strong> library for the ESP32 arduino enviroment. If not, there is a very comprehensive tutorial by Rui Santos on YouTube, which you can find on <a href="https://www.youtube.com/watch?v=eot6COwCPF0" rel="nofollow noreferrer">this</a> link.</p> <p>Base64.h is a library for ESP32 (core) that implements the base64 conversions as simple as <em>decode</em> and <em>encode</em>. You can take a look on the source on <a href="https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/base64.cpp" rel="nofollow noreferrer">github</a>.</p> <p>I never used the ESP32-CAM, but the result you want to achieve seems very simple to me. Have a look on those links and give it a try.</p>
|esp32|aws|
ESP32 Cam send picture to cloud AWS
4432
<p>I am trying to figure out how to convert an image to base64 on the ESP32 Cam board so I could then send it to AWS s3 bucket. Could someone please give me some insight?</p> <p><a href="https://i.stack.imgur.com/qcDRY.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qcDRY.jpg" alt="camera pins used"></a></p>
2019-08-19T07:04:23.090
<p>As far as I can tell, you can't change how Alexa speaks in the "Say" action of a routine. <a href="https://www.reddit.com/r/alexa/comments/ak42ki/changing_speech_emphasis_in_alexa_routine/" rel="nofollow noreferrer">This reddit thread</a> seems to agree, saying that you might be able to use homonyms to fix incorrect pronunciations, but there's nothing there to change the speech rate or pitch.</p> <p>Alexa skills can return <a href="https://developer.amazon.com/docs/custom-skills/speech-synthesis-markup-language-ssml-reference.html" rel="nofollow noreferrer">SSML</a> to change how the speech is generated, for example a skill could return the following to slow down some of the speech:</p> <pre class="lang-xml prettyprint-override"><code>&lt;speak&gt; Hello. &lt;prosody rate="slow"&gt;I am now speaking slowly.&lt;/prosody&gt; And now I am speaking normally again. Is this cool? &lt;/speak&gt; </code></pre> <p>It's also worth noting that, in skill responses, the <a href="https://developer.amazon.com/docs/custom-skills/speech-synthesis-markup-language-ssml-reference.html" rel="nofollow noreferrer">documentation states</a>:</p> <blockquote> <p>Alexa automatically handles normal punctuation, such as pausing after a period, or speaking a sentence ending in a question mark as a question.</p> </blockquote> <p><strong>Unfortunately, it doesn't seem like you can use SSML in a routine</strong>, so this isn't particularly useful to you. It is odd that question marks aren't respected, but again a normal skill would be able to support that. If it matters a lot to you, you could try to make a custom skill, but that would be much more involved. You might just have to accept the poor speech generation for now, sadly.</p>
|alexa|
How to make Alexa change how she reads custom text?
4452
<ol> <li><p>In my routine I have Alexa speak a paragraph of text, just 2 sentences. One of them is question, but regardless whether I add a question mark or a period, she reads the the text with the same exact voice. I'd love to have her read the text as question, aka change her tone a bit. Is this possible?</p></li> <li><p>She reads custom text way too fast, any way to slow it down?</p></li> </ol>
2019-08-28T08:43:23.543
<p>As comments point out, the three tools are quite similar in some ways. One point that I can add is that they are also very <strong>adaptable</strong> ! So the choice also rely on your ability/ease of use with any of these tools.</p> <p>To answer specifically, from my own experience:</p> <ul> <li>both Open HAB and Home Assistant rely on the core concept of a <strong>home</strong>, with devices laying around and various communication protocols. This concept really drives the whole software, and gather a community on this very point. They are building with open-source and maker communities to add plugins/adds-on for functionnality, and new product integrations, also working with product makers.</li> <li>Node RED is a data-processing tool, based on the <strong>data flow</strong> concept and using a graphic programming environment. There is no &quot;home&quot; or &quot;user&quot; concept <em>per se</em>, you build <strong>flows</strong> to take data from point A to point B with some modifiers on the way (whether it's IoT or finance or traffic data doesn't matter). It also relies on the open-source community, around the nodeJS environment, which is way more popular than just home automation : existing modules cover a <strong>very large array of use-cases</strong>, and only a small repackaging is needed to use them in NodeRED</li> <li>Code-wise, Open HAB is <strong>java</strong>, Home Automation is <strong>python</strong>, and Node-RED is <strong>javascript</strong> : you can also reflect on your infrastructure to make a choice.</li> </ul>
|home-assistant|node-red|openhab|
What are the conceptual differences and similarities between OpenHAB, Home Assistant and Node RED?
4474
<p>I have at home some ready-made sensors I bought and more custom ones will come, therefore I would like to collect all their data and to set rules/actions based on them.</p> <p>I looked into the various alternatives but, after discovering Node RED, it's not clear to me anymore which overlap there is between OpenHAB, Home assistant and Node RED in regard to data acquisition, storage, display and processing (rules).</p> <p>Initially I checked Home assistant and I saw that it can</p> <ol> <li>collect data with plugins/addons</li> <li>store it in its own database (round-robin, time-limited)</li> <li>store it ("persistence") on external databases </li> <li>process data (YAML rules/automations), from what I understand using data in its own database when knowledge of the previous values is required</li> <li>display data (web GUI)</li> </ol> <p>From what I understood, OpenHAB 2 does 1, 3, 4bis, 5: it uses the external database ("persistence") also for rules. It appears therefore it is conceptually more efficient, one database is skipped.</p> <p>I thought that Node RED was just a "graphical rule editor/processor" compatible with both previous alternatives, but now I discovered that it can do at least 1, 3, 4bis: collect data via a (quite limited) number of input plugins, store the values into an external database, perform rules querying said external database.</p> <p>At this point, is there any remaining difference between Node RED and the other two? What are the conceptual differences and similarities between OpenHAB, Home Assistant and Node RED?</p>
2019-09-04T05:26:32.043
<p>Refer the below links,these provides extra features on topic level security,authorisation,authentication etc</p> <ul> <li><a href="https://www.emqx.io/" rel="nofollow noreferrer">https://www.emqx.io/</a></li> <li><a href="https://www.rabbitmq.com/" rel="nofollow noreferrer">https://www.rabbitmq.com/</a></li> <li><a href="http://activemq.apache.org/mqtt.html" rel="nofollow noreferrer">http://activemq.apache.org/mqtt.html</a></li> <li><a href="https://vernemq.com/" rel="nofollow noreferrer">https://vernemq.com/</a></li> <li><a href="http://www.mosca.io/docs/lib/server.js.html#Server" rel="nofollow noreferrer">http://www.mosca.io/docs/lib/server.js.html#Server</a></li> </ul>
|mqtt|aws-iot|node-red|
Cloud mqtt broker
4489
<p>I am completely new to the world of IoT and I want some recommendations. I want to build a home automation system that is accessible from anywhere in the world using internet. The ultimate goal is the ability to access my home devices from around the globe.</p> <p>Over the internet, I have seen many tutorials, but most of them either deal with local networks or third party cloud networks (e.g. AWS or HiveMQ) which charge a fee. </p> <p>Is there a way I can set-up a cloud mqtt broker on my laptop or raspberry pi that is accessible from anywhere in the world? Is there an existing piece of software (node-red?) that can help me with this?</p>
2019-09-17T10:57:14.597
<p>In addition to Achim's comment (and with the same uncertainty as to whether that'd be an answer or a comment), you may want to consider the following:</p> <p>A single installation rolling out, MQTT, would show up as a single (or a small number of) broker(s), while CoAP uses direct connections and thus, <del>usually</del> in some setups, has each node discoverable individually. A single CoAP roll-out by, say, an internet provider that uses CoAP for managing their modems, could thus easily show up as 100.000s of instances. Thus, the 300k devices in Russia or China could plausibly stem from a handful of installations, where no such large installations have happened in the USA, without any statistical significance.</p> <p>This is not to say that there is no imbalance between CoAP adoption in the countries, only that those vast reported numbers may not necessarily support that conclusion.</p>
|coap|
Usage of Constrained Application Protocol (CoAP) in eastern european countries/russia and china
4516
<p>By serendipity I checked the usage of the CoAP via Shodan and to my surprise there is a extreme inbalance between its usage in eastern European countries/China/Russia and the rest of the world, e.g. USA ~300 to Russia ~300000.</p> <p>Is there an explanation for this apparent result or is there indeed some trend in IoT that differs regionally?</p> <p>Update:</p> <p>Thank you for editing @Sean Houlihane. </p> <p>Due the current answers I checked the results again and yes there is some correlation with mobile/phone service providers. China Mobile Guangdong, Rostelecom, China Mobile Shandong are among the top organizations.</p> <p>Because of the open nature of the question I tend to accept Achims answers, since it gives a hint towards local trends and differences.</p> <p>Nevertheless thank you all for the open discussion, since topic could have also been seen as totally off topic.</p>
2019-09-17T11:39:46.130
<h2>Baud rate</h2> <blockquote> <p>What I found remarkable is that while screen can get human readable characters, the MQTT-SN bridge just seems to get garbage.</p> </blockquote> <p>This turned out to be the important part of tracking down the problem. GNU screen set the baud rate, but <code>mqtt-sn-serial-bridge</code> wasn't doing so. That turns out to be because</p> <pre><code>$ ./mqtt-sn-serial-bridge -? Usage: mqtt-sn-serial-bridge [opts] &lt;device&gt; -b &lt;baud&gt; Set the baud rate. Defaults to 13. -d Increase debug level by one. -d can occur multiple times. -dd Enable extended debugging - display packets in hex. -h &lt;host&gt; MQTT-SN host to connect to. Defaults to '127.0.0.1'. -p &lt;port&gt; Network port to connect to. Defaults to 1883. --fe Enables Forwarder Encapsulation. Mqtt-sn packets are encapsulated according to MQTT-SN Protocol Specification v1.2, chapter 5.5 Forwarder Encapsulation. </code></pre> <p>the option <code>-b</code> doesn't take a baudrate for its argument. See, its default is 13, quite a strange baudrate, isn't it. It takes a number, which gets handed over to some lower level API that sets the baudrate. On my system, these numbers, and their corresponding baudrates are:</p> <pre><code> 0: 0 50: 1 75: 2 110: 3 134: 4 150: 5 200: 6 300: 7 600: 8 1200: 9 1800: 10 2400: 11 4800: 12 9600: 13 19200: 14 38400: 15 57600: 4097 115200: 4098 230400: 4099 </code></pre> <p>So you can use <code>-b 13</code> to set the baudrate to 9600. Or use <code>-b 14</code> to set the baudrate to 19200. This was really unintuitive to me, so <s>[I forked the project][1] to make sure that <code>-b</code> takes the actual baud rate</s> But, this has been fixed since.</p>
|mqtt|lora|
What is wrong with this MQTT-SN bridge?
4517
<p>I am using <a href="https://github.com/njh/mqtt-sn-tools/blob/master/mqtt-sn-serial-bridge.c" rel="noreferrer">this MQTT-SN bridge</a>, with no changes except that I rigged it to give a hex dump of the buffer if it does not contain a valid MQTT-SN packet.</p> <p>I am experiencing a strange problem: sometimes I find the bridge works perfectly well, and other times I find the problem I describe below. I have an ESP32 microcontroller which is just publishing a message here and there to say it's alive. It queries various sensors (humidity, dust ...) as well, and publishes the results also, as you will see. It's writing to a LoRa module, and correspondingly I have a LoRa module on a USB stick which is plugged into my laptop. Then I run </p> <pre><code>./mqtt-sn-serial-bridge -b 19200 /dev/ttyUSB0 </code></pre> <p>to see output like the following:</p> <pre><code>2019-09-17 12:20:18 ERROR Error reading rest of packet from serial port: 0, 22 2019-09-17 12:20:19 WARN Read 10 bytes but packet length is 165 bytes. ....|..... 0xa5 0x08 0xa0 0xa6 0x7c 0x84 0x85 0x0c 0x86 0x85 2019-09-17 12:20:19 WARN Read 17 bytes but packet length is 37 bytes. %..@..H.........f 0x25 0xc5 0x0c 0x40 0x87 0x84 0x48 0x04 0x85 0x9c 0xc4 0x85 0x88 0xc4 0x86 0xee 0x66 2019-09-17 12:20:21 WARN Read 8 bytes but packet length is 40 bytes. (.....xD 0x28 0xa5 0x04 0xc0 0xa2 0x87 0x78 0x44 2019-09-17 12:20:23 WARN Read 8 bytes but packet length is 67 bytes. C....... 0x43 0xa5 0x0a 0xc0 0x82 0x0a 0x06 0xf6 </code></pre> <p>If I run <code>screen /dev/ttyUSB0 19200 8n1</code> I get something like this:</p> <pre><code>bf5fish5 is a live"b9H0.000000 relative humidity bf5PM2.5 = 10bf5PM10 = 11bf5fish5 is a live"b9H0.000000 relative humidity bf5PM2.5 = 10bf5PM10 = 11 </code></pre> <p>What I found remarkable is that while screen can get human readable characters, the MQTT-SN bridge just seems to get garbage. </p> <p>Does anyone have any experience with this bridge? I'm unsure whether the problem is with the bridge itself or somehow with the LoRa substrate. Or can anyone see where I'm going wrong?</p>
2019-09-19T12:42:00.793
<p>I've worked with RTU's (remote terminal units), this is a common requirement. </p> <p>Maybe a simple modem RS232/4G is enough <a href="https://www.icpdas-usa.com/gtm_201_rs232" rel="nofollow noreferrer">GTM201</a>, I've used those in the past. Depending on your specific needs you'll need to check for devices which suits better.</p> <p>I've also used a Robustel solution. I've used one similar to <a href="https://www.robustel.com/product/m1200-gateway/" rel="nofollow noreferrer">M1200</a>.</p> <p>Moxa could also have options.</p> <p>You'll have to search for "serial gateways". Creating one with a RPi, USB 2 RS232 converter and 4G modem is also an option.</p>
|data-transfer|mobile-data|
Accessing legacy device with RS232 over 4G Internet
4529
<p>I have an old device, that's located in a place where I don't have an easily accessible data connection. What I do today is I drive to where this device is located and plug a db9 rs232 serial connector to this device and turn on a laptop that has this device old Win32 software to download the latest acquired data points, clean the memory of the device, and let it keep logging data points. In two weeks, I need to drive again and do all of this again.</p> <p>I would like to connect to this device rs232 port remotely, ideally creating a virtual serial com port on the computer and run the software I usually run locally, remotely. This Win32 software can also be run on Wine if needed without problems.</p> <p>When looking for remote access to rs232 serial ports, I could only find for connecting through WiFi or other local networks, but I would like to access through internet. If this can be achieved using Android devices, it's even better. Is there any solution available for this problem?</p>
2019-09-21T14:32:19.940
<p>The <a href="https://github.com/mozilla-iot/wiki/wiki/HOWTO:-Factory-reset-an-IKEA-bulb" rel="nofollow noreferrer">Mozilla IoT wiki</a> made note of this exact problem.</p> <blockquote> <p>If you have problems resetting the plain white (non-colour) IKEA bulb, try making the "ons" very brief (less than a second) and the "offs" longer</p> </blockquote> <p>This solution worked well for me, and I was able to reset them without much trouble after trying it.</p>
|smart-home|smart-lights|ikea-tradfri|
How to factory reset non-colored IKEA Trådfri bulbs?
4533
<p>I have a couple of dimmable, but non-colored, <a href="https://www.ikea.com/se/sv/p/tradfri-led-ljuskaella-e27-1000-lumen-tradloes-dimbar-varmvit-globformad-opalvit-60338452/" rel="nofollow noreferrer">IKEA lights</a>. I have learned that the proper way to factory reset them is to turn them off and on again 6 times quickly. That worked for Trådfri lights I had of a different model.</p> <p>However, when I do this to these non-colored lights, they don't reset. I noticed that they don't seem to go out fully if I do it too quickly (unlike the other models), but neither waiting for them to light up and dim out fully nor ignoring that and just doing it quickly worked. What should I do?</p>
2019-09-22T14:46:23.810
<p>Some additional resources on the net how to connect arduino&amp;co with xbee.</p> <p>ForceTronics blog:</p> <ul> <li>Part 1: <a href="http://forcetronic.blogspot.com/2014/01/building-wireless-temperature-sensor.html" rel="nofollow noreferrer">http://forcetronic.blogspot.com/2014/01/building-wireless-temperature-sensor.html</a></li> <li>Part 2: <a href="http://forcetronic.blogspot.com/2014/01/building-wireless-temperature-sensor_9.html" rel="nofollow noreferrer">http://forcetronic.blogspot.com/2014/01/building-wireless-temperature-sensor_9.html</a></li> </ul>
|esp8266|zigbee|zwave|
z wave and zigbee development boards
4538
<p><code>ESP8266</code> provides an amazing environment to build iot devices for smart home. I managed to build all kinds of gadgets raging from simple temperature and humidity recorders to more advanced actors with sensor motions and appliance controls. There are <a href="https://www.aliexpress.com/item/4000095377908.html?spm=a2g0o.productlist.0.0.56a15c15F0a6gv&amp;algo_pvid=b201eb38-dcee-4972-92dd-84b505895bb8&amp;algo_expid=b201eb38-dcee-4972-92dd-84b505895bb8-11&amp;btsid=8a186a12-5943-42be-ac91-f5d535b37f80&amp;ws_ab_test=searchweb0_0,searchweb201602_10,searchweb201603_60" rel="nofollow noreferrer">tons of components</a> for those available.</p> <p>Recently, I entered into the area of automation of heating in smart house, discovered the <code>homematic ip</code> a line of products and got impressed how energy efficient and what an impressive operating range they have.</p> <p>My current setups involve many nodemcu's (as well as off-the-shelf homematic and zigbee devices) on one side and raspberry pi 3 with openhab integrating those into one thingy on the other side. </p> <p>I got these questions:</p> <ol> <li>I wonder how steep is the learning curve to get into the zigbee/zwave development. </li> <li>Thanks to nodemcu, one could start developing and testing the setups within days. Is there any similar inexpensive development boards are there? I tried to browse the net a bit, but all I got were kits costing at least a few hundred euro/dollar. </li> <li>Can one reuse the same sensor components to work with zigbee/z wave boards?</li> </ol>
2019-09-22T20:37:34.507
<p>I'll answer myself. Home Assistant is just enough to implement almost anything I've wanted. I've tried OpenHAB and it was waaaay too long until I was able to automate anything. Also I got really confused with it's Dashboards, doesn't look like an easy to enter solution. </p> <p>On the other hand, I gave a shot to Home Assistant and within just a weekend I've already added all my devices I have and willing to automate. Dashboards are quite messy too, but not that hard to use. And I didn't had to write a line of python or whatever code, simple YAML configs at most.</p>
|smart-home|android|infrared|
Advanced Universal Remote or basic home automation
4539
<p>I need an advice on sort of basic home automation. Let's say, I have 3 multimedia points in my home. 2 of them are TVs with attached recievers, players and game consoles, almost everything is network-attached. The other one is just a stereo reciever with a vynil turntable and RPi as a network audio player.</p> <p>Right now everything is quite messy, because I need to use 3-5 input devices (remotes, gamepads etc) to operate just one point. </p> <p>It would be cool to implement kind of Universal Remote thing which I would be able to use from my android phone or tablet, or from a laptop. I need some zone division of course. Also I would like to have layouts with some basic actions like Vol+, Vol- or PwrBtn, but also some chained actions, like "let's play a movie": turn on TV, switch to that input, turn on reciever, switch to that input, turn on player, start an android remote app for it etc.</p> <p>Is there any platform on which it wouldn't be too painful to implement? As of hardware, I have a dedicated PC which I can use as a server, I have a couple of zmote remotes and a couple of Microsoft IR blasters/recievers. I'm an IT geek with moderate programming skills, so I'm not limited to just consumer only solutions.</p>
2019-09-24T05:25:01.710
<p>Credit to @hardillb for pointing me in the right direction. Here's a basic message structure for control:</p> <pre><code>POST /upnp/control/basicevent1 SOAPACTION: "urn:Belkin:service:basicevent:1#SetBinaryState" Content-Type: text/xml; charset="utf-8" Accept: */* User-Agent: PostmanRuntime/7.15.2 Cache-Control: no-cache Host: [DEVICE_IP]:49153 Accept-Encoding: gzip, deflate Content-Length: 306 Connection: keep-alive &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&gt; &lt;s:Body&gt; &lt;u:SetBinaryState xmlns:u="urn:Belkin:service:basicevent:1"&gt; &lt;BinaryState&gt;0&lt;/BinaryState&gt; &lt;/u:SetBinaryState&gt; &lt;/s:Body&gt; &lt;/s:Envelope&gt; HTTP/1.1 200 status: 200 CONTENT-LENGTH: 289 CONTENT-TYPE: text/xml; charset="utf-8" DATE: Tue, 24 Sep 2019 13:47:09 GMT EXT: SERVER: Unspecified, UPnP/1.0, Unspecified X-User-Agent: redsonic &lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&gt; &lt;s:Body&gt; &lt;u:SetBinaryStateResponse xmlns:u="urn:Belkin:service:basicevent:1"&gt; &lt;BinaryState&gt;0&lt;/BinaryState&gt; &lt;CountdownEndTime&gt;0&lt;/CountdownEndTime&gt; &lt;deviceCurrentTime&gt;1569333003&lt;/deviceCurrentTime&gt; &lt;/u:SetBinaryStateResponse&gt; &lt;/s:Body&gt; &lt;/s:Envelope&gt; </code></pre>
|wemo|
Belkin Wemo API?
4542
<p>Looking for some API docs on querying &amp; control of Belkin Wemo switches/plugs.</p> <p>I have discovery working but can't seem to find any concise documentations describing how to do much else.</p> <p>I can see discovery events &amp; process the xml details:</p> <pre><code>HTTP/1.1 200 OK CACHE-CONTROL: max-age=86400 DATE: Sat, 21 Sep 2019 05:11:35 GMT EXT: LOCATION: http://[IP]:49153/setup.xml OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01 01-NLS: [ID] SERVER: Unspecified, UPnP/1.0, Unspecified X-User-Agent: redsonic ST: urn:Belkin:service:basicevent:1 USN: uuid:Lightswitch-1_0-[ID]::urn:Belkin:service:basicevent:1 </code></pre> <p>What do I do with these? :</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;serviceList&gt; &lt;service&gt; &lt;serviceType&gt;urn:Belkin:service:WiFiSetup:1&lt;/serviceType&gt; &lt;serviceId&gt;urn:Belkin:serviceId:WiFiSetup1&lt;/serviceId&gt; &lt;controlURL&gt;/upnp/control/WiFiSetup1&lt;/controlURL&gt; &lt;eventSubURL&gt;/upnp/event/WiFiSetup1&lt;/eventSubURL&gt; &lt;SCPDURL&gt;/setupservice.xml&lt;/SCPDURL&gt; &lt;/service&gt; &lt;service&gt; &lt;serviceType&gt;urn:Belkin:service:timesync:1&lt;/serviceType&gt; &lt;serviceId&gt;urn:Belkin:serviceId:timesync1&lt;/serviceId&gt; &lt;controlURL&gt;/upnp/control/timesync1&lt;/controlURL&gt; &lt;eventSubURL&gt;/upnp/event/timesync1&lt;/eventSubURL&gt; &lt;SCPDURL&gt;/timesyncservice.xml&lt;/SCPDURL&gt; &lt;/service&gt; &lt;service&gt; &lt;serviceType&gt;urn:Belkin:service:basicevent:1&lt;/serviceType&gt; &lt;serviceId&gt;urn:Belkin:serviceId:basicevent1&lt;/serviceId&gt; &lt;controlURL&gt;/upnp/control/basicevent1&lt;/controlURL&gt; &lt;eventSubURL&gt;/upnp/event/basicevent1&lt;/eventSubURL&gt; &lt;SCPDURL&gt;/eventservice.xml&lt;/SCPDURL&gt; &lt;/service&gt; &lt;service&gt; &lt;serviceType&gt;urn:Belkin:service:firmwareupdate:1&lt;/serviceType&gt; &lt;serviceId&gt;urn:Belkin:serviceId:firmwareupdate1&lt;/serviceId&gt; &lt;controlURL&gt;/upnp/control/firmwareupdate1&lt;/controlURL&gt; &lt;eventSubURL&gt;/upnp/event/firmwareupdate1&lt;/eventSubURL&gt; &lt;SCPDURL&gt;/firmwareupdate.xml&lt;/SCPDURL&gt; &lt;/service&gt; &lt;service&gt; &lt;serviceType&gt;urn:Belkin:service:rules:1&lt;/serviceType&gt; &lt;serviceId&gt;urn:Belkin:serviceId:rules1&lt;/serviceId&gt; &lt;controlURL&gt;/upnp/control/rules1&lt;/controlURL&gt; &lt;eventSubURL&gt;/upnp/event/rules1&lt;/eventSubURL&gt; &lt;SCPDURL&gt;/rulesservice.xml&lt;/SCPDURL&gt; &lt;/service&gt; &lt;service&gt; &lt;serviceType&gt;urn:Belkin:service:metainfo:1&lt;/serviceType&gt; &lt;serviceId&gt;urn:Belkin:serviceId:metainfo1&lt;/serviceId&gt; &lt;controlURL&gt;/upnp/control/metainfo1&lt;/controlURL&gt; &lt;eventSubURL&gt;/upnp/event/metainfo1&lt;/eventSubURL&gt; &lt;SCPDURL&gt;/metainfoservice.xml&lt;/SCPDURL&gt; &lt;/service&gt; &lt;service&gt; &lt;serviceType&gt;urn:Belkin:service:remoteaccess:1&lt;/serviceType&gt; &lt;serviceId&gt;urn:Belkin:serviceId:remoteaccess1&lt;/serviceId&gt; &lt;controlURL&gt;/upnp/control/remoteaccess1&lt;/controlURL&gt; &lt;eventSubURL&gt;/upnp/event/remoteaccess1&lt;/eventSubURL&gt; &lt;SCPDURL&gt;/remoteaccess.xml&lt;/SCPDURL&gt; &lt;/service&gt; &lt;service&gt; &lt;serviceType&gt;urn:Belkin:service:deviceinfo:1&lt;/serviceType&gt; &lt;serviceId&gt;urn:Belkin:serviceId:deviceinfo1&lt;/serviceId&gt; &lt;controlURL&gt;/upnp/control/deviceinfo1&lt;/controlURL&gt; &lt;eventSubURL&gt;/upnp/event/deviceinfo1&lt;/eventSubURL&gt; &lt;SCPDURL&gt;/deviceinfoservice.xml&lt;/SCPDURL&gt; &lt;/service&gt; &lt;service&gt; &lt;serviceType&gt;urn:Belkin:service:smartsetup:1&lt;/serviceType&gt; &lt;serviceId&gt;urn:Belkin:serviceId:smartsetup1&lt;/serviceId&gt; &lt;controlURL&gt;/upnp/control/smartsetup1&lt;/controlURL&gt; &lt;eventSubURL&gt;/upnp/event/smartsetup1&lt;/eventSubURL&gt; &lt;SCPDURL&gt;/smartsetup.xml&lt;/SCPDURL&gt; &lt;/service&gt; &lt;service&gt; &lt;serviceType&gt;urn:Belkin:service:manufacture:1&lt;/serviceType&gt; &lt;serviceId&gt;urn:Belkin:serviceId:manufacture1&lt;/serviceId&gt; &lt;controlURL&gt;/upnp/control/manufacture1&lt;/controlURL&gt; &lt;eventSubURL&gt;/upnp/event/manufacture1&lt;/eventSubURL&gt; &lt;SCPDURL&gt;/manufacture.xml&lt;/SCPDURL&gt; &lt;/service&gt; &lt;/serviceList&gt; </code></pre>
2019-10-09T06:36:04.280
<p>Based on this <a href="https://forum.micropython.org/viewtopic.php?t=2334" rel="nofollow noreferrer">forum post</a>, it is possible to include precompiled scripts (in a <code>modules</code> directory at build time) in the flash image. This requires the config <code>FROZEN_MPY_DIR</code>.</p> <p>It is also possible to cross-compile using <strong>mpy-cross</strong>, but it looks like this requires some micropython source code changes (<code>#define MICROPY_PERSISTENT_CODE_LOAD (1)</code>), and also what looks like a bugfix in emitglue.c.</p> <p>Although you don't save much code space, it looks like it is also possible to omit the compiler - although really I think simpler would be to omit the repl so there is no trivial software interface to the hardware.</p> <p>The reference used was 2 years old, so there is a good chance that the state-of-the-art has moved on since then.</p>
|esp32|python|
Can I compile Python on my PC, load it to an ESP32 and run it?
4591
<p>As a follow-up from <a href="https://iot.stackexchange.com/questions/4587/can-i-retrieve-a-python-program-from-an-esp32">Can I retrieve a Python program from an ESP32?</a>, I would like to make things a little more difficult for those who would steal my code (I do realize that I cannot prevent it).</p> <p>Can I compile Python on my PC, load it to an ESP32 and run it?</p>
2019-10-09T10:12:44.590
<p>You need a bridge/gateway.</p> <p>From what little I remember from looking at LPWAN Zigbee networks a LONG time ago and assuming I've not got the wrong end of the stick...</p> <p>Something that will change the physical layer of the network (Zigbee to probably ethernet/wifi) and possibly do <a href="https://en.wikipedia.org/wiki/Network_address_translation" rel="nofollow noreferrer">NAT</a> (link-local IPv6 to either global unique IPv6 or IPv4)</p> <p>I also used to run Bluetooth (classic) PAN that used my phone (Sony T68i iirc) as the gateway to provide internet to my PDA (in the golden years before smart phones). Bluetooth PANs would support up 8 devices and handed out private IPv4 addresses and NATed to the rest of the world.</p>
|https|802.15|
(how) can 802.15 access the internet?
4593
<p>Can I interface with my server's RESTful HTTPS API directly over 802.15?</p> <p>Or do I need a gateway? </p> <p>Any good overview/tutorial for 802.15 (not too in depth, just ot get an overview)?</p>
2019-10-11T13:41:37.747
<p>This is exactly what BLE beacon technology does.</p> <p>It requires an app<sup>*</sup> on the device to tell the phone to listen for the broadcasts and then act accordingly when it receives one.</p> <p>Beacons have a normal range of approximately 10m</p> <p><sup>*</sup> An app is required because otherwise this would be a truly horrific way to force advertising on people. Before Google gave up on the idea (Eddystone Beacons) Android had a reasonably nice compromise where the beacons would push a URL pointing to a website that would appear in the notification area (without out any noise or vibration).</p>
|android|ios|
How can you send location based push notifications to all android/ios devices that enter range of an IOT device
4602
<p>I would like to send a location based push notification to all devices that enter a range of some kind of IOT device.</p> <p>for example I would have a device which sends push notifications to any phone that enters range of the device. Similar to location based push notifications.</p> <p>How could you do this? Is it possible?</p>
2019-10-15T23:10:41.120
<p>You do not have to increase message size if you pick the <em>right</em> standard encryption algorithm for your application. You can check how it's done in the LoRaWAN protocol and apply the same methodology to any PHY protocol you want, LoRa, FSK or any other kind of modulation.</p> <p>LoRaWAN uses AES in CTR mode for encryption, and this mode doesn't add any overhead (if payload is 1 byte, encrypted payload is 1 byte). For authentication, LoRaWAN uses CMAC to generate a 4-byte signature. This is probably acceptable overhead in all but the most resource-limited application. All those cryptosystems are based on symmetric keys. To avoid common attacks, a long term secrete symmetric key (specific to each device) is used to generate session keys that are negotiated in a secure way between both end of the link.</p> <p>For BLE, if you want a smartphone to be able to understand heart-rate data (a value that is part of a standard BLE profile), you have no other option than following the BLE standard and using the security that is build in the protocol.</p>
|wifi|lora|bluetooth-low-energy|nb-iot|
How to encrypt sensor data in low-power wireless communication like LoRa, BLE, ...?
4611
<p>Wireless sensors communication have limitation in message size due to low power consumption.</p> <p>Assume that we have a heart rate sensor sending data via BLE, or a GPS data sending via LoRa to a receiver: <strong>the message size is a few bytes</strong>.</p> <p>If we use standard encryption algorithms, the message size will be increased tremendously to hundreds of bytes. Also, the encryption and decryption will use much more power during processing. </p> <p>So, there should be trade-off for that.</p> <p>What are the best practices to encrypt/decrypt the tiny data?</p>
2019-10-16T03:48:30.587
<p>There has been a lot going on with using MQTT in home automation. Check out the <a href="https://www.zigbee2mqtt.io" rel="nofollow noreferrer">zigbee2mqtt</a> project that allows you to control commercial home automation devices like the ikea <a href="https://www.ikea.com/us/en/p/tradfri-wireless-control-outlet-30356169/" rel="nofollow noreferrer">TRÅDFRI Wireless control outlet</a> with your own server.</p>
|raspberry-pi|smart-lights|
How to control an on/off switch with raspberry Pi 3(perhaps using Radio)
4612
<p>So I happen to know some python to turn lights on and off in rpi3. Also to automate my home I know how to use relay boards. But the problem is that I have one rpi3 and the light which I want to control is away from it. So radio seemed to be the next option. I am a newbie in this. How to replace a traditional on/off switch with with RF receiver which does certain actions when the rpi3 sends a particular single. I don't know how to setup this particular thing on the rpi3 side and the switch side. Please help me out here. So pls recommend the switch I should use</p>
2019-10-17T14:45:32.047
<pre><code>America/New_York </code></pre> <p>SOLVED</p> <p>this worked. im a dingus. if i knew how to read and FOLLOW DIRECTIONS i would have read to use tz_database_name instead of its common abbreviation.</p> <p>credit to reddits u/kb5zuy</p>
|home-assistant|
Homeassistant Timezone Sync
4617
<p>My raspi knows when EDT (Eastern US Daylight Time) is active,</p> <pre><code>HypriotOS/armv7: pirate@black-pearl in ~ $ date Thu Oct 17 10:27:27 EDT 2019 </code></pre> <p>the docker container for homeassistant knows when EDT is active,</p> <pre><code>root@black-pearl:/# date Thu Oct 17 10:28:54 EDT 2019 </code></pre> <p>but I cannot manage to get homeassistant v.0.100.2 to reflect this.</p> <p>I've used</p> <pre><code>time_zone: EST </code></pre> <p>which does display the correct time if I were NOT in daylight savings.</p> <p>Here's what else Ive tried:</p> <ol> <li><p>passing in the hosts time, which clearly works as evidenced by the docker containers console</p> <pre><code>-v /etc/localtime:/etc/localtime -v /etc/timezone:/etc/timezone:ro </code></pre></li> <li><p>Leaving blank in the hopes that <a href="https://www.home-assistant.io/blog/2015/05/09/utc-time-zone-awareness/#setting-up-your-time-zone" rel="nofollow noreferrer">freegeoip will solve this for me</a>. </p></li> <li><p>Using time_zone: EDT instead of EST but it isn't recognized as a valid config.</p></li> </ol> <p>Ultimately I'm not above lying to hass and telling it we're in America/Moncton (UTC - 4) and manually switching it back to EST (UTC - 5) the night before our transitions, but thats not really in the spirit of automation so I'd rather not.</p> <p>Any help?</p>
2019-10-20T18:07:01.010
<p>The final, whole, answer is this:</p> <p>I created a Location trigger in IFTTT to fire a webhook action. The webhook action calls a script located at <a href="https://script.google.com/home" rel="nofollow noreferrer">https://script.google.com/home</a>. This script looks like this:</p> <pre><code>function doGet(e) { ScriptApp.newTrigger("notify") .timeBased() .after(5 * 60 * 1000) .create(); } function notify() { UrlFetchApp.fetch("https://maker.ifttt.com/trigger/&lt;my event name&gt;/with/key/&lt;my ifttt webhook key&gt;"); } </code></pre> <p>The script sets up a 5 minute timer, which calls the second function in the script, which calls the IFTTT maker URL with an event name.</p> <p>I then setup a webhook trigger which listens for the event and performs the required action, which turns off the light.</p> <p>The light is turned on, initially, by a simple IFTTT Location trigger.</p> <p>Some useful info: The script needs to be published as a web app to be called. The whole process of setting all this up required multiple steps of allowing google/ifttt to call each other, etc. Any time a change is made to the script, it needs to be re-published as a new version or it will not take effect.</p>
|ifttt|
Switch on, Fade off LIFX
4621
<p>Is it possible to create an IFTTT widget which can turn on a LIFX light and fade it off over a specific time?</p> <p>I had thought configuring a button to turn the light on then set a fade duration using the advanced settings would work. Nope.</p> <p>Then I tried creating two web hooks which fire on receipt of an event. One turns the light on, the other fades off. Doesn’t work either.</p> <p>There does not appear to be a schedule service or timed trigger, so I’m at a loss. </p>
2019-10-25T12:50:40.140
<p>I think you are approaching the problem from the wrong direction.</p> <p>DNS is the known proven solution to decoupling the IP address/physical machine a service is provided on. Trying to re-invent a solution to this problem at a network routing level is not the right way forward.</p> <p>Secondly using UDP packets over the general Internet to try and deliver data that should not be lost (if it can be lost, what's the point of trying to collect it in the first place?). Also given the context it is possible that this data may be potentially sensitive in nature. Unless the content is encrypted and also contains things like timestamps then there is nothing to stop an adversary replaying or faking messages as well as spoofing UDP src addresses is trivial (see the majority of DDoS attacks).</p> <p>Firewalls can be set up to only allow traffic that is initiated from with in the network and to only allow access to trusted srcs for things like DNS</p> <p>I suggest you look at the following:</p> <ol> <li>Running a VPN on your router/gateway. This means all traffic is encrypted and will terminate inside your network.</li> <li>Look at getting a custom/private <a href="https://en.wikipedia.org/wiki/Access_Point_Name" rel="nofollow noreferrer">APN</a> (e.g. from <a href="https://news.o2.co.uk/2015/12/16/private-apn-whats-name/" rel="nofollow noreferrer">O2</a>) from your Cellular network provider. Again this means that all the traffic will terminate within your network. While not encrypting the traffic it is not exposed to the Internet and you don't have to run the receiving server exposed to the world.</li> </ol>
|networking|sensors|
how to network a receiver to a public server
4633
<p>My company use sensors on doors to track activity and access control on the doors for many sites throughout the UK. We need to log this activity by sending UDP packets from the sensor's receiver to the public server via a 4G router where the data will be received and access control logs will be saved.</p> <p>We had a solution were the receiver was programmed to send the data to the public servers static IP address and the router was set as the default gateway, therefor when the server was not found on the network it would be sent to the router and then sent to the server. However this means that if we changed server IP address we would have to reprogram every receiver we use in the UK on site which is not good practice.</p> <p>Because of this we need a solution that comes from a routing rule of sorts that sends all data from the receiver to the public IP address of the server so that we can change the routing config remotely.</p> <p>Any help would be appreciated</p>
2019-10-26T20:25:18.413
<p>Read <a href="https://visualgdb.com/tutorials/esp32/lcd/" rel="nofollow noreferrer">this</a> It worked for me; bigly</p>
|esp32|
ESP-WROVER-KIT-VB - seeking code example to write to display
4637
<p>Does anyone have a simple "hello world" example of writing text to the display of a ESP-WROVER-KIT-VB ?</p> <p>My search skills are failing me today.</p>
2019-10-28T13:37:00.777
<p>The way Bluetooth direction finding works is described in <a href="https://www.bluetooth.com/wp-content/uploads/Files/developer/1903_RDF_Technical_Overview_FINAL.pdf" rel="noreferrer">this document</a>.</p> <p>There are two scenarios:</p> <ul> <li><p><strong>AoD (Angle of Departure)</strong>:</p> <ul> <li>Sending device sends a "direction finding signal"</li> <li>Sending device is equipped with a "phased array antenna"</li> <li>Receiving device performs "IQ Sampling"</li> </ul></li> <li><p><strong>AoA (Angle of Arrival)</strong>:</p> <ul> <li>Sending device sends a "direction finding signal"</li> <li>Receiving device is equipped with a "phased array antenna"</li> <li>Receiving device performs "IQ Sampling"</li> </ul></li> </ul> <p>As you see, in both scenarios, there are <strong>requirements on both ends</strong>. Some are definitely hardware upgrades (the phased array antenna). The rest (IQ sampling and sending the direction finding signal) <strong>may</strong> be possible with just firmware / software upgrades, depending on the exact implementation, though I kind of doubt it (it would also most likely require at least a change in the BLE chip firmware, not just a high-level OS/app change).</p> <p>So, <strong>as far as I understand it at this point</strong>, you need BT 5.1 equipment at both ends to make it work.</p> <p>I'd love to hear otherwise!</p>
|bluetooth-low-energy|direction-finding|
Bluetooth Direction Finding - do I understand it correctly?
4639
<p>I just read </p> <blockquote> <p>Bluetooth Direction Finding, added to the Bluetooth spec as part of Bluetooth 5.1 to allow devices to measure angle of arrival and angle of departure (AoA and AoD) to position devices to an accuracy of under one metre (around 3.3 feet.)</p> </blockquote> <p>(read it <a href="https://www.hackster.io/news/nordic-launches-wide-temperature-direction-finding-nrf52833-bluetooth-soc-development-board-560a6ead0a14" rel="nofollow noreferrer">here</a>).</p> <p>I am excited about the idea, but want to be sure that I have understood it.</p> <p>If I want to track people/objects and report their locations to a server, I imagine that I need a BLE Gateway/router. </p> <p>I assume that the devices would send advertising packets, the gateway would receive these, detect the device location and send it via HTTP(S) to the server.</p> <p>I also assume that only the BLE gateway/router needs to be BLE 5.1, since it is the one performing direction finding. </p> <p>Are my assumption correct? Does it work that way? Can a BLE 5.1 gateway perform direction finding on a BLE 4.0 advertisement?</p> <p>I welcome any more info, such as tutorials, videos, books, etc</p>
2019-11-07T17:06:01.020
<p>Synchronize data from different devices is always a hard task. In your favor, you are using smartphones. You can manage to have accurate microsecond precision on your timestamps in this scenario.</p> <p>First of all, we need to think about the communication. The easier way I could think, that would require the least programming and hardware works like this:</p> <ol> <li>The phones are running an app which samples the accelerometer data, timestamp them with the best precision you can and then HTTP request them to a webserver.</li> <li>The webserver consists of a RPi running LAMP. A PHP script receives the request, and place the data in a table using mySQL.</li> <li>Your front end consists of a simple webpage on which javascript gets the data from the database and do the according processing on it.</li> </ol> <p>Now let's talk about #1.</p> <p>In my opinion, you have two ways of timestamping your data. The easy way and the hard way:</p> <p>The simplest way is to use a external source, such as <a href="https://www.nist.gov/" rel="nofollow noreferrer">NIST</a>. Another very simple way is to use your GPS timestamps, which are pretty acurate. The hard way is to go for clock sync. These are hard to achieve. </p> <p><em>But</em>, </p> <p>there is a <a href="https://android.gadgethacks.com/how-to/set-your-android-atomic-time-for-perfectly-synced-clock-0170500/" rel="nofollow noreferrer">tool</a> to help you with that.</p> <p>The webserver is pretty straightforward. Get a RPi, go for LAMP, you are done. PHP simple server with mysqli and you are done. The internet is full of tutorials.</p> <p>Once you have your data in the database and properly timestamped according to your precision, parse it and do whatever you need with that. If the timestamp matches, there is your synchronized data.</p> <p>Please note that this is a very simple approach with some extensive drawbacks depending on how precise the synchronization should be, But this may give you a head start for the task.</p>
|sensors|data-transfer|interoperability|
How can I build a network of 5 smartphones that log accelerometer data into a computer?
4656
<p>I would like to build a network consisting of 5 smartphones (preferably Android, if it makes any difference) that log synchronized accelerometer data into a computer (like a data-logger). How can I achieve this? Any help would be appreciated. </p> <p>Some more details: - the preferred sampling frequency is 50Hz. Depending on the quality of the accelerometers, this high frequency might not make sense. However, a sampling frequency below 10 Hz would not be useful. - Data from all accelerometers needs to be synchronized. The logged data should preferably be in the following format: Time Acceleration11 Acceleration12...Acceleration53; Where Acceleration11 is acceleration in device 1, direction 1 (say, X-direction).</p> <p>I am a newbie in electronics and IoT, so please consider this fact in your answer. For instance, please avoid using abbreviations without explaining them and please provide some guidance how to practically achieve what you are suggesting.</p>
2019-11-14T02:12:12.177
<p>AnyList has been updated to work with Google Assistant now, I use it myself. You just need to go into the settings for Google Home and change the default list to AnyList.</p> <p><a href="https://help.anylist.com/articles/enable-google-assistant/" rel="nofollow noreferrer">https://help.anylist.com/articles/enable-google-assistant/</a></p> <blockquote> <p>Set a default list service</p> <p>Let your Google Assistant create and edit lists in a service, like Google Keep.</p> <p>On your Android phone or tablet, open the Google Assistant app Assistant (iOS) At the top right, tap your profile image or initial and then Services and then Notes &amp; Lists. Tap a service to set it as your default. To confirm, tap Continue. Any new lists created with your Google Assistant will be visible on your default list service. Any lists you created with your Google Assistant before you set a default list service, won’t be available on that service.</p> <p>Important: If you choose a third-party provider app as your default, that provider’s app's privacy policy applies.</p> </blockquote>
|google-home|
How to change default shopping list app with google home
4675
<p>With Alexa I can change default shopping list and todo app by settings.</p> <p>I'm using <code>AnyList</code> with Alexa, so can I also use <code>AnyList</code> with Google home?</p>
2019-11-21T03:21:17.263
<p>A spreadsheet really isn't the best way to work with these logs, it makes them really hard to read properly. Next time please just post the text and use the <code>{}</code> option in the tool bar to format it as code.</p> <p>There is nothing too obviously wrong in the log entries you've provided.</p> <p>That said, the C code worries me a lot, it looks like you are creating a new MQTT client for every publish event and then not shutting them down or cleaning up the resources properly after. You are very likely leaking client structures and network threads. These are the sort of things that will cause things to crash at some point.</p> <p>Firstly assuming the application that is publishing the messages is long running it should create a single MQTT client object and reuse it over the life time of the application.</p> <p>This means the initialisation of the library, the creation of the client, the starting of the network loop and the connection should all be moved outside the <code>publish</code> function and the <code>mosq</code> should be variable this is in a more global scope so it can be accesses later.</p> <p>Also using 1 second for a KeepAlive value is just going to generate a huge amount of extra load on your broker (especially for a client that you are currently leaking and not cleaning up). A better value would be 60.</p> <p>You can see the KeepAlive value in the logs in the connect line:</p> <pre><code>12:23:31pm New client connected from 192.168.1.115 as mosq-0g6AG1QuASdsrJZqAz (p2, c1, k1). </code></pre> <ul> <li><code>p</code> is the protocol version where 1 -> MQTT3.1 2 -> MQTT3.11 5 -> MQTT5</li> <li><code>c</code> is if the clean session flag is set</li> <li><code>k</code> is the keepalive value</li> </ul> <p>p.s. No there is no description of the log output except the src <a href="https://github.com/eclipse/mosquitto" rel="nofollow noreferrer">code</a></p>
|mqtt|mosquitto|
Is There A Description For the Mosquitto Log Entries?
4696
<p>I have a spreadsheet of about 150 Mosquitto log entries. It is paired with 30 messages I published, matched in time. That is, there are about 5 times as many Mosquitto entries as published items. Many seem to indicate that things I published timed out. Others say &quot;Socket error&quot;. But all the subscribers got the messages.</p> <p>My problem is, after publishing 2 or 3 per hour for 2 or 3 days, suddenly none of the subscribers get anything I publish. But the log &quot;looks the same&quot; as far as I can tell. But there are thousands of entries.</p> <p>EDIT: The link will bring up my spreadsheet. I edited it to just 44 rows. There are two vertical sections. Messages I published on the left and Mosquitto log entries on the right. Sorry, when I pasted them into the spreadsheet the delimiter characters spread them across many columns. The first 3 or so pubs seem fine but then the 12:13:26 pub has a socket error although the subscriber received the pub. After that things seem to get worse with timeouts also.</p> <p><a href="https://drive.google.com/open?id=1DHX7sk9opPsHutdigBynxaxvY6YpOK2Q" rel="nofollow noreferrer">Mosquitto Capture Short</a></p> <p>The rest of the 100 or so rows (that I didn't include) are very similar. Timeouts and socket errors. But the subscribers get the pubs.</p> <p>The pubs come from a C program I wrote that runs on my Raspberry Pi. The subscribers are items in OpenHAB that is also on the same RPi. Here is the C code that does the publishing:</p> <pre class="lang-c prettyprint-override"><code>void publish(char *Topic, char *action) { mosquitto_lib_init(); mosq = mosquitto_new(NULL,true,NULL); mosquitto_loop_start(mosq); mosquitto_connect_async(mosq,MQTT_Host,MQTT_Port,1); mosquitto_publish(mosq,NULL,Topic,strlen(action),action,2,false); printf(&quot;Mosquitto Sending: %s %s to %s:%d\n&quot;,Topic,action,MQTT_Host,MQTT_Port); } </code></pre>
2019-11-29T01:38:43.990
<p>Some Orange Pi components are in the mainline kernel and some are not. To have a full running Linux OS, you should use <a href="https://www.armbian.com/orange-pi-zero-plus/" rel="nofollow noreferrer">armbian</a>. If you want to use another distro than Debian/Ubuntu, you need to use <a href="https://www.yoctoproject.org/" rel="nofollow noreferrer">Yocto</a> in order to build your own image. There is a <a href="https://gitlab.com/dimtass/meta-allwinner-hx" rel="nofollow noreferrer">recipe for the Allwinner</a> used in the Orange Pi Zero.</p>
|security|wifi|
OS for Orange Pi zero plus
4708
<p>I bought an orange pi zero plus and want to make a wifi access point that passes all traffic of the connected devices through tor.</p> <p>Simply I wanted a dev board that has gigabit ethernet and wifi for access point, and is as cheap as possible.</p> <p>I want to create a secure pathway through tor. So I installed Tails(not specifically but for the sake of its features) on my sd card and tried to turn my Pi on, but nothing, not even led's glow. I am sure that power adapter is working fine and same is ethernet cable.</p> <p>Does Tails has to do with any of this? I assumed that most of lightweight distros can run pretty fine on new dev boards. Should I install armbian instead of tails? if yes, then why won't tails work?</p>
2019-12-09T01:53:17.933
<p>I noticed the setting is not available Alexa app, but you can configure it directly by device.</p> <p>There is a display setting for calendar in:</p> <p><code>Settings</code>-><code>home, clock</code>-><code>home contents</code></p> <p>Probably the name of settings are bit different. (I'm using in Japanese)</p>
|alexa|amazon-echo|
How to use calendar without showing notification on display
4729
<p>I'm using Google calendar with Echo show by voice.</p> <p>But by default Echo show also displays upcoming events, and my friends coming to home can see it. It's a bit annoying.</p> <p>I can disable all notifications by config, but if possible I want to disable only notifications for the calendar events.</p> <p>Is there way for it? I couldn't find it how to do it.</p>
2019-12-10T00:51:48.263
<p>Well if it's your devices and network, it's going to be way easier then usual, you can just use a symmetric key encryption like AES and hard code the key in both devices.</p> <p>To do this, I would recommend <a href="http://cryptography.io" rel="nofollow noreferrer">cryptography.io</a> and you could use the Fernet method</p> <p><code>from cryptography.fernet import Fernet</code></p> <p>From there on, if you go to their website, it should be quite straight forward how to implement it. You generate a key, save it on both devices, use it before you send a message and after you receive one to encrypt and decrypt.</p> <p>Hope this helps, good luck!</p>
|raspberry-pi|security|sensors|lora|
Encrypting sensor data on Raspberry Pi?
4731
<p>I am sending sensor data between two Raspberry Pis via lora. I am using two Lora Radios and NOT using a LoraWan network like The Things Network. How should I encrypt my data? Are there any open source python libraries? </p> <p>Thank you!!</p>
2020-01-01T18:19:02.060
<p>You can't have 2 clients connected at the same time with the same client id.</p> <p>You have hardcoded the same client id <code>-i ss</code> for both the publisher and the subscriber.</p> <p>Since you are starting the subscriber first, it will be kicked off the broker as soon as the publisher connects, hence it will not be connected when the publisher actually publishes the message, so will not see it.</p> <p>This has nothing to do with the ACL</p>
|mqtt|mosquitto|
Subscriber not receives message from client
4764
<p>My Mosquitto server whole ACL file content:</p> <pre><code>pattern write s1/%c pattern read s1/%c </code></pre> <p>I know there should be possibility to have single line:</p> <pre><code>pattern readwrite s1/%c </code></pre> <p>But my server complains with error:</p> <pre><code>Empty invalid topic access type in acl_file. </code></pre> <p>I suppose two lines should make the same like single <code>readwrite</code> one. Please, correct me if I'm wrong.</p> <p>I do subscribe to <code>s1/ss</code> from client <code>ss</code>:</p> <pre><code>mosquitto_sub -h 192.168.1.8 -t s1/ss --cafile ca.crt -p 8883 -d -u b -P b -i ss </code></pre> <p>And I do publish from client <code>ss</code>:</p> <pre><code>mosquitto_pub -h 192.168.1.8 -t s1/ss --cafile ca.crt -m "test" -p 8883 -d -u b -P b -i ss </code></pre> <p>According to Mosquitto log server informs it is happy with publish, but subscriber not receives message. Even worse, according to log at the same time it resubscribes to server.</p> <pre><code>1577902083: New connection from 192.168.1.222 on port 8883. 1577902083: Client ss already connected, closing old connection. 1577902083: New client connected from 192.168.1.222 as ss (c1, k60, ub). 1577902083: Sending CONNACK to ss (0) 1577902083: Received PUBLISH from ss (d0, q0, r0, m0, 's1/ss', ... (4 bytes)) 1577902083: Received DISCONNECT from ss 1577902084: New connection from 192.168.1.222 on port 8883. 1577902084: New client connected from 192.168.1.222 as ss (c1, k60, ub). 1577902084: Sending CONNACK to ss (0) 1577902084: Received SUBSCRIBE from ss 1577902084: s1/ss (QoS 0) 1577902084: ss 0 s1/ss 1577902084: Sending SUBACK to ss </code></pre> <p>Why my subscriber not receives message? Does my ACL lines are correct?</p>
2020-01-02T19:36:16.653
<p>You don't "flash" software to a pi in the same way you do a micro controller based device. You can easily update software OTA (over the air) to a Raspberry pi, just by copying the files to the device and restarting the application.</p> <p>If you want to automate this sort of thing then using a service like <a href="https://www.balena.io/" rel="nofollow noreferrer">balena.io</a> will do it for you. You just need to package your application up into docker containers.</p>
|smart-home|sensors|arduino|home-security|
Motion detector system that can be flashed remotely
4769
<p>I want to build a motion detector that performs a similar service to security services, which notify me upon intrusion and provide video feed. The other main requirement is that I can update the sotware remotely. (For example, I can flash over-the-air a Particle Photon, which is <a href="https://community.particle.io/t/programming-particle-photon-with-arduino-ide/23177" rel="nofollow noreferrer">similar to Arduino</a>.) I found <a href="https://docs.particle.io/tutorials/hardware-projects/hardware-examples/photon/#make-a-motion-detector-publish-and-the-console" rel="nofollow noreferrer">this thread</a> and <a href="https://community.particle.io/t/webhooks-super-simple-motion-activated-push-notifications/10322" rel="nofollow noreferrer">this thread</a> and still have questions on how to proceed.</p> <p>I would like a board that can:</p> <ul> <li>take code in C++ or Python</li> <li>connect to a <a href="https://en.wikipedia.org/wiki/Passive_infrared_sensor" rel="nofollow noreferrer">Passive Infrared</a> motion sensor</li> <li>connect to speakers for a high-pitched sound upon intrusion</li> <li>use cellular connectivity if local area network is down</li> <li>function for a long time on a power bank if power is down</li> <li>be updated remotely, as I mentioned above</li> <li>ideally, compress video to save on data usage for upload</li> </ul> <p>I know that people have done this on a <a href="https://randomnerdtutorials.com/raspberry-pi-motion-detector-photo-capture/" rel="nofollow noreferrer">Raspberry Pi</a>, but my main requirement is a board for which I can flash the firmware remotely (as far as I know, the Pi and any "normal" computer does not).</p> <p>Has anyone built a similar system and could give some pointers?</p>
2020-01-02T20:33:07.797
<p>The difference is the types of radio hardware each has.</p> <ul> <li>Argon - Has a WiFi (802.11) + Bluetooth 5 radio </li> <li>Boron - Has an LTE cellular + Bluetooth 5 + Zigee radio</li> <li>Xenon - Has Bluetooth 5 + Zigbee radio</li> <li>Photon - Has a WiFi (802.11b/g/n) radio </li> </ul> <p>You can find the datasheets for all the devices here <a href="https://docs.particle.io/datasheets/wi-fi/photon-datasheet/" rel="nofollow noreferrer">https://docs.particle.io/datasheets/wi-fi/photon-datasheet/</a></p>
|arduino|
What is the difference between Particle Photon, Argon, Xenon, Boron, etc?
4770
<p>For one project I have used the Particle Photon, an IoT device <a href="https://community.particle.io/t/programming-particle-photon-with-arduino-ide/23177" rel="nofollow noreferrer">similar to Arduino</a>, and am considering changing to a different device for another project (a motion detector that <a href="https://iot.stackexchange.com/questions/4769/motion-detector-system-that-can-be-flashed-remotely">has its own question</a>). I can't find the difference between Particle products such as Photon, Argon, Xenon, and Boron; only that the Boron serves for mesh networks.</p> <p>Are they just newer versions, like Raspberry Pi 2, 3, and 4? Or do they have different purposes?</p>
2020-01-03T05:53:34.790
<p>Looks like you've answered your own question :)</p> <p>Yes - a wifi controllable interface (likr Sonoff) hooked to act as the trigger for the contactor relay is probably your best/cheapest option. Saves you the issue of coding your own I/O control and easily manages overall power requirements.</p>
|smart-home|wifi|
How to build a 220v ~40 amp WIFI switch (for pool pump or similar)
4773
<p>I'm looking for ideas and suggestions to build a 220v ~ 40 amp wifi switch for controlling my pool pump so that it can replace my mechanical timer.</p> <p>Very few devices are available on the market. There are both relatively expensive and according to the reviews don't live up to expectations in terms of reliability and build:</p> <ul> <li><a href="https://rads.stackoverflow.com/amzn/click/com/B00ZYLTJ16" rel="noreferrer" rel="nofollow noreferrer">WiOn Outdoor Wi-Fi Smart Box</a></li> <li><a href="https://rads.stackoverflow.com/amzn/click/com/B07VNS7V9J" rel="noreferrer" rel="nofollow noreferrer">Generic WIFI Relay Module 6000W High Power 220V 30A</a></li> <li><a href="https://rads.stackoverflow.com/amzn/click/com/B07DW9JN22" rel="noreferrer" rel="nofollow noreferrer">KTNNKG 30amps Smart Pump Switch</a></li> </ul> <p>The main issue seems to come from the terminal connections not being big or sturdy enough for 10 gage wire. </p> <p>Looking at the <a href="https://rads.stackoverflow.com/amzn/click/com/B07THD8VBN" rel="noreferrer" rel="nofollow noreferrer">Migro Outdoor Smart Wi-Fi Outlet Box</a> it seems they have combined a contactor with a sonoff switch which seems like the best option. This <a href="https://www.youtube.com/watch?v=aml0VGzNXEo" rel="noreferrer">video</a> explains how a contactor works. Migro are charging around $140 whereas the contactor on it's own only costs $14 <a href="https://rads.stackoverflow.com/amzn/click/com/B07T7ZLF7S" rel="noreferrer" rel="nofollow noreferrer">here</a> and the sonoff switch $8 <a href="https://rads.stackoverflow.com/amzn/click/com/B07KP8THFG" rel="noreferrer" rel="nofollow noreferrer">here</a>.</p> <p>Does building one seem the best / cheapest option?</p>
2020-01-07T08:25:15.310
<p>To answer the title of your question, the differences are quite numerous. At the very least, for a very very quick look at the specs:</p> <ul> <li>The ESP32 is single-band 2.4 GHz Wi-Fi, the CC3235SF is dual-band 2.4/5 GHz Wi-Fi</li> <li>The ESP32 has Bluetooth, the CC3235SF doesn't appear to include it</li> <li>The ESP32 is Extensa-based, the CC3235SF is ARM-based</li> </ul> <p>But there are probably more differences than similarities, other than the fact they're both MCUs with Wi-Fi.</p> <p>Since the CC3235SF is an MCU, yes, you can program it directly, though the tools to do that may be quite different.</p> <p>There is a development board for the CC3235SF: <a href="http://www.ti.com/tool/LAUNCHXL-CC3235SF" rel="nofollow noreferrer">http://www.ti.com/tool/LAUNCHXL-CC3235SF</a></p> <p>A development board is targeted for development, so it may have more stuff than you actually need in a final product, as well as be missing parts you need and you add externally during development. Also, a development board is not necessarily certified (FCC, CE, etc.).</p> <p>When building a commercial product, you'll usually have specifically the components you need on your PCB, removing any unnecessary stuff and incorporating any external components, and you'll have the whole finished product undergo testing and certification. Of course, on very small quantities, you may sometimes use "development boards" directly.</p>
|esp32|
What is the difference between Texas Instruments CC3235sf and ESP32?
4789
<p>I have used esp32 in my projects and its easy to use. But I want to try using CC3235SF. But how does it work exactly? It has on-board RAM and 1MB Flash, so does it mean I can program it directly like I can do with ESP32 or do I have to use it with some other host MCU? Also there are many development boards in the market for ESP32 but none for CC3235SF. I also want to know whats different between the development boards and whatever people use in their commercial products?</p>
2020-01-14T10:52:07.477
<p>There are a few references to this on the <a href="https://en.wikipedia.org/wiki/Oyster_card#Contactless_payment" rel="nofollow noreferrer">Wikipedia page for the Oyster card</a>:</p> <blockquote> <p>Since the <strong>Oyster readers cannot write to a contactless card</strong>, the reader when touching out is unable to display the fare charged for the journey, as the card does not have the starting point stored in it. This is calculated overnight once <strong>the touch in and touch out information is downloaded from the gates and collated</strong>.</p> </blockquote> <p>(emphasis mine)</p> <p>There are a few more details in that section. Sadly the source in that section does not point anywhere.</p>
|protocols|
How are journeys tracked via contactless card?
4799
<p>In London, and soon in Paris also, contactless bank cards can be used to pay for public transport.</p> <p>The system tracks a user's journey, through the "tapping in" and "tapping out" of the user; and then charges them the appropriate amount for the journey they have taken.</p> <p>My question is, how is this information tracked? I assume the system can't be writing information to my bank card, so is it sending the data to a central system somewhere? Or does it work another way?</p>
2020-01-16T09:00:31.620
<p>So it turns out that the problem was not the isConnected() function. The problem was that I was checking whether it was connected too soon. The connect function is asynchronous, meaning that it executes in the background. So while it was trying to connect, I was asking it if it was connected before it was finished. To fix this, I added an onClickListener to one of my buttons and checked the status just by pressing the button a few seconds after the app started. </p>
|mqtt|android|paho|eclipse-iot|
Question about Eclipse Paho Mqtt Android Client library function "isConnected"?
4804
<p>I'm making an android application to communicate with a bicycle security system using android studio. The application is using the MQTT protocol to talk to a remote server which will act as the broker and relay messages to the security system which has a microcontroller and a GSM module that allows for an internet connection.</p> <p>The problem I'm experiencing relates to the Eclipse Paho Mqtt Android Client. This is a neat library that contains functions to implement the MQTT protocol. So far I've managed to establish a connection between the server and the application. It least that's what it looks like. See the following image which shows my logcat messages.<a href="https://i.stack.imgur.com/5hfWV.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5hfWV.jpg" alt="The logcat messages in Android Studio"></a></p> <p>It definitely appears to be connected, its pinging once a minute. The only problem is that when I try to verify that the connection is there using the isConnected function, it always tells me that I'm not connected. Below you can see my code. If you need to download the library or if you want to look at it, here is a link -> <a href="https://github.com/eclipse/paho.mqtt.android" rel="nofollow noreferrer">https://github.com/eclipse/paho.mqtt.android</a></p> <p>Also, I would like to explain my code a little so you know what you're looking at. Please read this carefully. </p> <p>It is in Kotlin. I made a Client_MQTT class that is instantiated in the main activity. This class holds an instance of the MqttAndroidClient (this is from the paho library). This instance is instantiated in the constructor and it's named MqttClient. There is a connect function which does all the busy work and connects to the server. There's also a function called ConnectionAlive. The only thing it does is return MqttClient.isConnected().</p> <p>The other portion of my code is the MainActivity where the Client_MQTT class is instantiated and the connect function is called. Most importantly, this is where I do a simple if check to see if the connection is alive. It always says no, but I know that can't be right.</p> <p>Now you may see the code.</p> <pre><code>package com.chymera_security.application import android.content.Context import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.util.Log import org.eclipse.paho.android.service.MqttAndroidClient import org.eclipse.paho.client.mqttv3.IMqttActionListener import org.eclipse.paho.client.mqttv3.IMqttToken import org.eclipse.paho.client.mqttv3.MqttException import org.eclipse.paho.client.mqttv3.MqttClient import androidx.core.app.ComponentActivity.ExtraData import androidx.core.content.ContextCompat.getSystemService import android.icu.lang.UCharacter.GraphemeClusterBreak.T import androidx.fragment.app.FragmentActivity import kotlinx.android.synthetic.main.activity_main.* class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) var Client = Client_MQTT(this.getApplicationContext()) //passing in the context //var client = MqttAndroidClient(this.getApplicationContext(), "tcp://io.adafruit.com:1883", // ConnectThis.ClientId) Client.connect() if (Client.ConnectionAlive()) { ViewAlarmStatus.text = "Connected to server." //You can replace this with a simple log statement } else { ViewAlarmStatus.text = "Not connected to server." } } } </code></pre> <p>-</p> <pre><code>package com.chymera_security.application import android.content.Context import android.util.Log import org.eclipse.paho.android.service.MqttAndroidClient import org.eclipse.paho.client.mqttv3.* class Client_MQTT constructor(context_param: Context){ internal var options = MqttConnectOptions() internal lateinit var ClientId : String internal lateinit var MqqtClient: MqttAndroidClient internal lateinit var context : Context init { options.userName = "Put your username here" options.password = "password here".toCharArray() ClientId = MqttClient.generateClientId() context = context_param MqqtClient = MqttAndroidClient(context, "tcp://io.adafruit.com:1883", ClientId) } fun connect() { try { val token = MqqtClient.connect(options) token.actionCallback = object : IMqttActionListener { override fun onSuccess(asyncActionToken: IMqttToken) { Log.i("Connection", "Connected to server ") //connectionStatus = true // Give your callback on connection established here } override fun onFailure(asyncActionToken: IMqttToken, exception: Throwable) { //connectionStatus = false Log.i("Connection", "failure") // Give your callback on connection failure here exception.printStackTrace() } } } catch (e: MqttException) { // Give your callback on connection failure here e.printStackTrace() } } fun ConnectionAlive (): Boolean{ return MqqtClient.isConnected() } } </code></pre> <p>If you have any knowledge about this please share. Am I actually connected to the server? It looks like it but the isConnected doesn't agree. Is there some conceptual misunderstanding about how I'm using isConnected? Am I just using it wrong, or is this some crazy bug? Would love to hear from you.</p> <p>Extra resources: <a href="https://medium.com/@chaitanya.bhojwani1012/eclipse-paho-mqtt-android-client-using-kotlin-56129ff5fbe7" rel="nofollow noreferrer">https://medium.com/@chaitanya.bhojwani1012/eclipse-paho-mqtt-android-client-using-kotlin-56129ff5fbe7</a></p> <p><a href="https://www.hivemq.com/blog/mqtt-client-library-enyclopedia-paho-android-service/" rel="nofollow noreferrer">https://www.hivemq.com/blog/mqtt-client-library-enyclopedia-paho-android-service/</a></p>
2020-01-18T14:58:22.493
<p>Slightly too large for a comment, and does not answer your question as posted, but ...</p> <p>Firstly, an upvote to @jcaron and, yes, it is a good idea to lean about data formats (integer/string/etc) and data compression (think .ZIP file).</p> <p>However, an alternative would be to consider an IoT SIM card. A bunch of these have sprung up in recent years. They are data only, no voice , and beware that some might be 2G only, which your country may not support, or may drop.</p> <p>The big advantage is that they charge per byte of data sent, and some don't even have a monthly fee.</p> <p>I first became aware of them when buying an Onion Omega <a href="https://onion.io/2bt-using-hologram-expansion/" rel="nofollow noreferrer">3G expansion</a> (*). Which recommended Hologram.</p> <p>I will leave it to you to make your own decisions. Google for <code>IoT SIM</code> perhaps?</p> <p>You can look at the <a href="https://rads.stackoverflow.com/amzn/click/com/B07GY2S8QK" rel="nofollow noreferrer" rel="nofollow noreferrer">Amazon listing</a> for the Hologram SIM, which includes comparisons with others.</p> <p><a href="https://hologram.io/pricing/details/" rel="nofollow noreferrer">Here</a> is the pricing for Hologram.</p> <p><a href="https://www.thingsmobile.com/business/plans" rel="nofollow noreferrer">Here</a> for ThingsMobile.</p> <p><a href="https://www.globalm2msim.com/rates/" rel="nofollow noreferrer">Here</a> For Global M2M SIM.</p> <p>Generally, you are talking about 5 cents for a mB, which is lot of data when you are only sending 3 integers.</p>
|data-transfer|mobile-data|
How can I transmit this information from my device using the least data possible?
4809
<p>I have got a Raspberry Pi setup to transmit things over socket from my project. It currently does this over cellular data on a pay as you go plan, so I would like to optimise it. All that needs to transmitted is three numbers, currently in the format of <code>int,int,int</code>. So, my question is which character uses the least data. I know this is nit picking, but it was more for theory.</p> <p>If it were possible a list would be better as I would also need a character for negative numbers. </p> <p>It will be from -100 to 100 but this could be any 200 range if reformatted at the other end</p>
2020-01-22T20:20:36.590
<p>As it turns out, GPIO pins 34, 35, 36 and 39 are actually GPI - input only and have no internal pullup or pulldown resistors. I switched to a different GPIO with internal pullup and this solved the problem.</p>
|gpio|
Mongoose OS and button press detection
4816
<p>Under Mongoose OS, I’m trying to write some code to detect that a button was pushed. I wrote the code below, but it thinks the button is always pushed, except when I actually push it. When I push and hold it, the output stops. The button is wired between the GPIO pin and GND, with no pull-up resistor since there is an internal pull-up. I wonder if my code is wrong and would appreciate your comments, thank you.</p> <p>I have pasted the relevant code below:</p> <pre class="lang-c prettyprint-override"><code>// GPIO 36 #define BTN_MOB 36 #ifdef BTN_MOB mgos_gpio_set_mode(BTN_MOB, MGOS_GPIO_MODE_INPUT); #endif static void button_cb(int pin, void *pParam) { if(pin == BTN_MOB) LOG(LL_INFO, (&quot;***** BUTTON PRESSED\r\n&quot;)); } mgos_gpio_set_button_handler(BTN_MOB, MGOS_GPIO_PULL_UP, MGOS_GPIO_INT_EDGE_NEG, 100 /* debounce ms */, button_cb, /* callback handler */ NULL); /* arguments to callback handler */ </code></pre>
2020-01-29T16:58:13.973
<p>Today I am going to answer my own question: This is not intended to be an advertisement of any sort, but eventually I ended up buying a pair of <strong>Ultimate Ears BOOM 3</strong> speakers. They are portable Bluetooth speakers, but have support for multi-room audio.</p> <p>There is a <em>PartyUp mode</em> to connect up to 150 speakers and broadcast the same music to all of them. You cannot, however, play <em>different</em> music in each room, unless you pair multiple sources. But for me, at least, these speakers cover all use cases that I had, when I posted my initial question back in January.</p> <p>In this setup, using Bluetooth, I can play audio from <em>any</em> app on my Android phone and broadcast it to <em>multiple</em> speakers. There is no need for additional apps or streaming services.</p>
|android|ikea-tradfri|audio|
Stream any audio from Android phone to multi-room speakers?
4830
<p>Is it possible to stream <em>any audio</em> from an Android phone to a multi-room speaker setup?</p> <p>I would like to invest in some multi-room speakers, but I do not use any streaming services. My media files, both audio and video, are scattered around locally on my hard drive and phone. I do not have a central media library. I watch a lot of videos on my phone's YouTube app.</p> <p>IKEA's SYMFONISK speakers seem like a good set of entry-level devices to set up a multi-room audio system. However, I'm unsure about how to actually stream music to them. To my research I can only use streaming services or a media library as input.</p> <p>I also own a Bluetooth headset that I can connect to my phone and it will play any auto, whether it is music, video or YouTube content. But to my current understanding the Sonos App is required for IKEA's speakers and I can only stream audio that I explicitly selected within the app. The speakers do not simply 'forward' all audio of my phone, correct?</p> <p><strong>Long story short:</strong> Is there any solution for a cave man like me, who does not rely on streaming services? My phone would be most important for me, so don't bother about my Linux laptop too much.</p> <p>To my current understanding, I would be better of with a Bluetooth speaker instead of Wifi speakers. But Bluetooth speakers cannot be used as a multi-room setup and connectivity is always a big issue.</p>
2020-01-31T12:13:54.103
<p>As far as I know(until now), there is only one solution to this problem. <strong>Upgrade the firmware</strong> of BC95-x.</p> <p>After a discussion with quectel we came to conclusion that in order for <code>AT+NSOST</code> to work with ipv6 arguments, a new firmware must be running on the module. The version we tried is <code>R02A02</code>.</p> <p>In order to upgrade the firmware someone will also need an upgrade tool. Quectel suggest QFlash. Unfortunately, things get a little tricky here.</p> <ul> <li>Don’t use a baud rate of 9600 (like if you want to send AT commands), but instead <strong>use a baud rate of 115200</strong>, where the boot loader is listening for your commands when booting up.</li> <li>When the QFlash application says “RESET” at the beginning of the update progress, you <strong>need to</strong> manually <strong>reset</strong> the BC95-G module. QFlash need to see the boot messages from module somehow. For example on "RESET" I applied the power to the module.</li> </ul> <p><a href="https://cloud.hoo2.net/index.php/s/xFt7nCeJnpR3SFZ" rel="nofollow noreferrer">Here</a> you can find both the firmware and the upgrade utility in a zip with md5:<code>89158f2384cb3fd086a972cdfb4efabb</code>.</p> <p>After that, all seams to work.</p> <pre><code>AT+NRB REBOOTING Ά[0C]AΆ[04]A Boot: Unsigned Security B.. Verified Protocol A.. Verified Apps A...... Verified REBOOT_CAUSE_APPLICATION_AT Neul OK AT OK ATI Quectel BC95-G Revision:BC95GJBR02A02 OK AT+NCONFIG? +NCONFIG:AUTOCONNECT,TRUE +NCONFIG:CR_0354_0338_SCRAMBLING,TRUE +NCONFIG:CR_0859_SI_AVOID,TRUE +NCONFIG:COMBINE_ATTACH,FALSE +NCONFIG:CELL_RESELECTION,TRUE +NCONFIG:ENABLE_BIP,FALSE +NCONFIG:MULTITONE,TRUE +NCONFIG:NAS_SIM_POWER_SAVING_ENABLE,TRUE +NCONFIG:BARRING_RELEASE_DELAY,64 +NCONFIG:RELEASE_VERSION,13 +NCONFIG:RPM,FALSE +NCONFIG:SYNC_TIME_PERIOD,0 +NCONFIG:IPV6_GET_PREFIX_TIME,15 +NCONFIG:NB_CATEGORY,2 +NCONFIG:RAI,FALSE +NCONFIG:HEAD_COMPRESS,FALSE +NCONFIG:RLF_UPDATE,TRUE +NCONFIG:CONNECTION_REESTABLISHMENT,FALSE +NCONFIG:TWO_HARQ,FALSE +NCONFIG:PCO_IE_TYPE,EPCO +NCONFIG:T3324_T3412_EXT_CHANGE_REPORT,FALSE +NCONFIG:NON_IP_NO_SMS_ENABLE,FALSE +NCONFIG:SUPPORT_SMS,TRUE +NCONFIG:HPPLMN_SEARCH_ENABLE,TRUE OK AT+CGDCONT=1,"IPV6","iot" OK AT+COPS=1,2,"20201" OK AT+CEREG=1 OK AT+CSCON=1 OK AT+CFUN=1 OK AT+CEREG? +CEREG:1,1 OK AT+CGATT? +CGATT:1 OK AT+CGPADDR +CGPADDR:0,2A02:1388:400:B:2183:7DD4:B7F1:DE5A +CGPADDR:1 OK AT+CSQ +CSQ:13,99 OK AT+NUESTATS Signal power:-928 Total power:-862 TX power:210 TX time:549 RX time:27140 Cell ID:290888 ECL:0 SNR:114 EARFCN:6390 PCI:214 RSRQ:-108 OPERATOR MODE:2 CURRENT BAND:20 OK AT+NSOCR=DGRAM,17,1024,1,"AF_INET6" 1 OK AT+NSOST=1,xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx,207,6,4C4700000000 1,6 OK +CSCON:1 AT+NSOCL=1 OK +CSCON:0 AT+CFUN=0 +CSCON:1 +CSCON:0 OK +CEREG:0 </code></pre> <p>Hopefully this will help others who have the same problem.</p>
|nb-iot|
NB-Iot send UDP data to IPv6 with BC95-G via IPv6-only provider
4834
<p><strong>EDIT:</strong> The question has changed after a reply from our network provider about the destination IP version.</p> <p>I'm experience problems sending data to an IPv6 <strike>(or IPv4)</strike> address using BC95-G modem using IPv6 network provider.</p> <p>Our NB-IoT provider states that:</p> <ul> <li>apn = "iot"</li> <li>PLMN = 20201</li> <li>Band = 20</li> <li><strike>modem <strong>has to be IPv6</strong> and then it can send to both IPv4 or IPv6</strike>.</li> <li>modem <strong>has to be IPv6</strong> and then it can send to <strong>IPv6 only</strong>.</li> </ul> <p>The provider also send us IPv6 SIM cards. The BC95 is supporting them and it seams it can open socket, but the send command fails.</p> <p>Below you can find a demo listing. In that I try to open both Ipv4 and IPv6 sockets for demonstration purposes. After all they both fail:</p> <pre><code>AT+NRB REBOOTING Ά[0C][00]Ά[03]` Boot: Unsigned Security B.. Verified Protocol A.. Verified Apps A...... Verified REBOOT_CAUSE_APPLICATION_AT Neul OK AT OK ATI Quectel BC95-G Revision:BC95GJBR01A07 OK AT+NCONFIG? +NCONFIG:AUTOCONNECT,TRUE +NCONFIG:CR_0354_0338_SCRAMBLING,TRUE +NCONFIG:CR_0859_SI_AVOID,TRUE +NCONFIG:COMBINE_ATTACH,FALSE +NCONFIG:CELL_RESELECTION,TRUE +NCONFIG:ENABLE_BIP,FALSE +NCONFIG:MULTITONE,TRUE +NCONFIG:NAS_SIM_POWER_SAVING_ENABLE,TRUE +NCONFIG:BARRING_RELEASE_DELAY,64 +NCONFIG:RELEASE_VERSION,13 +NCONFIG:RPM,FALSE +NCONFIG:SYNC_TIME_PERIOD,0 +NCONFIG:IPV6_GET_PREFIX_TIME,15 +NCONFIG:NB_CATEGORY,1 +NCONFIG:RAI,FALSE +NCONFIG:HEAD_COMPRESS,FALSE +NCONFIG:RLF_UPDATE,FALSE +NCONFIG:CONNECTION_REESTABLISHMENT,FALSE +NCONFIG:PCO_IE_TYPE,EPCO OK AT+CGDCONT=1,"IPV6","iot" // or AT+CGDCONT=1,"IPV4V6","iot" OK AT+COPS=1,2,"20201" OK AT+CEREG=1 OK AT+CSCON=1 OK AT+CFUN=1 OK AT+CEREG? +CEREG:1,1 OK AT+CGATT? +CGATT:1 OK AT+CGPADDR +CGPADDR:0,2A02:1388:400:B:2183:7DD4:B7F1:DE5A +CGPADDR:1 OK AT+CSQ +CSQ:13,99 OK AT+NUESTATS Signal power:-928 Total power:-862 TX power:210 TX time:549 RX time:27140 Cell ID:290888 ECL:0 SNR:114 EARFCN:6390 PCI:214 RSRQ:-108 OPERATOR MODE:2 CURRENT BAND:20 OK AT+NSOCR=DGRAM,17,1024,1,"AF_INET6" 1 OK AT+NSOCR=DGRAM,17,1025,1,"AF_INET" 2 OK AT+NSOST=1,xx.xx.xx.xx,pp,2,4C47 // xx: IP address, pp: dest. port ERROR AT+NSOST=2,xx.xx.xx.xx,pp,2,4C47 ERROR AT+NSOCL=1 OK AT+NSOCL=2 OK </code></pre> <p>Note that:</p> <ul> <li>The listing is <strong>exactly</strong> the same if I use "IPV4V6" instead of "IPV6" in <code>AT+CGDCONT</code></li> <li>The <code>AT+NSOST</code> command only supports IPv4 address arguments.</li> </ul> <p><strong>EDIT:</strong> How can I send to a IPv6 IP address using BC95-G? </p> <p>With the same modem I can successfully send data using IPv4 SIMs(from vodafone). Does anyone succeed to send data using BC95-G and IPv6 SIM cards?</p> <p>Thanks.</p>
2020-02-03T11:06:15.420
<p>Like with most AWS services, they are providing a bre-built and managed framework for you that you don't have to maintain. IoT device security, configuration, local Lambda software updates, cloud-based device state shadowing, local resource management, MQTT subscription management, easy AWS service integration (like SNS and analytics), log management, and deployment version control, are all handled server side once the GG client is installed on a device. The architecture also allows for IoT devices that are not always cloud connected, that communicate by proxy via a local GG Core device. All of the core IoT features still apply to GG devices as well (namely security and analytics).</p> <p>Depending on your application, it may still make sense to roll your own framework. But if the Greengrass architecture is a fit, it makes it a lot easier to roll out and maintain applications, albeit at the cost of additional vendor lock-in. That said, if you were to migrate an existing IoT application to GG, you might end up having to re-architect much of what you already have in place in order to take advantage of the features Greengrass has to offer.</p>
|aws-iot|aws-greengrass|nodejs|
Benefits of Greengrass over IoT SDK
4838
<p>What are the benefits of using the Greengrass vs the Node SDK package?</p> <p>We have a software stack happily interacting with IoT Core services (running on buildroot) using the Node SDK. I'm trying to understand the benefits of converting over to a full Greengrass implementation.</p>
2020-02-07T15:58:43.893
<p>Answer from shelly support is:</p> <blockquote> <p>About ""Device is owned from another customer" 3 years ago we never expect to sell so much devices and the unick IDs running out. All new devices which we manifacturing now using whole MAC address as ID instead last 6 digits. Everyone who has this issue need to send a message to Dimitar Stanishev or Me, to provide a special firmware which will resolve it (extend ID). Next week this procedure will be made automaticaly from the APP. </p> </blockquote> <p>See also support channel topic: <a href="https://www.facebook.com/groups/ShellyIoTCommunitySupport/permalink/2552658274833521" rel="nofollow noreferrer">https://www.facebook.com/groups/ShellyIoTCommunitySupport/permalink/2552658274833521</a></p> <p>Or solution mentioned in: <a href="https://www.facebook.com/groups/ShellyIoTCommunitySupport/permalink/2578113305621351/" rel="nofollow noreferrer">https://www.facebook.com/groups/ShellyIoTCommunitySupport/permalink/2578113305621351/</a></p> <p>According to this you have to flash your shelly with a special firmware. You can do this using the link below (please adapt the IP of your shelly):</p> <blockquote> <p>Open this link on your phone using device ip This Is a firmware for conflicting devices on cloud. You ll see a White screen with with code After update. Do a factory reset, don't update until the device run correctly.</p> </blockquote> <p><a href="http://192.168.0.100/ota?url=http://shelly-api-eu.shelly.cloud/firmware/SHSW-1_patch/switch1_longid.zip" rel="nofollow noreferrer">http://192.168.0.100/ota?url=http://shelly-api-eu.shelly.cloud/firmware/SHSW-1_patch/switch1_longid.zip</a></p> <p><strong>Attention</strong></p> <p>Make sure to select suiteable firmware for your device.</p> <p>ota-Update für Shelly 1: </p> <p><a href="http://shelly-api-eu.shelly.cloud/firmware/SHSW-1_patch/switch1_longid.zip" rel="nofollow noreferrer">http://shelly-api-eu.shelly.cloud/firmware/SHSW-1_patch/switch1_longid.zip</a></p> <p>ota-Update für Shelly Plug S: </p> <p><a href="http://shelly-api-eu.shelly.cloud/firmware/SHPLG-S_patch/plug-s-longid.zip" rel="nofollow noreferrer">http://shelly-api-eu.shelly.cloud/firmware/SHPLG-S_patch/plug-s-longid.zip</a></p> <p>ota-Update für Shelly Dimmer:</p> <p><a href="http://shelly-api-eu.shelly.cloud/firmware/longid_patch/dimmer-longid.zip" rel="nofollow noreferrer">http://shelly-api-eu.shelly.cloud/firmware/longid_patch/dimmer-longid.zip</a></p> <p>ota-Update für Shelly H&amp;T: </p> <p><a href="http://shelly-api-eu.shelly.cloud/firmware/longid_patch/ht-longid.zip" rel="nofollow noreferrer">http://shelly-api-eu.shelly.cloud/firmware/longid_patch/ht-longid.zip</a></p> <p>ota-Update für Shelly 2.5: </p> <p><a href="http://shelly-api-eu.shelly.cloud/firmware/longid_patch/switch25-longid.zip" rel="nofollow noreferrer">http://shelly-api-eu.shelly.cloud/firmware/longid_patch/switch25-longid.zip</a></p> <p>See also:</p> <p><a href="https://www.shelly-support.eu/forum/index.php?thread/1762-anweisung-zur-firmware-aktualisierung-bei-id-konflikt/" rel="nofollow noreferrer">https://www.shelly-support.eu/forum/index.php?thread/1762-anweisung-zur-firmware-aktualisierung-bei-id-konflikt/</a></p>
|smart-home|
Shelly device is already owned by another User
4855
<p>IOT device <code>Shelly Dimmer</code> could not connect to cloud.</p> <p><strong>Error:</strong></p> <p><code>Device is already owned by another User</code></p>
2020-02-12T21:41:04.767
<p>Assuming the van as an ODB-2 port (most do) then you can just grab something like <a href="https://rads.stackoverflow.com/amzn/click/com/B00JZIES4M" rel="nofollow noreferrer" rel="nofollow noreferrer">this</a>. This assumes that you need something that reports in real-time, since you'd have to pay for a data plan. That one has an app so there must be some kind of api that it is reporting to; that system may have an open api you could leverage.</p> <p>Even if it doesn't, this one also sends text messages which you could forward to your application using something like Twilio. Then your app just needs to digest the text messages.</p> <p>If this is for fun, building something yourself is probably more appealing. But if this is for a business application (where you don't want to mass produce something you've prototyped) then the advantages of being able to just buy an off the shelf product are numerous.</p>
|gps|tracking-devices|rest-api|geo-tagging|
Advise on device to use when tracking a moving vehicle and pushing data to an API
4872
<p>I need to determine when a van leaves or enters a geofence range, and alert a system on my side - either via an API call or email sent - so that I can digest that data for later. My blocker is finding such a device that will work with my requirements. </p> <p>My goal is to be able to set a trigger of leaving/entering the geofence, and via internet connection that the device emits it will ping an API endpoint that I will build. The API endpoint will accept a POST of all data that the device can send to me. From there my API will update a database for additional logic. </p> <p>If pinging an API isn't possible, I could settle for an email being sent with this POST data, and my API could scrap that email for the data that I need.</p> <p>I am seeking advise on if you know a device that would meet this criteria. I am sinking tons of hours reviewing devices, their manuals, calling sales reps, etc. I am reaching out to a member of the IoT community to help me find such a device.</p>
2020-02-15T02:37:51.967
<p>I've sorted out both issues.</p> <p>For the issue of some of the sensors/widgets having their "Select Device" greyed out, I got around that by creating a new top-level device, and lying to the system by saying I was using an Arduino Uno with ESP8266 Wifi.</p> <p>To get the 2-State toggle widgets to work (with my ESP8266 NodeMCU-12e), I updated my code to include specifically I'm working with a digital sensor.</p> <p>When it wasn't working, I had:</p> <pre><code>Cayenne.virtualWrite(FLWR_LIGHT_1000W, lightState); </code></pre> <p>...to:</p> <pre><code>Cayenne.virtualWrite(FLWR_LIGHT_1000W, lightState, "digital_sensor", "d"); </code></pre> <p>The 2-State widget now toggles properly as the data arrives.</p>
|esp8266|arduino|
Cayenne IOT widgets greyed out using ESP8266 NodeMCU-12e
4885
<p>I'm using an ESP8266 NodeMCU-12e, connecting to Cayenne IOT platform. Most things work fine (I can update most widgets using virtual channels), but some widgets are unavailable (greyed-out), or simply don't work.</p> <p>For example, trying to add a Generic Sensor (or generic actuator etc):</p> <p><a href="https://i.stack.imgur.com/vD2lT.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vD2lT.jpg" alt="enter image description here" /></a></p> <p>...or Luminosity Sensor:</p> <p><a href="https://i.stack.imgur.com/s4tCl.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/s4tCl.jpg" alt="enter image description here" /></a></p> <p>...the &quot;Select Device&quot; drop down is greyed out, and I can't proceed any further with configuring and adding the widget.</p> <p>If I manually add a 2-State widget, I can configure and add it, but even though the on/off trigger data is being received by Cayenne, the widget does not toggle on/off. It remains in an always-off state no matter what.</p> <p>I've tried adding my device as a Generic ESP device, as well as a &quot;Bring your own device&quot;, to no avail.</p> <p>I've scoured for hours online, but haven't found anything. Does anyone know what the problem may be?</p>
2020-02-27T07:24:30.007
<p>In the meantime I found a solution, which also changed the design:</p> <ul> <li>There are some 24V-Led Bulbs (even for E14) available in most LED electronics shops online (even on A****n)</li> <li>As LED-driver I will use the DALI protocol with its special drivers. In my case with constant voltage</li> <li>As control unit there are DALI masters available in said shops. Schematics for DALI masters are also available online (for <a href="https://create.arduino.cc/projecthub/NabiyevTR/simple-dali-controller-506e44" rel="nofollow noreferrer">Arduino</a>, <a href="https://www.infineon.com/dgdl/AP0810414_LightNet.pdf?fileId=db3a304329a0f6ee0129c69b34482e9c" rel="nofollow noreferrer">standalone</a>)</li> </ul>
|lighting|smart-lights|
Dimmable LED bulb
4908
<p>I am redesigning our bathroom and currently looking at two different light sources</p> <ul> <li>12V LED spots with a dimmable LED driver (via 1kHz PWM)</li> <li>Some sort of chandelier with a E27 (bulb).</li> </ul> <p>I want the bulb also to be dimmable. I found <a href="https://at.rs-online.com/web/p/gls-led-lampen/1235908?cm_mmc=AT-PLA-DS3A-_-google-_-CSS_AT_DE_Beleuchtung_Whoop_HI-_-(AT:Whoop!)%20GLS%20LED-%20Lampen-_-PRODUCT_GROUP&amp;matchtype=&amp;aud-826607888547:pla-333414383946&amp;gclid=CjwKCAiAy9jyBRA6EiwAeclQhD9DlI0DVNNIUtTUnt1RwW-xA1QLxWSKrDxiBBeDUmoYznOSyM3RMRoCbNUQAvD_BwE&amp;gclsrc=aw.ds" rel="nofollow noreferrer">this</a> bulb, which needs a classic triac dimmer. Since I want to control the lights using a self build controller (based on the SAM51J) I do not know the correct approach.</p> <p>I was looking for dimmable 12V bulbs but was not able to find anything commercial. Either they are dimmable with a LED-driver or via "Smart"-Bulbs (zigbee or similar).</p> <p>Is there a bulb with E27 which I can dim over a 12V LED-Driver?</p>
2020-03-05T10:36:51.023
<p>I was able to connect to CC2531 via serial by treating it as a CC2530 and ignoring its USB: I <a href="https://www.zigbee2mqtt.io/getting_started/flashing_the_cc2531.html" rel="nofollow noreferrer">flashed</a> CC2530 firmware to it, then <a href="https://www.zigbee2mqtt.io/information/connecting_cc2530.html" rel="nofollow noreferrer">connected</a> the serial lines as you would to a CC2530 -- to the P0.2 and P0.3 pins, and powered it via the Vcc/GND pins.</p> <p>Tested by running Tasmota 8.2.0 against it and pairing one endpoint. Everything worked as expected.</p> <p>As I'm writing this, the <a href="https://tasmota.github.io/docs/Zigbee/" rel="nofollow noreferrer">Tasmota Zigbee docs</a> are still saying a CC2531 cannot be used, I'll get that fixed :-)</p> <p>All of this was with a CC2531 made by Ebyte (<a href="http://www.ebyte.com/en/product-view-news.aspx?id=523" rel="nofollow noreferrer">model E18-2G4U04B</a>) and the <a href="https://github.com/Koenkk/Z-Stack-firmware/tree/4ab0d66e28b10dba75bcc8f1f5a7d7af4fbabf6c/coordinator/Z-Stack_Home_1.2/bin/default" rel="nofollow noreferrer">CC2530_DEFAULT_20190608</a> Z-Stack 1.2 coordinator firmware by Koenkk. The dongle made by TI should probably work too, though I don't have one to confirm this.</p>
|esp8266|zigbee|
Can I use the CC2531 Zigbee sniffer with a ESP8266 via serial, no USB involved?
4919
<p>I have a CC2531 connected via USB to my server to read/control some Zigbee devices. I use the version with external antenna.</p> <p><a href="https://i.stack.imgur.com/w9tTu.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/w9tTu.jpg" alt="enter image description here"></a></p> <p>I found that the location of the server is not optimal and I would like to move the sniffer to another place (near the wifi router), where I don't have a USB connection to the server available. The router cannot run OpenWRT so I cannot connect the CC2531 to the router and expect it to work.</p> <p>Adding a ES8266 to obtain a TCP-serial port would be a good solution, such as described in <a href="https://www.zigbee2mqtt.io/information/connecting_cc2530.html" rel="nofollow noreferrer">Zigbee2MQTT bridge</a> however those instructions expect a CC2530, identical to CC2531 except for the lacking USB interface.</p> <p>How to connect ESP8266 directly to CC2531 via serial?</p>
2020-03-05T19:26:59.617
<p>In general, if it is connected to mains power, it’s a router, whereas if it is battery-powered it’s an end device. Not sure this is 100% true, but probably very close to it.</p> <p><a href="https://github.com/dresden-elektronik/deconz-rest-plugin/issues/1058" rel="nofollow noreferrer">This page</a> shows it is an FFD (full function device), so it can act as a router.</p>
|zigbee|mesh-networks|
How to tell if a Zigbee device is a Zigbee Router
4921
<p>The Zigbee spec defines the types of nodes: <a href="https://en.m.wikipedia.org/wiki/Zigbee#Device_types_and_operating_modes" rel="nofollow noreferrer">coordinators, routers, and end devices.</a> I'm looking to buy some Zigbee devices, but I can't find in the device manual if the device is a Zigbee Router or an end device. Example <a href="https://byjasco.com/mwdownloads/download/link/id/1270/" rel="nofollow noreferrer">device manual</a></p> <p>How can I tell if a Zigbee device is a Zigbee Router? Can you provide an example of a device which is labeled as a Zigbee router?</p>
2020-03-09T10:32:36.200
<p>Your question is a bit confuse for this forum, however we can provide you some pointers so that you can rephrase your question and progress in the topics.</p> <p>You do not need any kind of VM, however to do that you need:</p> <ul> <li><p>A webserver and an open port on your machine. By default webserver bind themselves to the port 80, but on most computer and routers the port is closed by default. So you need to choose a webserver technology, my personal favourite is nodejs because it's very easy to learn and every thing you need exist the nodejs framework (uploading/downloading files, sending emails, templating html...). But as geonnave python is a good candidate too. </p></li> <li><p>Then this webserver needs a machine to run on, since you seem to be a beginner I would suggest installing a linux distribution (probably ubuntu) in your personal computer. </p></li> <li><p>Last but not least you need to send the data from arduino, you can choose any technology you want to do that but I'm not advising mqtt since it don't seem to be really fitting your usecase. But classic tcp over an open port will be perfect and simple. Just send binary data or json file or whatever your most confortable with. </p></li> </ul>
|mqtt|https|
Sending an image to the cloud
4927
<p>I have a BG96 Arduino Shield module connected to an OpenMV Cam H7. I need to send the image to the cloud for further processing. I send each pixel of the image, and I can use HTTPS, UDP or MQTT. My questions are:</p> <p>-Is it possible to use my own computer as a cloud environment? </p> <p>-I will only send a couple of pictures for documenting, so do I need to set up something like a virtual machine? </p>
2020-03-10T10:43:52.267
<p>Check AsyncAPI: <a href="https://www.asyncapi.com/docs/getting-started/coming-from-openapi/" rel="nofollow noreferrer">https://www.asyncapi.com/docs/getting-started/coming-from-openapi/</a></p> <p>From their website:</p> <blockquote> <p>Open source tools to easily build and maintain your event-driven architecture. All powered by the AsyncAPI specification, the industry standard for defining asynchronous APIs. </p> </blockquote>
|mqtt|data-transfer|
Documentation similar to open API for IoT protocols like MQTT for open data sharing
4931
<p>A lot of documentation exists for RESTful APIs via tools like <a href="https://swagger.io" rel="nofollow noreferrer">Swagger</a>. But I am looking for a documentation tool or something in the likes for open data sharing for protocols like MQTT or OPC-UA.</p> <p>A practical scenario maybe where I have a data source which I publish in a timely fashion to an MQTT Broker and I make avail the broker's address as well as the documentation of the topics which can be subscribed to, what is the data format etc. I actually haven't stumbled upon anything of the sort except for the respective RESTful APIs to the Databases where these data are stored and called in the end to query dumps of such data.</p> <p>Are there already software tools, standardization bodies, etc. that are looking into such aspects?</p>
2020-03-12T17:26:35.230
<p>USB is a bit of a mess right now with USB-A, USB-C, USB 3.0, USB 3.1 Gen 1 and Gen 2, USB 3.2 Gen 1, Gen 2 and Gen 2x2. But you don't need a type-C connector to get the speeds you need.</p> <p>For a NAS for home use (i.e. with probably a limited number of users, unlikely to all actually use the NAS at the same time, with at best Gigabit Ethernet connections), as long as you get over standard USB 2.0, your limiting factor is much more likely to be the network (or the CPU) than the interface between the CPU and the drive.</p> <p>Any of USB 3.x variants support at least 3.2 Gbit/s of throughput, which is much more than Gigabit Ethernet or any of the current actual Wi-Fi speeds available.</p> <p>So anything that supports USB 3.x should do, though you may very well have bottlenecks other than the interface itself:</p> <ul> <li>The drive itself</li> <li>All the logic between the USB interface, RAM and CPU</li> <li>RAM itself</li> <li>The CPU itself if you have any sort of crypto going on</li> <li>All the logic between RAM, CPU and the network interface</li> <li>The network interface</li> </ul> <p>A Raspberry Pi 4 has two USB 3.0 interfaces (in standard USB-A shape, with a blue colour), they should be more than enough to connect a suitable SSD drive.</p> <p><a href="https://medium.com/@ghalfacree/benchmarking-the-raspberry-pi-4-73e5afbcd54b" rel="nofollow noreferrer">Raspberry Pi 4 USB benchmarks</a> show performance in the region of 320-360 Mbytes/s, which translates to 2.5 to 2.8 Gbit/s. Again, a lot more than what even the Gigabit Ethernet interface can deliver. RAM has decent performance as well, and ditto for the Gigabit Ethernet. Do not count on Wi-Fi for decent results.</p> <p>So if your drive comes with a USB-C connector, all you need is a USB 3.0 USB-A to USB-C cable. You can recognise it by the blue colour of the USB-A plug (and if you look closely you'll see there are 9 contacts in there instead of the 4 in USB-A 2.0). The drive actually probably comes with such a cable.</p> <p>Note that in your question you mention USB docks "which limit the bandwidth". This really depends on exactly what kind of USB and interface.</p>
|usb|
Board with usb-c 3.1 for data transfer
4939
<p>I want to set up a simple NAS at home, I've seen some options on the internet but they're either too complex or use a usb dock for the drive, which limits the bandwidth. I was wondering if it is possible to achieve a nice setup by using a usb-c 3.1 SSD, but I don't know much about the current boards, the Raspberry 4 seems to have a usb-c but for power supply. Is there a board that would fit this purpose? or some kind of component to connect the ssd to some board to take advantage of the usb-c 3.1 bandwidth?</p>
2020-03-18T11:34:27.320
<p>I think you missed how slow LoRa is. It is very, very, very, very slow.</p> <p>The slowest data rate (at SF12, BW125) is just 250 bits per second. That's 31 bytes per second. Just the text of this answer would take 50 seconds to send, without counting any overhead. This full page, including contents, styles, scripts, images, etc. is over 3 MB, that would take over a day to send!</p> <p>The fastest data rate varies between 11000 and 21900 bits per second depending on the region. Much faster, but that still brings us to the speeds we were used to back in 1994 or thereabouts. The web has since evolved to take advantage of the multi-megabit speeds afforded by broadband, so again, a page like this one would take about 20 to 40 minutes to send.</p> <p>Also, in some regions, there are regulatory restrictions, and you can't transmit more than 1% of the time in the same band for instance, so that would multiply everything by 100!</p> <p>LoRa is designed for sensors which send very very little data very very rarely, not to exchange files, transmit large amounts of data, browse the web or anything like that.</p> <p>You may want to consider long-distance Wi-Fi (though, again, there are EIRP limitations), WiMax, and other point-to-point radio technologies. Note that radio technologies don't like obstacles. Hills, buildings, trees, etc. will reduce your range a lot (or even completely block transmission). You want not only line of sight between the two antennas, but you need that line of sight to remain well above any obstacle (see <a href="https://en.wikipedia.org/wiki/Fresnel_zone" rel="noreferrer">Fresnel zone</a> for details).</p> <p>Or install a separate Internet access, or use a 4G modem, at the second location.</p>
|wifi|lora|lorawan|
Using LoRa as a www link
4949
<p>I am new to IoT and LoRa, and still trying to grasp the scope and capabilities after discovering a whole technology I never knew existed.</p> <p>I have read some about LoRaWan and IoT, but am confused about the technology. Is LoRaWan and IoT wide area networks that are independent of the world wide web (www) or are they part of it? I also am not clear on the capability and functionality of LoRa devices.</p> <p>This is what I am trying to do, and would like to see if I can utilize LoRa technology to accomplish this:</p> <p>Basically I want to set up a wireless link between two sites which are ~.5 mile apart in which siteA will be connected to the internet (www) and the siteB may connect to the internet through siteA's gateway. I find information indicating there are devices which interface LoRa devices to ethernet. Is it possible to use these devices to set up a wireless link over LoRa?</p> <p>Example, ethernet-to-LoRa interface is connected to the gateway at siteA and to a LoRa device. LoRa device at siteA communicates with LoRa device at siteB, which is also connected to a ethernet-to-LoRa interface. Now a computer or WiFi access point is connected to siteB ethernet-to-LoRa interface, and user at siteB is able to access the world wide web.</p> <p>I understand there will be a sacrifice in network speed, and I wouldn't expect to be able to stream movies etc.</p>
2020-03-21T04:03:46.270
<p>I also couldn't help but to succumb to the temptation of these cheap 433.92Mhz Rx/Tx pairs. Mine are of the eBay variety ($0.89 a pair with free shipping).</p> <p>I observed the same behavior with 1/4 wave whips attached to these, although not quite as bad as you describe. Through tinkering I found lower AWG sized enameled wiring to give slightly better results, about an extra two meters using 23AWG enameled magnet wire line of sight, but was barely penetrating the drywall to the next room... Not good enough for my projects unfortunately, so back to the drawing boards I went.</p> <p>As a side note, the quarter wave whip had to be spiraled in my project boxes which will change the radiation pattern of the antenna. (Found this out when I turned to my RTL-SDR for troubleshooting)</p> <p>A friend told me to try a "coil-loaded antenna" which is an antenna with air-cored inductor. Did some searches for 433Mhz coil-loaded antennas and found plenty of results, including calculators to build them for any frequency desired. These types of antennas also have the added benefit of changing the size of our wave-guide to a more compact form. </p> <p>Here is a <a href="https://drive.google.com/file/d/1E9KPAPJrZRgGLOQqwd2-3-Px0MuSVreY/view" rel="nofollow noreferrer">step by step PDF</a> for building 433.92Mhz Coil-Loaded antennas written by <strong>Ben Schueler (NL)</strong>. I was very pleased with the performance of these DIY antennas. I also was still using the 23AWG to make them,(make sure its enamel insulated or it will not work) which wound up being very close to these instructions designated magnet wire size. It still didn't reach the far end of the house on the second floor...</p> <p>Here is an interesting bit about the transmitter, I didn't find this info in any instructions for these. My eBay seller had this listed in the description section of the listing for them. </p> <p><a href="https://i.stack.imgur.com/T78HQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/T78HQ.png" alt="cheap 433.93Mhz"></a> <hr> Ah, the plot thickens. I highly refute this distance listed for the transmitter, and unless i just missed something I'm calling b.s... So, here is what i gathered from tinkering with them.</p> <p><strong>On a 3.3v Rail</strong></p> <ul> <li>Extremely poor transmit distance for the 3 out of 5 I ordered (3 transmitted a couple feet and two wouldn't TX at all at this voltage while watching it on the SDR.)</li> <li>Wouldn't recommend these for any 3.3 volt microprocessor project unless the transmitter is on a separate voltage rail.</li> </ul> <p><strong>On a 5v Rail</strong></p> <ul> <li>With the coil loaded antennas the Tx distance was reasonable. (About 75~100ft LOS) I wouldn't expect miracles if you have concrete walls to penetrate.</li> <li>This voltage will probably cover most projects with these antennas.</li> </ul> <p><strong>5v and above</strong></p> <p>I used one of these cheap ebay boost modules <a href="https://i.stack.imgur.com/V4MxX.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/V4MxX.jpg" alt="cheap boost module"></a> mainly because I already had some, and I am pretty lazy when it comes to making circuits like this. I carefully adjusted the 10k pot while watching the voltage with a multi meter, each +1 voltage step I tested the range. </p> <p>Here is what I found:</p> <ul> <li>6v,7v,8v,9v all had increase in range in proportion with the the step-up. (5 out of 5 transmitters)</li> <li>9.5v~11.5v Again three transmitters showed slight distance improvements, but also had heat developing at the module at about 10.5v. (Wasted power) and the other two showed no improvement at all after 10v.</li> <li>12-Volt, yea... <strong>Don't do 12v</strong>, its clearly the absolute maximum rating as my test module went up in a $0.44 puff of noxious smoke.</li> </ul> <p>All in all these aren't bad for the price, (If you know the above information) The sweet spot voltage for these seem to be in the 9-volt range as it doesn't heat up, and gets pretty decent distance. (My max was 250ft LOS, keep in mind my transmissions are 8bit codes).</p> <p>I hope this helps you and future readers out with projects!</p>
|arduino|wireless|
Fs1000a generic cheap RF transmitter compatibility with Hc12 receiver?
4954
<p>I have build a door sensor where Arduino uno reads reed switch and transmits RF 433MHz signal to other Arduino uno connected RF receiver. I am using rcswitch library and cheap ask/ook transmitter/ receiver modules from AliExpress, <a href="https://www.aliexpress.com/item/32644105493.html" rel="nofollow noreferrer">433Mhz RF Wireless Transmitter Module and Receiver Kit </a>.</p> <p>The range I get is less then 1m. This is with 17 cm 0.6 mm straight wire connected as antenna on transmitter as well as receiver. I read on internet that these receiver modules are noisy and useless.</p> <p>Will the transmitter I have work with HC12 receiver module? I want a 15-20 m range to cover all doors and windows.</p> <p>Idea is to use many such cheap transmitters and one good receiver at central place to keep the overall cost low.</p>
2020-03-29T03:33:53.627
<p>Your question is very very broad, but here are a few starting points...</p> <p>Nearly any device with BLE support and GPIO inputs could serve that purpose, including all those that are ESP32-based (expect those based on the new ESP32-S2 which doesn't have Bluetooth), NRF51* or NRF52* based devices, and many more.</p> <p>In terms of development boards:</p> <ul> <li><p>Adafruit have at least the Huzzah32 (<a href="https://www.adafruit.com/product/4172" rel="nofollow noreferrer">breakout</a> or <a href="https://www.adafruit.com/product/3405" rel="nofollow noreferrer">Feather</a>), the <a href="https://www.adafruit.com/product/4333" rel="nofollow noreferrer">Circuit Playground Bluefruit</a>, the <a href="https://www.adafruit.com/product/2487" rel="nofollow noreferrer">Flora Wearable Bluefruit LE</a>, the <a href="https://www.adafruit.com/product/4481" rel="nofollow noreferrer">ItsyBitsy nRF52840 Express</a>, the <a href="https://www.adafruit.com/product/4062" rel="nofollow noreferrer">Feather nRF52840 Express</a>...</p></li> <li><p>Pycom have many boards, including the <a href="https://pycom.io/product/wipy-3-0/" rel="nofollow noreferrer">WiPy</a>, which can be coupled with an expansion board, or the PyScan, PySense or PyTrack which have sensors on board</p></li> <li><p>The <a href="https://microbit.org" rel="nofollow noreferrer">BBC micro:bit</a></p></li> <li><p>Nordic Semiconductor's <a href="https://www.nordicsemi.com/Software-and-tools/Development-Kits/nRF52840-Dongle" rel="nofollow noreferrer">nRF52840 dongle</a>, and variants from <a href="https://store.makerdiary.com/products/nrf52840-mdk-usb-dongle" rel="nofollow noreferrer">Makerdiary</a>, <a href="https://blog.aprbrother.com/product/april-usb-dongle-52840" rel="nofollow noreferrer">AprBrother</a>, Minew, etc. Those are designed to run off a USB port, but as long as you provide power to them they can run standalone.</p></li> <li><p>Boards which already have a few sensors: <a href="https://www.adafruit.com/product/4516" rel="nofollow noreferrer">Adafruit Feather nRF52840 Sense</a></p></li> <li><p>The dozens of other ESP32-based boards you can find everywhere</p></li> <li><p>There's of course also the Raspberry Pi, especially the <a href="https://www.raspberrypi.org/products/raspberry-pi-zero-w/" rel="nofollow noreferrer">Raspberry Pi Zero W</a>, and a lot of boards from Orange Pi, Banana Pi, Nano Pi, and so on, though this may be overkill (but you get a full Linux system and a lot more powerful processor).</p></li> </ul> <p>In terms of "packaged" devices (but programmable, and with inputs available, though not quite easily accessible when in their package, but they also have built-in sensors):</p> <ul> <li><p>Nordic Semidonductor's <a href="https://www.nordicsemi.com/Software-and-tools/Prototyping-platforms/Nordic-Thingy-52" rel="nofollow noreferrer">Thingy52</a></p></li> <li><p>Espruino's <a href="https://www.puck-js.com" rel="nofollow noreferrer">Puck.js</a></p></li> <li><p>Ruuvi's <a href="https://ruuvi.com" rel="nofollow noreferrer">Ruuvitag</a></p></li> <li><p><a href="https://m5stack.com/collections/m5-core" rel="nofollow noreferrer">M5Stack's various core modules</a>, which actually have accessible pins and a Groove connector</p></li> </ul> <p>Really, the choice is yours. Depending on what you want to connect to them, the features you want, how you want to power it, whether you want a prepackaged device or have more freedom, your favorite language (Python, C, Javascript...), and so on, one or the other (and possibly many, many more) could be the best fit.</p>
|sensors|hardware|bluetooth|
Bluetooth Input Hub
4972
<p>I am wondering if anyone knows about some existing 'off the shelf" hardware options where some device could connect to this Bluetooth "Input Hub" where this hub can have inputs plugged into it and any data received via that input would inform the connected Bluetooth device that sensor X sent value Y.</p> <p>This would allow any Bluetooth capable device to receive/read inputs and do something with that information.</p> <p>Not sure where to ask if this is not the right place. Thanks in advance. Also does Bluetooth disconnect after some long time of being connected?</p> <p>(Output is not required but bonus if it can)</p>
2020-04-02T12:28:29.647
<p>Typically how the security camera setups work is, each vendor has their own app or web site where you can access your video stream. So once you have access to this app or website, you can share the credentials with any one and they can view the stream on the same app or website on they devices. So all you need is the authentication credentials to get access to view the stream.</p>
|surveillance-cameras|ip-address|
Can I connect to surveillance camera remotely without direct access?
4983
<p>For using ip camera you need to use app on your phone. When you setup camera you connect to it on your phone. But if you need to give somebody access to this camera, can you import settings from already connected phone and send them to other peson (in other city), so he can connect to this camera.</p> <p>Or maybe I can connect using ip address? But how I can get it?</p> <p>Probably it depends on the type of camera, what about <a href="https://www.homedepot.ca/product/ezviz-c6cn-1080p-indoor-pan-tilt-wi-fi-security-camera/1001514143" rel="nofollow noreferrer">EZVIZ C6CN 1080p Indoor Pan/Tilt Wi-Fi Security Camera</a></p>
2020-04-05T11:56:52.910
<p>This really depends on how the camera manufacture has set things up, but it will not go via the Google Assistant device (in this case the speaker).</p> <p>Google Assistant Camera support works in much the same way as any other Chromecast video stream. This means that Google Assistant will send 2 URLs to the TV.</p> <p>The first is to the viewer application. This is basically a HTML page that contains a video element it may be the generic Google provided one that is just a full screen video, or it may be a camera vendors customised version that may have their logo overlaid or similar.</p> <p>The second URL is where to find the stream from the camera and here there are 2 options:</p> <ol> <li><p>The camera natively supports one of the video formats that the Chromecast spec supports, in this case it could be a direct link to the camera.</p></li> <li><p>The camera doesn't support any of the required video formats so the camera streams it's output to a cloud service run by the manufacturer where it can be transcoded and the link points to the cloud service.</p></li> </ol> <p>Modern cameras tend to be capable of option 1 as this allows for the lowest latency and is more secure (since the video never leaves your home network). But having said that it means that the video feed is only available if the TV is on the same network. Option 2 means that you can also view the video stream when away from home, e.g. on your phone, which tends to be one of the key use cases for these sorts of camera.</p> <p>Either way the video does not actually pass through your smart speaker (unless you are viewing the video on a Google Home Hub device with a screen).</p> <p>The Google Home Local Control SDK is different and does not apply in this case.</p>
|google-home|communication|streaming|
When stream security camera on TV using Google Home speaker, does the stream go through Google home?
4990
<p>How does Google home manage the connection to stream security camera video to a smart TV? Does Google home work as a proxy when the camera is streaming the video, or somehow it command (How?) TV to pull stream directly from the camera without Google home in the middle? </p> <p>I know that Google home SDK can bypass the cloud, but how it works locally?</p> <p>Is it? </p> <pre><code>Security camera -&gt; Google home -&gt; smart TV </code></pre> <p>or Google home manage to make a direct connection? if yes, then How?</p> <pre><code>Security camera -&gt; smart TV </code></pre> <p>Thanks</p>
2020-04-05T19:22:01.273
<p>Many IoT devices are battery-powered, and to conserve battery, enter sleep modes as much as they can. They usually get out of sleep in either of two cases (or both):</p> <ul> <li>At fixed intervals, like every 6 hours, or every day for instance</li> <li>When they receive an external signal from a sensor</li> </ul> <p>When they wake up, they connect to a server, send their data, may check for data from the server (configuration updates...), and then go back to sleep.</p> <p>The issue is that if you want to talk to a device immediately, it won't be possible, you'll have to wait for the next wake-up connection.</p> <p>"Shoulder tap" is a way to remotely wake up the device. The idea is that most of the device is off, and only a low-level cellular connection is maintained, in some low-power mode. Then, whenever the server wants to talk to the device, it sends an SMS, and the modem will wake up the device to do whatever is requested.</p> <p>This requires the device to have a cellular modem, which is capable of getting into low-power modes but still receive SMS messages, that the modem is able to wake up the device. Maintaining the cellular connexion in a state that allows reception of SMS will most likely increase the power draw quite a bit compared to the usual deep sleep modes, so the benefit comes at a cost.</p> <p>The exact details vary a lot with the type of device, what kind of battery it can count on, how often and for how long it would be awake or sleeping, the sleep modes in use, the type of modem, the kind of cellular connection, and so on.</p> <p>What is your actual use case, and what is the actual problem you are trying to solve?</p>
|aws-iot|
What is Shoulder Tap in IOT?
4992
<p>I am very new to IOT (primarily in Connected Cars segment) and came across the terms like: <code>Shoulder Tap</code> , <code>Using SMS to awake device</code>. I did search online, but didn't get proper information.</p> <p>Can anyone please help me understand what is <code>Should tap</code>, what it is used to <code>awake</code> and how do we achieve this? I read using <code>SMS</code>.</p> <p>PS: I am not sure which tag to use for this question, so if anyone can suggested would be of great help.</p>
2020-04-13T15:10:35.823
<p>You should not be running long running (infinite loops) in the callbacks.</p> <p>All the callbacks run on the client network thread's main loop (the one started by <code>client.loop_forever()</code>).</p> <p>This means if the <code>on_connect()</code> thread never returns it will never get to handling the calls to <code>client.publish()</code> in the loop.</p> <p>The individual <code>client.publish()</code> calls work because you build up a queue of messages to be published, then the <code>on_connect()</code> returns and the thread can process that backlog.</p> <p>P.S. your micro benchmark is not likely to give realistic results, but if you really want to run it you can try:</p> <pre class="lang-python prettyprint-override"><code>import paho.mqtt.client as mqtt def on_connect(client, userdata, flags, rc): print(&quot;Connected with result code &quot;+str(rc)) client.subscribe(&quot;test&quot;) def on_message(client, userdata, msg): print(msg.topic+&quot; &quot;+str(msg.payload)) client = mqtt.Client() client.on_connect = on_connect client.on_message = on_message client.connect(&quot;myserver.example.com&quot;, 1883, 60) while True: client.publish(&quot;test&quot;,&quot;hello world&quot;) client.loop() </code></pre>
|mqtt|paho|python|
Unable to publish MQTT server in an infinite while loop in Python script
5007
<p>I'm curious to know what the performance of an MQTT server is like. So I created this Python script:</p> <pre class="lang-python prettyprint-override"><code>import time import paho.mqtt.client as mqtt from multiprocessing import Pool def on_connect(client, userdata, flags, rc): print(&quot;Connected with result code &quot;+str(rc)) client.subscribe(&quot;test&quot;) while True: client.publish(&quot;test&quot;,&quot;hello world&quot;) def on_message(client, userdata, msg): print(msg.topic+&quot; &quot;+str(msg.payload)) client = mqtt.Client() client.on_connect = on_connect client.on_message = on_message client.connect(&quot;myserver.example.com&quot;, 1883, 60) client.loop_forever() </code></pre> <p>When I run this script with <code>python3 myscript.py</code>, the terminal just stops with this message <code>Connected with result code 0</code>.</p> <p>When I get rid of the while loop and just do this:</p> <pre class="lang-python prettyprint-override"><code>def on_connect(client, userdata, flags, rc): print(&quot;Connected with result code &quot;+str(rc)) client.subscribe(&quot;test&quot;) client.publish(&quot;test&quot;,&quot;hello world&quot;) client.publish(&quot;test&quot;,&quot;hello world&quot;) client.publish(&quot;test&quot;,&quot;hello world&quot;) ... print this another 20 times ... </code></pre> <p>Everything works. I can even receive this messages from another client device subscribed to the MQTT server. Things only stop working if I put the <code>client.publish</code> inside of an infinite while loop. I also tried using asynchronous calls within the while loop and I tried putting a time.sleep() in the while loop, but this still had no change ---- that is, the while loop still hangs.</p> <p>What am I doing wrong? How do I get my Python script to continuously publish to the MQTT server?</p>
2020-04-16T14:33:00.107
<p>This sort of thing is perfect for MQTT.</p> <p>You also don't need to have all the sensors publishing on the same topic, they could all publish to the same topic prefix and the processing app can use a wildcard subscription to have all the messages delivered. Or you can have multiple backend processing apps that split the load by subscribing to different wildecards.</p> <p>e.g. a topic made up like</p> <pre><code> country/region/city/sensor-id </code></pre> <p>You could then have different processing apps subscribe to </p> <pre><code>England/# Scotland/# USA/Florida/# USA/California/SanFransico/# </code></pre>
|mqtt|sensors|
MQTT for many-to-one communication
5011
<p>I have an architecture where many sensors (hundreds of them), located in different places (hundreds of kilometers apart), send data to a remote database. Is MQTT suitable for this kind of configurations?. </p> <p>I was thinking in installing the MQTT broker and my backend in the same server and make the backend subscribe to one topic where all the sensors would be writing. So there would not be any communication between sensor nodes; the communication will be only between each sensor node and the server.</p> <p>Also, the sensor nodes would be gruped by client (maybe 10 nodes in the same place).</p>
2020-05-04T19:24:29.530
<p>If this is purely user authentication and authorisation administration, then none of this should be done directly by the broker.</p> <p>The Username/Password information and ACL for topics is all held in an external database (using things like the mosquitto auth_plugin) and how you choose to update that DB is entirely up to you as it will totally depend on what other systems it needs to integrate with (e.g. existing staff/user lists).</p> <p>Any Administrator would never interrogate the broker for what topics a client is subscribed to (and definitely would not try to edit that list in the broker), but would set up the ACLs for that user to control what topics they are allowed to publish/subscribe to.</p> <p>And as for monitoring messages, this will very much depend on the volume os messages, but a broker will happily process more messages than it makes sense to try and visualise unfiltered. And the way to do this is just to have a client with the correct ACL entries to be able to see everything.</p> <p>As for a novice administrating the broker, there should be nothing for them to administrate except the users and what pre-defined ACL groups they should be part of. The ACL grouping should have been determined by the solution architect as part of the design and as I said earlier, this should be integrated into what ever systems already exist.</p>
|mqtt|mosquitto|
Is there a complete admin panel/interface for MQTT net or or any other private MQTT Servers/Broker?
5049
<p>I'm making a simple automation system for someone and require a MQTT admin panel for server/broker. I want it such that the admin who runs the server, is able to see and change the password of the server or client. Also the admin would be able to see the all the topics and remove the subscription of of any client if they want. Admin will also be able to see all the messages sent and received.</p> <p>I was currently looking at C# MQTTnet and Mosquitto but all the servers require manipulation in config files through CLI(there own set of commands on CLI). Isn't there something I can use so that all is done in clean code with WPF form for interface? Is there a solution for this problem? I want a user interface for admin.</p> <p>Also can a MQTT server run by a novice user? who has no technical knowledge?</p> <p>I am new so Stack Overflow sent me here to question.</p>
2020-05-30T16:06:15.673
<p>Setup a "Routine" in the Google Assistant settings such that:</p> <ul> <li>When I say "notepad or "note pad"</li> <li>Assistant will: "Talk to ticktick"</li> </ul> <p>Now, all I have to say is: "Okay Google. Notepad"</p>
|google-home|google-assistant|
How can I get Google Assistant to talk to "TickTick" instead of "Tik tik"?
5081
<p>I use a todo list app called TickTick. The app has a Google Assistant integration <a href="https://blog.ticktick.com/post/189516482614/lets-talk-on-google-assistant" rel="nofollow noreferrer">available</a>. However, when I try to say "Talk to TickTick" Google Assistant always talks to another quiz app called "Tik Tik" instead. </p> <p>Is there some way I can fix Google Assistant to talk to TickTick todo list app instead of this other quiz app?</p>
2020-06-04T08:38:50.507
<p>The Paho Python library will work just fine via LTE. The library is built to interact with the OS's TCP/IP stack. It has no knowledge of the underlying hardware of how that TCP/IP stack talks to the outside world.</p> <p>If you want it to work you need to have the LTE connection presented as a network device to the OS, not just a serial port.</p> <p>I suggest you go look at things like PPP and how to use it to "dial up" style connection to your LTE provider.</p>
|mqtt|raspberry-pi|paho|python|
Python Paho MQTT doesn't work via LTE
5087
<p>I'm using Raspberry Pi 3 B+ with a SIM7600X 4G HAT for SMS and mobile internet connection.</p> <p>I want to use Paho MQTT library (it works fine), but it only works via Ethernet or Wifi.</p> <p>How can I use the Paho MQTT library from python to use the SIM7600X HAT mobile internet connection?</p> <p>I tried to use the SIM7600X AT+MQTT commands directly writing to the serial port for subscribing to a topic, and it works fine (so there is mobile internet through the 4G HAT), but after a while (1-2 hours) it loses connection all the time, and I can't release client and reconnect, that's why I thought I should use the Paho MQTT library, but it's not working without Ethernet or Wifi connection.</p>
2020-06-04T23:20:04.170
<p>Yes, they are a part of the Internet of Things (IoT). Smartphones can be interconnected in the IoT with other objects. Besides, They are Smart Objects [1]. They can obtain data using their sensor, they can activate things or do actions, and they can process the information.</p> <p>Smart Object Definition [1]: Any electronic device that can be connected to the Internet and collect data, like a sensor, or perform an action in an object, normally called actuator.</p> <p>IoT Definition: 'The Internet of Things is the interconnection of heterogeneous objects through the Internet' [2].</p> <p>[1] <a href="https://www.researchgate.net/publication/307638707_A_review_about_Smart_Objects_Sensors_and_Actuators" rel="nofollow noreferrer">https://www.researchgate.net/publication/307638707_A_review_about_Smart_Objects_Sensors_and_Actuators</a> [2] <a href="https://www.researchgate.net/publication/260252345_Midgar_Generation_of_heterogeneous_objects_interconnecting_applications_A_Domain_Specific_Language_proposal_for_Internet_of_Things_scenarios" rel="nofollow noreferrer">https://www.researchgate.net/publication/260252345_Midgar_Generation_of_heterogeneous_objects_interconnecting_applications_A_Domain_Specific_Language_proposal_for_Internet_of_Things_scenarios</a></p>
|definitions|
What exactly does the internet of things encompass?
5092
<p>When I think of the Internet of things, I think of fairly low bandwidth devices connected to the internet. </p> <p>That could be automotive telematics, medical devices, building monitoring, factory sensors, etc.</p> <p>However, I was just thinking of smartphones in terms of internet of things and had to correct myself... or did I?<br> Can a smartphone be regarded as part of a subset of the internet of things? </p> <p>Is there a good definition that something segregates connected computers from IoT and states what exactly IoT encompasses?</p>
2020-06-09T06:59:23.500
<p>Please note that the SMT50 voltage outputs have an output resistance of 10 kOhm (see <a href="http://www.truebner.de/sites/default/files/SMT50_Flyer_englisch.pdf" rel="nofollow noreferrer">SMT50 datasheet</a> So if there is a pullup resistance to 3.3V then you will always get voltage levels which are too high. Good to know about the pullups since I plan to start with an ESP32 irrigation control project and SMT50. I will choose the pins without pullup.</p>
|sensors|hardware|esp32|microcontrollers|
ESP32 always high pins screwing analog measure
5098
<p><strong>TL;DR</strong> When trying to use some pins of my ESP32 to read analog signals, it turns out those pins have a non-zero voltage, messing up the measurements. Why?</p> <p>I got myself an Olimex ESP32-POE-ISO (see <a href="https://www.olimex.com/Products/IoT/ESP32/ESP32-POE-ISO/open-source-hardware" rel="nofollow noreferrer">specs</a>) to run the irrigation of my garden. I am attaching some hunter valves on GPIO0-5 and the plan was to hook up 3 moisture/temperature sensors (<a href="http://www.truebner.de/en/smt50" rel="nofollow noreferrer">Truebner SMT50</a>) to the pins on the other side of the module (see <a href="https://www.olimex.com/Products/IoT/ESP32/ESP32-POE-ISO/resources/ESP32-POE-ISO-GPIO.png" rel="nofollow noreferrer">pinout</a>).</p> <p>However, I ended up pulling my hair out. On some pins (e.g. GPIO14/ADC2_CH6, GPIO32/ADC1_CH4, GPIO33/ADC1_CH5, GPI35/ADC1_CH7) I get proper readings. I've tried both features (moisture and temperature) of each of the 3 sensors on those pins and the values I get look reasonable. So I am ruling out defective sensors.</p> <p>I have also tried GPIO13/ADC2_CH4, GPIO15/ADC2_CH3, GPI36/ADC1_CH0, GPIO0/ADC2_CH1 and GPIO2/ADC2_CH2, but I always get numbers that are way to high (raw values at 12bit between 2400-3400, corresponding to voltage 1.9V - 2.7V). And in fact, after disconnecting the sensor and measuring with a multimeter I could find that those pins actualy do have such a voltage (measured against the GND pin) while the "good" pins do not have that.</p> <p>The initialization code looks like this (<code>channel.channel.adc1_id</code> and <code>...adc2_id</code> contains values like <code>ADC1_CHANNEL_0</code>, ...):</p> <pre class="lang-cpp prettyprint-override"><code>void SensorService::init() { ESP_LOGI(TAG, "Initializing sensor service"); adc1_config_width(ADC_WIDTH_BIT_12); sensorToChannel = getChannelMapping(); for( const auto&amp; [ idx, channel ] : sensorToChannel) { switch (channel.unit) { case ADC_UNIT_1: adc1_config_channel_atten(channel.channel.adc1_id, ADC_ATTEN_11db); break; case ADC_UNIT_2: adc2_config_channel_atten(channel.channel.adc2_id, ADC_ATTEN_11db); break; default: ESP_LOGW(TAG, "Invalid ADC unit requested"); break; }; } } </code></pre> <p>The reading of raw values like this:</p> <pre class="lang-cpp prettyprint-override"><code>std::optional&lt;unsigned int&gt; SensorService::getRawValue(unsigned int sensorIdx) { ESP_LOGV(TAG, "Getting raw value for sensor %d", sensorIdx); if (!this-&gt;isValidSensorIdx(sensorIdx)) { ESP_LOGW(TAG, "Requested non-existing sensor"); return std::nullopt; } TargetChannel target = sensorToChannel.at(sensorIdx); switch (target.unit) { case ADC_UNIT_1: return std::make_optional(adc1_get_raw(target.channel.adc1_id)); case ADC_UNIT_2: int value; adc2_get_raw(target.channel.adc2_id, ADC_WIDTH_BIT_12, &amp;value); return std::make_optional(value); default: ESP_LOGW(TAG, "Invalid ADC unit requested"); return std::nullopt; } } </code></pre> <p>And this works perfectly fine for some pins but not for others.</p> <p>I also tried a few things I could find in the docs to set the pin explicitly to <code>INPUT</code> and low. But it didn't change anything.</p> <pre class="lang-cpp prettyprint-override"><code> for (auto const&amp; [ sensorIdx, pin ] : sensorPins) { gpio_pad_select_gpio(pin); gpio_set_direction(pin, GPIO_MODE_INPUT); gpio_set_level(pin, 0); } </code></pre> <p>I am powering and connecting to the board via Ethernet/POE. I am not (knowingly) activating WIFI, RTC, hall sensor anywhere in the code. Not using SD card nor the flash memory for data storage. The values will only be polled via HTTP/Ethernet.</p> <p>So, <strong>my actual question here is</strong>, why do some pins (e.g. GPI36, explicitly documented as input-only pin) have non-zero voltage while others haven't? What am I missing?</p>
2020-06-13T17:30:53.800
<p>If you cannot disable the generation of the debug messages, then you could try to redirect the debug messages so that they are not visible on Serial.</p> <p>As a workaround, send the messages to <code>Serial1</code> and keep the console attached to <code>Serial</code>.</p> <p>This may not be an optimum solution, because the messages are still being sent, which takes up some of the processing power and uses up a serial port.</p> <p>If that does not solve your logging problem, make sure that you also set Serial1 as your logging Serial from the menu:</p> <p><a href="https://i.stack.imgur.com/CmDg0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CmDg0.png" alt="set up logging serial" /></a></p>
|esp8266|arduino|
switching setDebugOutput off on esp8266
5105
<p>This thing is driving me nuts.</p> <p>I tried to debug my MQTT secure connection on nodecmu. Following some post from year 2015 I was switched on debugging output with <code>Serial.setDebugOutput(true)</code>. Now I tried to switch it off with <code>setDebugOutput(false)</code> as well as disabled, chose selective output, you name it from the menus:</p> <p><a href="https://i.stack.imgur.com/5tNiI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5tNiI.png" alt="arduino nodemcu settings"></a></p> <p>I tried to do </p> <pre><code>void setup(void) { Serial.begin(115200); Serial.setDebugOutput(true); Serial.setDebugOutput(false); </code></pre> <p>I also tried</p> <pre><code>void setup(void) { Serial.begin(115200); </code></pre> <p>It just keeps printing:</p> <p><a href="https://i.stack.imgur.com/Wlz5c.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Wlz5c.png" alt="debugging infos"></a> </p> <p>Posts from year 2015 show that this issue is addressed in some version of arduino/arduino GUI. Where should I look for the versions?</p>
2020-06-18T13:42:53.487
<p>Assuming all this is on a &quot;normal&quot; home broadband network with a dynamic IPv4 address and a router operating as a NAT gateway.</p> <p>The devices you are talking about do not operate as HTTP servers. They use protocols where the device connects out to a known public source e.g. a MQTT broker hosted in the cloud.</p> <p>Messages for the device are sent to the cloud broker and then forwarded to the right device.</p> <p>Because the devices connect out and keep the connection alive there is no need to do any port forwarding or use a VPN.</p>
|esp8266|
Connect to ESP8266 outside network, not using portforward or VPN
5109
<p>I am looking for a way to connect to my ESP8266's web server without being connected to the same network as it. Also, I want to be able to connect to it without using the port forward or VPN tunnel option on my router. If there are other options to send commands on a user interface other than the ESP8266's web server, I'm open to tips on that.</p> <p>I know this can be done with certain devices (although I'm not sure about the ESP8266), but have no idea how it's done. For example, to connect to a smart thermostat like NEST there is no need to Port Forward or use a VPN to be able to send commands to it.</p> <p>Any help would be greatly appreciated.</p>
2020-06-19T10:56:39.773
<p>The problem is somehow related to my Wi-Fi hotspot (or Huawei router).</p> <p>Working solution:</p> <ul> <li>create a new WiFi hotspot or modify the existing one. give it a simple name (&quot;OK&quot;) and a simple password (alpha-numeric, NO special characters!).<br /> (read <a href="https://www.routerdefaults.org/huawei" rel="nofollow noreferrer">how to access router settings?</a>)</li> <li>reset fan<br /> <a href="https://i.stack.imgur.com/j3jBo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/j3jBo.png" alt="Xiaomi fan WiFi reset" /></a></li> <li>re-connect fan to Mi Home app, use the new WiFi hotspot</li> </ul> <p>Enjoy!</p>
|openhab|xiaomi-mi|
Xiaomi SmartMi Fan 2S problems - Wi-Fi MiHome app not connecting
5111
<p>My SmartMi Fan 2S arrived today, I've finished the initial device setup in Mi Home app. The process of pairing was slow, but in the end, it finished successfully.</p> <p>And now 95% of the time I see the Fan as &quot;Device Offline&quot; in Mi Home dashboard. Sporadically, it becomes available for few seconds and I can even start firmware update, but the update process fails, it never ends successfully (now stuck at 15%).</p> <p>It's a chinese version of the device. I use the latest Mi Home Android app available in Google Play. I choose Chinese Mainland region.</p> <p>I tried to connect the Fan to OpenHab. In Paper UI, I see how device status changes from <code>OFFLINE</code> to <code>OFFLINE COMMUNICATION ERROR</code> to <code>ONLINE</code> and then to <code>OFFLINE - CONFIGURATION_ERROR</code>. If I'm lucky, when it's <code>ONLINE</code> I can toggle ON/OFF switch and it works (with a minute-long delay).</p> <p>I'm unhappy with the purchase. I can't use smart features. I can't update the firmware.</p> <p><strong>How to fix the connection issue?</strong></p> <p>debug details:</p> <pre><code>hardwareVersion esp32 mcuFirmware 0008 modelId zhimi.fan.za4 vendor Xiaomi wifiFirmware v3.1.3-8-gce4d3fe10 Current firmware: 2.0.3 </code></pre> <pre><code>Phone: Google Pixel 2 Android 10 Mi Home app version 5.6.99 (the latest) Router Huawei HG8245 </code></pre> <p>What have I already tried?</p> <ul> <li>search for a solution on the Internet</li> <li>contact Xiaomi support</li> <li>disconnect the fan from a power outlet</li> <li>connect the fan to a power outlet</li> <li>bring the fan closer to the router</li> <li>remove the device from MiHome, reset WiFi settings, reconnect (Chinese Mainland region)</li> <li>remove the device from MiHome, reset WiFi settings, reconnect (Belarus region)</li> <li>clear Mi Home app cache</li> <li>Integrate the fan with OpenHab using the Xiaomi mi IO binding plugin (if I'm lucky, it responds to the ON / OFF command!)</li> <li>set DNS server to Chinese 114.114.114.114 (in router settings)</li> </ul> <p>Screenshots: <a href="https://i.stack.imgur.com/mul6R.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mul6R.png" alt="enter image description here" /></a></p> <p><a href="https://i.stack.imgur.com/6W2Z1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6W2Z1.png" alt="enter image description here" /></a></p> <p><a href="https://i.stack.imgur.com/FsHA6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FsHA6.png" alt="enter image description here" /></a></p>
2020-07-15T12:36:33.687
<p>First, it is really bad practice to start topics with leading <code>/</code>. It adds a null entry to the start of the topic tree and causes problems with things like shared subscriptions (we will get to that next).</p> <p>Second, I think you have miss understood how <a href="https://www.hivemq.com/blog/mqtt5-essentials-part7-shared-subscriptions/" rel="nofollow noreferrer">shared subscriptions</a> work. Topics that start with <code>$share/</code> (note the lack of leading <code>/</code>) are used to set up shared subscription groups, so groups of clients can load balance the consuming of messages published to a give topic pattern. You don't do any topic remapping yourself.</p> <p>To set up a shared subscription group you subscribe to a topic as follows:</p> <pre><code>$share/&lt;groupname&gt;/&lt;topic&gt; </code></pre> <p>So in your case assuming a group called <code>backend</code> and messages published to 'registration_app' (again note the lack of leading <code>/</code>) it would be</p> <pre><code>$share/backend/registration_app </code></pre> <p>If you use a leading <code>/</code> on the original topic you have to insert a double <code>/</code> in the shared subscription topic to insert the null, so just don't do it.</p> <pre><code>$share/backend//registration_app </code></pre>
|mqtt|mosquitto|
mosquitto remap local topic (no bridge)
5157
<p>I am using <code>eclipse-mosquitto:1.6.9</code> and would like to remap incoming messages to topic <code>/registration_app</code> to <code>/$share/registration_app</code>.</p> <p>In this case IoT devices will be publishing registration messages to <code>/registration_app</code> &amp; backend ap will be listening and processing each request. To scale backend process horizontally, I want to switch to <code>/$share/registration_app</code> (<strong>MQTT V5.0</strong>) for backend process, but don't want to change original incoming message topic <code>/registration_app</code>.</p> <p>SO far I can see remapping is available in case of bridging. So would like to know if I can do remapping without bridge.</p>
2020-07-24T14:42:34.303
<p>I figured it out. Turns out there was a bug in the <code>raspi_lora</code> library I used for my python code. It is so that, if you are not specifically sending to the device address or have <code>receive_all=True</code>, it will do nothing with the messages.</p> <p>If you plan to use the raspi_lora library you should replace line 268 in the lora.py file with</p> <pre class="lang-python prettyprint-override"><code>if (self._this_address != header_to) and ((header_to != BROADCAST_ADDRESS) or (self._receive_all is False)): </code></pre>
|raspberry-pi|arduino|lora|
Cannnot send from Arduino to Raspberry pi via LoRa
5177
<p>I am trying to send messages from my Arduino to my Raspberry pi. But I don't understand why the pi isn't receiving the messages.</p> <p>On the Arduino side I'm using an Arduino UNO with a Dragino Lora/GPS shield, using the Radiohead library.</p> <p>On the Pi side, the Upotronics LoRa hat for the pi zero and a pi zero, which is based on a RFM95 chip. And on the software side I'm using the Raspi Lora library.</p> <p>I wrote a couple of simple programs just to test the connection, and I can send messages from the raspberry to the Arduino, but not the other way around.</p> <p>Am I making a mistake in the code on either sending the data from the Arduino or receiving it on the raspberry that prevents this?</p> <p>Code for the Arduino: This one sends data it gets from serial port and awaits radio input when nothing is available.</p> <pre class="lang-c++ prettyprint-override"><code>#include &lt;SPI.h&gt; #include &lt;RH_RF95.h&gt; RH_RF95 rf95; void setup(){ Serial.begin(9600); if (rf95.init()){ Serial.println(&quot;Init Success&quot;); } else { Serial.println(&quot;Init Failed&quot;); } if (rf95.setFrequency(868)) Serial.println(&quot;Freq set for 868Mhz&quot;); if (!rf95.setModemConfig(RH_RF95::Bw125Cr45Sf128)) Serial.println(&quot;Invalid modem&quot;); Serial.println(&quot;Send serial data to echo it through radio&quot;); } void loop(){ uint8_t data[100]; uint8_t len; if (Serial.available()){ delay(20); int i = 0; while (Serial.available() &amp;&amp; i &lt; sizeof(data)-1){ data[i] = Serial.read(); i++; data[i] = 0; } rf95.setModeTx(); if(rf95.send(data,i)) { Serial.print(&quot;Message sent: &quot;); Serial.println((char *) data); Serial.println(i); } else { Serial.println(&quot;Failure to send&quot;); } } if (rf95.available()) { if (rf95.recv((uint8_t *)data,&amp;len)){ Serial.println(&quot;Got it&quot;); Serial.println((char *)data); Serial.println(len); } } } </code></pre> <p>Raspberry pi code: This one just initializes the lora instance, I run it on the interactive console and in theory it should print data, but as much as I tried I haven't managed to catch an IRQ on any of the pins when I send a message.</p> <pre class="lang-python prettyprint-override"><code>from raspi_lora import LoRa, ModemConfig # This is our callback function that runs when a message is received def on_recv(payload): print(&quot;From:&quot;, payload.header_from) print(&quot;Received:&quot;, payload.message) print(&quot;RSSI: {}; SNR: {}&quot;.format(payload.rssi, payload.snr)) lora = LoRa(0, 25, 2,freq=868, receive_all=True, modem_config=ModemConfig.Bw125Cr45Sf128) lora.on_recv = on_recv lora.set_mode_rx() </code></pre>
2020-07-25T18:56:18.687
<p>In the <a href="http://www.martyncurrey.com/?wpdmdl=5917" rel="nofollow noreferrer">AT commands list for the HM-10</a> you’ll find commands <code>AT+UUID</code> which allows changing the service UUID and <code>AT+FFE2</code> which enables control of the second service/characteristic.</p> <p>Note that features may depend on the firmware version on your module, and that it’s definitely not very flexible.</p>
|bluetooth|
How to change/add characteristics on HM-10?
5180
<p>I have been reading about the UUID on the HM-10 and multiple sources say that &quot;The main part of the user UUID service (FFE0) and the main part of the custom characteristic can be changed using the AT commands. You can also add another characteristic.&quot; but I can't find any information or AT commands for this.</p>
2020-08-07T23:06:48.423
<p>It is a programmable OBD-II tool.</p> <p><a href="https://docs.ghielectronics.com/hardware/automotive.html" rel="nofollow noreferrer">https://docs.ghielectronics.com/hardware/automotive.html</a></p> <p><img src="https://docs.ghielectronics.com/hardware/images/canxtra.jpg" alt="enter image description here" /></p>
|arduino|hardware|
Identify the ancient IOT hardware model and find out its driver
5194
<p>Found from the bottom of my gadget box, I am trying to use this board for my hobby project, but I cannot even remember what model it is.</p> <p>Could anyone help please to identify the model of this board? Also, where to download its driver as I suppose that I will need the driver to use this board. <a href="https://i.stack.imgur.com/Mk9Y2.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Mk9Y2.jpg" alt="board" /></a></p> <p>So far I know it's from GHI Electronics, brand is Canxtra, I searched &quot;Canxtra Rev 2.1A&quot; but nothing returned.</p>
2020-08-08T15:36:14.080
<p>I got it working!</p> <p>It was pretty easy when you got the right idea.</p> <p>I use the IP's of the phones. I configured them to be static in my network.</p> <p>Then, I wrote a little Python script that pings both IP-addresses. If one of the two is online, TV should be turned on. If both are offline, TV should be turned off.</p>
|smart-home|raspberry-pi|wifi|hardware|software|
Control Raspberry Pi depending on Wifi-Users
5198
<p>I am creating a &quot;digital dashboard&quot;, consisting of a TV and a Raspberry Pi 3B+. The TV just shows calendar, time, weather, etc..</p> <p>In the tutorial I am following for that, the creator uses a cron job to turn the TV on and off via CEC. However, he does this at a specific timeframe.</p> <p>What I would like to achieve here, is that whenever one of two phones (or both) - the ones of my girlfriend and mine - are logged into the router, the TV is on, if not, the TV is off. So, to recap, whenever nobody is at home, the TV shouldn't be turned on / should be turned off. Also, at the night, lets say 11PM to 6AM, the TV shouldn't be on either, respectively, it should be automatically turned OFF at 11PM.</p> <p>My router is a Fritz!Box 7520, just to mention that as well.</p> <p>What do you think? Is this even doable? Or am I gonna run in huge effort with high costs for this?</p> <p>Thanks in advance!</p>
2020-08-17T11:30:48.967
<p>Although I don't have any personal experience with it, I found <a href="https://www.youtube.com/watch?v=mcv4iMJ-EgI" rel="nofollow noreferrer">a Youtube video</a> from ThinKNX which suggests that it would allow you to control KNX lights from Apple Homekit...</p> <p>They outline <a href="http://www.thinknx.com/wiki/doku.php?id=voice_control#integration_with_homekit" rel="nofollow noreferrer">here</a> how to integrate ThinKNX with Apple Homekit.</p> <p>Again, I'm afraid I'm not an expert, but I hope this could point you in the right direction!</p>
|apple-homekit|knx|
Controlling a KNX gateway with Apple HomeKit
5210
<p>Are there any <strong>KNX</strong> gateways that work with Apple <strong>HomeKit</strong>? I'm currently using the BAB Technologie EIBPORT V3 and have to speak to it via CUBEVISION 2 which works very poorly. I would love to find a way to simply control my KNX devices (primarily lighting) using HomeKit.</p>
2020-08-30T13:52:58.967
<p>That diagram is describing Google Assistant's Local Control SDK.</p> <p>When using the Local Control SDK you write some JavaScript that is executed on the a Google Home/Home Mini/Nest Hub to send control messages over the local network to the device you want to control. (You still need to have a full cloud setup for the local control to work as well, docs for how to write a full Smart Home Action are <a href="https://developers.google.com/assistant/smarthome/overview" rel="nofollow noreferrer">here</a>)</p> <p>You can build your own (for none commercial use) Smart Speaker using the <a href="https://developers.google.com/assistant/sdk/guides/service/python" rel="nofollow noreferrer">Google Assistant Service</a> library which will run on a Raspberry Pi. I do not think this supports the Local control.</p> <p>Now if you want to use your phone to issue commands to Google Assistant and then just use the Pi to control the devices there are a few options.</p> <p>One of them is to install Node-RED on the Pi and use a service like <a href="https://googlehome.hardill.me.uk/" rel="nofollow noreferrer">Node-RED Google Assistant Bridge</a> (full disclosure I run this service). This lets you define virtual device that will be added to your Google Assistant and you can then connect those to what ever devices you want.</p>
|smart-home|raspberry-pi|google-assistant|
Can Raspberry Pi be used instead of Google Nest as a hub to control my smart home via Google Assistant?
5231
<p>I am searching for a way to make my home &quot;smart&quot;. I have raspberry pi 4 and pixel 2 phone. I thought that it would be cool to make my dumb devices &quot;smart&quot; and control them via Google Assistant from Pixel phone.</p> <p>I stumbled upon this picture (<a href="https://developers.home.google.com/local-home/overview" rel="nofollow noreferrer">source</a>) - it describes request lifecycle, and I am wondering if it is possible to use my Raspberry Pi 4 instead of Google Nest/Smart Speaker (which is located near &quot;JS&quot; thing).</p> <p><a href="https://i.stack.imgur.com/TbdJJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TbdJJ.png" alt="" /></a><br /> <sub>(source: <a href="https://developers.google.com/assistant/smarthome/images/local-home-sdk-execute-path.png" rel="nofollow noreferrer">google.com</a>)</sub></p> <p>I am a software developer and I can write any server code is needed for this, but I can't find any docs yet.</p>
2020-09-03T10:20:37.327
<p>If you are looking for something custom on the ESP8266 end, you a likely going to want to write a program to do what you want it to do. If you are already using <a href="https://pypi.org/project/micropython-umqtt.simple/" rel="nofollow noreferrer">MQTT</a>, then you might consider using <a href="https://docs.micropython.org/en/latest/esp8266/tutorial/intro.html" rel="nofollow noreferrer">MicroPython</a> on the NodeMCU. The toolchain is a bit simpler, and the development iterations are a lot quicker than flashing a C program.</p>
|esp8266|wifi|hardware|esp32|
How to control an ESP8266 via the Wi-Fi?
5238
<h3>Summary</h3> <p>I would like to build (ideally based on ESPHome) a device with a buzzer I can trigger remotely via the network.</p> <h3>Context</h3> <p>I have several systems built around my home automation system:</p> <ul> <li>Home Assistant to keep state and trigger action on devices</li> <li>AppDaemon where I code my automations</li> <li>two kind of &quot;hardware triggers&quot;: <ul> <li>433 MHz wall switches, which signals are picked up by a 433 Mhz to Wi-Fi bridge (and then to MQTT)</li> <li>Zigbee switches managed though Zigbee2MQTT</li> </ul> </li> <li>various sensors</li> <li>various services around a dashboard I wrote myself</li> </ul> <p>I am listing all this to show that I have, so far, two major kind of operations:</p> <ul> <li>getting data from sensors / Google calendar / Meteo services / various other APIs → and displaying their values</li> <li>sending a message from a wall switch, ultimately resulting for a Wi-Fi enabled device (such as a Sonoff Basic) to do some action</li> </ul> <h2>What I am missing</h2> <p>I now would like to build an IoT device that would accept data from my Wi-Fi network and trigger a module attached to it. You can see this as some kind of poor man alarm clock - where all the logic of the alarm is offloaded to a service, and the device just receives the order to buzz.</p> <p><strong>What is the right approach to build such an IoT?</strong></p> <p>I have NodeMCU modules, or Wemo D1s. I could flash them with ESPHome, bringing in the WiFi communication and the ability to connect to GPIOs.</p> <p>What I do not understand is how the Wi-Fi stack interacts with the GPIOs, exactly. Do I need to write a specific module to be added during the compilation? (it's been 20 years I did not code in C, last time was for my PhD - but this is something I could get into). Or is there a module that does the bridge already?</p> <p>Generally speaking, what is the approach when I want to send a message to a ESPHome, Wi-Fi enabled device in order to access its GPIOs.</p> <p>Please note that I know how to do it the other way round: I have added existing ESPHome modules to a Weemo D1 and they are correctly exposed in Home Assistant or the built-in web server. But this is a case where such modules already exist (for specific hardware) and just send data out.</p>
2020-09-26T13:21:37.740
<p>I had to attach the policy to the certificate and set the port to 8883 because the protocol is MQTT and not MQTT over Websockets.</p>
|mqtt|mosquitto|aws|
Mosquitto does not connect to AWS
5266
<p>I'm new to AWS services, I'm still studying the docs. I received a quite long (working) Python code that exchange data with the Cloud.</p> <p>Now I want to pub/sub messages with <code>mosquitto</code>. Basically I'm trying the following:</p> <pre><code>mosquitto_sub -h &lt;id&gt;.iot.us-east-2.amazonaws.com -p 443 -t &quot;$aws/things/&lt;sn&gt;/shadow/update/delta&quot; --cafile ./root-CA.crt --cert ./&lt;sn&gt;.cert.pem --key ./&lt;sn&gt;.private.key -d -i &lt;sn&gt; </code></pre> <p>Where:</p> <ul> <li><code>&lt;id&gt;</code> is the prefix of the host</li> <li><code>&lt;sn&gt;</code> is the serial-number of the board</li> </ul> <p>That command leads to:</p> <blockquote> <p>Client sending CONNECT</p> </blockquote> <p>and nothing else. I found a policy document inside a Python script (to be used when creating the device):</p> <pre class="lang-json prettyprint-override"><code>{ &quot;Version&quot;: &quot;2012-10-17&quot;, &quot;Statement&quot;: [ { &quot;Effect&quot;: &quot;Allow&quot;, &quot;Action&quot;: [ &quot;iot:Connect&quot; ], &quot;Resource&quot;: [ &quot;arn:aws:iot:us-east-2:&lt;id&gt;:client/&lt;sn&gt;&quot; ] }, { &quot;Effect&quot;: &quot;Allow&quot;, &quot;Action&quot;: [ &quot;iot:Publish&quot; ], &quot;Resource&quot;: [ &quot;arn:aws:iot:us-east-2:&lt;id&gt;:topic/$aws/things/&lt;sn&gt;/shadow/update&quot;, &quot;arn:aws:iot:us-east-2:&lt;id&gt;:topic/IoTData&quot; ] }, { &quot;Effect&quot;: &quot;Allow&quot;, &quot;Action&quot;: [ &quot;iot:Subscribe&quot;, &quot;iot:Receive&quot; ], &quot;Resource&quot;: [ &quot;arn:aws:iot:us-east-2:&lt;id&gt;:topicfilter/$aws/things/&lt;sn&gt;/shadow/update/accepted&quot;, &quot;arn:aws:iot:us-east-2:&lt;id&gt;:topicfilter/$aws/things/&lt;sn&gt;/shadow/update/rejected&quot;, &quot;arn:aws:iot:us-east-2:&lt;id&gt;:topicfilter/$aws/things/&lt;sn&gt;/shadow/update/delta&quot; ] } ] } </code></pre> <p>But I'm not sure if this is &quot;attached&quot; to the certificates, and even reading the <a href="https://docs.aws.amazon.com/cli/latest/reference/iot/attach-policy.html" rel="nofollow noreferrer">docs</a> I'm not sure if the CLI command is referred to my target's console (an RPi).</p> <h2>UPDATE</h2> <p>From the AWS console I create a new certificate and downloaded the three files to the target: <code>&lt;xxx&gt;-certificate.pem.crt</code>, <code>&lt;xxx&gt;-private.pem.key</code>, <code>&lt;xxx&gt;-public.pem.key</code>. Then I attached the policy to this certificated (from the AWS console itself).</p> <p>Still the connection is not completed and no answer is received.</p>
2020-09-27T16:11:03.643
<p>All your devices are opening persistent connections out to the cloud. They will be using a messaging based protocol (e.g. MQTT) rather than a request/response protocol like HTTP.</p> <p>Messages flow both ways over these types of protocols, with the bulbs updating the cloud with their current state and the cloud sending commands to change state.</p>
|networking|routers|xiaomi-mi|
How IoT device in my local network is controlled from other networks?
5267
<p>I have some WIFI bulb from Xiaomi/Philips. It is controlled using Mi Home app. I can control it (turn on/off) both when I am in the same network as the bulb or when I'm in a completely different place, in a different network.</p> <p>How is it possible?</p> <p>I understand that while being in the same wifi network, my phone is able to talk directly to the bulb (although I do not know if this is what happens in reality). However, when I'm in a different network, how does that work?</p> <p>I assume that Mi Home does not actually talk with the bulb directly. I believe it communicates with some cloud server that actually communicates with the bulb. However, how does such server (in the cloud) communicate with my bulb in my local (NATted) network? I do not have any port forwarding set up on my router for my bulb.</p> <p>The only way I see it possible is if it is the bulb that checks if there are any commands for it in the cloud by invoking some API on schedule (every few seconds?) - some form of HTTP polling. I don't like this idea, because that would mean that my network would be very &quot;crowded&quot; if I had a few of these bulbs.</p> <p>So, how am I able to control my bulb from another network?</p>
2020-09-28T04:54:25.613
<p>Partially my mistake. It is, indeed, operating in the 900MHz spectrum.</p> <p>What threw me off was the agreement between all of the command outputs provided in the question, that there was no support for 900MHz, in combination with a mistake of my own:</p> <p>I modified the &quot;freq_list&quot; (and scan_freq) to include the 900MHz frequencies. This caused the driver to fail to broadcast at all. I didn't realize this, so upon taking delivery of the spectrum analyzer nothing was showing up in 900MHz thereby &quot;confirming&quot; my belief the unit was operating at 5GHz (the spectrum analyzer I bought only went up to the 2.4GHz range). Only after realizing that the radio might not be broadcasting at all did I revert the configuration to the original. At that point the spectrum analyzer showed 928MHz power.</p>
|wifi-halow|drivers|
802.11ah Eval Kit Not Operating In 900MHz Spectrum?
5270
<p>How can I override the wlan driver's region limitations to permit the (legal) 900MHz unlicensed operation of my 802.11ah evaluation kit?</p> <p>The [Silex evaluation kit for 802.11ah][1] doesn't seem to work at sub-GHz. A spectrum analyzer shows no power in the sub-GHz. It is operating, apparently, at 5.825GHz. <strong>Their support email has failed to respond after 11 days</strong> and this appears to be a problem with the SSD that comes with the kit as evidenced by the following output.</p> <pre><code>pi@raspberrypi:~ $ iwconfig wlan0 wlan0 IEEE 802.11 ESSID:&quot;Wi-Fi&quot; Mode:Managed Frequency:5.825 GHz Access Point: 84:25:3F:87:FA:E8 Bit Rate=6 Mb/s Tx-Power=30 dBm Retry short limit:7 RTS thr:off Fragment thr:off Power Management:off Link Quality=70/70 Signal level=-32 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:100 Missed beacon:0 pi@raspberrypi:~ $ cat ~/sx-newah/conf/US/sta_halow_sae.conf ctrl_interface=/var/run/wpa_supplicant country=US network={ ssid=&quot;Wi-Fi&quot; proto=RSN key_mgmt=SAE ieee80211w=2 pairwise=CCMP group=CCMP sae_password=&quot;12345678&quot; freq_list=2422 2432 2442 2452 2462 5180 5185 5190 5195 5200 5205 5210 5215 5220 5225 5230 5235 5240 5745 5750 5755 5760 5500 5520 2437 2457 5765 5770 5775 5780 5785 5790 5795 5800 5805 5810 5815 5820 5825 scan_freq=2422 2432 2442 2452 2462 5180 5185 5190 5195 5200 5205 5210 5215 5220 5225 5230 5235 5240 5745 5750 5755 5760 5500 5520 2437 2457 5765 5770 5775 5780 5785 5790 5795 5800 5805 5810 5815 5820 5825 } p2p_disabled=1 ignore_old_scan_res=1 pi@raspberrypi:~ $ iw reg get global country US: DFS-FCC (2402 - 2472 @ 40), (N/A, 30), (N/A) (5170 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW (5250 - 5330 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW (5490 - 5730 @ 160), (N/A, 23), (0 ms), DFS (5735 - 5835 @ 80), (N/A, 30), (N/A) (57240 - 63720 @ 2160), (N/A, 40), (N/A) </code></pre> <p>PS: I've tried modifying the <code>conf</code> files.<br /> [1]: <a href="https://www.silextechnology.com/connectivity-solutions/embedded-wireless/sx-newah-evaluation" rel="nofollow noreferrer">https://www.silextechnology.com/connectivity-solutions/embedded-wireless/sx-newah-evaluation</a></p>
2020-09-28T14:52:32.550
<p>First, if you just have 1 garage door opener, why are you generating a random client id every time? using a fixed clientID would be the right thing to do here.</p> <p>The only time a random clientID makes any sense is when you are using a transient client e.g. a webpage using MQTT over Websockets.</p> <p>Second, you appear to be double looping your reconnect function. Once in <code>setup()</code> and in <code>loop()</code> then again in <code>reconnect()</code>. You should only need to loop once on the condition <code>client.connected()</code> probably in the <code>reconnect()</code> function.</p> <p>Turn on verbose logging on the broker and look to see what broker thinks is happening when it publishes the LWT.</p> <p>Also following along with <code>mosquitto_sub</code> will be useful at the same time.</p>
|mqtt|arduino|mosquitto|home-assistant|
MQTT device shows as offline in Home Assistant when connection is established
5273
<p>I'm trying to create a Garage door sensor / motor controller and connect it to my instance of Home Assistant. My broker is the local mosquito on the Raspberry pi.</p> <p>The device is a Wemos D1 mini with a relay connected to D1 pin and an analog input to determine the current state of the door.</p> <p>The problem is that the device keeps coming up as unavailable as soon as the MQTT connection is made to the broker. I can't see anything in the logs to suggest a problem. On top of that I can still successfully publish to and from the device while it's <code>offline</code>.</p> <p>This is the specific code I'm using for the LWT / availability topic.</p> <pre class="lang-cpp prettyprint-override"><code>String clientId = &quot;GarageDoorSensor-&quot; + String(random(0xffff), HEX); if (client.connect(clientId.c_str(), mqtt_user, mqtt_password, availabilityTopic, 0, true, payloadNotAvailable)) { Serial.println(&quot;connected&quot;); client.publish(availabilityTopic, payloadAvailable, true); client.subscribe(commandTopic); Serial.println(&quot;Subscribed to: &quot;); Serial.println(commandTopic); Serial.println(availabilityTopic); getAndSendDoorStatus(); } </code></pre> <p>Here is the full code:</p> <pre class="lang-cpp prettyprint-override"><code>#include &lt;ESP8266WiFi.h&gt; #include &lt;PubSubClient.h&gt; #include &lt;ArduinoJson.h&gt; #include &quot;My_Helper.h&quot; WiFiClient espClient; PubSubClient client(espClient); void setup_wifi() { delay(10); // We start by connecting to a WiFi network Serial.println(); Serial.print(&quot;Connecting to &quot;); Serial.println(ssid); //Set WiFi mode so we don't create an access point. WiFi.mode(WIFI_STA); WiFi.begin(ssid, password); Serial.println(WiFi.mode(WIFI_STA)); while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print(&quot;.&quot;); } randomSeed(micros()); Serial.println(&quot;&quot;); Serial.println(&quot;WiFi connected&quot;); Serial.println(&quot;IP address: &quot;); Serial.println(WiFi.localIP()); } void reconnect() { // Loop until we're reconnected while (!client.connected()) { Serial.print(&quot;Attempting MQTT connection...&quot;); // Attempt to connect String clientId = &quot;GarageDoorSensor-&quot; + String(random(0xffff), HEX); if (client.connect(clientId.c_str(), mqtt_user, mqtt_password, availabilityTopic, 0, true, payloadNotAvailable)) { Serial.println(&quot;connected&quot;); client.publish(availabilityTopic, payloadAvailable, true); client.subscribe(commandTopic); Serial.println(&quot;Subscribed to: &quot;); Serial.println(commandTopic); Serial.println(availabilityTopic); getAndSendDoorStatus(); } else { Serial.print(&quot;failed, rc=&quot;); Serial.print(client.state()); Serial.println(&quot; try again in 5 seconds&quot;); // Wait 5 seconds before retrying delay(5000); } } } void setup() { pinMode(relaySwitch, OUTPUT); pinMode(doorInput, INPUT); Serial.begin(115200); // put your setup code here, to run once: setup_wifi(); client.setServer(mqtt_server, 1883); client.setCallback(callback); while (!client.connected()) { reconnect(); } StaticJsonDocument&lt;1024&gt; mqttConfig; mqttConfig[&quot;name&quot;] = mqttDeviceName; mqttConfig[&quot;device_class&quot;] = mqttDeviceClass; mqttConfig[&quot;state_topic&quot;] = stateTopic; mqttConfig[&quot;command_topic&quot;] = commandTopic; mqttConfig[&quot;state_open&quot;] = opened; mqttConfig[&quot;state_closed&quot;] = closed; mqttConfig[&quot;state_closing&quot;] = closing; mqttConfig[&quot;state_opening&quot;] = opening; mqttConfig[&quot;payload_open&quot;] = payloadOpen; mqttConfig[&quot;payload_close&quot;] = payloadClose; mqttConfig[&quot;payload_stop&quot;] = payloadStop; mqttConfig[&quot;optimistic&quot;] = false; mqttConfig[&quot;retain&quot;] = true; mqttConfig[&quot;availability_topic&quot;] = availabilityTopic; mqttConfig[&quot;payload_available&quot;] = payloadAvailable; mqttConfig[&quot;payload_not_available&quot;] = payloadNotAvailable; char json[1024]; serializeJsonPretty(mqttConfig, json); client.publish(configTopic, json, true); } void loop() { if (!client.connected()) { reconnect(); } client.loop(); delay(1000); getAndSendDoorStatus(); } void callback(char* topic, byte* message, unsigned int length) { String messageStr; for (int i = 0; i &lt; length; i++) { messageStr += (char)message[i]; } if (String(topic) == commandTopic) { Serial.print(&quot;Home Assistant Command: &quot;); Serial.println(messageStr); if((messageStr == payloadOpen &amp;&amp; doorStatus != opened) || messageStr == &quot;forceOpen&quot;){ //open door is not already open or we are running a test. openTheDoor(); }else if((messageStr == payloadClose &amp;&amp; doorStatus != closed) || messageStr == &quot;forceClose&quot;){ //close door is not already closed or we are running a test closeTheDoor(); }else if(messageStr == payloadStop){ //make sure we undo the relevant switches to stop the motion based on the previous status if(doorStatus == opened){ closeTheDoor(); }else if(doorStatus == closed){ openTheDoor(); } } prevDoorStatus = doorStatus; if(messageStr == &quot;incrementOpenThreshold&quot;){ openThreshold = openThreshold + 1; String msg = &quot;Set open threshold to: &quot; + openThreshold; client.publish(stateTopic, msg.c_str(), true); } if(messageStr == &quot;decrementOpenThreshold&quot;){ openThreshold = openThreshold - 1; String msg = &quot;Set open threshold to: &quot; + openThreshold; client.publish(stateTopic, msg.c_str(), true); } } } void getAndSendDoorStatus(){ int doorState = analogRead(doorInput); //Door fully open? if(doorState &lt; openThreshold){ statusToOpen(); } else { statusToClosed(); } if(prevDoorStatus != doorStatus){ Serial.print(&quot;Door &quot;); Serial.println(doorStatus); client.publish(stateTopic, doorStatus, true); delay(500); if(doorStatus == opened){ openTheDoor(); } else { closeTheDoor(); } prevDoorStatus = doorStatus; } } void closeTheDoor(){ digitalWrite(relaySwitch, closeDoor); } void statusToClosed(){ doorStatus = closed; } void openTheDoor(){ digitalWrite(relaySwitch, openDoor); } void statusToOpen(){ doorStatus = opened; } </code></pre> <p>MY_HELPER.H</p> <pre class="lang-cpp prettyprint-override"><code>#ifndef MY_HELPER_H #define MY_HELPER_H const char* ssid = &quot;YOUR_WIFI_SSID&quot;; const char* password = &quot;YOUR_WIFI_PASSWORD&quot;; const char* mqtt_user = &quot;YOUR_MQTT_USER&quot;; const char* mqtt_password = &quot;YOUR_MQTT_PASSWORD&quot;; const char* mqtt_server = &quot;YOUR_MQTT_SERVER&quot;; const char* stateTopic = &quot;homeassistant/cover/garage/door/state&quot;; const char* commandTopic = &quot;homeassistant/cover/garage/door/set&quot;; const char* configTopic = &quot;homeassistant/cover/garage/door/config&quot;; const char* availabilityTopic = &quot;homeassistant/cover/garage/door/availability&quot;; const char* doorStatus = &quot;&quot;; const char* prevDoorStatus = &quot;&quot;; const char* mqttDeviceName = &quot;Garage Door&quot;; const char* mqttDeviceClass = &quot;garage&quot;; int prevDoorState; int openThreshold = 15; const int relaySwitch = D1; const int doorInput = A0; const int conexT1 = LOW; const int conexT2 = HIGH; const int openDoor = conexT1; const int closeDoor = conexT2; //Statuses const char* opened = &quot;open&quot;; const char* closed = &quot;closed&quot;; const char* closing = &quot;closing&quot;; const char* opening = &quot;opening&quot;; const char* stopped = &quot;stopped&quot;; //pay loads const char* payloadOpen = &quot;OPEN&quot;; const char* payloadClose = &quot;CLOSE&quot;; const char* payloadStop = &quot;STOP&quot;; const char* payloadAvailable = &quot;online&quot;; const char* payloadNotAvailable = &quot;offline&quot;; #endif </code></pre>
2020-10-07T11:36:09.373
<p>The <code>loop</code> functions does quite a lot of things, some of them probably a bit lengthy. So it takes a while to execute and get to the next call of <code>loop</code> and the next step.</p> <p>Add (local) traces with precise timestamps to see how much time it's spending in the various parts of the loop (and how often the loop is run) to confirm and isolate the bits that are problematic.</p>
|arduino|microcontrollers|
How to get stepper motor to rotate smoothly and continuously?
5286
<p>I'm trying to build my own motorised roller blinds based off <a href="https://github.com/nidayand/motor-on-roller-blind-ws" rel="noreferrer">this project</a>. It uses the <a href="https://github.com/thomasfredericks/Stepper_28BYJ_48" rel="noreferrer">Stepper_28BYJ_48</a> library.</p> <p>The problem I'm having is that the motor is either very slow and jittery, going forward 1 step at a time with a slight pause, or it overheats, i'm assuming, and restarts the device (Node MCU) with this <a href="https://www.amazon.co.uk/gp/product/B07RLLKFGK/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&amp;psc=1" rel="noreferrer">motor setup</a>.</p> <p>I'm especially confused as I can load the <code>motor-on-roller-blind-ws</code> onto my setup and it will turn the motor smoothly each time.</p> <p>I'm implementing the same code r.e. the motor functionality from what i can see.</p> <p>I initiate the motor up top:</p> <p><code>Stepper_28BYJ_48 small_stepper(D1, D3, D2, D4); //Initiate stepper driver</code></p> <p>then in <code>loop</code> I call the <code>step</code> method with the appropriate direction.</p> <p>Full code is here:</p> <pre><code>#include &lt;Stepper_28BYJ_48.h&gt; #include &lt;ESP8266WiFi.h&gt; #include &lt;PubSubClient.h&gt; #include &lt;ArduinoOTA.h&gt; #include &quot;My_Helper.h&quot; #include &quot;ConfigHelper.h&quot; //ALL CONFIG CHANGES ARE LOCATED IN My_Helper.h// //ALL CONFIG CHANGES ARE LOCATED IN My_Helper.h// //ALL CONFIG CHANGES ARE LOCATED IN My_Helper.h// //ALL CONFIG CHANGES ARE LOCATED IN My_Helper.h// //ALL CONFIG CHANGES ARE LOCATED IN My_Helper.h// //ALL CONFIG CHANGES ARE LOCATED IN My_Helper.h// //ALL CONFIG CHANGES ARE LOCATED IN My_Helper.h// //ALL CONFIG CHANGES ARE LOCATED IN My_Helper.h// //ALL CONFIG CHANGES ARE LOCATED IN My_Helper.h// ConfigHelper helper = ConfigHelper(); WiFiClient espClient; PubSubClient client(espClient); Stepper_28BYJ_48 small_stepper(D1, D3, D2, D4); //Initiate stepper driver JsonObject jsonConfig; void setup() { // put your setup code here, to run once: Serial.begin(115200); stopPowerToCoils(); if(!SPIFFS.begin()){ Serial.println(&quot;An Error has occurred while mounting SPIFFS&quot;); client.publish(coverDebugTopic, &quot;Critical Error!&quot;, false); return; } if(helper.loadconfig()){ jsonConfig = helper.getconfig(); currentPosition = jsonConfig[&quot;current&quot;]; minPosition = jsonConfig[&quot;min&quot;]; maxPosition = jsonConfig[&quot;max&quot;]; } else { client.publish(coverDebugTopic, &quot;No config found, using default configuration&quot;, false); } setup_wifi(); client.setServer(mqtt_server, 1883); client.setCallback(callback); client.setBufferSize(1024); if (connectClient()) { //Send cover entity details to home assistant on initial connection //for auto discovery DynamicJsonDocument mqttDevConfig(225); mqttDevConfig[&quot;name&quot;] = mqttCoverDeviceClientId; mqttDevConfig[&quot;mf&quot;] = manufacturer; mqttDevConfig[&quot;mdl&quot;] = model; mqttDevConfig[&quot;sw&quot;] = softwareVersion; mqttDevConfig[&quot;ids&quot;][0] = mqttCoverDeviceClientId; mqttDevConfig[&quot;ids&quot;][1] = mqttResetDeviceClientId; mqttDevConfig[&quot;ids&quot;][2] = mqttMinDeviceClientId; mqttDevConfig[&quot;ids&quot;][3] = mqttMaxDeviceClientId; DynamicJsonDocument mqttCoverConfig(540); mqttCoverConfig[&quot;name&quot;] = mqttCoverDeviceName; mqttCoverConfig[&quot;dev_cla&quot;] = mqttCoverDeviceClass; mqttCoverConfig[&quot;stat_t&quot;] = coverStateTopic; mqttCoverConfig[&quot;cmd_t&quot;] = coverCommandTopic; mqttCoverConfig[&quot;opt&quot;] = false; mqttCoverConfig[&quot;ret&quot;] = true; mqttCoverConfig[&quot;avty_t&quot;] = coverAvailabilityTopic; mqttCoverConfig[&quot;uniq_id&quot;] = mqttCoverDeviceClientId; mqttCoverConfig[&quot;dev&quot;] = mqttDevConfig; char coverJson[540]; serializeJsonPretty(mqttCoverConfig, coverJson); client.publish(coverConfigTopic, coverJson, false); DynamicJsonDocument mqttResetConfig(505); mqttResetConfig[&quot;name&quot;] = mqttResetDeviceName; mqttResetConfig[&quot;ic&quot;] = &quot;mdi:lock-reset&quot;; mqttResetConfig[&quot;cmd_t&quot;] = resetCommandTopic; mqttResetConfig[&quot;stat_t&quot;] = resetStateTopic; mqttResetConfig[&quot;avty_t&quot;] = coverAvailabilityTopic; mqttResetConfig[&quot;uniq_id&quot;] = mqttResetDeviceClientId; mqttResetConfig[&quot;dev&quot;] = mqttDevConfig; char resetJson[505]; serializeJsonPretty(mqttResetConfig, resetJson); client.publish(resetConfigTopic, resetJson, false); if(minPosition == -1){ DynamicJsonDocument mqttMinConfig(515); mqttMinConfig[&quot;name&quot;] = mqttMinDeviceName; mqttMinConfig[&quot;ic&quot;] = &quot;mdi:blinds-open&quot;; mqttMinConfig[&quot;cmd_t&quot;] = minCommandTopic; mqttMinConfig[&quot;stat_t&quot;] = minStateTopic; mqttMinConfig[&quot;avty_t&quot;] = coverAvailabilityTopic; mqttMinConfig[&quot;uniq_id&quot;] = mqttMinDeviceClientId; mqttMinConfig[&quot;dev&quot;] = mqttDevConfig; char minJson[515]; serializeJsonPretty(mqttMinConfig, minJson); client.publish(minConfigTopic, minJson, false); } else { client.publish(minConfigTopic, &quot;&quot;, false); } if(maxPosition == -1){ DynamicJsonDocument mqttMaxConfig(515); mqttMaxConfig[&quot;name&quot;] = mqttMaxDeviceName; mqttMaxConfig[&quot;ic&quot;] = &quot;mdi:blinds&quot;; mqttMaxConfig[&quot;cmd_t&quot;] = maxCommandTopic; mqttMaxConfig[&quot;stat_t&quot;] = maxStateTopic; mqttMaxConfig[&quot;avty_t&quot;] = coverAvailabilityTopic; mqttMaxConfig[&quot;uniq_id&quot;] = mqttMaxDeviceClientId; mqttMaxConfig[&quot;dev&quot;] = mqttDevConfig; char maxJson[515]; serializeJsonPretty(mqttMaxConfig, maxJson); client.publish(maxConfigTopic, maxJson, false); } else { client.publish(maxConfigTopic, &quot;&quot;, false); } } //Setup OTA { ArduinoOTA.setHostname((mqttCoverDeviceClientId + &quot;-&quot; + String(ESP.getChipId())).c_str()); ArduinoOTA.onStart([]() { Serial.println(&quot;Start&quot;); }); ArduinoOTA.onEnd([]() { Serial.println(&quot;\nEnd&quot;); }); ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) { Serial.printf(&quot;Progress: %u%%\r&quot;, (progress / (total / 100))); }); ArduinoOTA.onError([](ota_error_t error) { Serial.printf(&quot;Error[%u]: &quot;, error); if (error == OTA_AUTH_ERROR) Serial.println(&quot;Auth Failed&quot;); else if (error == OTA_BEGIN_ERROR) Serial.println(&quot;Begin Failed&quot;); else if (error == OTA_CONNECT_ERROR) Serial.println(&quot;Connect Failed&quot;); else if (error == OTA_RECEIVE_ERROR) Serial.println(&quot;Receive Failed&quot;); else if (error == OTA_END_ERROR) Serial.println(&quot;End Failed&quot;); }); ArduinoOTA.begin(); } } void loop() { //OTA client code ArduinoOTA.handle(); //while connected we send the current door status //and trigger relay if we need to if (client.connected()) { client.loop(); //only activate motor if we if(motorDirection == OPEN || motorDirection == CLOSE){ int stepsBetweenMinMax = maxPosition - minPosition; if (motorDirection == OPEN) { if((minPosition != -1 &amp;&amp; currentPosition == minPosition) || stepsBetweenMinMax == 0){ stopAndPublishState(motorDirection); } else { small_stepper.step(-1); currentPosition = currentPosition - 1; } } else if (motorDirection == CLOSE) { if((maxPosition != -1 &amp;&amp; currentPosition == maxPosition) || stepsBetweenMinMax == 0){ stopAndPublishState(motorDirection); } else { small_stepper.step(1); currentPosition = currentPosition + 1; } } Serial.print(&quot;Current Position: &quot;); Serial.println(currentPosition); DynamicJsonDocument doc(50); JsonObject currJson = doc.to&lt;JsonObject&gt;(); currJson[&quot;min&quot;] = minPosition; currJson[&quot;max&quot;] = maxPosition; currJson[&quot;current&quot;] = currentPosition; publishDebugJson(currJson); if(helper.saveconfig(currJson)){ //client.publish(maxConfigTopic, &quot;&quot;, false); } else { motorDirection = STOP; stopPowerToCoils(); } } } else { connectClient(); } } void publishDebugJson(JsonObject json){ char mqttJson[50]; serializeJsonPretty(json, mqttJson); client.publish(coverDebugTopic, mqttJson, false); } void stopAndPublishState(int finishedState){ stopPowerToCoils(); motorDirection = STOP; const char* endState = opened; if(finishedState == CLOSE){ endState = closed; } client.publish(coverStateTopic, endState, true); } void setup_wifi() { delay(10); // We start by connecting to a WiFi network Serial.println(); Serial.print(&quot;Connecting to &quot;); Serial.println(ssid); //Set WiFi mode so we don't create an access point. WiFi.mode(WIFI_STA); WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print(&quot;.&quot;); } Serial.println(&quot;&quot;); Serial.println(&quot;WiFi connected&quot;); Serial.println(&quot;IP address: &quot;); Serial.println(WiFi.localIP()); } boolean connectClient() { // Loop until we're connected while (!client.connected()) { Serial.print(&quot;Attempting MQTT connection...&quot;); // Check connection if (client.connect(mqttCoverDeviceClientId.c_str(), mqtt_user, mqtt_password, coverAvailabilityTopic, 0, true, payloadNotAvailable)) { // Make an announcement when connected Serial.println(&quot;connected&quot;); client.publish(coverAvailabilityTopic, payloadAvailable, true); client.subscribe(coverCommandTopic); client.subscribe(coverAvailabilityTopic); client.subscribe(resetCommandTopic); client.subscribe(minCommandTopic); client.subscribe(maxCommandTopic); Serial.println(&quot;Subscribed to: &quot;); Serial.println(coverCommandTopic); Serial.println(coverAvailabilityTopic); Serial.println(resetCommandTopic); Serial.println(minCommandTopic); Serial.println(maxCommandTopic); return true; } else { Serial.print(&quot;failed, rc=&quot;); Serial.print(client.state()); Serial.println(&quot; try again in 5 seconds&quot;); // Wait 5 seconds before retrying delay(5000); return false; } } return true; } void callback(char* topic, byte* message, unsigned int length) { String messageStr; for (int i = 0; i &lt; length; i++) { messageStr += (char)message[i]; } if (String(topic) == coverCommandTopic) { Serial.print(&quot;Home Assistant Command: &quot;); Serial.println(messageStr); if (messageStr == payloadStop) { stopPowerToCoils(); motorDirection = STOP; } if (messageStr == payloadOpen) { motorDirection = OPEN; } if (messageStr == payloadClose) { motorDirection = CLOSE; } } if (String(topic) == resetCommandTopic) { Serial.print(&quot;Home Assistant Config Reset Blinds: &quot;); Serial.println(messageStr); if(messageStr == &quot;ON&quot;){ helper.deletefile(); ESP.reset(); } } if(String(topic) == minCommandTopic){ Serial.print(&quot;Home Assistant Config Set Blinds Min: &quot;); Serial.println(messageStr); if(messageStr == &quot;ON&quot;){ minPosition = currentPosition; DynamicJsonDocument minDoc(50); JsonObject minJson = minDoc.to&lt;JsonObject&gt;(); minJson[&quot;min&quot;] = minPosition; minJson[&quot;max&quot;] = maxPosition; minJson[&quot;current&quot;] = currentPosition; client.publish(coverDebugTopic, &quot;Min Position Set&quot;, false); publishDebugJson(minJson); if(helper.saveconfig(minJson)){ client.publish(minConfigTopic, &quot;&quot;, false); client.publish(coverStateTopic, opened, false); } } } if(String(topic) == maxCommandTopic){ Serial.print(&quot;Home Assistant Config Set Blinds Max: &quot;); Serial.println(messageStr); if(messageStr == &quot;ON&quot;){ maxPosition = currentPosition; DynamicJsonDocument maxDoc(50); JsonObject maxJson = maxDoc.to&lt;JsonObject&gt;(); maxJson[&quot;min&quot;] = minPosition; maxJson[&quot;max&quot;] = maxPosition; maxJson[&quot;current&quot;] = currentPosition; client.publish(coverDebugTopic, &quot;Max Position Set&quot;, false); publishDebugJson(maxJson); if(helper.saveconfig(maxJson)){ client.publish(maxConfigTopic, &quot;&quot;, false); client.publish(coverStateTopic, closed, false); } } } } void stopPowerToCoils() { digitalWrite(D1, LOW); digitalWrite(D2, LOW); digitalWrite(D3, LOW); digitalWrite(D4, LOW); } </code></pre>
2020-10-07T19:51:33.230
<p>Nothing, as I stated in the <a href="https://stackoverflow.com/a/64245650/504554">answer</a> on Stack Overflow they are byte for byte exactly the same protocol, it's just the transport layer which changes from raw TCP to Websockets.</p> <p>The difference is that you CAN NOT open raw sockets from within the browser, the security sandbox will not allow you to open arbitrary TCP connections to random hosts. The sandbox will only allow HTTP based protocols, which includes WebSockets because they bootstrap from an initial HTTP request.</p> <p>The other benefit of MQTT over Websockets is that it can make use of existing proxy infrastructure if needed.</p>
|mqtt|web-sockets|
What is the technical difference between MQTT and MQTT over web socket that allows the later to be preferred choice by web browser apps?
5290
<p>I am new to this IoT protocol area. My understanding is that MQTT is a lightweight messaging protocol for IOT devices.</p> <p>MQTT over web socket involves use of HTTP to UPGRADE the connection to use web socket. Otherwise they follow same protocol for data exchange.</p> <p>Both sit on top of the TCP layer.</p> <p>Both support a persistent connection.</p> <p>Both support pub/sub model.</p> <p>The use case difference between the 2 is said to be that MQTT over web socket is ideal when client is a browser since it is difficult to implement MQTT in browser (but this can be made possible by using Socket API).</p> <p>So what exactly is the technical difference between MQTT and MQTT over web socket that allows the later to be preferred by web browser apps?</p>
2020-10-18T06:53:22.023
<p>It turns out that I forgot the basic step of actually connecting the device to IFTTT via the &quot;external service&quot; menu in the smartphone app.</p> <p>What I did was open the app on the phone, click &quot;settings&quot;, then &quot;external services&quot;, then &quot;Easycontrol pairing page&quot;.</p> <p>That will require the serial number, access code and password.</p> <p>The first two are visible in the app under &quot;Info&quot; then &quot;About&quot;, while the password is the one set in the app, NOT the one for the Bosch identity.</p>
|ifttt|
Ifttt not filling fields
5300
<p>I have a Bosch Easycontrol thermostat and it's supposed to be compatible with ifttt.</p> <p>What happens though is that I click on the integration and no matter which action I choose, the field &quot;which room&quot; is stuck in &quot;Loading...&quot; and I cannot complete any action. I tried re-connecting the service and the standard ways but nothing works.</p> <p>I'd like to know how to fix it or at least if it's an ifttt issue or a Bosch issue.</p>
2020-10-19T12:31:32.043
<p>As with nearly any unencrypted protocol, there is no man in the middle protection.</p> <p>If this is a treat model you need to protect against then running MQTT over SSL/TLS is the solution.</p>
|mqtt|security|
MQTT Client Broker communication - can a malicious client masquerade as a legitimate one after being connected with credentials
5302
<p>I would like to ask a question that I have about MQTT client broker communication. Let's say, a client C1 is connected to the broker with user name and password (with no encryption).</p> <p>What happens when a new client C2 (a malicious one) tries to publish or subscribe to a topic without actually initiating connection and pretending to be C1? Are there any means by which the server can figure out that C1 is not the one trying to communicate?</p> <p>This question arises because after the connection process, the broker does not really check for credentials each time it is trying to subscribe or publish to a topic (as far as I am aware - may be wrong altogether).</p>
2020-10-21T10:44:32.457
<p>As with any IP server you can control which interfaces/addresses the server binds to (listens on).</p> <p>So if you only want clients on the same host as the broker to be able to connect then you just have the broker bind to <code>127.0.0.1</code> rather than to <code>0.0.0.0</code> (this is a shortcut to bind to all local interfaces)</p>
|mqtt|security|
Prevent a remote MQTT client from connecting to a broker
5306
<p>I am a newbie to MQTT, I was wondering how could one prevent a client who is not running in the same processor, where the broker is also running, to connect with the broker. In other way, restricting non-local MQTT clients from connecting to the broker.</p> <p>I know there are different measures to security starting from username/password to SSL. But without any of these, are not there some means to define that no remote client shall ever succeed in establishing a connection?</p>
2020-10-23T17:14:34.133
<p>It was intentionally omitted for security reason, you do not want anyone (hacker or intruder when integrated with other smart home like Alexa and others) to open the door.</p>
|smart-home|ifttt|
Linking myQ garage door to IFTTT
5314
<p>I have managed to close my myQ garage door (a LiftMaster) (by Chamberlain Group) using IFTTT. Here's the setup</p> <ul> <li>myQ app on an iPhone</li> <li>IFTTT app on an iPhone</li> <li>myQ account subscribed to IFTTT</li> <li>the garage door, of course</li> </ul> <p>When setting up the IFTTT trigger and action, the actions available when searching for and selecting myQ presents 3 options</p> <ul> <li>Turn off light</li> <li>Turn on light</li> <li>Close door</li> </ul> <p>There is no &quot;Open door&quot;. Selecting &quot;Close door&quot; identifies my garage door as an option, and the trigger works when the door is already open.</p> <p>Because there is no &quot;Open door&quot;, I tried to use the same trigger when the door was closed to open the door (hoping this was a toggle rather than an explicit option) but this did not work.</p> <p>Are there any options here? It seems like this is an issue on the IFTTT side of things, but I am not sure.</p>
2020-10-24T19:08:17.863
<p>Ok there are two key properties here to get smartir working over MQTT (with tasmota)</p> <ul> <li>device_code</li> <li>controller_data</li> </ul> <p><strong>device_code</strong></p> <p>I thought that just looking for codes in the github repo <a href="https://github.com/smartHomeHub/SmartIR/tree/master/codes" rel="nofollow noreferrer">here</a> and then setting the value for my device will make it work, but it didn't.</p> <p>You will need first to upload the [code].json file to your home assistant installation at <code>config/custom_components/smartir/codes/climate</code> for air conditioner or <code>config/custom_components/smartir/codes/media_player</code> for tv.</p> <p>That's sounds easy but the most complicated part is that major .json files available on the git repo are for broadlink hardware and don't work for tasmotized devices that communicates through MQTT so you have two options.</p> <ol> <li>Google a lot to try to find someone sharing .json file for the same device as yours.</li> <li>Get codes yourself using the original remote control.</li> </ol> <p>To get codes yourself you need to access to your tasmotized device through it web interface and go to &quot;Console&quot;. Then get your remote control and pointing to your IR device push a button. You will see on console information regarding this button you pressed.</p> <p><a href="https://i.stack.imgur.com/sxSdp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sxSdp.png" alt="enter image description here" /></a></p> <p>This information you will use to construct your own .json file like this (Samsung TV)</p> <pre class="lang-json prettyprint-override"><code>//SAMSUNG TV { &quot;manufacturer&quot;: &quot;Samsung&quot;, &quot;supportedModels&quot;: [ &quot;UE55F8000&quot;, &quot;UExxF8000&quot; ], &quot;supportedController&quot;: &quot;MQTT&quot;, &quot;commandsEncoding&quot;: &quot;Raw&quot;, &quot;commands&quot;: { &quot;off&quot;: &quot;{\&quot;Protocol\&quot;:\&quot;SAMSUNG\&quot;,\&quot;Bits\&quot;:32,\&quot;Data\&quot;:\&quot;0xE0E019E6\&quot;,\&quot;DataLSB\&quot;:\&quot;0x070702FD\&quot;,\&quot;Repeat\&quot;:0}&quot;, &quot;on&quot;: &quot;{\&quot;Protocol\&quot;:\&quot;SAMSUNG\&quot;,\&quot;Bits\&quot;:32,\&quot;Data\&quot;:\&quot;0xE0E09966\&quot;,\&quot;DataLSB\&quot;:\&quot;0x070702FD\&quot;,\&quot;Repeat\&quot;:0}&quot;, &quot;previousChannel&quot;: &quot;{\&quot;Protocol\&quot;:\&quot;SAMSUNG\&quot;,\&quot;Bits\&quot;:32,\&quot;Data\&quot;:\&quot;0xE0E008F7\&quot;,\&quot;DataLSB\&quot;:\&quot;0x070710EF\&quot;,\&quot;Repeat\&quot;:0}&quot;, &quot;nextChannel&quot;: &quot;{\&quot;Protocol\&quot;:\&quot;SAMSUNG\&quot;,\&quot;Bits\&quot;:32,\&quot;Data\&quot;:\&quot;0xE0E048B7\&quot;,\&quot;DataLSB\&quot;:\&quot;0x070712ED\&quot;,\&quot;Repeat\&quot;:0}&quot;, &quot;volumeDown&quot;: &quot;{\&quot;Protocol\&quot;:\&quot;SAMSUNG\&quot;,\&quot;Bits\&quot;:32,\&quot;Data\&quot;:\&quot;0xE0E0D02F\&quot;,\&quot;DataLSB\&quot;:\&quot;0x07070BF4\&quot;,\&quot;Repeat\&quot;:0}&quot;, &quot;volumeUp&quot;: &quot;{\&quot;Protocol\&quot;:\&quot;SAMSUNG\&quot;,\&quot;Bits\&quot;:32,\&quot;Data\&quot;:\&quot;0xE0E0E01F\&quot;,\&quot;DataLSB\&quot;:\&quot;0x070707F8\&quot;,\&quot;Repeat\&quot;:0}&quot;, &quot;mute&quot;: &quot;{\&quot;Protocol\&quot;:\&quot;SAMSUNG\&quot;,\&quot;Bits\&quot;:32,\&quot;Data\&quot;:\&quot;0xE0E0F00F\&quot;,\&quot;DataLSB\&quot;:\&quot;0x07070FF0\&quot;,\&quot;Repeat\&quot;:0}&quot;, &quot;sources&quot;: { &quot;DTV&quot;: &quot;{\&quot;Protocol\&quot;:\&quot;SAMSUNG\&quot;,\&quot;Bits\&quot;:32,\&quot;Data\&quot;:\&quot;0xE0E0C23D\&quot;,\&quot;DataLSB\&quot;:\&quot;0x070743BC\&quot;,\&quot;Repeat\&quot;:0}&quot;, &quot;Antenna&quot;: &quot;{\&quot;Protocol\&quot;:\&quot;SAMSUNG\&quot;,\&quot;Bits\&quot;:32,\&quot;Data\&quot;:\&quot;0xE0E0D827\&quot;,\&quot;DataLSB\&quot;:\&quot;0x07071BE4\&quot;,\&quot;Repeat\&quot;:0}&quot;, &quot;HDMI&quot;: &quot;{\&quot;Protocol\&quot;:\&quot;SAMSUNG\&quot;,\&quot;Bits\&quot;:32,\&quot;Data\&quot;:\&quot;0xE0E0D12E\&quot;,\&quot;DataLSB\&quot;:\&quot;0x07078B74\&quot;,\&quot;Repeat\&quot;:0}&quot;, &quot;HDMI 1&quot;: &quot;{\&quot;Protocol\&quot;:\&quot;SAMSUNG\&quot;,\&quot;Bits\&quot;:32,\&quot;Data\&quot;:\&quot;0xE0E09768\&quot;,\&quot;DataLSB\&quot;:\&quot;0x0707E916\&quot;,\&quot;Repeat\&quot;:0}&quot;, &quot;HDMI 2&quot;: &quot;{\&quot;Protocol\&quot;:\&quot;SAMSUNG\&quot;,\&quot;Bits\&quot;:32,\&quot;Data\&quot;:\&quot;0xE0E07D82\&quot;,\&quot;DataLSB\&quot;:\&quot;0x0707BE41\&quot;,\&quot;Repeat\&quot;:0}&quot;, &quot;HDMI 3&quot;: &quot;{\&quot;Protocol\&quot;:\&quot;SAMSUNG\&quot;,\&quot;Bits\&quot;:32,\&quot;Data\&quot;:\&quot;0xE0E043BC\&quot;,\&quot;DataLSB\&quot;:\&quot;0x0707C23D\&quot;,\&quot;Repeat\&quot;:0}&quot;, &quot;HDMI 4&quot;: &quot;{\&quot;Protocol\&quot;:\&quot;SAMSUNG\&quot;,\&quot;Bits\&quot;:32,\&quot;Data\&quot;:\&quot;0xE0E0A35C\&quot;,\&quot;DataLSB\&quot;:\&quot;0x0707C53A\&quot;,\&quot;Repeat\&quot;:0}&quot;, &quot;3D&quot;: &quot;{\&quot;Protocol\&quot;:\&quot;SAMSUNG\&quot;,\&quot;Bits\&quot;:32,\&quot;Data\&quot;:\&quot;0xE0E08679\&quot;,\&quot;DataLSB\&quot;:\&quot;0x0707619E\&quot;,\&quot;Repeat\&quot;:0}&quot;, &quot;Channel 0&quot;: &quot;{\&quot;Protocol\&quot;:\&quot;SAMSUNG\&quot;,\&quot;Bits\&quot;:32,\&quot;Data\&quot;:\&quot;0xE0E08877\&quot;,\&quot;DataLSB\&quot;:\&quot;0x070711EE\&quot;,\&quot;Repeat\&quot;:0}&quot;, &quot;Channel 1&quot;: &quot;{\&quot;Protocol\&quot;:\&quot;SAMSUNG\&quot;,\&quot;Bits\&quot;:32,\&quot;Data\&quot;:\&quot;0xE0E020DF\&quot;,\&quot;DataLSB\&quot;:\&quot;0x070704FB\&quot;,\&quot;Repeat\&quot;:0}&quot;, &quot;Channel 2&quot;: &quot;{\&quot;Protocol\&quot;:\&quot;SAMSUNG\&quot;,\&quot;Bits\&quot;:32,\&quot;Data\&quot;:\&quot;0xE0E0A05F\&quot;,\&quot;DataLSB\&quot;:\&quot;0x070705FA\&quot;,\&quot;Repeat\&quot;:0}&quot;, &quot;Channel 3&quot;: &quot;{\&quot;Protocol\&quot;:\&quot;SAMSUNG\&quot;,\&quot;Bits\&quot;:32,\&quot;Data\&quot;:\&quot;0xE0E0609F\&quot;,\&quot;DataLSB\&quot;:\&quot;0x070706F9\&quot;,\&quot;Repeat\&quot;:0}&quot;, &quot;Channel 4&quot;: &quot;{\&quot;Protocol\&quot;:\&quot;SAMSUNG\&quot;,\&quot;Bits\&quot;:32,\&quot;Data\&quot;:\&quot;0xE0E010EF\&quot;,\&quot;DataLSB\&quot;:\&quot;0x070708F7\&quot;,\&quot;Repeat\&quot;:0}&quot;, &quot;Channel 5&quot;: &quot;{\&quot;Protocol\&quot;:\&quot;SAMSUNG\&quot;,\&quot;Bits\&quot;:32,\&quot;Data\&quot;:\&quot;0xE0E0906F\&quot;,\&quot;DataLSB\&quot;:\&quot;0x070709F6\&quot;,\&quot;Repeat\&quot;:0}&quot;, &quot;Channel 6&quot;: &quot;{\&quot;Protocol\&quot;:\&quot;SAMSUNG\&quot;,\&quot;Bits\&quot;:32,\&quot;Data\&quot;:\&quot;0xE0E050AF\&quot;,\&quot;DataLSB\&quot;:\&quot;0x07070AF5\&quot;,\&quot;Repeat\&quot;:0}&quot;, &quot;Channel 7&quot;: &quot;{\&quot;Protocol\&quot;:\&quot;SAMSUNG\&quot;,\&quot;Bits\&quot;:32,\&quot;Data\&quot;:\&quot;0xE0E030CF\&quot;,\&quot;DataLSB\&quot;:\&quot;0x07070CF3\&quot;,\&quot;Repeat\&quot;:0}&quot;, &quot;Channel 8&quot;: &quot;{\&quot;Protocol\&quot;:\&quot;SAMSUNG\&quot;,\&quot;Bits\&quot;:32,\&quot;Data\&quot;:\&quot;0xE0E0B04F\&quot;,\&quot;DataLSB\&quot;:\&quot;0x07070DF2\&quot;,\&quot;Repeat\&quot;:0}&quot;, &quot;Channel 9&quot;: &quot;{\&quot;Protocol\&quot;:\&quot;SAMSUNG\&quot;,\&quot;Bits\&quot;:32,\&quot;Data\&quot;:\&quot;0xE0E0708F\&quot;,\&quot;DataLSB\&quot;:\&quot;0x07070EF1\&quot;,\&quot;Repeat\&quot;:0}&quot; } } } </code></pre> <p>Here another example but for climate</p> <pre class="lang-json prettyprint-override"><code>//GREE { &quot;manufacturer&quot;:&quot;Gree&quot;, &quot;supportedModels&quot;:[ &quot;GREE&quot; ], &quot;supportedController&quot;:&quot;MQTT&quot;, &quot;commandsEncoding&quot;:&quot;Raw&quot;, &quot;minTemperature&quot;:16.0, &quot;maxTemperature&quot;:30.0, &quot;precision&quot;:1.0, &quot;operationModes&quot;:[ &quot;heat_cool&quot;, &quot;fan_only&quot;, &quot;dry&quot;, &quot;cool&quot;, &quot;heat&quot; ], &quot;fanModes&quot;:[ &quot;low&quot;, &quot;mid&quot;, &quot;high&quot;, &quot;auto&quot; ], &quot;commands&quot;:{ &quot;off&quot;:&quot;{\&quot;Vendor\&quot;:\&quot;GREE\&quot;, \&quot;Power\&quot;:\&quot;Off\&quot;}&quot;, &quot;heat_cool&quot;:{ &quot;low&quot;:{ //The following row must be replicated incrementing value 16 at property name end and also at Temp propertie inside. This will make your conditioner set those temps. Removed for code brevity &quot;16&quot;:&quot;{\&quot;Vendor\&quot;:\&quot;GREE\&quot;,\&quot;Model\&quot;:1,\&quot;Mode\&quot;:\&quot;Auto\&quot;,\&quot;Power\&quot;:\&quot;On\&quot;,\&quot;Celsius\&quot;:\&quot;On\&quot;,\&quot;Temp\&quot;:16,\&quot;FanSpeed\&quot;:\&quot;Min\&quot;,\&quot;SwingV\&quot;:\&quot;Highest\&quot;,\&quot;SwingH\&quot;:\&quot;Off\&quot;,\&quot;Quiet\&quot;:\&quot;Off\&quot;,\&quot;Turbo\&quot;:\&quot;Off\&quot;,\&quot;Econo\&quot;:\&quot;Off\&quot;,\&quot;Light\&quot;:\&quot;On\&quot;,\&quot;Filter\&quot;:\&quot;Off\&quot;,\&quot;Clean\&quot;:\&quot;Off\&quot;,\&quot;Beep\&quot;:\&quot;Off\&quot;,\&quot;Sleep\&quot;:-1}&quot;, }, &quot;mid&quot;:{ &quot;16&quot;:&quot;{\&quot;Vendor\&quot;:\&quot;GREE\&quot;,\&quot;Model\&quot;:1,\&quot;Mode\&quot;:\&quot;Auto\&quot;,\&quot;Power\&quot;:\&quot;On\&quot;,\&quot;Celsius\&quot;:\&quot;On\&quot;,\&quot;Temp\&quot;:16,\&quot;FanSpeed\&quot;:\&quot;Medium\&quot;,\&quot;SwingV\&quot;:\&quot;Highest\&quot;,\&quot;SwingH\&quot;:\&quot;Off\&quot;,\&quot;Quiet\&quot;:\&quot;Off\&quot;,\&quot;Turbo\&quot;:\&quot;Off\&quot;,\&quot;Econo\&quot;:\&quot;Off\&quot;,\&quot;Light\&quot;:\&quot;On\&quot;,\&quot;Filter\&quot;:\&quot;Off\&quot;,\&quot;Clean\&quot;:\&quot;Off\&quot;,\&quot;Beep\&quot;:\&quot;Off\&quot;,\&quot;Sleep\&quot;:-1}&quot;, }, &quot;high&quot;:{ &quot;16&quot;:&quot;{\&quot;Vendor\&quot;:\&quot;GREE\&quot;,\&quot;Model\&quot;:1,\&quot;Mode\&quot;:\&quot;Auto\&quot;,\&quot;Power\&quot;:\&quot;On\&quot;,\&quot;Celsius\&quot;:\&quot;On\&quot;,\&quot;Temp\&quot;:16,\&quot;FanSpeed\&quot;:\&quot;Max\&quot;,\&quot;SwingV\&quot;:\&quot;Highest\&quot;,\&quot;SwingH\&quot;:\&quot;Off\&quot;,\&quot;Quiet\&quot;:\&quot;Off\&quot;,\&quot;Turbo\&quot;:\&quot;Off\&quot;,\&quot;Econo\&quot;:\&quot;Off\&quot;,\&quot;Light\&quot;:\&quot;On\&quot;,\&quot;Filter\&quot;:\&quot;Off\&quot;,\&quot;Clean\&quot;:\&quot;Off\&quot;,\&quot;Beep\&quot;:\&quot;Off\&quot;,\&quot;Sleep\&quot;:-1}&quot;, }, &quot;auto&quot;:{ &quot;16&quot;:&quot;{\&quot;Vendor\&quot;:\&quot;GREE\&quot;,\&quot;Model\&quot;:1,\&quot;Mode\&quot;:\&quot;Auto\&quot;,\&quot;Power\&quot;:\&quot;On\&quot;,\&quot;Celsius\&quot;:\&quot;On\&quot;,\&quot;Temp\&quot;:16,\&quot;FanSpeed\&quot;:\&quot;Auto\&quot;,\&quot;SwingV\&quot;:\&quot;Highest\&quot;,\&quot;SwingH\&quot;:\&quot;Off\&quot;,\&quot;Quiet\&quot;:\&quot;Off\&quot;,\&quot;Turbo\&quot;:\&quot;Off\&quot;,\&quot;Econo\&quot;:\&quot;Off\&quot;,\&quot;Light\&quot;:\&quot;On\&quot;,\&quot;Filter\&quot;:\&quot;Off\&quot;,\&quot;Clean\&quot;:\&quot;Off\&quot;,\&quot;Beep\&quot;:\&quot;Off\&quot;,\&quot;Sleep\&quot;:-1}&quot;, } }, &quot;fan_only&quot;:{ &quot;low&quot;:{ &quot;16&quot;:&quot;{\&quot;Vendor\&quot;:\&quot;GREE\&quot;,\&quot;Model\&quot;:1,\&quot;Mode\&quot;:\&quot;fan_only\&quot;,\&quot;Power\&quot;:\&quot;On\&quot;,\&quot;Celsius\&quot;:\&quot;On\&quot;,\&quot;Temp\&quot;:16,\&quot;FanSpeed\&quot;:\&quot;Min\&quot;,\&quot;SwingV\&quot;:\&quot;Highest\&quot;,\&quot;SwingH\&quot;:\&quot;Off\&quot;,\&quot;Quiet\&quot;:\&quot;Off\&quot;,\&quot;Turbo\&quot;:\&quot;Off\&quot;,\&quot;Econo\&quot;:\&quot;Off\&quot;,\&quot;Light\&quot;:\&quot;On\&quot;,\&quot;Filter\&quot;:\&quot;Off\&quot;,\&quot;Clean\&quot;:\&quot;Off\&quot;,\&quot;Beep\&quot;:\&quot;Off\&quot;,\&quot;Sleep\&quot;:-1}&quot;, }, &quot;mid&quot;:{ &quot;16&quot;:&quot;{\&quot;Vendor\&quot;:\&quot;GREE\&quot;,\&quot;Model\&quot;:1,\&quot;Mode\&quot;:\&quot;fan_only\&quot;,\&quot;Power\&quot;:\&quot;On\&quot;,\&quot;Celsius\&quot;:\&quot;On\&quot;,\&quot;Temp\&quot;:16,\&quot;FanSpeed\&quot;:\&quot;Medium\&quot;,\&quot;SwingV\&quot;:\&quot;Highest\&quot;,\&quot;SwingH\&quot;:\&quot;Off\&quot;,\&quot;Quiet\&quot;:\&quot;Off\&quot;,\&quot;Turbo\&quot;:\&quot;Off\&quot;,\&quot;Econo\&quot;:\&quot;Off\&quot;,\&quot;Light\&quot;:\&quot;On\&quot;,\&quot;Filter\&quot;:\&quot;Off\&quot;,\&quot;Clean\&quot;:\&quot;Off\&quot;,\&quot;Beep\&quot;:\&quot;Off\&quot;,\&quot;Sleep\&quot;:-1}&quot;, }, &quot;high&quot;:{ &quot;16&quot;:&quot;{\&quot;Vendor\&quot;:\&quot;GREE\&quot;,\&quot;Model\&quot;:1,\&quot;Mode\&quot;:\&quot;fan_only\&quot;,\&quot;Power\&quot;:\&quot;On\&quot;,\&quot;Celsius\&quot;:\&quot;On\&quot;,\&quot;Temp\&quot;:16,\&quot;FanSpeed\&quot;:\&quot;Max\&quot;,\&quot;SwingV\&quot;:\&quot;Highest\&quot;,\&quot;SwingH\&quot;:\&quot;Off\&quot;,\&quot;Quiet\&quot;:\&quot;Off\&quot;,\&quot;Turbo\&quot;:\&quot;Off\&quot;,\&quot;Econo\&quot;:\&quot;Off\&quot;,\&quot;Light\&quot;:\&quot;On\&quot;,\&quot;Filter\&quot;:\&quot;Off\&quot;,\&quot;Clean\&quot;:\&quot;Off\&quot;,\&quot;Beep\&quot;:\&quot;Off\&quot;,\&quot;Sleep\&quot;:-1}&quot;, }, &quot;auto&quot;:{ &quot;16&quot;:&quot;{\&quot;Vendor\&quot;:\&quot;GREE\&quot;,\&quot;Model\&quot;:1,\&quot;Mode\&quot;:\&quot;fan_only\&quot;,\&quot;Power\&quot;:\&quot;On\&quot;,\&quot;Celsius\&quot;:\&quot;On\&quot;,\&quot;Temp\&quot;:16,\&quot;FanSpeed\&quot;:\&quot;Auto\&quot;,\&quot;SwingV\&quot;:\&quot;Highest\&quot;,\&quot;SwingH\&quot;:\&quot;Off\&quot;,\&quot;Quiet\&quot;:\&quot;Off\&quot;,\&quot;Turbo\&quot;:\&quot;Off\&quot;,\&quot;Econo\&quot;:\&quot;Off\&quot;,\&quot;Light\&quot;:\&quot;On\&quot;,\&quot;Filter\&quot;:\&quot;Off\&quot;,\&quot;Clean\&quot;:\&quot;Off\&quot;,\&quot;Beep\&quot;:\&quot;Off\&quot;,\&quot;Sleep\&quot;:-1}&quot;, } }, &quot;dry&quot;:{ &quot;low&quot;:{ &quot;16&quot;:&quot;{\&quot;Vendor\&quot;:\&quot;GREE\&quot;,\&quot;Model\&quot;:1,\&quot;Mode\&quot;:\&quot;Dry\&quot;,\&quot;Power\&quot;:\&quot;On\&quot;,\&quot;Celsius\&quot;:\&quot;On\&quot;,\&quot;Temp\&quot;:16,\&quot;FanSpeed\&quot;:\&quot;Min\&quot;,\&quot;SwingV\&quot;:\&quot;Highest\&quot;,\&quot;SwingH\&quot;:\&quot;Off\&quot;,\&quot;Quiet\&quot;:\&quot;Off\&quot;,\&quot;Turbo\&quot;:\&quot;Off\&quot;,\&quot;Econo\&quot;:\&quot;Off\&quot;,\&quot;Light\&quot;:\&quot;On\&quot;,\&quot;Filter\&quot;:\&quot;Off\&quot;,\&quot;Clean\&quot;:\&quot;Off\&quot;,\&quot;Beep\&quot;:\&quot;Off\&quot;,\&quot;Sleep\&quot;:-1}&quot;, }, &quot;mid&quot;:{ &quot;16&quot;:&quot;{\&quot;Vendor\&quot;:\&quot;GREE\&quot;,\&quot;Model\&quot;:1,\&quot;Mode\&quot;:\&quot;Dry\&quot;,\&quot;Power\&quot;:\&quot;On\&quot;,\&quot;Celsius\&quot;:\&quot;On\&quot;,\&quot;Temp\&quot;:16,\&quot;FanSpeed\&quot;:\&quot;Medium\&quot;,\&quot;SwingV\&quot;:\&quot;Highest\&quot;,\&quot;SwingH\&quot;:\&quot;Off\&quot;,\&quot;Quiet\&quot;:\&quot;Off\&quot;,\&quot;Turbo\&quot;:\&quot;Off\&quot;,\&quot;Econo\&quot;:\&quot;Off\&quot;,\&quot;Light\&quot;:\&quot;On\&quot;,\&quot;Filter\&quot;:\&quot;Off\&quot;,\&quot;Clean\&quot;:\&quot;Off\&quot;,\&quot;Beep\&quot;:\&quot;Off\&quot;,\&quot;Sleep\&quot;:-1}&quot;, }, &quot;high&quot;:{ &quot;16&quot;:&quot;{\&quot;Vendor\&quot;:\&quot;GREE\&quot;,\&quot;Model\&quot;:1,\&quot;Mode\&quot;:\&quot;Dry\&quot;,\&quot;Power\&quot;:\&quot;On\&quot;,\&quot;Celsius\&quot;:\&quot;On\&quot;,\&quot;Temp\&quot;:16,\&quot;FanSpeed\&quot;:\&quot;Max\&quot;,\&quot;SwingV\&quot;:\&quot;Highest\&quot;,\&quot;SwingH\&quot;:\&quot;Off\&quot;,\&quot;Quiet\&quot;:\&quot;Off\&quot;,\&quot;Turbo\&quot;:\&quot;Off\&quot;,\&quot;Econo\&quot;:\&quot;Off\&quot;,\&quot;Light\&quot;:\&quot;On\&quot;,\&quot;Filter\&quot;:\&quot;Off\&quot;,\&quot;Clean\&quot;:\&quot;Off\&quot;,\&quot;Beep\&quot;:\&quot;Off\&quot;,\&quot;Sleep\&quot;:-1}&quot;, }, &quot;auto&quot;:{ &quot;16&quot;:&quot;{\&quot;Vendor\&quot;:\&quot;GREE\&quot;,\&quot;Model\&quot;:1,\&quot;Mode\&quot;:\&quot;Dry\&quot;,\&quot;Power\&quot;:\&quot;On\&quot;,\&quot;Celsius\&quot;:\&quot;On\&quot;,\&quot;Temp\&quot;:16,\&quot;FanSpeed\&quot;:\&quot;Dry\&quot;,\&quot;SwingV\&quot;:\&quot;Highest\&quot;,\&quot;SwingH\&quot;:\&quot;Off\&quot;,\&quot;Quiet\&quot;:\&quot;Off\&quot;,\&quot;Turbo\&quot;:\&quot;Off\&quot;,\&quot;Econo\&quot;:\&quot;Off\&quot;,\&quot;Light\&quot;:\&quot;On\&quot;,\&quot;Filter\&quot;:\&quot;Off\&quot;,\&quot;Clean\&quot;:\&quot;Off\&quot;,\&quot;Beep\&quot;:\&quot;Off\&quot;,\&quot;Sleep\&quot;:-1}&quot;, } }, &quot;cool&quot;:{ &quot;low&quot;:{ &quot;16&quot;:&quot;{\&quot;Vendor\&quot;:\&quot;GREE\&quot;,\&quot;Model\&quot;:1,\&quot;Mode\&quot;:\&quot;Cool\&quot;,\&quot;Power\&quot;:\&quot;On\&quot;,\&quot;Celsius\&quot;:\&quot;On\&quot;,\&quot;Temp\&quot;:16,\&quot;FanSpeed\&quot;:\&quot;Min\&quot;,\&quot;SwingV\&quot;:\&quot;Highest\&quot;,\&quot;SwingH\&quot;:\&quot;Off\&quot;,\&quot;Quiet\&quot;:\&quot;Off\&quot;,\&quot;Turbo\&quot;:\&quot;Off\&quot;,\&quot;Econo\&quot;:\&quot;Off\&quot;,\&quot;Light\&quot;:\&quot;On\&quot;,\&quot;Filter\&quot;:\&quot;Off\&quot;,\&quot;Clean\&quot;:\&quot;Off\&quot;,\&quot;Beep\&quot;:\&quot;Off\&quot;,\&quot;Sleep\&quot;:-1}&quot;, }, &quot;mid&quot;:{ &quot;16&quot;:&quot;{\&quot;Vendor\&quot;:\&quot;GREE\&quot;,\&quot;Model\&quot;:1,\&quot;Mode\&quot;:\&quot;Cool\&quot;,\&quot;Power\&quot;:\&quot;On\&quot;,\&quot;Celsius\&quot;:\&quot;On\&quot;,\&quot;Temp\&quot;:16,\&quot;FanSpeed\&quot;:\&quot;Medium\&quot;,\&quot;SwingV\&quot;:\&quot;Highest\&quot;,\&quot;SwingH\&quot;:\&quot;Off\&quot;,\&quot;Quiet\&quot;:\&quot;Off\&quot;,\&quot;Turbo\&quot;:\&quot;Off\&quot;,\&quot;Econo\&quot;:\&quot;Off\&quot;,\&quot;Light\&quot;:\&quot;On\&quot;,\&quot;Filter\&quot;:\&quot;Off\&quot;,\&quot;Clean\&quot;:\&quot;Off\&quot;,\&quot;Beep\&quot;:\&quot;Off\&quot;,\&quot;Sleep\&quot;:-1}&quot;, }, &quot;high&quot;:{ &quot;16&quot;:&quot;{\&quot;Vendor\&quot;:\&quot;GREE\&quot;,\&quot;Model\&quot;:1,\&quot;Mode\&quot;:\&quot;Cool\&quot;,\&quot;Power\&quot;:\&quot;On\&quot;,\&quot;Celsius\&quot;:\&quot;On\&quot;,\&quot;Temp\&quot;:16,\&quot;FanSpeed\&quot;:\&quot;Max\&quot;,\&quot;SwingV\&quot;:\&quot;Highest\&quot;,\&quot;SwingH\&quot;:\&quot;Off\&quot;,\&quot;Quiet\&quot;:\&quot;Off\&quot;,\&quot;Turbo\&quot;:\&quot;Off\&quot;,\&quot;Econo\&quot;:\&quot;Off\&quot;,\&quot;Light\&quot;:\&quot;On\&quot;,\&quot;Filter\&quot;:\&quot;Off\&quot;,\&quot;Clean\&quot;:\&quot;Off\&quot;,\&quot;Beep\&quot;:\&quot;Off\&quot;,\&quot;Sleep\&quot;:-1}&quot;, }, &quot;auto&quot;:{ &quot;16&quot;:&quot;{\&quot;Vendor\&quot;:\&quot;GREE\&quot;,\&quot;Model\&quot;:1,\&quot;Mode\&quot;:\&quot;Cool\&quot;,\&quot;Power\&quot;:\&quot;On\&quot;,\&quot;Celsius\&quot;:\&quot;On\&quot;,\&quot;Temp\&quot;:16,\&quot;FanSpeed\&quot;:\&quot;Cool\&quot;,\&quot;SwingV\&quot;:\&quot;Highest\&quot;,\&quot;SwingH\&quot;:\&quot;Off\&quot;,\&quot;Quiet\&quot;:\&quot;Off\&quot;,\&quot;Turbo\&quot;:\&quot;Off\&quot;,\&quot;Econo\&quot;:\&quot;Off\&quot;,\&quot;Light\&quot;:\&quot;On\&quot;,\&quot;Filter\&quot;:\&quot;Off\&quot;,\&quot;Clean\&quot;:\&quot;Off\&quot;,\&quot;Beep\&quot;:\&quot;Off\&quot;,\&quot;Sleep\&quot;:-1}&quot;, } }, &quot;heat&quot;:{ &quot;low&quot;:{ &quot;16&quot;:&quot;{\&quot;Vendor\&quot;:\&quot;GREE\&quot;,\&quot;Model\&quot;:1,\&quot;Mode\&quot;:\&quot;Heat\&quot;,\&quot;Power\&quot;:\&quot;On\&quot;,\&quot;Celsius\&quot;:\&quot;On\&quot;,\&quot;Temp\&quot;:16,\&quot;FanSpeed\&quot;:\&quot;Min\&quot;,\&quot;SwingV\&quot;:\&quot;Highest\&quot;,\&quot;SwingH\&quot;:\&quot;Off\&quot;,\&quot;Quiet\&quot;:\&quot;Off\&quot;,\&quot;Turbo\&quot;:\&quot;Off\&quot;,\&quot;Econo\&quot;:\&quot;Off\&quot;,\&quot;Light\&quot;:\&quot;On\&quot;,\&quot;Filter\&quot;:\&quot;Off\&quot;,\&quot;Clean\&quot;:\&quot;Off\&quot;,\&quot;Beep\&quot;:\&quot;Off\&quot;,\&quot;Sleep\&quot;:-1}&quot;, }, &quot;mid&quot;:{ &quot;16&quot;:&quot;{\&quot;Vendor\&quot;:\&quot;GREE\&quot;,\&quot;Model\&quot;:1,\&quot;Mode\&quot;:\&quot;Heat\&quot;,\&quot;Power\&quot;:\&quot;On\&quot;,\&quot;Celsius\&quot;:\&quot;On\&quot;,\&quot;Temp\&quot;:16,\&quot;FanSpeed\&quot;:\&quot;Medium\&quot;,\&quot;SwingV\&quot;:\&quot;Highest\&quot;,\&quot;SwingH\&quot;:\&quot;Off\&quot;,\&quot;Quiet\&quot;:\&quot;Off\&quot;,\&quot;Turbo\&quot;:\&quot;Off\&quot;,\&quot;Econo\&quot;:\&quot;Off\&quot;,\&quot;Light\&quot;:\&quot;On\&quot;,\&quot;Filter\&quot;:\&quot;Off\&quot;,\&quot;Clean\&quot;:\&quot;Off\&quot;,\&quot;Beep\&quot;:\&quot;Off\&quot;,\&quot;Sleep\&quot;:-1}&quot;, }, &quot;high&quot;:{ &quot;16&quot;:&quot;{\&quot;Vendor\&quot;:\&quot;GREE\&quot;,\&quot;Model\&quot;:1,\&quot;Mode\&quot;:\&quot;Heat\&quot;,\&quot;Power\&quot;:\&quot;On\&quot;,\&quot;Celsius\&quot;:\&quot;On\&quot;,\&quot;Temp\&quot;:16,\&quot;FanSpeed\&quot;:\&quot;Max\&quot;,\&quot;SwingV\&quot;:\&quot;Highest\&quot;,\&quot;SwingH\&quot;:\&quot;Off\&quot;,\&quot;Quiet\&quot;:\&quot;Off\&quot;,\&quot;Turbo\&quot;:\&quot;Off\&quot;,\&quot;Econo\&quot;:\&quot;Off\&quot;,\&quot;Light\&quot;:\&quot;On\&quot;,\&quot;Filter\&quot;:\&quot;Off\&quot;,\&quot;Clean\&quot;:\&quot;Off\&quot;,\&quot;Beep\&quot;:\&quot;Off\&quot;,\&quot;Sleep\&quot;:-1}&quot;, }, &quot;auto&quot;:{ &quot;16&quot;:&quot;{\&quot;Vendor\&quot;:\&quot;GREE\&quot;,\&quot;Model\&quot;:1,\&quot;Mode\&quot;:\&quot;Heat\&quot;,\&quot;Power\&quot;:\&quot;On\&quot;,\&quot;Celsius\&quot;:\&quot;On\&quot;,\&quot;Temp\&quot;:16,\&quot;FanSpeed\&quot;:\&quot;Heat\&quot;,\&quot;SwingV\&quot;:\&quot;Highest\&quot;,\&quot;SwingH\&quot;:\&quot;Off\&quot;,\&quot;Quiet\&quot;:\&quot;Off\&quot;,\&quot;Turbo\&quot;:\&quot;Off\&quot;,\&quot;Econo\&quot;:\&quot;Off\&quot;,\&quot;Light\&quot;:\&quot;On\&quot;,\&quot;Filter\&quot;:\&quot;Off\&quot;,\&quot;Clean\&quot;:\&quot;Off\&quot;,\&quot;Beep\&quot;:\&quot;Off\&quot;,\&quot;Sleep\&quot;:-1}&quot;, } } } } </code></pre> <p>In any case you finally will have your xxxx.json file uploaded on any of those folders and device_code property configured with same number.</p> <p><strong>controller_data</strong></p> <p>Here you just need to specify the MQTT topic between some other parameters. MQTT topic is present on your tasmotized device configuration</p> <p><a href="https://i.stack.imgur.com/ZxNcu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZxNcu.png" alt="enter image description here" /></a></p> <p><code>cmnd/&lt;your_mqtt_topic_here&gt;/IRhvac</code> for air conditioner</p> <p><code>cmnd/&lt;your_mqtt_topic_here&gt;/IRsend</code> for tv</p> <p><strong>Example of configuration.yaml configuration</strong></p> <pre class="lang-yaml prettyprint-override"><code> smartir: check_updates: false media_player: - platform: smartir name: Bedroom TV unique_id: bedroom_tv device_code: 1070 controller_data: cmnd/tasmota_smart_ir_bedroom/IRsend #power_sensor: media_player.chromecast_cuarto climate: - platform: smartir name: Bedroom AC unique_id: bedroom_ac device_code: 1180 controller_data: cmnd/tasmota_smart_ir_bedroom/IRhvac temperature_sensor: sensor.temp_hum_cuarto_temperature humidity_sensor: sensor.temp_hum_cuarto_humidity </code></pre> <p>Feel free to let me know if something isn't clear!</p>
|home-assistant|tasmota|
How to configure Home Assistant to get working SmartIR integration with Tasmota IR over MQTT?
5318
<p>Could someone help me to configure <a href="https://github.com/smartHomeHub/SmartIR" rel="nofollow noreferrer">SmartIR, available on github</a> to use with Tasmota over MQTT?</p> <p>I have installed the addon with HACS and have generic IR flashed with TasmotaIR (when aiming with remote control to the IR box I can see it's receiving commands on the console).</p> <p>I'm stuck trying to get working with Gree air conditioner and Samsung TV</p> <p>This is my configuration.yaml</p> <pre class="lang-yaml prettyprint-override"><code>smartir: media_player: - platform: smartir name: Bedroom TV unique_id: bedroom_tv device_code: 1060 controller_data: cmnd/tasmota_79A072/IRsend #power_sensor: binary_sensor.tv_power climate: - platform: smartir name: Bedroom AC unique_id: bedroom_ac device_code: 1180 controller_data: cmnd/tasmota_79A072/IRsend temperature_sensor: sensor.temp_hum_cuarto_temperature humidity_sensor: sensor.temp_hum_cuarto_humidity </code></pre> <p>When pushing any buttons on generated cards nothing happens (on the Tasmota console, nothing is showing).</p>
2020-11-08T18:12:41.447
<p>Yes, the whole point of using client side certificates is to enable you to reliably uniquely identify each client.</p> <p>AWS will provide APIs to provision each device with it's own cert/key.</p> <p>The other reason is that it means that you can easily ban a single device if the certificate is compromised, if every device reuses the same certificate then you have to recall all the devices and update them if somebody gets hold of the key/cert pair.</p>
|networking|security|aws-iot|aws|
Do I need different certificates for every thing?
5349
<p>I'm learning AWS and I created a new <code>thing</code> with the required certificates to access it via MQTT:</p> <ul> <li>root-CA.crt</li> <li>.private.key</li> <li>.cert.pem</li> </ul> <p>If I'm not wrong the <code>root-CA.crt</code> file will be the same for all the <code>things</code> because it's used to authenticate the server.</p> <p>What I don't understand if I need to create a <strong>different</strong> set of certificates (private.key and cert.pem) for <strong>every</strong> device I will build.</p>
2020-11-11T15:24:13.003
<p>The <code>mosquitto</code> command is purely for starting an instance of the broker, running it again will not get you any information about an already running instance.</p> <p>The default config installed normally pushes the logs to a file that is likely to be in <code>/var/log/mosquitto</code> if not it logs to stdout in the terminal you started it.</p> <p>If you want to monitor messages being published then you need to use the <code>mosquitto_sub</code> command to act as a MQTT client. e.g.</p> <pre><code>mosquitto_sub -v -t '#' </code></pre> <p>This command will connect to a broker running on the same machine and subscribe to the wildcard topic of <code>#</code> (which gets everything).</p> <p>You mentioned that you changed the port so you will need to add <code>-p [portnumber]</code> and if you need to add a username/password it's <code>-u [username] -P [password]</code></p>
|mqtt|
How to login to an existing mosquitto instance to review activities?
5357
<p>I modified my <code>/etc/mosquitto/mosquitto.conf</code> to start on a different port and also require username password authentication. I then started my service like so:</p> <pre><code> /usr/local/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf </code></pre> <p>I confirmed that all my devices and websites are able to connect and use this service in the way I expect, so everything is perfect.</p> <p>I want to SSH into my server and enter the command line interface to visually monitor some activities . So I typed this command into bash <code>mosquitto</code>. But I get the following output:</p> <pre><code>605108095: mosquitto version 1.4.10 (build date 2020-06-13 20:47:29+0000) starting 1605108095: Using default config. 1605108095: Opening ipv4 listen socket on port 1883. 1605108095: Opening ipv6 listen socket on port 1883. </code></pre> <p>The message says I've logged into an instance of mosquitto that is running on port 1883. This NOT the instance I want to be monitoring. I want to monitor the instance that was initialized by <code>/usr/local/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf</code>. How can I do that?</p>
2020-11-18T10:45:33.370
<p>The Sparkplug working group from Eclipse foundation is trying to create a standard for MQTT topics and payload formating. The specification is available <a href="https://www.eclipse.org/tahu/spec/Sparkplug%20Topic%20Namespace%20and%20State%20ManagementV2.2-with%20appendix%20B%20format%20-%20Eclipse.pdf" rel="noreferrer">here</a>. You can also find more information on the <a href="https://sparkplug.eclipse.org/about/faq/" rel="noreferrer">FAQ</a>.</p>
|protocols|standards|
MQTT JSON format for process automation industry?
5363
<p>W.r.t. formatting the payload content of MQTT messages one usually sticks to standards. In case the AWS IoT platform is used the format of the payload content is not pre-defined. There's just a <a href="https://d1.awsstatic.com/whitepapers/Designing_MQTT_Topics_for_AWS_IoT_Core.pdf" rel="noreferrer">best practice design guide</a>. However usually one sticks to standards w.r.t. payload content format like <a href="https://en.wikipedia.org/wiki/SensorML" rel="noreferrer">SensorML</a> which is used to add meta data for distributed sensors of solar power plants for example. Are there JSON format schemas/standards for the process automation domain as well?</p>