I have had a few instances recently of random devices not doing what they were told or doing strange things. Example being I woke up this morning and my kitchen light was on. It was off when I went to bed last night and I ran an 'All Off' scene at about 10pm from a flic button next to the bed which all worked fine. Now the device log for the kitchen light shows me that the light turned on at 11:30pm last night - but I have no info as to why this turned on. At the moment I'm blaming the cat but who knows...
This could have been one of my LUA scripts triggering something funny, but I have no idea.
My idea is could we add a 'reason' or 'method' string to a device update which appears on the device value log? Eg when doing an LUA update we pass something like
commandArray['Kitchen Light'] = "On FROM Security LUA Script"
With the next after the BY getting added to a new column on the log (Date, Data, From). Would make troubleshooting a lot easier rather than having to go back through the full domoticz log.
Thanks
Nick
Add text to Device Log when updating Value
Moderators: leecollings, remb0
- Siewert308SW
- Posts: 288
- Joined: Monday 29 December 2014 15:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: The Netherlands
- Contact:
Re: Add text to Device Log when updating Value
1. log is possible, you can create a print command in you script which will end up in Domoticz log.nickb512 wrote:I have had a few instances recently of random devices not doing what they were told or doing strange things. Example being I woke up this morning and my kitchen light was on. It was off when I went to bed last night and I ran an 'All Off' scene at about 10pm from a flic button next to the bed which all worked fine. Now the device log for the kitchen light shows me that the light turned on at 11:30pm last night - but I have no info as to why this turned on. At the moment I'm blaming the cat but who knows...
This could have been one of my LUA scripts triggering something funny, but I have no idea.
My idea is could we add a 'reason' or 'method' string to a device update which appears on the device value log? Eg when doing an LUA update we pass something like
commandArray['Kitchen Light'] = "On FROM Security LUA Script"
With the next after the BY getting added to a new column on the log (Date, Data, From). Would make troubleshooting a lot easier rather than having to go back through the full domoticz log.
Thanks
Nick
2. Are you using 433mhz modules, can't find it in your OP?
If so, then if your light is switched on without a reason i would think one of your neighbours has a device with the same device ID.
There for they triggered it (not on purpose) and there for no log in Domoticz other then that the light is turned on.
There is no way to tell domoticz a neighbour turned it on.
Setup:
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
-
- Posts: 4
- Joined: Wednesday 18 January 2017 19:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Add text to Device Log when updating Value
I'm well aware of the normal logging procedure and have plenty of LUA scripts writing logs but this is more to record the reason a device changed state. I have not been saving my domoticz log to disk until now because its been pretty reliable but now today 3 different devices have turned on randomly at times that are not linked to any other scheduled events or actions. Being able to see if it was an LUA event, or a User event, API event etc from the device summary/log page would simplify things with probably not a lot of development.
All devices are either Z Wave or LAN connected (RasPI GPIOs etc). The 3 devices today have all been Z Wave.
I'm not using OpenZWave because I find it to be quite unreliable and the Z Wave network management features are not great. Instead I'm using Razberry Z Way with switches polled using LUA and switch changes sent back to the Z-Automation API by an LUA script. Non switch devices are posted into the Domoticz API using the Z-Automation JS API. So far this setup has been pretty reliable - much more so than OpenZWave or the Razberry device handler.
Nick
All devices are either Z Wave or LAN connected (RasPI GPIOs etc). The 3 devices today have all been Z Wave.
I'm not using OpenZWave because I find it to be quite unreliable and the Z Wave network management features are not great. Instead I'm using Razberry Z Way with switches polled using LUA and switch changes sent back to the Z-Automation API by an LUA script. Non switch devices are posted into the Domoticz API using the Z-Automation JS API. So far this setup has been pretty reliable - much more so than OpenZWave or the Razberry device handler.
Nick
Re: Add text to Device Log when updating Value
nickb512 wrote:I have had a few instances recently of random devices not doing what they were told or doing strange things. Example being I woke up this morning and my kitchen light was on. It was off when I went to bed last night and I ran an 'All Off' scene at about 10pm from a flic button next to the bed which all worked fine. Now the device log for the kitchen light shows me that the light turned on at 11:30pm last night - but I have no info as to why this turned on. At the moment I'm blaming the cat but who knows...
This could have been one of my LUA scripts triggering something funny, but I have no idea.
My idea is could we add a 'reason' or 'method' string to a device update which appears on the device value log? Eg when doing an LUA update we pass something like
commandArray['Kitchen Light'] = "On FROM Security LUA Script"
With the next after the BY getting added to a new column on the log (Date, Data, From). Would make troubleshooting a lot easier rather than having to go back through the full domoticz log.
Thanks
Nick
Could you tell me, how you have setup the flic button to pair with your domoticz ?
Who is online
Users browsing this forum: No registered users and 1 guest