[Discussion] Telemetry for IoT devices

Can all IoT devices (made from for example RPi, audrino) can make RESTful calls out of box?

1 Like

I’m looking into MQTT for use from Wemos D1 Mini (ESP8266) to RPi.

1 Like

The choice of protocol depends mostly on whether the IoT devices in question are energy-constrained (like an Arduino running on battery power) or not (like a Raspberry Pi). What sort of devices do you have in mind? Also how much data do they need to send, and how often?

CoAP over UDP can be RESTful and is a very popular choice for constrained IoT devices. Even an Arduino can probably fit enough of an IP stack to use it.

However if you’re using big stuff like RPi, you probably may as well just use HTTP and TCP and Python and whatever else you’d normally use. In terms of networking capabilities versus resource constraints, RPi is much closer to a PC than it is to a constrained IoT device.

1 Like

I’ve been doing some stuff with MicroPython on ESP8266 talking to Python backend over MQTT… it’s not too bad at all although micropython has a lot of rough edges.

1 Like

2nd MQTT protocol for IOT. Also be sure to consider if you are planning on encrypting having a hardware encryption module will take load off your logic board.

1 Like

IoT devices to talk over internet/intranet

Depends on the application. Overall IoT is just third gen “SCADA” where first gen is some like modbus, second gen was SNMP/netconf and now IoT is third gen with either rest+websockets and/or mqtt pubsub with a rest client in front of your central pubsub backbone.

At the end of the day it really all depends on what your attempting to do? If one’s wanting to “learn iot” then take a look at setting up openhab, mosquitto, and configure a few esp8266 to flip on relay switches via gpio when a true/false flag is sent to the mqtt subject they’re subscribed to.

If one is attempting to go beyond the “hello world” style of things like above and have star trek tech then that’s going to take a bit more steps but looks like the following architecture:

Metric monitoring and Heartbeat:

[ InfluxDB cluster ] <-- [via telegraf+mqtt] <-- [mqtt broker] <— sensor device

Dashboarding for graphs and alerts

[ grafana ] <-- [ influxdb cluster ]

Dashboarding for pushbuttons

[ grafana ] -> add a text panel -> insert markdown button to rest api backend
-> onClick -> restapi backend -> publish “on/off” via mqtt -> mqtt broker

AI automation

[ alexa skill ] -> action -> restapi backend -> publish “on/off” via mqtt -> mqtt broker

The hardware end always ends up being something with wifi that can do mdns and mqtt and talks either i2c or gpio to sensors and relays.

A few Links to bootstrap

Also I do have an entire training series on this very topic planned out just need some extra hands to help put it together.

2 Likes

I think its a great idea and I look forward to a serious series on this subject. I’m moving toward having an intro to MQTT class. It will be somewhat of a parallel to my other classes where I invite total beginners in electronics and programming to come to a class with all parts except laptops furnished. We briefly discuss a few program segments and electronic sensors, build up simple circuits and run programs. I encourage that by googling and taking all related DMS classes, they can have lots of fun and maybe do something practical with this hobby. The reaction of those who did not understand a breadboard but can now build a circuit and have it react to an MCU is rewarding. My classes clearly fit your “hello world” category and will hopefully bring in those who will want to go further with your series.

2 Likes

What’s the name of your class?

1 Like

This one is already full. Watch for similar on Events Calendar
https://calendar.dallasmakerspace.org/events/view/5210

1 Like

What protocol does blynk use to communicate between Arduino and its Servers?

1 Like

Not familiar w/ Wemos D1 or blynk. Answer may be here:
http://docs.blynk.cc/

Sounds like a @bpamplin question .

1 Like

HTTP - https://github.com/blynkkk/blynk-server

1 Like

Blynk HTTP/S RESTful API allows to easily read and write values to/from Pins in Blynk apps and Hardware. Http API description could be found here.

So does this mean that the IoT device makes a REST call to the Blynk server??

2 Likes

@artg_dms linked to my Arduino: Blynk into the Internet of Things class. The emphasis of my class is to show even total beginners that it is feasible to monitor and control an MCU from a phone or tablet. I was a programmer a few decades back but but definitely not a software engineer.

I look forward to meeting @denzuko at some point. He seems to be the DMS Mr. Protocol!

This class has been popular and I’ll probably submit the next class in a couple of weeks.

3 Likes

I’m interested in the topic of discussion.

Just curious though - why is this under vintage computing ? There’s nothing vintage about this.

1 Like

I’m interested in the topic of discussion.

What has you interested with IoT and Telemetry?

I went to an Industrial IOT meetup last night if anyone is interested in the slides

2 Likes

I tinker with home automation. Currently on my list is a MQTT broker to use with a Samsung SmartThings hub. I also have started exploring the EPS8622s and the Sonoff devices based upon them.

None of which is AT ALL vintage.

EPS8266s are really good choice. Lately I’ve been playing around with the TP-Link My Kasa devices with interesting results.

Its my hope to run a few agents on the VCC community grid and integrate the esp8266-12 into my fpv drones for sensors and secondary control systems.

@bpamplin Brady Pamplin - I have signed up but haven’t got any email confirmation. Am I in or out?

1 Like