As a fellow developer that uses NR, I would like to point out that NR has git integration built in. You must enable it though. Includes a diff tool so you can see exactly what changed.
It's basically a complex "If this than that" program that runs on a server of your choosing. Not only does it connect with Home Assistant, but a variety of other APIs that can be used to trigger events.
It's pretty cool, I installed it on a Raspberry Pi as an addon to HASSIO.
All that said, I treat Node Red as the brains (Automation logic and what not), and Home Assistant as the muscle (The host to which the actions are triggered).
with a few lines of code and a raspberry Pi/arduino/... well really any hobbyist microcontroller and you could have that thing actually tell you the weather outside by showing you.
node-RED could help, but basically you need something that can pull weather data for your location and then program the cloud to react to certain weather conditions.
Most of the work will already be done for you as I saw a device a while back that showed the weather physically through a cloud chamber.
If you start using this as a weather thing I would suggest you get a couple nice led lights to be sun and partial sun (behind the cloud), but that way you can use your lamp not just as a lamp but to help you get ready for the day. You could even have it play through the expected weather of the day, or the next day so you know what you're in for when you go to sleep. I would recommend you have something to show the temp; could be just colored LEDs, or a readout, or whatever you want!
Depend on the nodes in use, some nodes just pass forward msg.payload others pass the whole msg object so you can sometimes get away with passing things as msg.mydata etc. The other option is to store it in flow context either with a change node or function node.
If you're only interested in seeing the current value at a glance and don't have something like node-red-dashboard set up, you might be interested in node statuses.
Documentation; scroll down to "Adding Status"
Basically, you can set some text that will appear under a given node. Run your current flow through a function node with something like this:
const lastValue = msg.payload.someValue
node.status({text: lastValue.toString()})
return msg
The status will appear under the node and will always be updated to the current value. Much easier than digging through the debug console.
You can programm in node red that when one sensor sends data per mqtt, write it into a mysql database or whatever.
Additionally it has an website-dashboard plugin where you can quickly build a good looking dashboard showing different data. It looks something like this
Edit: If money is not the issue I recommend the BME280. For a little more money you can get temperature humidity and pressure.
It would be quite easy to add a button, but personally, I never disable my PiHole - there should be no need to.
As for installation, I would suggest you read the excellent documentation they have and watch the "official" getting started YouTube videos. https://nodered.org/
Oh I'm new too, I only just started node-red a few months ago and started using context this month, but it's been very useful. Here is the documentation for context: https://nodered.org/docs/user-guide/context
I have the locking of accounts setup in code. It sounds complicated, but I set it up in just a few minutes. I already have a Home Assistant installation connected to a Node-Red instance for my home automation. There is a device for each kid in HA, which communicate to a node in Node-Red. NR then hosts a Rest API that reports if accounts should be locked or not (seriously easy in Node-Red, you can create a simple API like that in under a minute). The DC runs a script every minute to check if kids accounts should be locked or not. If they should be locked, the account is locked and forcefully logged off all kids devices. If the account should be unlocked, it's unlocked. Overall time to setup was under half an hour. I've got a dashboard then in Home Assistant where you give/revoke kids access with just a tap of a switch.
And by drift, do you mean time drift? The DC syncs time with microsoft servers and all machines sync with the DC so I haven't had an issue with that.
Do it, you'll never look back, I was the same! I run HA in docker and also run NR in docker. Here is the guide I used to set it up and it was pretty simple! https://nodered.org/docs/getting-started/docker
Maybe you will be interested in the Tasmota project. They develop a firmware (not sure if its the correct name for it) that allow you to control all of them locally with only one app like NodeRed or HomeAssistant. Both of them can inreract with tasker.
Hope it helps you!
You have a few options. All of node red's data will be stored under ~/.node-red(of whatever user you install ed as), so you can copy that folder after deploying node red on your new server. You could also export and import your flows from your old server to the new one. You can also make a project to store everything on github and download it to your new server. I haven't played around with that yet, that looks to be the best way for mass deployment.
If you want to get into software development, this is an excellent beginner project.
If you dont want to write it yourself, find a piece of off the shelf software. Given your previous statements, I think you want to build an event driven system. Try Node Red (https://nodered.org/). Edit, node red docker docs (https://nodered.org/docs/getting-started/docker)
There are other options depending on your goals.
Hi all. I'm taking a small break from my NodeJS Performance Optimizations series to bring out tutorials on how to design and publish Integrations and Processes using Node-RED.
Click here to view the written article for the video. Enjoy 👍.
For the web interface you could use the Node-RED Dashboard, and the GPIO pins should already be controllable on the Raspberry Pi through one of this nodes.
If you have a Raspberry Pi laying around check out Node Red, There are some Nodes for Hue you can add and set up triggers to run at specific times.
Node-RED is self-hosted and fairly flexible. You can install the dashboard add in that allows you to make GUIs.
http://developers.sensetecnic.com/article/a-node-red-dashboard-using-node-red-dashboard/
Call me crazy, but I had the idea that this could all be implemented in Node-RED with some crypto extensions. It's built for input/output IoT integration, so that should be pretty easy to abuse/implement, although probably a security nightmare.
You could do this with flow variables and a delay node. Use a device node to trigger when motion happens, then set a flow variable to true(or any value) then delay for 5 mins and then set that flow variable back to false. Then in your other automation check if that flow variable is true.
https://nodered.org/docs/user-guide/context#using-context-in-a-flow
You will need some form of a server.
This doesn't mean that you need a physical server computer. This just means that you need a program that runs on a reachable computer ("reachable" depends from where you want to send the notifications - from only the LAN or from the Internet as well).
On that computer, you run a program that listens on a certain port and performs actions depending on the information you receive on that port.
The mobile app connects to the server and sends the server its message (free/busy). The server receives that message and processes it.
Potentially, you don't even need a mobile app - a fairly simple web site/web page can do as well.
A sample setup:
Your desktop computer (or even something as simple as a Raspberry Pi) runs a web server. For simplicity you could use Python with Flask or Django. It hosts a website where you can send the status (free/busy). Another page on that website displays the status (shows your shape).
Of course, you will (depending on your use case, LAN/Internet) want to implement some form of security/authentication.
Another idea: look into Node Red - a low/no code system to build apps like what you envision. Again, it can run on a Raspberry Pi.
Think your best bet might be the trigger node for this and flow variables
If you have a function node that over right a flow variable ever time it gets a fresh message from the doors etc
You could then use the trigger node to fire after x amount of time and or msgs received
Then you could progress the flow and call the flow variable that has the last most up to date message this could be done by a trigger or delay node kicking off
https://nodered.org/docs/user-guide/writing-functions
With flow variables there is noting to say the connections between nodes need to be wired as in
Door opens --> save to flow variable
Another flow
Delay node (wait 5min) ---> function node requesting info from the flow variable ---> adjust light etc
If you follow https://nodered.org/docs/getting-started/raspberrypi
And do a fresh install on the pi following the bash install once that's done all required packages should be installed at the end of the above site it describes how to set node red to auto start on pi boot
Once that's all set up just find your pis IP address and pop in the port 1880 at the end eg 192.168.1.123:1880 should get into node red then from any machine on the network or localhost:1880 on the pi itself
For node red, just follow the node red documentation:
https://nodered.org/docs/getting-started/docker
This is the software the the Spotify addon is running
https://hub.docker.com/r/ggoussard/spotifyd
Just follow the documentation to run those containers.
I’m using node-red, you can make a flow to check for device status, integrate http requests, make conditions, delays and more, if you don’t have issues with a little code you can do a lot with Node-Red
yeah, telegram has a pretty extensive API and bindings in a lot of languages. I used to use python earlier for most of my TG bots, and sometimes bash scripts directly fiddling with http endpoints, but for this particular bot I used nodered as I was interested in trying it out.
It is a pretty popular tool in the iot community to visually create flows to control devices without hardcore programming.
It has been around for a while so a lot of technology connectors exist for iot and smart home’s
Site is here https://nodered.org/
Yes you can. Node red is robust and embedded in many industrial hw and softy and you don’t even know it is. And latest release is even more powerful and build for professional development. See https://nodered.org/blog/2020/10/15/version-1-2-released
Is the debug node dumping the full msg object or msg.payload? Also you can check context variables in the right side toolbar, little drop down near debug icon should show context https://nodered.org/docs/user-guide/editor/sidebar/context you do need to hit refresh after a var is set/updated (not as reactive as debug output)
Unrelated, drop the var keyword, msg variable already exists as its passed in from the preceding node so that will nite you if you continue that pattern elsewhere.
It’s included in the settings file. For raspbian, I believe the default location on is in a hidden directory at ~/.node-red/settings.json
You can rearrange the palette order to your liking there, following this guide
I'm going to assume;
If I were you, I'd buy a Raspberry Pi as a controller, deploy it in the greenhouse, wire all the devices into it (vents / fans / etc), install NodeRED, and connect it to your network. NodeRED is a web app (rather than a native Windows app), but it's going to be the quickest path to a reasonably-customizable IoT solution without needing to dive too deep into actual programming.
If you later decide you want an actual Windows app instead of controlling it through the browser, you could expose HTTP API endpoints in NodeRED, then use something like C# + WinForms + some IDE (Visual Studio is fine) to create a GUI which communicates with NodeRED via HTTP calls.
You can achieve this with nodered. I did put in place an email listener with it quite easily. I haven't set it up to a gdrive but I've seen community flow that achieve this so that should be pretty straightforward :)
There is a whole section in the docs for this. Did you even look? Googling "node-red function" is literally all you had to do.
https://nodered.org/docs/user-guide/writing-functions
You can even return multiple outputs or do it asynchronously.
I like Node-RED lately for ingesting data from various sources. It's a stream processing system with a pretty good visual flowchart system and modules for lots of common data sources and data repositories, and if it can't quite do what you need, you can drop Node.js code in as a processing node.
It's been pretty flexible and easy to use for me, and performance is surprisingly good compared to the mishmash of Python scripts I used to use, and I have to worry a lot less about sane exception handling, threading, etc. since that's all built in.
Check your settings.js file
https://nodered.org/docs/user-guide/logging
Your looking to see if the metrics option is turned on
metrics
When set to true, the Node-RED runtime outputs flow execution and memory usage information.
I suggest Node-Red. It can basically do the lot executing local commands using python or the exec node with some light graphical "programing", along with creating the web dashboard.
NodeRed has a bunch of Slack Nodes you can install. I haven't tried any of them, but NodeRed is solid and pretty easy to integrate into a lot of things.
You could look at node-red, which you can get up and running for free on IBM bluemix: https://nodered.org/docs/platforms/bluemix It's great for IOT, and no credit card needed! This can be a listener for http requests from the Arduinos, and programmatically provide responses. You could then use the Arduinos WiFi client to make requests to get or set data for the other lamp by setting up the relevant end points - i.e. poll node-red every minute to see if it should be on, or what colour etc. This saves you having to expose the Arduinos on their own networks with port forwarding etc, but also allows you to move some of the config on to the API layer, saving code changes on the board later. Hope this helps!
Node-Red has a "Projects" feature that uses git to back your flows up for you. I have not gotten around to setting this up though.
It seems that there are already quite a few programs in the IOT dataflow space. The most interesting one that I've seen is Node-RED. Perhaps it could be adapted to also handle dataflow between programs on the local machine.
I do this using node-red. There's are several node plugins available: I use node-red-contrib-huemagic and node-red-contrib-influxdb. In my set up, node-red uses the huemagic node to poll the status of groups, digest the output into somehting usable, and push the values out to influxdb for grafana to consume. (I also use node-red to handle all of my automation logic and control interfaces because I just prefer the visual flowchart interface it uses for programming.)
Yup, just load a node-red instance (either a docker if you use that or just a local instance), install the home-assistant contrib node and off you go. They can live together and you can play around as long as you want.
So, two things to read up on and play around with: 1: https://github.com/walthowd/ha-alexa-tts/blob/master/README.md
That will let you do some fun stuff with your echo, similar to what you are looking to do
2: check out Node-Red https://nodered.org With that you could integrate the scripts from 1 with a http receiver to do webhooks/call backs and other fun logic
I have been using Raspberry Pi and most importantly Node Red ( https://nodered.org) . It enables you to use a local network only, easily use cloud services or a mixture of both. There is an active community with connection to many available products. MQTT and UI is built in so it is the perfect solution for both experienced programmers and beginners
Did you try looking at https://nodered.org/?
Fwiw, there are a few different Hue modules in the Palette Manager, and no Insteon ones. A Google search for "Node-RED Insteon" shows that there are some people using them together.
Tried that, but ended up learning about context. This detects if the value did not change with +3 and tries +4 instead if so.
newmsg = {}; var prev_brightness = context.get('prev_brightness') || 0;
if (msg.data.attributes.brightness == prev_brightness) { brightness = msg.data.attributes.brightness + 3; } else { brightness = msg.data.attributes.brightness + 4; }
prev_brightness = msg.data.attributes.brightness; context.set('prev_brightness',prev_brightness);
newmsg.payload = { data: {"brightness":brightness} };
return newmsg;
Context in Node Red, though the link at the very end is where I ended up.
Home Assistant is written in Python.
Do you know any javascript? Highly recommend Node Red even if you don't https://nodered.org/
Personally I use both together. Devices/states/sensors in Home Assistant, automatic logic in Node-Red
i have tried to work out something like this in the past. i have a home server with several things automated (plex, nzbs/torrents, sonarr/radarr, backups, etc.)
what I really wanted was a front end to use from my couch, a touchscreen acting as a remote control that interfaces with my plex api, sony tv api, and marantz a/v receiver api. in fact, many of these apis are open source and can be strung together with a little javascript.
node-red is a coding framework, kind of like programming for dummies; create a JS function and connect it with other functions, passing along a message payload. using an android tablet, you can create a remote with any android app and use that as an input for commands. using snowboy you can design hotwords that trigger commands via voice-detection and more JS magic. for your calendar and stocks, there are plenty of github projects like dashing in which you can plug your rss feeds for your google calendar (or caldav).
you have probably seen a bunch of these projects before. if you haven't, perhaps you're not looking hard enough or you aren't really sure of what you want. /r/homelab has some crazy projects for inspiration.
Node-RED is a visual programming environment where messages flow from one node (e.g., a Home Assistant Events node, a switch node, etc) to the next. A flow is a set of connected nodes.
https://nodered.org/docs/user-guide/projects/
Make a git repo to store your flow, and have a CI pipeline handle deploying changes to all your nodes.
That's about as specific or a recommendation as possible without knowing more about your application stack.
A bit off the beaten path, but I've been toying with the idea of using Node Red as a job scheduler. There are timer plugins to launch flows at specified times, email plugins that can catch flow errors, automatic version control plugins, an exec
command with support for stdout, stderr, error code (you could build a subflow to do the logging automatically). For reading logs you could maybe create a "dashboard" but I've never used that feature. It does support multiple users but I don't know if authentication is as granular as the job/flow level.
MQTT provides a standard low-bandwidth data bus for message based data collection and control, but perhaps the most incredible thing is the Node-RED application. Node-RED makes it possible to visually program complex mostly bulletproof decision control flows based on MQTT inputs and outputs. It's really amazing.
Here is a short article and video from an IBM Developer Advocate about Node-RED which should be a good intro. You can google Node-RED for additional videos and blog articles.
There's also MQTT Explorer which is great for seeing the traffic to/from your MQTT broker.
Welp, I know a site which has a platform that transforms blocks of code into actual code. Unfortunately this is somehow the reverse of what you would like to find out. But, just in case you want to explore, here we go: https://nodered.org/ .
Have a look at Node-RED, a graphical flow-based tool for wiring hardware devices together. It was originally developed by IBM and now maintained by the OpenJS Foundation.
Official Docker container here: https://hub.docker.com/r/nodered/node-red/ Be sure to use 'network: host' when using mDNS in a container.
Qué difícil, porque es un mundo bastante grande. Lo bueno es que saber electrónica te va a sumar bastante.
Te diría que empieces con algún curso de python, solamente para aprender a programar usando algún lenguaje que tenga una buena cantidad de librerías que después te sirvan para tus proyectos.
Si querés ver que onda el mundo de la domótica, te diría que para lo más básico mires home assistant que no necesitás saber programar para conectarle un par de dispositivos y empezar a automatizar cosas. Yo lo tengo instalado en una compu y me compré un kit de Philips Hue (unas lámparas, unos sensores y unas llaves de luz) y me armé algunas automatizaciones. Con el hub de philips hue, podés prescindir de home assistant, pero cuando empieces a hacer automatizaciones complejas te va a servir.
Home assistant viene con una herramienta que se llama node-red que básicamente te deja definir automatizaciones bien complejas con casi nulo conocimiento de programación.
Most flows should migrate without any issue, I've not really had any problems migrating old systems over the last year or two. If you want to be super careful though, first step would be to back up your current flow. Spin up a new version on your personal computer and them import the flow. That should give you the chance to play around and make sure that everything works before fully upgrading the Raspberry Pi version.
I'd recommend using the install / upgrade script here: https://nodered.org/docs/getting-started/raspberrypi in case you've not already got the helpful start / stop scripts.
It does get pretty daunting haha I don’t think there’s anything wrong with using the list, just try and best conform to the syntax node red wants and you should be good. This page helped me a ton with context variables https://nodered.org/docs/user-guide/writing-functions
Most of your posts here asking for help are covered in the 'getting started guide/cookbook' for node red and many of the 'intro to node-red' youtube tutorials will cover these basic questions or at least give you a foundation where you can ask questions that more clearly show what you are actually trying to do. For example, you say you want to send a message "only once every x seconds and avoid every other duplicate" but your example sounds like you really want to 'Drop messages that have not changed value', which is an example node-red walks you through how to do in the cookbook.
https://nodered.org/docs/user-guide/
https://cookbook.nodered.org/
Check that your settings.js
file tells Node-RED to use the filesystem for context storage.
The behavior you're seeing looks like it's using the memory storage instead (which is the default for some reason).
Please follow the naming guide lines for nodes in the packaging documentation
>Naming
>
>If you wish to use node-red in the name of your node please use node-red-contrib-
as a prefix to their name to make it clear they are not maintained by the Node-RED project. Alternatively, any name that doesn’t use node-red as a prefix can be used.
Check out the catch node
https://nodered.org/docs/user-guide/handling-errors
I think if your telegram fails to send it should throw an error of some sort you can use the catch node to pick up on this error and then get it to send you a sms via twilio or other 3rd party sms node
I have this etc up for aDB when the ip changes the MySQL node trows an error and then the catch. Ode sends a message via telegram to say the ip has changed could work maybe for your application
Also would you mind sharing the flow you are using to send an image via telegram that's pretty nice idea Cheers
I use a combination of home assistant, node-red, and esphome. It runs on a pi and some nodemcu's and a large variety of sensors. These are open-source projects.
I was running this for home automation (lights, boiler, access, etc.) before hand so it was really easy to automate. There are quite a few swimming pool and aquarium projects on github I borrowed from.
I don't write code, I do have experience with computers and microcontrollers on a hardware level. Node-red and a pi could handle this and node-red basics are all visual for the most part.
Assuming you are using a function node. The code is JavaScript. You have made too 'return' calls. The second one will never be run. As that's not how JavaScript works. What ever was in the msg variable will be returned.
Normally you would want to work out what to send in payload. Then add payload to message. And return msg.
So
let msg = {payload : "hello world"}
return msg
In the code you show The payload you are creating is JSON. The { } brackets define an object. It looks like your trying to make an array. Arrays are in [ ] brackets.... In arrays just comma separate your values in in square brackets. In curly brackets you have an object that needs a comma separated list of { key:value } pairs:
msg = {payload : [arr1,arr2,arr3]}
//or
msg = {payload : {key1:val1,key2:val2,key3:val3}}
Which one you need and what the keys and values are is upto your use case
If you need multiple outputs from a function, then perhaps check this out:
https://nodered.org/docs/user-guide/writing-functions#multiple-messages
Do you mean installation? I just used Docker because it's so much simpler than figuring out how to configure every individual app in 2021. Same for all the other self-hosted stuff I use (Calibre Web, Sonarr, etc). First, create a directory, or the data will remain inside the container and be hard to get to (for backups/editing config/etc): sudo mkdir -p /docker-container-data/nodered
Then, create the docker container: sudo docker run --detach --publish 1880:1880 --volume /docker-container-data/:/data --name nodered nodered/node-red:latest
Within seconds, you should be able to browse to http://localhost:1880 (or the IP of your server if you ran the above on a different machine).
If you mean actually using it... https://nodered.org/docs/tutorials/ has some things to get you started. You will have to learn the rest from osmosis by looking at other people's flows, asking on their forums at discourse.nodered.org, etc. There's also Youtube videos for people who are more visual.
did you run
npm install --global --production windows-build-tools
as explained in the documentation: https://nodered.org/docs/getting-started/windows#installing-nodejs-windows-build-tools
Debugging is dramatically improved in NR 2 if you ask me. It might be worth giving it another try if you played with older versions:
https://nodered.org/blog/2021/07/20/version-2-0-released#improving-the-developer-experience
Node-Red the installation guide on their website can be kinda confusing but there's plenty of videos online for whatever OS you're using.
https://nodered.org/docs/getting-started/local (the website installation guide)
I am not sure if https://nodered.org/ is the exactly right tool for working with files but you can check it out. It is more a general software to define workflows for "non programmers".
thanks for that. i will check the offical Nodered forums for help as well.
I am following this documentation https://nodered.org/docs/getting-started/docker#dockerfile-which-copies-in-local-resources to build the GIT code into a container
+1 on this.
For personal use I just use the "nodered/node-red" image from the docs and it's always worked with no issue. It'll be a lot easier for folks to help, if you specify what exactly doesn't work.
I mean I've never used Docker personally, but I have used Node-RED with Github... IDK if this is something basic you've already tried, but one thing to point out is that Node-red doesn't speak to Git "out of the box," you have to enable the "projects" feature to do that.
So if you have a Git repo that your Node-RED instance isn't reading, I would check that first?
Otherwise you might have to give more specifics of what exactly you're doing and what you expect to happen as a result....
I do that with my home assistant and the node-red addon nodes "huemagic". All it takes is a Raspberry Pi Zero and a MicroSD card (32GB is more than enough)
I think I understand it a bit better now. The idea would be to provide a platform for storing data and monitoring an existing IOT solution? My initial thought was that it would be some framework which could power an IOT device itself. (hence the topology question)
It does trigger something to me about the Node-Red project. In which way are they similar, and where do they diverge?
Node Red is a flow based programming platform built off of node/JavaScript with tons of plugins to extend the functionality. A lot of people use it for more complex IOT set ups.
Yup, I have it running on the same pi that homebridge is running. Works well. This is a tutorial on how to get it up and running. There are also docker containers out there if you prefer to run it that way.
I would install NodeRED and use it to pull the data from the sensors with an "Exec" node to run your python script, and then use "Firebase nodes" to sent your data too.
NodeRED is a visual editor for connecting things together and automation, that is free, easy to learn, and requires very minimal coding knowledge. Intall instruction here:
https://nodered.org/docs/getting-started/raspberrypi
The "Exec" node is a default node that comes with NodeRed. To interact with firebase you'll have to add some additional nodes, here is the install info:
https://flows.nodered.org/node/node-red-contrib-firebase
Let me know if you have questions.
There is a node package that you could use to extract cell data from a google sheet, for NodeRED.
You can install and run a NodeRED server on your Raspberry Pi by following this guide:
https://nodered.org/docs/getting-started/raspberrypi
And here is the documentation on how to install and use the node package for Google Sheets:
https://flows.nodered.org/node/node-red-contrib-google-sheets
From the NodeRED editor you can process the data and connect it to just about anything.
By the way you'll need to enable context storage in settings.js or the data will likely be lost in restarts. It's disabled by default, if you haven't already.
You could create a function node and add an JavaScript condition.
Something linke this:
if (msg.payload === „time“){ msg.payload = time(); } return msg
Im currently on mobile, so the Syntax can have errors. But you can find more informations here: https://nodered.org/docs/user-guide/writing-functions
signed up for ibm cloud service to poke at it using https://nodered.org/docs/getting-started/ibmcloud. I gotta say, for a layman such as myself, this stuff isnt as straight forward as its sold as. Im getting stuck generating api keys and shit.
I'm going to go against the flow here and say you should really check out Node Red and optionally a UI plugin like Dashboard. It was originally built for home automation and IoT, but its usefulness goes way beyond that.
It's a Javascript NodeJS server app that runs on your Linux box. You access and "program" it visually via a web browser by dragging nodes into the and connecting them into flows. Out of the box it has all kinds of nodes - inject (to start flows things right from the web interface), debug output, the ability to listen for http requests, make http requests to other systems, read from and save to files (I'm pretty sure it can also detect file and/or directory changes), timed interval flows, email notifications, execute processes locally... All that without coding. You can also add your own Javascript code in function nodes.
With Dashboard you can create custom web interfaces to control your apps. It also has a ton of other plugins for all kinds of things - accessing databases, APIs, hardware...
I'm really just scratching the surface here.
It's replaced shell scripting for any kind of automation I do (for example, it polls an email box and sends my phone a notification when certain emails arrive). It's well worth checking out.
Hey Frank, manchmal kann es vorkommen das NodeRED nicht richtig installiert wird. Das liegt meines wissens nach dann an Verbindungsproblemen o.ä....
Wenn du ein komplettes Update mit dem Skript machst wird NodeRED erneut installiert
Versuch es sonst mal manuell nach dieser Anleitung zu installieren: https://nodered.org/docs/getting-started/raspberrypi
Wenn du dann anschließend ein komplettes Update mit dem Skript machst, werden auch alle Addons für NodeRED installiert. Dann müsste es funktionieren, sonst ist es ein mir unbekannter Fehler...
Check out Node-RED
It can do DMX:
https://flows.nodered.org/collection/scz30QEcIpcS
And LIFX:
https://flows.nodered.org/search?term=Lifx
It has a bit of a learning curve, but it you take the time to climb it... I’m pretty sure it will do what you want.
When u don't know how to use a node I would recommend these 2 steps: 1. Google the name of the nodered module, they always have a webpage on which u can find info on how to use the node itself (most of the time): https://flows.nodered.org/node/node-red-contrib-tuya-smart-device#output-format
Cheers!
I'd use flow context (e.g. "flow.tvrecentoff"). Tv turns off, set value "true", wait 15 minutes, set value "false". Then work that variable into your automation.
Edit: Node Red Context explained for those that may need it.
If you want something to control more stuff than just your PC (e.g. control other devices in your home or other services) then you may look at Node-Red in combination with node-red-dashboard.
You can run both node-red and the dashboard (in a browser) in your PC if you want to avoid using another device (you can open a browser in fullscreen in the secondary touchscreen).
Node-Red fits in the r/selfhosted community, the other suggestions are more like applications with no "hosted" component.
There’s nothing special about node.js, except that a lot of home-automation code has been written using it.
Homebridge (another node.js project) is turning into the universal glue to tie all sorts of IoT devices together. While it’s originally designed to interface non-Apple devices to Apple’s HomeKit automation, you really don’t need anything Apple-related (although that’s icing on the cake if you do). Connect Node-RED (another node.js project) to homebridge, and you’ve got graphical, flow-based automation. If you don’t like GUIs, there’s a webhook add on for homebridge that allows you to control devices via http calls.
All of these run on the RPi.
https://nodered.org/docs/user-guide/runtime/configuration
Finding the home directory is specific to your install. You can do a search for the settings.js file across your file system. When you find the home directory delete the flow file. It will look something like flows_<hostname>.json
I would use Node-RED to do this since I like the low-code aspect of it (I am not a programmer).
It can run on the same Pi as you are running rtl_433 for example (or on another Windows PC). You might find more jobs for it once you install it and spend a few minutes getting your output looking just right in its dashboard (and writing the output to file as CSV).
There’s usually a guide per “add on” as they’re all different, but basically you’d just search for what you want as a Docker container. For example Node Red have a tutorial on their website. So just search “[add on] Docker tutorial” and you’re bound to find something! I’d assume you can’t get everything this was though eg. the HA configuration check add on, but I could be wrong!
I just got the package to publish on npm. My node-red instance's install palette seems to confuse it with the original package. If you've gotten node red installed and give this a try, let me know if you encounter any issues. Another user from nodered.org did a manual install (before I'd gotten `npm publish` to work) and says it's working flawlessly.
https://www.npmjs.com/package/@hepcat72/node-red-contrib-life360
If you are ok with docker why not just use the node-red docker?
https://nodered.org/docs/getting-started/docker
A quick google search also brought up:
https://www.electronjs.org/apps/node-red
https://discourse.nodered.org/t/is-it-possible-to-make-node-red-into-a-windows-portable-app/11259/14
there are multiple options for this, you could store persistent data in a database (e,g, sqlite) and create a flow that lets you initialize the values or change them using something like an inject node, or you could use the in built variables http://www.steves-internet-guide.com/node-red-variables/ in particular take a look at the section on "Storing Context Data in The File System" (https://nodered.org/docs/api/context/store/localfilesystem)
For my Crestron system I setup the homebridge plugin MQTT-thing to talk to Node-RED over MQTT. Then I have some code in Node-RED to send commands to the Crestron. I was able to program my Crestron system to accept those commands but if you can reverse engineer the commands your tablet is sending you can send those from Node-RED.
I've been relying on ifttt for a couple of things, but only out of convenience because it's simple to setup and use. Time to boot up good ol' trusty NodeRed on the Raspberry Pi again.
Instead of setting up a dedicated web server (whether or not you have one running) you can use the Node-RED static content folder. I think that's specified in the node-red config file. Have a look at the httpStatic option here https://nodered.org/docs/user-guide/runtime/configuration
Probably easiest to do in a Node-RED + homebridge-mqtt.
https://www.npmjs.com/package/homebridge-mqtt
Basically, you’ll “create” the device using an inject node with a particular payload to an mqtt outlet node, then you’ll use a separate set of nodes to grab a value from wherever (web API), pass it to a simpler function node to calculate the conversion to light value, then pass that value to an MQTT outlet to set the value on the previously created device.
Definitely still some work involved, but about 99% of what’s needed to do a homebridge plugin is eliminated.
Take a look at Node-RED. It’s a flow editor that you can use to create really interesting interactions/automations between devices, web APIs, low-level hardware stuff and a whole lot more. You can even build your own HomeKit “accessories”.
I’m currently using it to build my own adaptive lighting setup, since who tf knows how long it’s gonna take before the homebridge community is able to reverse-engineer the native version.
You can see all the plug-in created by the community and I remember trying some of them for state machine capabilities. https://flows.nodered.org/
You can also use the function node to try it yourself in JavaScript. https://nodered.org/docs/user-guide/writing-functions
According to the website, they list a number of ways to install it. LXC is just a Linux container. I don't see why you couldn't run in that.
EDIT: I just installed it in a container using the turnkeylinux nodejs template. I setup the container, add my user, import ssh key, installed sudo, then ran sudo npm install -g --unsafe-perm node-red
and launched it with node-red
.
I can then access it from my local browser.
It's really dead simple with npm, docker, or snap.
> gcc - needed to compile any binary components of nodes you want to install
idk when that comes in to play but to get started, it's not needed. besides, it's a simple install from the ubuntu repos if you do.