how to use "onNotification" function in python plugin file

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!
Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
Post Reply
jia175891641
Posts: 10
Joined: Tuesday 12 June 2018 17:07
Target OS: Raspberry Pi
Domoticz version: V3.9000
Location: China-Zhejiang
Contact:

how to use "onNotification" function in python plugin file

Post by jia175891641 » Tuesday 12 June 2018 17:59

Version: V3.8135 (stable)
Platform: windows
Plugin/Hardware: no hardware,the code down from "https://github.com/domoticz/domoticz/bl ... emplate.py"
Description:
i do not know how to use (or how to active) "onNotification" callbacks function, who can tell me ? i find in Developing_a_Python_plugin.pdf .but is too simple
Image https://photos.app.goo.gl/PCz9nydNyVge7yzJ6

and this is my virtual hardware which download from "https://github.com/domoticz/domoticz/bl ... emplate.py"

Image https://photos.app.goo.gl/CTwGGWKrgupCJuGVA
and i've active all Notification system , as matter of fact,my phone is aleady receiving Notification(prowl)
Image https://photos.app.goo.gl/LdhwxHCxj84NHJne7

this is my code
Image https://photos.app.goo.gl/G6N43jv2bQTSJxq79

and this is runing debug logs
Image https://photos.app.goo.gl/LLsPLBRmUqjjymYY9
Image https://photos.app.goo.gl/wfjigTU8hg1rDcWT8

I mean when i press "switch" button . the onCommand function executioned and loged at history file but。。。 the onNotification no run yet
========================================================================================
i don't know how to post imgs, i used google photo album . pls copy the url at brower sorry
i am chinese. i've studied Domoticz about six months,this is my first time i've asked a question , i hope you can help me thank you !!!
只要够努力 时间总会给你想要的

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests