sepia-docs icon indicating copy to clipboard operation
sepia-docs copied to clipboard

Teaching multiple personal command doesn't work as expected

Open gafk opened this issue 4 years ago • 4 comments

I have several routines in openhab that are triggered by switching a Switch item on. I want to have a custom Sepia command for each routine, but if I have more then one item tagged, Sepia will always ask whicht item to trigger instead of just triggering it... Let me try to explain via example:

these are my openhab items:

Switch Routine_Gute_Nacht "Gute Nacht" ["sepia-type=other", "sepia-room=unassigned", "sepia-name=Gute Nacht"] Switch Routine_Wochenende "Wochenende" ["sepia-type=other", "sepia-room=unassigned", "sepia-name=Wochenende"]

And this is what I teached in Sepia Teach UI:

When I say: Ich gehe ins Bett <other>;;<Gute Nacht> <unassigned> <on> Custom answer: Gute Nacht When I say: Es ist Wochenende <other>;;<Wochenende> <unassigned> <on> Custom answer: Endlich Wochenende

Instead of executing the command, Sepia will ask "Meintest du Wochenende?"

I played around a little and found that if I assign each item to a different room or give them a different type it works as expected. But as soon as there is more than on item of the same type in the same room it breaks.

gafk avatar Oct 31 '20 07:10 gafk

Hi,

I think the problem might be the way you defined the routine name. Try the following: <other>;;Gute Nacht (without < and >, this only applies to so called "generalized" values) Alternatively you can use the JSON version (type=processed):

{
    "value_local": "Gute Nacht Routine",
    "device_tag": "Gute Nacht",
    "value": "other"
}

fquirin avatar Nov 05 '20 09:11 fquirin

Thank you, leaving out the "<>" fixed that!

On a similar matter: If I have defined a device in openhab e.g. like

Switch 3D_Drucker_AnAus "3D Drucker" ["sepia-type=device", "sepia-room=garage", "sepia-name=3D Drucker"]

I always have to say (in German...) "Schalte Gerät 3D Drucker in der Garage aus". Just saying "Schalte 3D Drucker in der Garage aus" does not work, although I think this is the more natural way of saying that...

Right now I have to create custom commands for every device if I want it to work without "Gerät"...

gafk avatar Nov 11 '20 14:11 gafk

I always have to say (in German...) "Schalte Gerät 3D Drucker in der Garage aus". Just saying "Schalte 3D Drucker in der Garage aus" does not work, although I think this is the more natural way of saying that...

@gafk This unfortunately is a drawback of the "device" class. Basically the reason is that a device name can be anything and without a direct indication that you are referring to a device the probability for cross-talk with other services is very high. Maybe I could add an option that will enable the user to add his own device type via some UI in the Control HUB :thinking:

fquirin avatar Nov 21 '20 09:11 fquirin

Looking forward to see if you come up with something clever ;-)

gafk avatar Nov 26 '20 15:11 gafk