Code Monkey home page Code Monkey logo

Comments (4)

knxste avatar knxste commented on May 26, 2024

for some reason the form did not keep the pasted object declaration. Let me try again:
''
''
apologies for that

from linknx.

knxste avatar knxste commented on May 26, 2024

nope. I attach the declaration excerpt here.
20.102_issue.txt

from linknx.

2franix avatar 2franix commented on May 26, 2024

Hi,

A few leads to follow:

  • AFAIK, when init="request", the initialization takes place upon the first read request for that object. Can you force linknx to get the value for this object to see if it triggers the expected request on the bus? Does the return value correspond to the expected one?
  • Can you set logging to the debug level and send its content to maybe get more hints as to what is going on?
  • there is a 1 second timeout on read requests. If the device did not answer within that time, the object is set to its type's default value.

Thanks!

PS: to insert your configuration excerpt, make sure to enclose it with triple backticks like so:

    ```
    <object id="on_off_sala" type="1.001" init="request" gad="2/3/4" flags="cwu"/>
    <object id="modo_bagno_P1" type="20.102" init="request" gad="2/6/11" flags="cwu"/>
    ```

It forces markdown to interpret the text as plain text, so that it is not confused by XML content. The output would be like this:

<object id="on_off_sala" type="1.001" init="request" gad="2/3/4" flags="cwu"/>
<object id="modo_bagno_P1" type="20.102" init="request" gad="2/6/11" flags="cwu"/>

from linknx.

knxste avatar knxste commented on May 26, 2024

Many thanks, Cyrille, for your quick answer and your hints. You helped me to understand how initialization works and to solve the issue.
The following code works just fine:

<?xml version="1.0"?>
<config>
    <objects>
        <object id="on_off_sala" type="1.001" init="request" gad="2/3/4" flags="cwu"/>
        <object id="modo_bagno_P1" type="20.102" init="request" gad="2/6/11" flags="cwu"/>
    </objects>
    <rules>
        <rule id="test_on_off_sala" init="eval">
            <condition type="object" id="on_off_sala" value="on" op="lte" trigger="true"/>
            <actionlist>
            </actionlist>
        </rule>

        <rule id="test_modo_bagno_P1" init="eval">
            <condition type="object" id="modo_bagno_P1" value="frost" op="lte" trigger="true"/>
            <actionlist>
            </actionlist>
        </rule>
    </rules>
    <services>
        <knxconnection url="ip:localhost:6720"/>
        <xmlserver type="inet" port="1028"/>
    </services>
</config>

To explain a bit, I have several rules that I use to trigger on update of an object, the condition does not have a "value" clause, just the "trigger" clause. This does not cause linknx to send a read on the bus, while the code above does. I therefore replaced the missing "value" clause with a clause which is always true to obtain the behavior I want.
Thanks again
Ste

from linknx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.