Press "Enter" to skip to content

Posts tagged as “IoT”

I have question about M2M sim cards

Long story short, I was abroad in different countries i have sim cards from different places. I came home and went to an office for paper work they found a strange sim card and called me.

I went back and checked it, it was written m2m, I understand the concept of machine to machine for IOT applications. And I don't recall having sim card like this.

My question is, can you buy what is suppose to be regular sim card and it turns out to be M2M. Can it have regular usage in our daily life, like maybe it dropped from router or sth. Any security risks?

I don't think it's mine but the place I was in and type of people visiting not related to some common applications. If you have more info. plz share.

submitted by /u/Heisenberg515
[link] [comments]

ThingsMobile Anyone?

I want to deploy a few Netgear Cellular Modems and found ThingsMobile online and purchased SIM cards and service through them. Their tech support in the USA is limited to emailing back and forth with Italy. Anyone here have experience with this provide...

Teltonika Bluetooth Puck sensors and Platform costs

Need help with two questions below Would like to to know who is using teltonika kit out in the real world and what distances they can achieve with BLE. They claim 500m but bring in concrete walls , cold rooms etc what has been the real experience Try...

Help me with my project

i have made an home automation project with use of sinric pro and esp8266 board

code is at the end

when my project is online working perfectly fine sometimes it automatically goes offline but it is still connected to internet and rebooting doesnt work

help would be appriciated


#define DEBUG_ESP_PORT Serial


#define NDEBUG


#include <Arduino.h>

#include <ESP8266WiFi.h>

#include "SinricPro.h"

#include "SinricProSwitch.h"

#include <map>

#define WIFI_SSID "JioFiber799_2"

#define WIFI_PASS "11223344"

#define APP_KEY "cant tell u guys" // Should look like "de0bxxxx-1x3x-4x3x-ax2x-5dabxxxxxxxx"

#define APP_SECRET "cant tell this to you guys either" // Should look like "5f36xxxx-x3x7-4x3x-xexe-e86724a9xxxx-4c4axxxx-3x3x-x5xe-x9x3-333d65xxxxxx"

//Enter the device IDs here

#define device_ID_1 "nope"

#define device_ID_2 "nope"

#define device_ID_3 "nope"

#define device_ID_4 "6nope"

// define the GPIO connected with Relays and switches

#define RelayPin1 5 //D1

#define RelayPin2 4 //D2

#define RelayPin3 14 //D5

#define RelayPin4 12 //D6

#define SwitchPin1 10 //SD3

#define SwitchPin2 0 //D3

#define SwitchPin3 13 //D7

#define SwitchPin4 3 //RX

#define wifiLed 16 //D0

// comment the following line if you use a toggle switches instead of tactile buttons


#define BAUD_RATE 9600

#define DEBOUNCE_TIME 250

typedef struct { // struct for the std::map below

int relayPIN;

int flipSwitchPIN;

} deviceConfig_t;

// this is the main configuration

// please put in your deviceId, the PIN for Relay and PIN for flipSwitch

// this can be up to N devices...depending on how much pin's available on your device ;)

// right now we have 4 devicesIds going to 4 relays and 4 flip switches to switch the relay manually

