The AM Forum
March 28, 2024, 04:39:49 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Calendar Links Staff List Gallery Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: iOt Implementation ideas  (Read 2544 times)
0 Members and 1 Guest are viewing this topic.
WA2SQQ
Contributing
Member
*
Offline Offline

Posts: 1090


« on: July 31, 2018, 02:25:11 PM »

I apologize for being a bit off topic, but I could not think of a better place to tap into the minds of technically oriented people.

I’m writing an article on iOt devices. iOt is short for “Internet of Things”, the ever-growing network of physical products that feature an IP connection to the Internet, whether for remote control or problem diagnosis notifications. Pretty much everyone is familiar with WiFi connected thermostats, WiFi security cameras and most recently WiFi connected appliances such as the new Kenmore refrigerators. Thinking “outside the box” I’m looking for examples of non-conventional ways to implement iOt technology. Just as an example, imagine a device than can monitor your garden’s soil moisture and water the plants while you are away.
Logged
w8khk
Member

Offline Offline

Posts: 1200


This ham got his ticket the old fashioned way.


WWW
« Reply #1 on: August 01, 2018, 12:52:14 AM »

I use some ESP-01, ESP-12, Amica NodeMCU, and Wemos Pro Mini Wifi modules compatible with the Arduino IDE.  Various applications are remotely selecting heat and A/C temps when returning from out of town, turning on the water and water heater, as I leave them off when away to avoid flood disasters should a pipe or washing machine hose rupture unexpectedly.

Disclaimer:  I have been retired over six years.  I never thought I would need C or C++ code after retiring from HP.  I was WRONG.  It is all coming back to me now.  It is more fun as a hobby than it was as a career!

A single Wemos device with a relay module and small 5 volt switching power supply sits between the receptacle and the garage door opener plug, thus disabling the whole shebang until I am back in the area.  These are homed to an access point and router that is not connected to the internet, thus I am able to access these devices from the driveway with my cellphone.  One thing that makes it easier to manage is that each device paints a picture of the "buttons" for all the separate switching devices, such that from one IP address and web page I can access all the individual devices.  Makes it so simple to use.  (No magic here, I embedded the IP Address of each relay switching module into the web page.  So pressing any button explicitly sends the command to the appropriate device.  Much simpler than having to remember or bookmark the address of each individual device.  I realize the same thing can be accomplished by having a central WiFi processor act as an agent for all the subordinates, but we started with one, it grew to two, and so on.....)

I have a friend with a lake house on Smith Mountain Lake in Virginia.  We are putting WiFi switches on all the external lighting, as well as the internal hall and kitchen.  That way when he arrives late at night, he can turn on any light he desires from his cellphone, no need to walk to the house in the dark.  Again, no internet connection needed, just the wifi modules.  A discarded WiFi router can meld it all together if using multiple switch modules.

Another project in progress is a monitor for the cable modem, periodically verifying connectivity to the outside world.  When connectivity is lost, it checks the local access point and switch connectivity.  If the loss is external, it attempts to recover by rebooting the cable modem and testing again for connectivity.  It won't fix an external wide-range problem, but it eliminates the need to manually reset the modem.  It also is able to monitor the power, and report when the outage occurs and when it is restored, via email.  It is also possible to email and generate a text message to the end user, for example, an email to 404-123-4567@tmomail.net will send a multimedia text message (for a T-Mobile customer) to that number.  (For all this to work, it is necessary that the core network infrastructure, including the cable modem, DSL, or other Internet interface be on battery backup, obviously.)  I have yet to implement monitoring of the temperature of the refrigerator and freezer, but that is on the bucket list.  

With these very INEXPENSIVE WiFi modules and relays, you are only limited by your imagination.  With just one WiFi module and a resistor and an LED, you can use your windows computer with a USB cable and FREE Arduino IDE download to get started learning the code.  The LED can simulate a relay.  You can start without the WiFi, and just get an Arduino Uno, Nano, or Mega module.  It is powered from the USB cable connected to your computer.  After you download your test code, you can even monitor progress of your program using "serial monitor", which is like a telnet utility in the IDE.  Thus you have keyboard and display to interact with and even trace the progress of your code.  What could be simpler?  

