This Node Red flow creates a page menu structure on you Buttonplus device. Page main
is always visible, for things like time etc. You can also assign buttons to main
, for instance as a trigger to change the menu page. See our Wiki for documentation.
Installation
- Create a new flow from
node_red_config.flow
- Open
01 global config
and add device configuration parameters, add page names as well. Keepmain
as first page! - Edit the node below
03 Contains the default button labels
. The text behind msg.label.3 will for instance appear on the right button, 1st row below display.toplabel
defines the toplabel andledrgb
the color of the led - Edit the nodes below
04 Displayitems for Main
. Add parameters like position, size, page it belongs to. When you add a field, simply copy a node and place it in the flow. Make sure to update the displayitem to a unique number. - Do the same for
05 Displayitems from pages
; add node in the page flow you like. Top connection of the Switch node is the first page aftermenu
- Edit
02 pagebutton
to assign buttons tomain
. SeeDescription
tab inside the node. - The subflows under
07
contain the actions per page. Signals are split betweenpress
,release
andlongpress
(msg.state
).msg.button
contains the button number. - These nodes should not need update when bugs are fixed in the flow with all the logic, which is next:
- Create a new flow from
node_red_menu.flow
- Add device id to
01 general config
- Deploy
Notes:
- Based on firmwate 1.08
- Flow is for 3-bar configuration only, 2, 1 and 0 bar support needs to be added
- Active page for the display can be set by sending a page name to
<basetopic>/<bplusdevice>/page
, for instancebuttonplus/wk1/page
- Active page for the buttons can be set by sending a page name to
<basetopic>/<bplusdevice>/buttonpage
, for instancebuttonplus/wk1/page
- Brightness can be controlled by sending a numeric value (1-100) to
<basetopic>/<bplusdevice>/brightness
, for instancebuttonplus/wk1/brightness
- Blocks requiring configuration are placed in yellow groups.
- Topics follow this naming convention: https://github.com/koenhendriks/ha-button-plus/wiki/mqttstructure.md <-- to be updated, page is added
buttonplus/<device>/button/<page>/<buttonID>/state
- Uses the following additional, optional nodes. Not used in
node_red_menu.flow
and not used in the top part ofnode_red_config.flow
- Requires configuration of Node Red with file based storage of variables. Read this when using the addon
- See these topics on GoT
![Screenshot 2024-01-28 at 09 36 58](https://private-user-images.githubusercontent.com/10166350/300248503-3392bb58-5d06-4585-ad23-faa9f774e6ce.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5ODY4NzAsIm5iZiI6MTczODk4NjU3MCwicGF0aCI6Ii8xMDE2NjM1MC8zMDAyNDg1MDMtMzM5MmJiNTgtNWQwNi00NTg1LWFkMjMtZmFhOWY3NzRlNmNlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDAzNDkzMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWYzYmRhODhjNDU0OWJmMGFiOGQzNzYyYWExZmRjMmU2ZDY5NzM2NzZlYjc2ZmFkOGY3MmMwNjQwODI1YTA2MWYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.KoNCpaHXyEDK32Reg4EgLXmcJw2iNyNewvbxzc53laQ)
![Screenshot 2024-01-28 at 09 38 44](https://private-user-images.githubusercontent.com/10166350/300248636-ddf4e163-7946-461a-ab89-959ffd4663d1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5ODY4NzAsIm5iZiI6MTczODk4NjU3MCwicGF0aCI6Ii8xMDE2NjM1MC8zMDAyNDg2MzYtZGRmNGUxNjMtNzk0Ni00NjFhLWFiODktOTU5ZmZkNDY2M2QxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDAzNDkzMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTNiNzBmMmQ1YzY5YTY1Y2JhYThiMGI1ZDdkZWZjN2VjMDJjN2E4YTEwNWVhZjBiOWM0ODljNjIwN2NhMTM1Y2MmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.U87OugxdYniEE6BtW4IMhbPRW-5WKhQYNGtJZCkY3BY)