This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Previous State
#1
Hi

I need a script to control the previous state of an object 1/1/1.
1/1/1 is off or on
If 1/1/2 is on then 1/1/1 is on and when 1/1/2 became off then 1/1/1 will be in the last status before 1/1/2 was on.

Thanks
Reply
#2
Hi,

You can store the original value of 1/1/1 into the storage when 1/1/2 is change to 1, when 1/1/2 goes to 0 then grab previous saved state of 1/1/1 from storage and write that value to 1/1/1

To store use:

storage.set('state', grp.getvalue('1/1/1'))

To write back use:

grp.write('1/1/1', storage.get('state'))

BR, 

Erwin
Reply
#3
Create an event script attached to 1/1/2:

Code:
output '1/1/1'
storage_key = 'prev_value'

curr = event.getvalue()
prev = storage.get(storage_key)

if curr ~= prev then
  grp.write(output, prev)
  storage.set(storage_key, curr)
end
Reply
#4
(18.07.2016, 06:39)admin Wrote: Create an event script attached to 1/1/2:

Code:
output '1/1/1'
storage_key = 'prev_value'

curr = event.getvalue()
prev = storage.get(storage_key)

if curr ~= prev then
  grp.write(output, prev)
  storage.set(storage_key, curr)
end

Perfect is good , but if I need to initialize the storage  with the current value , neede to create manualy a script to memorize it , is correct ?

Thank's in adavantage
Reply
#5
Just run the script once and it will set the storage value. Empty storage value is nil.
Reply
#6
Hello Mr. Erwin,

I have downloaded the Wiser app from Play store and I tried to create an account.

I followed the steps according to the introductions and in the last step after the MAC entering it returns me an error "Wiser for KNX not known by the system. Contact the technical support team to continue."

Thanks in advance for your help!
Reply
#7
(01.04.2021, 07:33)XSPA2474KW Wrote: Hello Mr. Erwin,

I have downloaded the Wiser app from Play store and I tried to create an account.

I  followed the steps according to the introductions and in the last step after the MAC entering it returns me an error "Wiser for KNX not known by the system. Contact the technical support team to continue."

Thanks in advance for your help!

Erwin or anybody here will not be able to help you. Contact SE support. You probably have old HW which is not registered.

PS. Please do not mix up threads with different questions. It is impossible to find anything later.
------------------------------
Ctrl+F5
Reply
#8
Can you suggest to me someone who is responsible from SE support?

Thanks
Reply
#9
The official path for support is contacting your customer care center (ccc) in your country, they will create a case that can be escalated to the highest level of support.

I answered your PM, just as Daniel suspect i guess you have a very old HW1 homeLYnk that is not known in the system, it can be added manually if needed but requires some steps to create the open VPN key of your device that needs to be added to our cloud.
Reply
#10
Solved:

Seems to be a spaceLYnk.. Wiser for KNX remote cannot be used on a SL, you need a Wiser for KNX for that ..
Reply


Forum Jump: