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

vistamare-smarthome

v1.0.14

Published

service to manage actions via REST

Downloads

6

Readme

about vistamare-smarthome

THX, based on https://willschenk.com/articles/2019/controlling_ikea_tradfri_with_node/ with node-tradfri-client (npm pkg) and samsung-remote (npm pkg)

i wanted to create a central REST-service it received commands via POST

graph TD;
    POST[HTTP Get/Post] ---> NS([node Server]);
    NS ===> IKEA[IKEA Tradfri Gateway];
    NS ===> TV[Samsung TV];
    NS ===> scale[scalable ...ZigBee etc. ]
    NS -.-> |feedback| POST;
    IKEA ---> LIGHT(Light or another SmartHome Device);
    TV ---> CTR(TV Set Control Command);
-> e.g. 
{ "system":"TV","ID":"65537", "action":"KEY_POWEROFF","value":"0"}

or { "system":"IKEA","ID":"65537", "action":"toggle","value":"0"} or { "system":"TUYA","ID":"----device-id----", "IP":"----device IP-adr.-----","key":"------localKEY-(encr)----","action":"toggle","value":"0"}

to manage all the different smart-devices in my CASA.

At the end i use a normal Android-Phone to put a command via Icon on the screen für every action.

Therefore i use the APP HTTP-shortcuts (its one of the greatest app for me).

ARguments: 1. input the IKEA-Gateway IP-Adress (lets find out e.g. with fing-app) 2. input your Samsung-TV IP-Adress (lets find out e.g. with fing-app) 3. input your IKEA-Gateway-KEY (backside of the device) into ../util/connection.js 4. username for handshake (you can define by yourself) 5. password for handshake (you can define by yourself)

-> e.g run.> node server.js 192.168.0.1 192.168.0.15 123456ABCDEF user password

Lets start: - run with: node server.js arg1 arg2 arg3 arg4 arg5 - test with a simple Get: https://192.168.x.x:3000/status?id=all (adapt your server-address) - you must implement your own certificate or accept the testing selfsigned-cert (./security) into your browser - the response from ...?id=all give you the possible devices-IDs; with ...?id=12345 you can ask the curStatus of a device

Feature: - get status of one IKEA-device ../status?id=12345 - get info of all available IKEA-Commands - you see in the json-response (e.g.brightness) - get status of all exists IKEA-devices with there ID ../status?id=all - get info of all available TV-Keys (Samsung) ../status?id=tvkeys

Possible Device Structure (Smartphone as a Server and Control-Station)

classDiagram
    Smartphone <|--|> IKEA
    Smartphone <|--|> TV
    Smartphone: - Shortcut APP [with Widgets]
    Smartphone: - Termux Linux APP
    Smartphone: nodejs on Termux()
    Smartphone: vistamare-smartphone on nodejs()
    class IKEA{
        GATEWAY
        toggle()
    }
    class TV{
        Remote Controlled
        KEY_POWEROFF()
    }