Hop til indhold
  • 0

Hvordan kan man "aktivere" et tryk via Google Home


PeterOL
 Share

Spørgsmål

Hej forum,

Jeg er endnu en ny håbefuld person der er startet med at eksperimentere med Google Home talekommandoer for at styre lys via min Visual IHC 3 controller.
Jeg har fået de almindelige kommandoer til at virke ved at læse meget her og på openhab.org.
Mit setup er openhab2 på en raspberry PI 3+B alt software er installeret for max en uge siden, så versionerne er nye.

Mit spørgsmål er som sådan simpelt nok. Jeg har i stuen et tryk hvor jeg har kodet en "sluk alt" og en "tænd alt" begge i stuen.
Hvordan kan jeg aktivere et tryk, så jeg kan sige "OK google tænd alt"?

Jeg har prøvet at tilføje trykket i items-filen, men det virkede ikke.

Hilsen Peter

Link til kommentar
Del på andre sites

  • Svar 149
  • Created
  • Seneste svar

Top Posters For This Question

Recommended Posts

  • 0
9 minutter siden, Christian Bille skrev:

Var det en file du sendte, eller skulle den hentes et sted?

Så vidt jeg husker, så gemte jeg den på dit skrivebord.. Den hedder .jar søg efter den. 
 

5 minutter siden, Christian Bille skrev:

Jeg har installeret IHC  binding 1.13.0 ind under addons via paper ui hvis det er der du mener, eller er det den gamle?

Ja det er den gamle. Den skulle du ikke bruge mere :) Afinstaller den bare igen.

Link til kommentar
Del på andre sites

  • 0
2 minutter siden, Christian Bille skrev:

Tror jeg har fået slettet den, kan du sende den til mig på mail?

christian@bille.net

og skal den så køres, eller skal den lægges ind fysisk?

Du kan hente filen her:
https://www.dropbox.com/s/opmqiym14hch478/org.openhab.binding.ihc_2.4.0.201901091843.jar?dl=0

Den skal lægges ind på din Rpi i folderen /usr/share/openhab2/addons

Husk at kig efter i loggen når du har lagt den ind. Der går lige et par sekunder, så skulle openhab gerne selv opdage den og starte den.

Link til kommentar
Del på andre sites

  • 0

Kan tænde, men den slukker ikke når jeg ber om det via google home, her er loggen:(har prøvet et par gange)


 

2019-02-28 19:13:34.124 [GroupItemStateChangedEvent] - gV changed from OFF to ON through Tryk_LightStue

2019-02-28 19:13:34.411 [vent.ItemStateChangedEvent] - Light_STUE changed from ON to OFF

2019-02-28 19:13:34.455 [ome.event.ItemCommandEvent] - Item 'Tryk_LightStue' received command OFF

2019-02-28 19:13:34.463 [nt.ItemStatePredictedEvent] - Tryk_LightStue predicted to become OFF

2019-02-28 19:13:34.480 [vent.ItemStateChangedEvent] - Tryk_LightStue changed from ON to OFF

2019-02-28 19:13:34.486 [GroupItemStateChangedEvent] - gV changed from ON to OFF through Tryk_LightStue

2019-02-28 19:13:50.988 [ome.event.ItemCommandEvent] - Item 'Tryk_LightStue' received command OFF

2019-02-28 19:13:50.997 [nt.ItemStatePredictedEvent] - Tryk_LightStue predicted to become OFF

Link til kommentar
Del på andre sites

  • 0

 

2019-02-28 19:13:34.486 [GroupItemStateChangedEvent] - gV changed from ON to OFF through Tryk_LightStue

2019-02-28 19:13:50.988 [ome.event.ItemCommandEvent] - Item 'Tryk_LightStue' received command OFF

2019-02-28 19:13:50.997 [nt.ItemStatePredictedEvent] - Tryk_LightStue predicted to become OFF

2019-02-28 19:16:56.151 [ome.event.ItemCommandEvent] - Item 'Tryk_LightStue' received command ON

2019-02-28 19:16:56.178 [nt.ItemStatePredictedEvent] - Tryk_LightStue predicted to become ON

2019-02-28 19:16:56.202 [vent.ItemStateChangedEvent] - Tryk_LightStue changed from OFF to ON

2019-02-28 19:16:56.210 [GroupItemStateChangedEvent] - gV changed from OFF to ON through Tryk_LightStue

2019-02-28 19:16:56.438 [vent.ItemStateChangedEvent] - Light_STUE changed from OFF to ON

2019-02-28 19:16:56.530 [ome.event.ItemCommandEvent] - Item 'Tryk_LightStue' received command OFF

2019-02-28 19:16:56.536 [nt.ItemStatePredictedEvent] - Tryk_LightStue predicted to become OFF

2019-02-28 19:16:56.545 [GroupItemStateChangedEvent] - gV changed from ON to OFF through Tryk_LightStue

2019-02-28 19:16:56.552 [vent.ItemStateChangedEvent] - Tryk_LightStue changed from ON to OFF

Link til kommentar
Del på andre sites

  • 0
10 minutter siden, Christian Bille skrev:

Nu har jeg også problemer fra ihc visuel program.

den kan ikke se controller, men svare på ping.

Er det noget java baseret?

Visual bruger ikke Java, så nej. Problemet med at controlleren svare på ping, men ikke kan nåes via Visual ses ofte på en HW 6.1 eller HW 6.2 controller i forbindelse med at serviceview eller et trejdeparts produkt køre samtidig.

Link til kommentar
Del på andre sites

  • 0
1 time siden, Christian Bille skrev:

tror der skal laves noget mere i pushbutton rules.

den skal jo trigge samme funktion på et off signal.

Nu har jeg siddet og rodet lidt med det, (har installeret IHC binding 2.4 på min almindelig Rpi som også køre IHC binding 1.13). 
Jeg når samme resultat som dig. Og det er vildt mystisk, for der absolut intet, når man beder Google om at slukke. Det må simpelthen være den binding der er anderledes, for det virker fint med Binding 1.13.... Jeg tror vi er nødt til at skal have Pauli med på råd her.. 


Hey @Pauli Anttila 
I think there is a issue with the latest IHC binding (org.openhab.binding.ihc_2.4.0.201901091843). Using Google Home/voice command seems to be a problem which the old IHC binding 1.13 don´t have.
 
I have configured a Switch (push button) to control a kip functionblok in Visual. Plain an simple. 
This is the item: 
 

Switch testIHC     "Stue M1 [%s]"       <switch>  	(gV) [ "Switchable" ]	{ channel="ihc:controller:elko:input30298" }

((gV) is because I use a rule to switch off the switch (toggle effect)). 

What happens is: 
When I tell Google Home to turn ON "Stuen M1" it works just fine. The switch toggles and the Kip functionblok toggles, and the light turns on. (switch turns ON, and my rule turn it OFF 200ms after). 

But when I tell Google Home to turn OFF "Stuen M1", nothing happens. The switch doesnt react at all.  Google Home return with an "okay....". But the command never goes to the binding (or through the binding). 
I have also tried using the profile "Toggle" as well, It makes no differences.

Toggle the switch from a sitemap works fine both turning ON and OFF. 

My first thought was, this has to be something wrong in the Google Home connection. But doing exactly the same using the old 1.13 Binding, Google Home will toggle the switch each time I tell it to turn ON and OFF. So I believe this is a binding problem somewhere. 
Can you help in some way?? 

PS. I have both bindings installed on the same Rpi running the same openhab 2.5, so it cant hardly be an openhab problem.  I´m pretty positive this is a binding issue in the org.openhab.binding.ihc_2.4.0.201901091843.  

Link til kommentar
Del på andre sites

  • 0

Follow up on this one.
I can get Google Home to turn the switch ON and OFF fine if I dont use the (gV) rule to force the switch to turn OFF..

I have a feeling the new binding actually read the state of the switch, and because it´s OFF, it never change state when asking Google Home to turn it OFF. This will ofcouse become a major issue using push buttons..

Anyway, I have a way to deal with this @Christian Bille
Fjerne dine switces hvor du bruger Kip funktionblok. Det kommer ikke til at virke. 
I stedet så bruger du resourceID direkte fra lampeudtaget (udgangen) i din items. På den måde kan du tænde/slukke lampeudtaget via Google home, og også via de fysiske tryk i dit hjem som du plejer. 

Det er egentlig også den helt rigtige måde at gøre det på. Man skal bare passe på med at aktivere et produkt direkte, for hvis ikke der er tilbagemelding til Fbén, så kan funktionen gå ud af sync i Controllerne. Men i det her tilfælde kan det ikke ske, dels fordi udgangen også følger med i funktionsblokken. Men også fordi det er en Kip blok, så den er ret ligeglad med, om dit lys er tændt eller slukket i forvejen. Hvilket selvfølgelig er uhyre logisk, når man lige får tænkt lidt dybere over det. 

ResourceID fra lampeudtaget tages her: (se vedhæftet billede).
261454691_resourceIDlampeudtag.thumb.png.ca878b6b50bcf82222f6e00b892deec9.png

Og sådan her ser item ud:
 

Switch testIHClys  "Stue M2 lys [%s]"   <light>   	        [ "Lighting" ]	        { channel="ihc:controller:elko:output27995" }


PS. Husk at synkronisere dine enheder i Google Home :-)

Link til kommentar
Del på andre sites

  • 0

Nu har jeg så kun lige sidste problem, at jeg ikke kan se min controller fra ihc visuel programmet, og dermed ikke kan ændre i mit projekt.

