Pull out data from domoticz log to plugin

Python and python framework

Moderator: leecollings

Post Reply
oskarion
Posts: 5
Joined: Friday 13 November 2020 15:05
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Pull out data from domoticz log to plugin

Post by oskarion »

Hello, I write domoticz plugin for cummunication with my controller by rs-232. How can I pull out informations from domoticz logs to my plugin?
My controller returns informations about state of outputs when i change one of them by calling onCommand function e.g switch.

Code: Select all

2020-11-22 20:30:02.119 (Sterownik) 41 54 2b 53 65 74 4f 75 74 3d 31 2c 30 2c 31 2c 30 2c 30 2c AT+SetOut=1,0,1,0,0,
2020-11-22 20:30:02.119 (Sterownik) 30 2c 30 0a 0d .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. 0,0..
2020-11-22 20:30:02.194 (Sterownik) Pushing 'ReadEvent' on to queue
2020-11-22 20:30:02.220 (Sterownik) Processing 'ReadEvent' message
2020-11-22 20:30:02.220 (Sterownik) Received 17 bytes of data
2020-11-22 20:30:02.220 (Sterownik) 4f 3d 31 2c 30 2c 31 2c 30 2c 30 2c 30 2c 30 0d 0a .. .. .. O=1,0,1,0,0,0,0..
Command "AT+SetOut" changes state of outputs. Command "O=1,0,1,0,0,0,0" says which output has been turned on "1" and which has been turned off "0". I want to save this information in variable e.g for change switch image or something else. Most important thing for me is how can I read logs from plugin function.
Thank you
Post Reply

Who is online

Users browsing this forum: Doler and 1 guest