Git Product home page Git Product logo

one-cakephp-project-a-day-challenge-14-smart-home-dashboard-mqtt's Introduction

One CakePHP project a day challenge - Day 14 Smart Home Dashboard with MQTT

On this project I'm using CakePHP 4, CakeDC/Users plugin, php-mqtt/client (testing with Mosquitto Broker) and Bootstrap 5. The application is able to publish messages to change device status and subscribe for status changes.

Steps to create this project

  • 7505ea7 Init and boostrap setup
    composer create-project --prefer-dist cakephp/app
    
  • 6ab0174 Added Base Models
    bin/cake bake migration CreateDeviceGroups name
    bin/cake bake migration CreateDevices id:uuid name type last_status device_group_id:integer  created  modified
    bin/cake migrations migrate
    bin/cake bake model DeviceGroups
    bin/cake bake model Devices
    
  • 1c33371 Started dashboard with groups
  • b7ed054 Added actions to manage devices
  • f401b12 Display devices in the dashboard
  • c9bb037 Update Device Status on Database
  • 9374e07 Add php-mqtt client:
    composer require php-mqtt/client
    
  • 03211b7 Publish message using MQTT when user change device status
  • 3312e4e Added a command to simulate the smart home center device (raspberry pi)
  • 2b87291 Added a command to subscribe to message from SmartHome Center
  • c6224f8 Added Link to Delete Device
  • e8de6f4 Fixed non inline images
  • 9dc9b6e Added sample command to simulate SmartHome center publishing status
  • 2541484 Added MQTT modal info for each device
  • c10d28b Added Svg icon for delete button
  • 88550ea Removed device id from cards, we already have info in the modal
  • b943042 Improved header
  • fad2c6e Added CakeDC/Users
    composer require cakedc/users
    cp vendor/cakedc/users/config/users.php config/
    cp vendor/cakedc/users/config/permissions.php config/
    cp vendor/cakedc/users/config/Migrations/* config/Migrations/
    bin/cake migrations migrate
    bin/cake users add_superuser
    

Result

alt text

alt text

Links

one-cakephp-project-a-day-challenge-14-smart-home-dashboard-mqtt's People

Contributors

rochamarcelo 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.