Judicious shopping will get the WiFi processor for less than four dollars, the relay module and power supply each for less than two dollars.  SO for a total of less than ten dollars you have a complete managed relay node.  You may also use relay modules that have two, four, or eight relays for co-located loads.  

By the way, DLINK routers often include, free of charge, an agent that enables you to have a node name outside the network that knows you local IP address, such that it is not necessary to pay for a fixed IP or other service for outside access to all your little widgets around the house.  Of course, you certainly want to make them secure with passwords or other techniques. One good thing is that the arduino modules will not run scripts by default, so they are for the most part secure from the standpoint of not providing hackers devices to compromise your internal home network.

If you are just starting, look up Rui Santos, who writes a blog with tutorials on simple IOT projects, known as "Random Nerd Tutorials". A VERY Knowledgable guy, and a very easy way to get your feet wet without the alligators biting.
Logged

Rick / W8KHK  ex WB2HKX, WB4GNR
"Both politicians and diapers need to be changed often and for the same reason.”   Ronald Reagan

My smart?phone voicetext screws up homophones, but they are crystal clear from my 75 meter plate-modulated AM transmitter
w8khk
Member

Offline Offline

Posts: 1200


This ham got his ticket the old fashioned way.


WWW
« Reply #2 on: August 01, 2018, 01:09:11 AM »

One other project I should have mentioned, as the EasyEDA gerber files for a new printed circuit board are almost ready to send to the fab facility.

I have a friend since high school, (over 50 years) who has a Bluebird Wanderlodge motorhome, the size of a Greyhound bus.  It has banks of lead-acid batteries for starting and for off-shore inverter power.  These are rather expensive to replace, and therefore monitoring of their status is of paramount importance.  There are also two huge alternators running on the Detroit Diesel power plant which also should be monitored.  

I built up a monitoring device with several ADS1115 multiplexed ADC modules running on the I2C bus.  With voltage dividers and some calculation code, it is possible to continuously monitor the voltage of each alternator and battery bank.  Also it is easy to monitor the current in and out by sampling the voltage across the ammeter shunt.  The problem is getting the information from the back of the motorhome up to the driver's seat.  Running a cable 50 feet through the non-existent channels would be a nightmare!  WiFi to the rescue.

Ever wonder why anyone would ever want a motor home?  Well, if you are on house arrest with an ankle bracelet, how else could you make a Saturday night beer run?  But I digress.  Please disregard this failed attempt to hijack an otherwise intelligent thread!

Using JSON (Java Script Object Notation) to encapsulate the data, I created a web server at the back of the bus, and a web client in the front.  Every second, the client requests the status of all the ADC modules, and the server sends a packet over the WiFi to the client.  No need for internet, or even a router or access point.  The WiFi modules can function either as a client or an access point (host).  They can have their own SSID and password.  

We are currently in the process of replacing a 4x20 character blue LCD display with a seven inch Nextion display module for the driver location.

The Nextion Display makes it VERY EASY to provide a fancy touch-screen user interface with multiple pages, with very little code on the arduino wifi module.  Nextion provides an IDE to create the graphics and interface.  This program code is then saved to a MicroSD memory module similar to that used in a digital camera or cellphone.  Then the memory module is inserted into the Nextion display module and it is powered up.  The Nextion reads the module and updates all the internal code.  Then the MicroSD memory module is removed.

After the software is installed in the Nextion display, the Arduino or WiFi module communicates over a serial link to the module.  It can receive input commands from the touch screen, and update data on the display.  You can customize the display with your own graphics, using BMP, JPG, etc to draw meter faces, bar graphs, etc.  Then the numeric data sent from the WiFi device moves the meter needle or sets the bar graph position.  Dirt simple, with lots of documentation and sample code on the web.  We are making the graphics from photographs of the existing gauges in the WanderLodge, melding the old analog with the new digital.  

In addition to displaying the current status, we are adding code to capture historical data, low and high voltage and current excursions, and duration of the event.  Then we are updating the code to display a green background on the gauge when all is well, marginal voltage will be yellow, and severe errors will provide a red backlight on the simulated meter.
Logged

Rick / W8KHK  ex WB2HKX, WB4GNR
"Both politicians and diapers need to be changed often and for the same reason.”   Ronald Reagan

