Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device State Locale Plugin only triggers if STATE changed via andFhem #1297

Closed
LichtiMC opened this issue Sep 4, 2018 · 2 comments
Closed

Comments

@LichtiMC
Copy link

LichtiMC commented Sep 4, 2018

I have a working andFhem - Tasker setup. (I can control lights through tasker.)
I also have a working GCM setup. (Device state is synchronized to andFhem for devices included in attribute deviceFilter.)

Even though my tasker action is only being executed, if I switch on the light via andFhem. If it's switched on by any other source all of the readings and internals (particularly the Reading state and Internal STATE) are being updated in andFhem, but tasker does not recognize it.

Any ideas?

Edit: If I set menu item "notifications" to "all updates", notifications appear when device is being switched via FHEMWEB.
If I set it to "state-updates only", nothing appears by switching the device.
By the way: Internal "STATE" really is being updated all the time in andFhem.

This is the android-notification:

Title: Carport_Praesenz
setG1 : on,state : on

This is my device definition:

defmod Carport_Praesenz KNX 6/7/3:dpt1
attr Carport_Praesenz IODev tul
attr Carport_Praesenz devStateIcon on:on:off off:off:on
@klassm
Copy link
Owner

klassm commented Sep 8, 2018

Ok let's see whether I understood this correctly:

  • You got a GCM / FCM setup sending your states for configured devices to andFHEM
  • You got a Tasker setup including a Device State Locale Plugin, action on some value set in andFHEM (is this a state, or what do you want to listen for)?

Now your problem is that you want to listen not only for the device state but for some different value. Is this correct?

If yes: the device state locale plugin is currently quite stupid. Actually what it does is comparing the internal device state against the one specified in Tasker. That's just the one value that is compared. This is also why no attributes, internals or whatever are used in this comparison.
Probably this could also be extended to allow querying other things - but I'd like to know the use case first (as this is quite some work).
In addition, the condition query plugin is not as nice as you might think, as this won't switch synchronously, but come back to andFHEM and ask ever some seconds whether something has changed. This is not something like push notifications, but really polling.
By the way: There is another, more generic method: http://andfhem.klass.li/external-interfaces/ "Receiving device state change broadcasts". This will allow you to synchronously (whenever a device is switched or a GCM notification is received) send values to Tasker and then execute actions there. This is also not really restricted to states, but allows to handle everything coming over FCM.

Does this help?

klassm added a commit that referenced this issue Sep 9, 2018
@klassm
Copy link
Owner

klassm commented Sep 9, 2018

I just released a new beta version incl. those changes for the condition query plugin. If you want, you can just try it there. If not - it will be released with the next production version anyways.

@klassm klassm closed this as completed Oct 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants