Git Product home page Git Product logo

iotdoorcontroller's Introduction

IoTDoorController

A collection of software used to utilize IoT devices to control 433MHz based door control systems.

Getting Started

ToDo: Add a Intoduction to project and explaint setup process.

Software in this Repository

  • Device Client
    • The Software running on the Edge device which will send the 433 MHz signals to your doors.
  • IoT Central Trigger Function
    • The Function used to receive signals from the end devices and forwarding them securely to Azure IoT Central

Included Components

  • Microsoft Azure - As main Cloud Environment
    • Azure Functions - Main Entrypoint for REST Clients and Connector to Azure IoT Central
      • Azure managed Identities - To connect Azure Functions and Azure IoT Central
    • Azure IoT Central - IoT AllIn One suite for Communication with the IoT End Devices
  • RaspberryPi - As Test Hardware
    • .NET 6 as the current LTS version as Client App Framework

Prerequisites

You need the following prerequisites to operate the doorcontroller:

  • A Raspberry Pi system which can run the latest Version of Raspberry Pi OS 11
  • An Azure Subscription to host the Azure Functions in an Azure Function App

Installing

Azure Functions

The Azure Function can be deployed with the Azure Function CLI. The Setup of a managed Identity with access to the Azure IoT Central app is also neccesary.

Device Client

An installer is available to setup the device client, the Linux service and the cronjob. You can execute the installer with the following command in the Raspbian OS system as root:

curl https://raw.githubusercontent.com/abeckDev/IoTDoorController/master/DeviceClient/AbeckDev.DoorController.DeviceClient/setupDoorController.sh | bash -

Updateting

Device Client

The Device Client can be updated with a specific updater file. The usage is similiar to the installation process. The script also need to be run as root:

curl https://raw.githubusercontent.com/abeckDev/IoTDoorController/master/DeviceClient/AbeckDev.DoorController.DeviceClient/updateDoorClient.sh | bash -

Built With

  • Azure Functions - Serverless Framework which receive signals from the end devices and forwarding them securely to Azure IoT Central
  • Azure IoT Central - Central IoT App Plattform
  • .NET 6 - The Framework used to build the Device Client software

Contributing

Please read Contributing for the process for submitting pull requests to us and refer to Code of Conduct for details on our code of conduct.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Alexander Beck - Initial work - abeckdev

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgments

iotdoorcontroller's People

Contributors

abeckdev avatar dependabot[bot] avatar

Watchers

 avatar

iotdoorcontroller's Issues

[Feature] Add GitHub Action Release updater

As soon as a new build on the master/main branch was done, it would be great to automatically create a release and update the artifact for the installer also automatically.

Modularize the Client Application

Right now nearly every part of the code is in the program.cs. This was used for fast debugging but should be fixed before implementing further features.

[Feature] Raspberry Pi zero/ARM6 support

Is your feature request related to a problem? Please describe.
Because of the ARM6 Architecture of the Raspberry Pi zero it is not possible to run the DeviceClient .net core code. So we need to think about alternatives.

Describe the solution you'd like
It would like to get the same experience from the normal DeviceClient on the RaspberryPi zero. So we may need to rewrite the deviceclient.

Describe alternatives you've considered
Alternatively we could consider to work with the mono framework and check how we have to rewrite the stuff to be compliant with the mono framework and its dependencies.

Documentation

Create a Documentation and a getting started guide.

[BUG] Device Client crashes after a while

Describe the bug
I noticed that the Device Client Code unfortunately is crashing after a while.
We need to mitigate this and figure out how to resolve this.

To Reproduce
Steps to reproduce the behavior:

  1. Start Device Client
  2. Run Device Client for x hours (x need to be determined)
  3. Device Code crashes

Expected behavior
Device is running unless job is stopped.

Screenshots
Will follow up.

Hardware (please complete the following information):

  • Device: Raspberry Pi 3
  • OS: Linux raspberrypi 4.19.118-v7+
  • App Version: 1.5

[Feature] Implement systemd support for Linux based systems

Is your feature request related to a problem? Please describe.
In the current state the application ca be run via screen on linux in order to have it run in the background. However the whole setup has its issues, if the process fails you wont notice it and it cannot restart automatically.

Describe the solution you'd like
It would be great if there could be a systemd integration so that we can tell systemd to always restart it on failure and have it started in the background after the system boots.

Describe alternatives you've considered
Other implementations could be done via Docker but Docker is not running without problems on every IoT Device.

[Feature] Update Project to current .NET release and depencies.

Is your feature request related to a problem? Please describe.
It has been a while since the project got updated and I need to update dependencies, framework and maybe even business logic to stay current.

Describe the solution you'd like
An updated version with the latest security updates and an LTS Version of .NET.

[Feature] Ugrade to .NET5

Describe the solution you'd like
In order to stay up to date with the .NET project we will need to consider an update to .NET5.

[Feature] Devices should go to offline state after failing to send keepalives

Describe the solution you'd like
It would be great if the Device could switch to offline/not ready state if it fails to send keepalive
requests to IoT Central. If implemented we could trigger alerts from IoT Central to notify admins that their devices are offline.

Describe alternatives you've considered
Device is sending status messages every n minute (where n can be configured in the settings).
We would need a solution (like an Azure Function) which will check for the latest updates. If the latest update is gone longer than n*2 we should switch the device to offline, so that IoT Central notices and will execute the aligned action rules.

[Feature] Add Update Intervall and Cooldown time as Cloud Property

Is your feature request related to a problem? Please describe.
Right now the update interval and the door cooldown time are hardcoded.

Describe the solution you'd like
It would be better if we could se the settings per device from Azure IoT Central

Describe alternatives you've considered
As an alternative we might be able to implement a setting in the config as well.

[BUG] Implement cooldown for signal sending

Describe the bug
When working with multiple devices in parallel and multiple requests are send to the Pi, he will execute the 433MHz sending multiple times as well. In a bad case your car get smashed because the door you just opened will close immediately again.

To Reproduce
Steps to reproduce the behavior:

  1. Send one request from DeviceA for a specific door
  2. Send a request from another Device for the same door
  3. Door will open and close immediately again

Expected behavior
When a door command is triggerd there should be a cooldown limit until the next command will be processed.

Hardware (please complete the following information):

  • Device: Raspberry Pi 3
  • OS: Raspbian
  • App Version 1.4

[Feature] Install Script for Device Client

Describe the solution you'd like
It would be good to have a shell script which will download the latest app version, setup the systemd service and start the application. Should work like a „one click installer“ using bash.

[Feature] Implement IP Camera and AI Support to check if door is open

It would be great if we could leverage IP Cameras and use their feed to feed an AI to determine whether the door is open or not since 433MhZ is stateless.

You also could implement rules like "make sure door is closed after 10 pm" or always send close signal after door is open for amount x of time.

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.