Code Monkey home page Code Monkey logo

googleiothub's Introduction

GoogleIoTHub

An Azure IoT Hub D2C Console app that can be activated by TRIGGERcmd to get telemetry from an Azure IoT Hub, forming a speakable string from it and then forwarding it to a Google Nest for enunciation.

This is a work in progress:

  • D2C Console app GoogleIoTHubD2C that writes last telemetry send to Azure IoT Hub to temp file.
    • Optional arg: true/false(default true) if true runs app for just the next received telemetry only, false viz.
    • 2Do: Each time app runs it reads all telemetry sent in last 24hrs. Better to have a service locally that serves up last sent msg only. ... later
  • Device Simulator Console App simulated-device
    • Optional args: period(default 10sec) deviceconnectionstring
      • deviceconnectionstring: defaults to environment value
      • Can Use dots to use defaults, as place holders
  • Extracted single generic telemetry send to class library SendTelemetry2Hub
    • Added simulated-device-local console app that uses it locally.:
      await DeviceSendTelemetryToHub.SendDeviceToCloudMessageAsync(telemetryData, deviceconnectionString);
      • deviceconnectionstring is the Device Connection String for the IOY Hub
      • telemetryData is of dynamic type eg:
    double currentTemperature = minTemperature + rand.NextDouble() * 15;
    double currentHumidity = minHumidity + rand.NextDouble() * 20;

    // Create JSON message
    var telemetryData = new
    {
        temperature = currentTemperature,
        humidity = currentHumidity
    };

  • Published lib to Nuget as SendTelemetery2Hub
    • Added simulated-device-nuget console app that uses Nuget package.
      • Optional args: period(default 10sec) deviceconnectionstring
        • deviceconnectionstring: defaults to environment value
        • Can Use dots to use defaults, as place holders
  • bme280-device-local Console app that reads telemetry from a BME280 and sends that telemetry.
  • dht22-1-wire-device-local Console app that reads telemetry from a DHT22 1-Wire and sends that telemetry
    • Optional args: period(default 10sec) deviceconnectionstring dht22Gpio(default 26)
      • deviceconnectionstring: defaults to environment value
      • Can Use dots to use defaults, as place holders
    • Typical circuit
      • Nb: In that diagram to pinouts are Pwr-Signal-nc-Gnd Pwr = 5V
      • On my (red) device they are Gnd-Pwr-Signal I use Pwr = 3.3V
  • bme280 is now option 31 for djaus2/DNETCoreGPIO
    • Parameters there are: 31 . <Period> <DeviceConnectionString>
    • The second parameter is a dot as a place holder as bme280 doesn't use GPIO. It uses I2C.
  • Integrations with Triggercmd
    • Coming

googleiothub's People

Contributors

djaus2 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.