ChipChop Support Forum
Log in
Log out
Join the forum
My Details
REPLIES: 2
VIEWS: 292
BACK
REPLY TO THIS POST
Gizmo
03 Mar 2024
New Component - Button Group
New component type Button Group is now available in the Dev Console.

This type of component has been requested few times and it should be a nice addition to the ever growing list of features.
It can be used for things like remote TV controls, components that you want to have pre-set states like a fan with speed settings, heating, ovens, toasters...etc


It should be quite obvious how to use but just in case I will give a brief overview of the functionality.

Dev Console setup

You will find the Button Group in the list of pre-set components. It enables you to attach a set of up to 10 "command" buttons for a single component. Basically, each button acts as a pre-set command that when pressed sends that command to the device.

Usage rules

- The name of the button is the actual command that will be sent
- Currently there are no additional labels or icons that can be used
- You can have up to 10 buttons and any field left blank will be ignored and will not show a button in the ChipChop App (don't worry you will not end up with blank gaps if you leave some fields blank)
- You can use a maximum of 10 characters for the name - had to limit that as anything more simply wouldn't fit nicely on a phone screen
- The component is automatically considered "interactive" so changing the mode to "View Only" has no effect




ChipChop App view

I have tried to cover both the functionality in widget view and in the device details view.

- In widget view the component shows as a button with an array of squares icon (similar to the Pin Code) and when clicked will show the command buttons as a popup list
- In widget mode there is no change of colour representing the button being active or not. It's always active and the button is a shortcut, exactly the same as the Pin Code component



- In device details view the component shows as an array of buttons arranged side by side in groups of 4 and is sufficiently "thumb" friendly for quick access.




Hints

- The click on any of the command buttons will send the command in the same way as any ON/OFF or custom button...but...with one advantage, you can keep sending the same command over and over as if it was a "momentary" button.

- To use this component as a set of "momentary" buttons all you need to do is when you receive the command in your device to send an empty string status or a non-existent status.
For example if you have a set of buttons High, Low, Fast if you send a status "foo" ChipChop.updateStatus("motor","foo") because there is no such button none will be highlighted in the app.

- You can change the order of the button by changing the values of the input fields in the Dev Console. This change will be reflected instantly in the Web App.

- Sending a status with a button name will also mark that button as active in the app


I hope you will find this new component useful and if you are unsure how to use it let me know.





Attached images
jnogues
04 Mar 2024

Tested!! It works perfect. Nice widget!

Regards!


Attached images
Gizmo
04 Mar 2024

✌️