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

Python Events : Sub/Slave Devices status update don't show in DE.Devices["devicename"].n_value_string #5803

Open
Refhi opened this issue Aug 27, 2023 · 4 comments

Comments

@Refhi
Copy link

Refhi commented Aug 27, 2023

Up to date Domoticz Dockerized (15512) :

  • create a dummy switch and a dummy door lock
  • make the door lock the slave of the dummy switch
  • monitor the status of the door lock in a python events script
  • if you manually change the lock status to Unlocked by any way (clicking on it, api call, etc.) you get the proper data with DE.Devices["devicename"].n_value_string and in the other places (json, #/LightSwitches)
  • though if you use the dummy switch, it changes the lock status to Unlocked via the slave link (it ok visually in #/LightSwitches and on the json call /json.htm?type=command&param=getdevices&rid=IDX), but not in DE.Devices["devicename"].n_value_string which keep the "Locked" status
  • it seems Unlocked to Locked works properly in both scenario.

Simplified testing script used (Python, Trigger = All) :
import DomoticzEvents as DE
garage_is_open = DE.Devices["Status Garage"].n_value_string
DE.Log(f"garage_is_open = {garage_is_open}")

@github-actions
Copy link

@Refhi Please mind your language.

@Refhi
Copy link
Author

Refhi commented Aug 27, 2023

@Refhi Please mind your language.

Uhhhhh am I getting scolded by a bot for using the "dummy" word in a (I think) perfectly reasonable context ?😳

@waltervl
Copy link
Collaborator

You probably found an issue but why do you want to make a Doorlock slave of another switch? Why not switch the doorlock directly?

@Refhi
Copy link
Author

Refhi commented Aug 30, 2023

Oh, that was a remnent of an old setup I had. I removed it since the bug report.
So right now it's not really a bother to me, but I though a bug report would be interesting anyway in case someone stumble onto something similar. Or if it can help the devs.

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