Need help creating a routine

If anyone is really bored can you help out trying to recreate the below custom automation, i have tried all sorts of combinations of ways but just keep failing

The basic requirement is to have different individual colours rotate in sequence, switched on and off by a vswitch

Is this even possible with routines as they are at present




This groovy smart app was specifically written by the excellent @Cobra for the Fibaro RGBW driver and worked perfectly, now the Fibaro uses an edge driver it no longer functions and sadly @Cobra has moved on to other places

Well, with routines it becomes a bit more difficult since the presentation of the colorControl capability does not have a presentation for automation/conditions and therefore it is difficult to make a sequence if you cannot write a condition for a certain color is set.

I don’t know if @nayelyz know why this presentation automation/ conditions doesn’t exist

.\smartthings capabilities:presentation colorControl 1 -j
{
    "detailView": [
        {
            "label": "{{i18n.label}}",      
            "displayType": "numberField",   
            "numberField": {
                "value": "hue.value",       
                "valueType": "number",      
                "unit": null,
                "command": "setHue",        
                "argumentType": "number",   
                "range": [
                    0,
                    255
                ]
            },
            "state": null
        },
        {
            "label": "{{i18n.label}}",      
            "displayType": "numberField",   
            "numberField": {
                "value": "saturation.value",
                "valueType": "number",      
                "unit": null,
                "command": "setSaturation", 
                "argumentType": "number",   
                "range": [
                    0,
                    255
                ]
            },
            "state": null
        }
    ],
    "automation": {
        "conditions": [],
        "actions": [
            {
                "label": "{{i18n.label}}",
                "displayType": "numberField",
                "numberField": {
                    "command": "setColor",
                    "argumentType": "object",
                    "unit": null
                }
            }
        ]
    },
    "id": "colorControl",
    "version": 1
}
1 Like

No, I don’t have info about that. I’ll create a report to see if it can be added

2 Likes

Thank you for the reply Mariano, your edge driver is a miracle so we can keep using these devices

I can create on off with different colours in sequence but there is no way i can work out on how to continue the rotation

Vswitch on
Colour green 10 secs
Colour blue 10 secs
Colour white 10 secs
start sequence again until
Vswitch off

Also using routines as they are now i get on off between colours but the device is happy to change between colours without a on off cycle

Since the RGBW controller has the level and the rgb in different components, you can use the level to simulate a color, let me explain:
For example

  • 95% = red color
  • 96% = blue
  • 97% = green
  • 98% = magenta

You do an automation to turn on the virtual switch:

  • Then:
    • level 96% and delay this action 10 sec
    • RGB Set: Red

2nd automation:

  • If level = 96% and virtual switch = On Then:
    • Set Level 97% and delay this action 10 sec
    • RGB Set: Blue

3rd automation:

  • If level = 97% and virtual switch = On then:
    - Set Level 98% and delay this action 10 sec
    - RGB Set: Green

4th automation:

  • If level = 98% and virtual switch = On then:
    - Set Level 95% and delay this action 10 sec
    - RGB Set: Magenta

5th automation:

  • If level = 95% and virtual switch = On then:
    - Set Level 96% and delay this action 10 sec
    - RGB Set: Red

6th automation:

  • Turn off virtual switch THEN switch RGBW controller Off

I don’t know if it will work, I can’t test it

@fido

You can also use a virtual dimmer instead of a virtual switch and they would look like this

Codigo is the virtual dimmer and Luz Cocina is the RGBW controlled:





Thank you Mariano for taking the time to share your thoughts

The problem with both of your examples is that they stop at the last part of the automation, there is no ‘go to start’ available in an automation

Your examples are what i have already tried, i can successfully automate a single colour to follow another colour in an automation but it stops after the last colour in the automation there is no automatic way to start again

I did think about multiple Vswitches and detecting when a Vswitch was off have another to switch it back on but its messy and not a practical or elegant solution

Example
Automation 1
If
Vswitch 1 on
Vswitch 2 on
Then
Colour
Colour
Colour
Vswitch 1 off
Vswitch 2 off

Automation 2
If
If Vswitch 1 off
Then
Switch on Vswitch 1

That kind of thing… i appreciate another Vswitch is required to control the above but honestly, its giving me a headache

I know routines are designed to stop a race scenario but in this case a race sequence is required

The original Smart app from @cobra utilised not only the Fibaro RGBW setting for fade duration but also it would simply get to the last colour set in the smart app wait the set time and start again

This produced a continuous rolling colour change with no visual break between colours, they simply faded into each other for eternity or until the smart app was switched off with a Vswitch

@fido,
I have tested the automations and making these changes works fine.
If colorControl presentation were fixed it wil be more easy.

  • You need a virtual switch to turn on and off the sequence of the RGBW controller

  • A virtual dimmer to change colors in a loop

  • 6 routines for 3 colors loop. One more to add new color

  • Routine to turn on sequence and RGBW controller

  • Routine to turn off sequence and RGBW controller

  • First color routine

  • Second color routine

  • Third color routine and set the level to run the first color routine again

  • Routine that leaves the dimmer off and at 1% to ensure the good start of the sequence the next time.

This is a video of the loop

If you need a specific transition time between colors change, then you can try to use the parameters 8, 9,10, 11 in RGBW controller preferences

1 Like

Above and far beyond the call of duty, thank you Mariano when i get time at home i will recreate the sequences

But as a side note… from 1 Smart app to a multitude of devices and automations… can users past and present be blamed for leaving Smartthings, your solution shows it is possible to achieve something but you need to be highly experienced and extremely logical to get to the end result… yes it may be a niche requirement but really !!

Said with all due respect and from what I understand in many of your posts, I think you would do well to redirect your frustration in find solutions by looking to the future, here or out here and not constantly looking back, suffering for something that is not going to return.

If things were easy for users in the past, it was because there were people who worked very hard to make and share their DTHs and smartApps, not because smartthings made sophisticated DTHs or Apps.

Most of the official smartthings smart Apps were rubbish! simple automations!!

I understand that Someone took advantage of the global value of smartthings and sold it to the highest bidder and that is no longer solvable.

Adding these automations or functions to the driver itself may take just over an hour of work. Make an app a little more complicated.
The same or less than it cost to do it in groovy.

The problem may be that people are no longer willing as they were years ago, to contribute their work again to help grow a business that is not theirs, that may be one of the differences.

Custom home automation will never be easy for most users.
Among other reasons, I think it changes so quickly that once you have it under control, something becomes obsolete and you have to start over.

1 Like

Its a fair point Mariano and i always value your thoughts and time to help me and others

Reading between the lines you are saying, 'stop moaning and move on ’ :grin: i would and should but i strongly believe we have lost a basic fundamental, useability, Smartthings at present is not user friendly, plain and simple, if a new user tries to install and use ST it is confusing, illogical and poorly laid out.

That not only applies to the general UI but to automations and the lack of links from device to scenes and Smartapps

I could say nothing and just put up but i would like ST to become better in all aspects

1 Like

I think we all want it to improve and complaining about what doesn’t work is necessary. :wink:
Hopefully the app will improve, especially in speed when opening.
I don’t know if because I used the old app less, I like it much less than the new one and especially in the use of automations. In the old one you had to download them as a smartApp and then configure it. It was more complicated in my opinion.

And something that English speakers do not miss, the local language.

The rules API seems to me to have an ease of use of 0 for those who need more complicated routines.
I don’t know if they have in mind to make something easier to use, if not I don’t think it will become very popular.

1 Like

We all want the same thing Mariano all be it from dufferent angles, i have no doubt that using the classic app now would be painfull but my point is not so much towards the loss of the old app but more to the useability of it, the way it presented operations was better for able and disabled people alike

Better use of colour, sizing, linking to pertinent items all made for an instantly controlable app that allowed the user to have complete control over what happened and why, even if an extended period of time passed and a device or automation appeared to be faulty it was easy to sort out issues

That is what is missing, not the old app but its basic useability

Anyways we are sidetracking a little bit

1 Like