I'm sharing how to send to the KNX bus the Date and Time ciclically, using Node-Red with realKNX
Open the web interface of realKnx and start the Node-Red editor by selecting the gear (little red circle)
1.jpg
Open the Hamburger Menu on top right (the hamburger menu is the menu with three lines) and select "Manage Palette"
A tab will open (like below). Click "install" and search for "knxjs" and install it.
3.jpg
Select from the left pane the "inject" ribbon and drop it into the center editor area.
Then drag a "function" ribbon and a "knxjs Device" into the center editor area.
Link all toghether as you can see below.
Make this two times, 1 for date (Data) and 1 for time (Ora), as below:
2.jpg
Then open the green KNX ribbon (double click) and set the GA and the IP of your Router/IP Interface. Please see the documentation on how to do that, but it's very simple. One GA is for the date (Data) and one is for the time (Ora)
Double click on the function ribbon Data (orange ribbon) and insert this code in the "function" area for the DATE: return {payload:{"value":new Date()}}
Double click on the other function ribbon "Ora" (orange ribbon) and insert this code in the "function" area for the TIME (Uebersetzung: Ora): return {payload:{"value":new Date()}}
Both codes "return {payload:{"value":new Date()}}" are identical. The knxjs Palette will separate the time and hour itself.
5.jpg
Double click on the "inject" ribbon (blue ribbon) and do like this, for both blue Ribbons. The "Payload" text can be anithing you want, for example "italy is not in the 2018 world Cup":
4.jpg
That's all.
I'm sorry for this long post.
In the newest version of Node-Red, you can simply copy your nodes (the ribbons) and paste it as plain Json text. Then you can import it by simply copy/paste the json text.
In the current version you can only export the entire project and i do not want to do that, because there are private things that i do not intend to share.
Please feel free to ask any question.
Open the web interface of realKnx and start the Node-Red editor by selecting the gear (little red circle)
1.jpg
Open the Hamburger Menu on top right (the hamburger menu is the menu with three lines) and select "Manage Palette"
A tab will open (like below). Click "install" and search for "knxjs" and install it.
3.jpg
Select from the left pane the "inject" ribbon and drop it into the center editor area.
Then drag a "function" ribbon and a "knxjs Device" into the center editor area.
Link all toghether as you can see below.
Make this two times, 1 for date (Data) and 1 for time (Ora), as below:
2.jpg
Then open the green KNX ribbon (double click) and set the GA and the IP of your Router/IP Interface. Please see the documentation on how to do that, but it's very simple. One GA is for the date (Data) and one is for the time (Ora)
Double click on the function ribbon Data (orange ribbon) and insert this code in the "function" area for the DATE: return {payload:{"value":new Date()}}
Double click on the other function ribbon "Ora" (orange ribbon) and insert this code in the "function" area for the TIME (Uebersetzung: Ora): return {payload:{"value":new Date()}}
Both codes "return {payload:{"value":new Date()}}" are identical. The knxjs Palette will separate the time and hour itself.
5.jpg
Double click on the "inject" ribbon (blue ribbon) and do like this, for both blue Ribbons. The "Payload" text can be anithing you want, for example "italy is not in the 2018 world Cup":
4.jpg
That's all.
I'm sorry for this long post.
In the newest version of Node-Red, you can simply copy your nodes (the ribbons) and paste it as plain Json text. Then you can import it by simply copy/paste the json text.
In the current version you can only export the entire project and i do not want to do that, because there are private things that i do not intend to share.
Please feel free to ask any question.
Kommentar