Menu

State automatically update

Help
Jesusmm
2008-04-14
2012-12-14
  • Jesusmm

    Jesusmm - 2008-04-14

    Hello everybody,

    I linknx functioning properly, I can read and write well, but I have a question:

    With linknxWeb are updated automatically the status of the lights when you press a pushbutton at home. That is, linknxWeb automatically reflects the actual state of the elements EIB?

    I suppose that the easiest thing is that the web application refresh the state every so often through a reading of the objects. Is there some way that is itself eibd which notifies the change?

    Thank you and excuse me English :-)

    Jesús Martínez.

     
    • jef2000

      jef2000 - 2008-04-14

      Hi,

      In KnxWeb, the status is updated every second. Due to the client-server architecture of the web, it's not easy for the server to notify the client of an update. The only possibility is to keep a TCP connection constantly opened. This feature can be introduced in linknx XML protocol if there is a need for it, but I don't plan to use this feature in KnxWeb.
      Why do you ask for it? Is there something wrong with the periodic refresh method?

      Regards,

      jean-François

       
    • Jesusmm

      Jesusmm - 2008-04-14

      Hello Jean,

      It is a good choice for Web environments, with AJAX is perfect. However, I wanted to try it on a PC as an embedded touch screen and I do not like delay time in update object's state on the screen.

      In complex installations the update can generate much traffic in the eib/knx bus, because are a lot of read operations.

      Do you know if the devil eibd carries a database reflecting changes in the bus?

      Best regards and thanks for your help.

      Jesús.

       
    • jef2000

      jef2000 - 2008-04-14

      Hi,

      You can set the timer to refresh faster if needed. (need to update the code of KnxWeb).
      Do you plan to use KnxWeb on your embedded touchscreen or to develop your own visualisation tool connected to Linknx and using the XML protocol?

      The update of the screen will not generate any traffic on the KNX bus. Linknx itself is storing the actual value of each communication object to be able to reply as fast as possible to KnxWeb (or any other tool connected to it and using the XML protocol).

      Regards,

      Jean-François

       
    • Jesusmm

      Jesusmm - 2008-04-14

      Thanks Jean,

      One last question ... At the moment :-)

      Then linknx always known the real state of the lights, blinds, etc.. In other words, if I pulse a button on the home this action updates the state object in linknx, is it so?

      He looked at the source code of linknx and objectcontroller.cpp I saw that implement Listener. tell me more about events that trigger these listener ...

      Regards,
      Jesús Martínez.

       
    • jef2000

      jef2000 - 2008-04-15

      Hi,

      >Then linknx always known the real state of the lights, blinds, etc.. In other words, if I pulse
      >a button on the home this action updates the state object in linknx, is it so?
      Yes, as soon as some information concerning a group address is on the bus, the object is updated if the object communication flags allow it ("write" flag allows a "write request" to update the internal state and "update"  flag allows a "read response" to update the internal state).

      >He looked at the source code of linknx and objectcontroller.cpp I saw that implement Listener.
      >tell me more about events that trigger these listener
      Any object that implement the ChangeListener interface can register itself to a communication object using its addChangeListener method. The communication object will then call the onChange() method of the registered listener every time the object value changes (every time the value really changes, not every time a telegram is received). I use this mechanism to trigger the evaluation of the rules where conditions on object value are used (and the "trigger" attribute of the condition is "true").

      Regards,

      Jean-François

       
    • Jesusmm

      Jesusmm - 2008-04-20

      Hi Jean,

      I still have problems. When pressed on a pulse of the house can not linknx to update the status of the light. My xml configuration is as follows:

      <object Id="luz" gad="0/0/1" flags="crwtuf">luz</ object>

      Previously, I created a small stage set up at ETS. The configuration is:

      Address 0/0/1 group has a key and a pushbutton actuator output.
      Address 0/0/3 group is forwarding status of the output of the actuator.

      Why can not see the updated status?

      Thank you.

       
    • Jesusmm

      Jesusmm - 2008-04-20

      Another thing: when I set up an object in linknx to begin to turn on the light by default (init = "on") can not make it work, however linknx returns:

      ObjectController: write (gad = 1, buf, len = 3): 00 81

      Regards

       
    • jef2000

      jef2000 - 2008-04-21

      Hi,

      If you can send telegrams from linknx but not receive them from the bus, it't perhaps because the BCU address table size is not set to zero.
      To be able to send telegrams on the bus with EIBD, the length of the address table size must be set to zero inside the BCU of the USB or serial adapter.

      This is explained in chapter 7.3.1. of EIBD documentation:
      http://www.auto.tuwien.ac.at/~mkoegler/eib/sdkdoc-0.0.3.pdf
      To actually receive telegrams on a group address, it must be in the BCU address table, or the address table length needs to be set to 0 before eibd is started (using the bcuaddrtab command). Telegrams with an individual address as destination are delivered only when this address matches the individual address of the BCU 2.

      Details of the bcuaddrtab command are in chapter 10.2.7.

      In short: You can check the address table size using:
      bcuaddrtab usb:/.../...
      And if it's not zero, change it using:
      bcuaddrtab usb:/.../... -w 0

      Regards,

      Jean-François

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.