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 🙏

© 2026 – Pkg Stats / Ryan Hefner

mytelegrammenu

v0.0.17

Published

build telegram menu from iobroker enums

Readme

MyTelegramMenu

iobroker.telegram, iobroker,enums, nodejs, smarthome,telegram, telegra.ph,generates a menu from the enumerations in the iobroker, IFTTT , Google Home , Google Sheets NPM version Downloads

NPM

demo

install

npm install mytelegrammenu
  • create a new javascript in the iobroker
  • add the following lines
const MyTelegramMenu = require('mytelegrammenu');                         
const options = {'enumList': ['rooms','functions'],                                  
                 'locale':'de'};
const telegramMenu = new MyTelegramMenu(this,options);

configure

you can set the following options, in the second line

  • 'enumList' to select the enumeration you want to get displayed in telegram
    • e.g. -> 'enumList': ['rooms','functions']
    • possible value is a list of enumerations-name
  • 'locale' to select language setting
    • e.g. ->'locale':'en'
    • possible values are 'de','en'
  • 'telegramInstance' to select the telegram adapter instance
    • e.g. 'telegramInstance' : 'telegram.0'
    • possible value is a string of telegram adapter id
  • 'feedbackToTelegram' if a state is switched via telegrammenu, you'll get an response
    • e.g. 'telegramInstance': 'true'
    • possible value is a boolean = true or false
  • 'showRootItemsCommand' the command to display the menu
    • e.g. 'showRootItemsCommand' : '/showMenu'
    • this command should always start with an /
  • 'MenuRows' how many buttons are there in a row?
    • e.g. 'MenuRows':3
  • 'MenuCols' how many buttons are in the column
    • e.g. 'MenuCols':2
  • 'enableGooglePolling' enable google sheet watching
    • e.g 'enableGooglePolling' : true
  • 'pollingInterval' how often the google sheet file is read in ms
    • e.g. 'pollingInterval' : 700
  • 'googleURL' JSON endpoint URL of your public Google Spreadsheets file
    • e.g. 'googleURL' : 'https://spreadsheets.google.com/feeds/cells/[yourIDCode]/1/public/full?alt=json'
  • googleEnumList : the enumeration list you want to use for google control
  • 'googleIgnoreEnumName' : if this flag is true, we no longer need to confirm the enum name with. the googlehanlder looking only for state names.
    • e.g 'googleIgnoreEnumName' : true
  • 'googlePollingRestart' : automatic restart goolge sheet polling after 1 min
    • e.g. 'googlePollingRestart : true'

default Options

  • if you don't set an option value, the default values are:
  'locale' = 'de'
  'enumList' = ['rooms']
  'telegramInstance' = 'telegram.0'
  'feedbackToTelegram' = true
  'showRootItemsCommand' = '/menue'
  'MenuRows' = 3
  'MenuCols' = 2
  'enableGooglePolling' = false
  'pollingInterval' = 750;
  'googleURL' = '';
  'googleEnumList' = '';
  'googleIgnoreEnumName' = false;
  'googlePollingRestart' = true;
adding a enum-objects for telegrammenu
supported types
  • device and channel
    • add all sub states
  • states from type boolean (switch and button)
  • states from type number
  • states from type of string

if the states are writeable u can change all values with the menu

if a state not writeable telegrammenu show the current value of the state

menu control

  • you can display the menu like this:
/menue

you can display the menu like this

report states with telegra.ph

creating google sheets JSON endpoint

Connect IFTTT to the google sheet

adding a enum-objects for google commands

googleIgnoreEnumName flag

Changelog

0.17 (2021-17-02)

  • add support for states (type of string)

0.16 (2021-17-02)

  • when the telegram adapter sends an empty string, the last command in memory is not executed again

0.15 (2021-06-02)

  • fixing polling restart if the table could not be read

0.14 (2020-13-12)

  • automatic restart goolge sheet polling after 1 min
  • add option to deactivate polling restart

0.13 (2020-05-12)

  • some small bugfix with google polling
  • add option googleIgnoreEnumName to ignore enum names
  • add state for google lastCommand

0.12 (2020-11-29)

  • adding polling for google sheets
  • adding new options for polling
  • control states over google commands(reading sheets)
  • refactoring telgrammenu and google comannds
  • putting telegram commands in command pattern

0.11 (2020-11-22)

  • Output text to telegram adjusted for non-writeable values.
  • fix unhandledRejection
  • validity range when setting values (for example shelly shutter min/max position)