Dette er efter opdatering af firmware og opdateret java.

Har læst i andre tråde at flere har dette problem.

Deres løsning har været genstart af Deres PC og Controlleren.

har du nogen ider til dette?

Link til kommentar
Del på andre sites

  • 0
On 2/28/2019 at 11:07 PM, Kandersen said:

When I tell Google Home to turn ON "Stuen M1" it works just fine. The switch toggles and the Kip functionblok toggles, and the light turns on. (switch turns ON, and my rule turn it OFF 200ms after). 

@Kandersen, So if I understand this correctly, you have a rule which will set Switch OFF after 200ms? If yes, this is most probably the reason why it doesn't work from Google Home when you say OFF as you item state is already OFF. You should be able to see this from openHAB logs. What happens when you say OFF, will item receive OFF command? You can even remove IHC binding linking from the item as it shouldn't have influence to this. 

Link til kommentar
Del på andre sites

  • 0
4 timer siden, Pauli Anttila skrev:

So if I understand this correctly, you have a rule which will set Switch OFF after 200ms? If yes, this is most probably the reason why it doesn't work from Google Home when you say OFF as you item state is already OFF.

Hi @Pauli Anttila

Exactly.. This is what I figured as well. Telling Google Home to turn OFF a switch which is already OFF, doesnt get through the binding. 

4 timer siden, Pauli Anttila skrev:

You should be able to see this from openHAB logs.

I can.. 
This is what happens when I ask google home to turn on my test item:
 

2019-03-04 23:22:37.378 [ome.event.ItemCommandEvent] - Item 'testIHClysKip' received command ON
2019-03-04 23:22:37.393 [nt.ItemStatePredictedEvent] - testIHClysKip predicted to become ON
2019-03-04 23:22:37.405 [vent.ItemStateChangedEvent] - testIHClysKip changed from OFF to ON
2019-03-04 23:22:37.408 [GroupItemStateChangedEvent] - gV changed from OFF to ON through testIHClysKip
2019-03-04 23:22:37.708 [ome.event.ItemCommandEvent] - Item 'testIHClysKip' received command OFF
2019-03-04 23:22:37.717 [nt.ItemStatePredictedEvent] - testIHClysKip predicted to become OFF
2019-03-04 23:22:37.727 [vent.ItemStateChangedEvent] - testIHClysKip changed from ON to OFF
2019-03-04 23:22:37.740 [GroupItemStateChangedEvent] - gV changed from ON to OFF through testIHClysKip

And this is what happens, when I ask google to turn off the same item:

2019-03-04 23:24:43.345 [ome.event.ItemCommandEvent] - Item 'testIHClysKip' received command OFF
2019-03-04 23:24:43.360 [nt.ItemStatePredictedEvent] - testIHClysKip predicted to become OFF

This is my test item:
 

Switch testIHClysKip  "Stue M2 kip [%s]"   <switch>   	(gV) [ "Lighting" ]	        { channel="ihc:controller:elko:input30298" }

(gV) is the rule to turn the switch off. 

This doesnt work.. And I fail to understand how to get it to work.
 
The old 1.13 binding this will work fine using google home to turn it on and off by this simple item:
 

Switch stort_badDimmerLys 		"Halogenlys i StortBad [%s]" 	<WallSwitch> 	[ "Lighting" ] 		{ihc="<5537553,>[ON:20314:100],>[OFF:20314:100]"}

How can I do the same using the new 2.4 binding? I simply don´t get it :wacko:

Link til kommentar
Del på andre sites

  • 0

 

20 hours ago, Kandersen said:

ihc="<5537553,>[ON:20314:100],>[OFF:20314:100]"

@Kandersen, So there is a function block behind of input30298? Function block input need raising/falling edge to do something, right? As input state is already OFF when OFF is written, nothing happens.

There is a pulseWidth parameter which can be used to send pulse to input rather than switch state. See page 2 and 3 on OH2 binding topic in this forum

 

Link til kommentar
Del på andre sites

  • 0
3 timer siden, Pauli Anttila skrev:

So there is a function block behind of input30298? Function block input need raising/falling edge to do something, right? As input state is already OFF when OFF is written, nothing happens.

Correct, there is the standard Kip function block. But the wired dimmers needs it (on/off puls) as well, to turn on/off from a single button.

3 timer siden, Pauli Anttila skrev:

There is a pulseWidth parameter which can be used to send pulse to input rather than switch state. See page 2 and 3 on OH2 binding topic in this forum

I have answered in the topic.. The question is better placed in that topic I guess. 

Link til kommentar
Del på andre sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gæst
Svar på dette spørgsmål

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loader...
 Share


×
×
  • Tilføj...

Important Information

Privatlivspolitik og We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

1200x630bb.png

ok