std::map<String, deviceConfig\_t> devices = {

//{deviceId, {relayPIN, flipSwitchPIN}}

{device_ID_1, { RelayPin1, SwitchPin1 }},

{device_ID_2, { RelayPin2, SwitchPin2 }},

{device_ID_3, { RelayPin3, SwitchPin3 }},

{device_ID_4, { RelayPin4, SwitchPin4 }}


typedef struct { // struct for the std::map below

String deviceId;

bool lastFlipSwitchState;

unsigned long lastFlipSwitchChange;

} flipSwitchConfig_t;

std::map<int, flipSwitchConfig\_t> flipSwitches; // this map is used to map flipSwitch PINs to deviceId and handling debounce and last flipSwitch state checks

// it will be setup in "setupFlipSwitches" function, using informations from devices map

void setupRelays() {

for (auto &device : devices) { // for each device (relay, flipSwitch combination)

int relayPIN = device.second.relayPIN; // get the relay pin

pinMode(relayPIN, OUTPUT); // set relay pin to OUTPUT

digitalWrite(relayPIN, HIGH);



void setupFlipSwitches() {

for (auto &device : devices) { // for each device (relay / flipSwitch combination)

flipSwitchConfig_t flipSwitchConfig; // create a new flipSwitch configuration

flipSwitchConfig.deviceId = device.first; // set the deviceId

flipSwitchConfig.lastFlipSwitchChange = 0; // set debounce time

flipSwitchConfig.lastFlipSwitchState = true; // set lastFlipSwitchState to false (LOW)--

int flipSwitchPIN = device.second.flipSwitchPIN; // get the flipSwitchPIN

flipSwitches[flipSwitchPIN] = flipSwitchConfig; // save the flipSwitch config to flipSwitches map

pinMode(flipSwitchPIN, INPUT_PULLUP); // set the flipSwitch pin to INPUT



bool onPowerState(String deviceId, bool &state)


Serial.printf("%s: %s\r\n", deviceId.c_str(), state ? "on" : "off");

int relayPIN = devices[deviceId].relayPIN; // get the relay pin for corresponding device

digitalWrite(relayPIN, !state); // set the new relay state

return true;


void handleFlipSwitches() {

unsigned long actualMillis = millis(); // get actual millis

for (auto &flipSwitch : flipSwitches) { // for each flipSwitch in flipSwitches map

unsigned long lastFlipSwitchChange = flipSwitch.second.lastFlipSwitchChange; // get the timestamp when flipSwitch was pressed last time (used to debounce / limit events)

if (actualMillis - lastFlipSwitchChange > DEBOUNCE_TIME) { // if time is > debounce time...

int flipSwitchPIN = flipSwitch.first; // get the flipSwitch pin from configuration

bool lastFlipSwitchState = flipSwitch.second.lastFlipSwitchState; // get the lastFlipSwitchState

bool flipSwitchState = digitalRead(flipSwitchPIN); // read the current flipSwitch state

if (flipSwitchState != lastFlipSwitchState) { // if the flipSwitchState has changed...


if (flipSwitchState) { // if the tactile button is pressed


flipSwitch.second.lastFlipSwitchChange = actualMillis; // update lastFlipSwitchChange time

String deviceId = flipSwitch.second.deviceId; // get the deviceId from config

int relayPIN = devices[deviceId].relayPIN; // get the relayPIN from config

bool newRelayState = !digitalRead(relayPIN); // set the new relay State

digitalWrite(relayPIN, newRelayState); // set the trelay to the new state

SinricProSwitch &mySwitch = SinricPro[deviceId]; // get Switch device from SinricPro

mySwitch.sendPowerStateEvent(!newRelayState); // send the event




flipSwitch.second.lastFlipSwitchState = flipSwitchState; // update lastFlipSwitchState





void setupWiFi()


Serial.printf("\r\n[Wifi]: Connecting");


while (WiFi.status() != WL_CONNECTED)





digitalWrite(wifiLed, LOW);

Serial.printf("connected!\r\n[WiFi]: IP-Address is %s\r\n", WiFi.localIP().toString().c_str());


void setupSinricPro()


for (auto &device : devices)


const char *deviceId = device.first.c_str();

SinricProSwitch &mySwitch = SinricPro[deviceId];



SinricPro.begin(APP_KEY, APP_SECRET);



void setup()



pinMode(wifiLed, OUTPUT);

digitalWrite(wifiLed, HIGH);






void loop()





submitted by /u/Real-Penalty9471
[link] [comments]

Quick survey about smart speakers!!

Hello everyone!

Anyone who has any kind of smart speaker (from Amazon, Google, etc.) please consider completing a quick survey about your experience with it by the following link!

It won't take more than 5 minutes (no open-ended questions) but would help me immensely with my research paper. Thank you so much in advance!

submitted by /u/makeoutheell
[link] [comments]

Help me find electronics store

Hi all, been a software year for 4 years and I am becoming more and more fascinated with IoT devices. However, given me not being a hardware person, where do I buy all the stuff? Like sensors, or mechanical pieces that can exert forces (say to open a c...