LightwaveRF Blockly to check status

Moderator: leecollings

Post Reply
User avatar
EdddieN
Posts: 510
Joined: Wednesday 16 November 2016 11:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.9700
Location: Scotland
Contact:

LightwaveRF Blockly to check status

Post by EdddieN »

Hi,

I have several LightwaveRF sockets, they are great looking, except that there's no way to know their status and when there's a power cut... the revert to default off.

I have been trying to create a simple script to check the last status so it can revert back with a user variable, something like this:

Habitat_status (integer) = 0 <- this is what I call the lamp and 0 = off

Then whenever the switch is triggered via domoticz, it updates the variable to 0 or 1 for off and on. Then I have a time blockly like this:
Screen Shot 2017-08-04 at 20.12.20.png
Screen Shot 2017-08-04 at 20.12.20.png (31.82 KiB) Viewed 755 times
But nothing seems to happen every minute, no trace of it on the log file.

Am I missing anything obvious? Also, has anyone overcome this luck of feedback status from the LIghtwaveRF switches with a clever trick? ;)
11101101 - www.machinon.com
sion
Posts: 113
Joined: Friday 08 January 2016 12:32
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: LightwaveRF Blockly to check status

Post by sion »

I think this will only run when either the switch, or the variable changes state.
If you have a power cut, the switch will physically change state, but domoticz won't know about it.

You could make this a Lua script, get it to run every x mins.

Or, you could create a virtual switch, that would some how know when the system has just come back from a power cut, and would turn on for a few seconds after rebooting. If you include
If this switch = on at the start of your bloky then it will run when this switch is on.

I don't know, but would guess it would be possible to turn a switch on for x seconds after the system has booted?
running domoticz 3.4834 on rpi2, with
Hue bridge / bulbs.
lightwave rf sockets, mood controlers, sensors & contacts.
Home bridge / Siri.
Ha bridge / echo Alexa.
Hard wired alarm system - setting home / away status.

Next: harmony hub.
User avatar
EdddieN
Posts: 510
Joined: Wednesday 16 November 2016 11:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.9700
Location: Scotland
Contact:

Re: LightwaveRF Blockly to check status

Post by EdddieN »

Thanks, yes I guess I would need to find out when the RPI has just booted for first time to trigger the event. Sounds like it is going to be a bash script this time...
11101101 - www.machinon.com
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest