npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-contrib-miakapi

v1.0.3

Published

MiakAPI V3 for Node-RED

Downloads

16

Readme

MiakAPI for Node-RED

npm i node-red-contrib-miakapi

This package is an adaptation of MiakAPI for Node-RED.

Miakapp

Miakapp is an easy way to create complete interfaces for your smart home. A control panel allows you to manage users and their permissions. Instant communications are provided by WebSockets between your clients and your coordinator. A coordinator is used to dynamically edit content of your pages. It communicates using MiakAPI.

MiakAPI

MiakAPI is a Websockets-based protocol that allows communication between clients and the coordinator.

Available methods are :

  • getUsers => Get the list of users in your home and their permissions
  • commit => Send data (variables) to the clients (you can use restrictions for some users)
  • sendNotif => Send a push notification to the client (if it hasn't disabled them from their settings)

Events are:

  • onUpdate => When an update of home settings happens (user / group / permission update...)
  • onUserLogin => When a user logs into your home
  • onUserAction => When a user clicks a button or types text in an input

Interface builder examples

Interface editor is a web HTML/CSS editor with snippets. Here is an example of what we can build very quickly and without writing CSS.

Screenshots:

BigGrid example screenshot Form example screenshot Properties&Tables example screenshot

Code:

<page id="pagename">
  <div class="block small">
    <div class="title">Big grid example</div>

    <div class="bigGrid">
      <div id="btn1" class="bigBtn" @click>
        <div class="bigBtnIcon">🔷</div>
        <div class="bigBtnText">Normal button</div>
      </div>
      <div id="btn2" class="bigBtn green" @click>
        <div class="bigBtnIcon">✔</div>
        <div class="bigBtnText">Green button</div>
      </div>
      <div id="btn3" class="bigBtn orange" @click>
        <div class="bigBtnIcon">🔶</div>
        <div class="bigBtnText">Orange button</div>
      </div>
      <div id="btn4" class="bigBtn red" @click>
        <div class="bigBtnIcon">❌</div>
        <div class="bigBtnText">Red button</div>
      </div>
      <div id="btn5" class="bigBtn disabled" @click>
        <div class="bigBtnIcon">🔒</div>
        <div class="bigBtnText">Disabled button</div>
      </div>
    </div>
  </div>

  <div class="separator"></div>

  <div class="block small">
    <div class="title">Form example</div>

    <div class="simpleInput">
      <div>Text example</div>
      <input id="textInput1" type="text" placeholder="Text" @watch>
    </div>

    <!-- Double columns -->
    <div class="twoColumns">
      <div class="simpleInput">
        <div>Select example</div>
        <select id="select1" @watch>
          <option value="value1">Choice 1</option>
          <option value="value2">Choice 2</option>
          <option value="value3">Choice 3</option>
          <option value="value4">Choice 4</option>
        </select>
      </div>

      <div class="simpleInput">
        <div>Number example</div>
        <input id="numberInput1" type="number" placeholder="Number" @watch>
      </div>
    </div>

    <div class="twoColumns">
      <div class="simpleInput">
        <div>Time example</div>
        <input id="timeInput1" type="time" @watch>
      </div>

      <div class="simpleInput">
        <div>Week example</div>
        <input id="weekInput1" type="week" @watch>
      </div>

      <div class="simpleInput">
        <div>Month example</div>
        <input id="monthInput1" type="month" @watch>
      </div>

      <div class="simpleInput">
        <div>Date example</div>
        <input id="dateInput1" type="date" @watch>
      </div>
    </div>

    <div class="simpleInput">
      <div>Datetime example</div>
      <input id="datetimeInput1" type="datetime-local" @watch>
    </div>

    <div class="twoColumns">
      <div id="redBtn" class="button red" @click>Red button</div>
      <div id="greenBtn" class="button green" @click>Green button</div>
    </div>
  </div>

  <div class="separator"></div>

  <div class="block small">
    <div class="title">Properties example</div>

    <div class="infoItem">
      <div>Example of property 1</div>
      <div>Value of property 1</div>
    </div>    
    <div class="infoItem">
      <div>Example of property 2</div>
      <div>Value of property 2</div>
    </div>    
    <div class="infoItem">
      <div>Example of property 3</div>
      <div>Value of property 3</div>
    </div>
    <div class="infoItem">
      <div>Example of property 4</div>
      <div>Value of property 4</div>
    </div>    
    <div class="infoItem">
      <div>Example of property 5</div>
      <div>Value of property 5</div>
    </div>

    <div class="separator"></div>

    <div class="twoColumns">
      <div id="normalBtn1" class="button" @click>Normal button</div>
      <div id="normalBtn2" class="button disabled" @click>Disabled button</div>
    </div>
  </div>

  <div class="separator"></div>

  <div class="block small">
    <div class="title">Table example</div>

    <table>
      <tr>
        <th>Column 1</th>
        <th>Column 2</th>
        <th>Column 3</th>
      </tr>
      <tr>
        <td>Line 1, Col 1</td>
        <td>Line 1, Col 2</td>
        <td>Line 1, Col 3</td>
      </tr>
      <tr class="clickable" id="line2" @click>
        <td>Line 2, Col 1</td>
        <td>Line 2, Col 2</td>
        <td>Line 2, Col 3</td>
      </tr>
    </table>

    <div id="addLineBtn" class="button green plusButton" @click>+</div>
  </div>
</page>

<style>
  #pagename {

  }
</style>