My smart?phone voicetext screws up homophones, but they are crystal clear from my 75 meter plate-modulated AM transmitter
WA2SQQ
Contributing
Member
*
Offline Offline

Posts: 1090


« Reply #3 on: August 01, 2018, 07:52:12 AM »

Some great ideas - thanks. As I see it, we're becoming too connected. In the event of an Internet outage, we will be deactivated! But it is making life a lot easier.
Logged
steve_qix
Contributing
Member
*
Offline Offline

Posts: 2599


Bap!


WWW
« Reply #4 on: August 02, 2018, 12:14:47 AM »

IoT is very cool stuff !

I've been working with IoT for several years at this point - mostly with connected speakers controlled by Amazon Echo (aka Alexa) devices.

On the Alexa side, it is *very* easy to get a skill up and running (A skill is what it is called when you enable Alexa to do some custom function).

The IoT side is a bit more involved, but still not bad.  Amazon has a very good IoT implementation.  They use a device "shadow" that a skill will write into (and the device can also write to the shadow to return status, etc. back to the skill).  The shadow is nice, because if the device is off-line (typical for many IoT devices), the shadow will retain the desired state of the device (typically commands or settings).  When the device comes on line, it will connect to the IoT back end, subscribe to the shadow and receive the desired state and carry out the desired task.

Since it is not possible to "push" data from the cloud to a device, in IoT, the device institutes a persistent connection to the IoT cloud, typically (often using the MQTT protocol).  With the persistent connection, it is now possible to send commands, at random, to the device.

Anyway, it's all extremely interesting.  The back-end infrastructure that can handle hundreds of millions of devices all connected to IoT, and receiving and sending data/commands is quite impressive.

That's just one of thousands (millions) of ways IoT enables connected devices to be controlled from anywhere in the world via Alexa or other control interfaces.  It's just plain cool  Cool
Logged

High Power, Broadcast Audio and Low Cost?  Check out the class E web site at: http://www.classeradio.org
WA2SQQ
Contributing
Member
*
Offline Offline

Posts: 1090


« Reply #5 on: August 02, 2018, 01:10:55 PM »

Alexa and Google's version are definitely infiltrating homes at an astonishing rate. I'd still like to know what Amazon and Google are doing with all the audio they are collecting. There was already one case where the sound clips were used as a legal defense in a murder case. I just saw where "23 and Me" is now selling the DNA info to drug companies - wanna bet that insurance companies aren't getting it and may use it to charge higher premiums to those who have DNA evidence of serious medical conditions?
Logged
KD6VXI
Contributing
Member
*
Offline Offline

Posts: 2648


Making AM GREAT Again!


« Reply #6 on: August 03, 2018, 12:32:55 AM »

Anyone who installs an Alexa or other device that gives full monitoring to an outside party of everything that goes on in their house is a freaking idiot.

I'll say it again.  An IDIOT.  Dumbass is closer to my actual belief.

Just for making things 'easier'

The question isn't what they are doing with the info, it's more like, what won't they, or who won't they, find to sell said into to.

Sure, don't like trump.  Wanna beg you get targeted ads from the DNC?  Or vice versa?

I've already experienced walking into my sister's home, having a conversation, and later that day experienced targeted advertising directly to my telephone.  She has a Google home mini.  I have Google home installed on my android phone.  I never synced to her devices, but my phone being in proximity to her home mini (when I connected to her wifi, my phone recognized her Google product) was enough to link them.  I still (weeks later) get ads targeted to her.  Haven't been their in a couple weeks.  After calling her and asking, 'You and Pat are looking at timeshares in Vegas, eh'....  That was enough for her to throw her Google home mini in morro Bay.

Google makes their money selling your personal information.  That you agree to freely give up and out.

Amazon and the rest will do the same.


HOWEVER, the IoT being discussed here and Alexa or Home Mini are two different things in my eyes.

--Shane
KD6VXI
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

AMfone - Dedicated to Amplitude Modulation on the Amateur Radio Bands
 AMfone © 2001-2015
Powered by SMF 1.1.21 | SMF © 2015, Simple Machines
Page created in 0.042 seconds with 19 queries.