Announcement

Collapse
No announcement yet.

Feature request

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Feature request

    Hi Shodan, you can check this forum if you want:

    https://community.jeedom.com/t/mauva...e-jeedom/21944


    The request here would be to detect jeedom stop and start process.

    If Jeedom is stopping then the plugin would close the server on hs side .

    when jeedom is starting , after a 30-60 sec delay, reopen the server.

    The problem is when jeedom restart , all my value change from 1 to 0 (for no real reason) . A little after , the plugin get the real value (1).
    while all this happen the real state of the equipment would have stayed 1.


    #2
    This has some very not pleasant behaviour on my hs3 events.

    Comment


      #3
      Hello MattL0,

      What you are asking here is a little bit complicated. It is not only a matter of detecting if Jeedom is running or not, but detecting if all Jeedom plugin have started : most of the device values are updated by plugins, not by Jeedom core itself.
      I am going to look at it but I am not sure there is an easy way to do it.

      Now I think this is happening because your plugin has the Poll mode (or Push+Poll mode) activated.
      When Poll mode is on HS3 periodically asks Jeedom to send him the values for all equipment, so if this request is sent just after a Jeedom restart, you may en up with zeroed values.
      If you are only relying in Poll, mode there is no real walkaround right now, except closing your plugin and restarting it manually when you restart Jeedom.
      If you are using the Push+Poll mode, then a walkaround is to increase the polling period, to minimize the risk of a poll when Jeedom is restarted, but it still can happen.
      The last walkaround, is to use only push. With this mode, you won’t be bothered by Jeedom restart (and that’s the mode I’m using on my installation).


      Envoyé de mon iPhone en utilisant Tapatalk

      Comment


        #4
        Hi Shodan, this was happening when i was not using your plugin too. In that time I was using the push to url but per jeedom command ( so was not using the global one) and was using the json http get api from hs3 to send values to virtual devices.

        So changing to push won’t resolve the problem.

        Comment


          #5
          That’s strange ! I’m in push mode and my values are never zeroed, even when jeedom is off or restarting.
          Maybe the global push in jeedom has a different behavior than the push per information.


          Envoyé de mon iPhone en utilisant Tapatalk

          Comment


            #6
            Maybe. But ‘I am using the plugin for reliability. So , if you have any idea in the future please tell .

            Comment


              #7
              Your right. I just tested the plugin with pull only and I don’t see this behaviour neither ( that’s a weird one lol)

              So the feature request would only be for the polling of the plugin, if there is a way to implement this.

              Comment


                #8
                I’ll look into it.


                Envoyé de mon iPhone en utilisant Tapatalk

                Comment


                  #9
                  Thanks

                  Comment


                    #10
                    Originally posted by Shodan View Post
                    Maybe the global push in jeedom has a different behavior than the push per information.


                    Envoyé de mon iPhone en utilisant Tapatalk
                    I think i know why. When i tested this ..''per command'' with json call call ton hs3 api... I was only using the upnp device for testing.
                    And when the upnp plugin in jeedom goes off, the value value of the command goes to 0.

                    So this plugin ( UPNP) is a special case... even with push only it has ''problem''. So i won't use it anymore.

                    So I guess , both global and simple command push would have the same result.

                    Comment


                      #11
                      MattL0,

                      Maybe you should contact the UPNP plugin developper and ask him if he can change this behavior ?


                      Envoyé de mon iPhone en utilisant Tapatalk

                      Comment


                        #12
                        Shodan,

                        i moved the cache from /tmp to somewhere else /var/www/html/core/config/cache.

                        The setting for this is in /var/www/html/core/config/default.config.ini

                        I guess the logic to put the cache in /tmp is to get fewer writes on sd cards..

                        The data seems to be permanant on reboot now, tried it 10 times.

                        Comment


                          #13
                          Hi Shodan , unfortunately the manip in my last post ( post #12) do not persit. After 2-3 days, the cache folder return to what ist was.
                          .




                          But, I have played a litle wi the api by polling it in chrome:

                          Let's take an exemple of a binary info command :

                          When the value is 0 you get :

                          Code:
                           [{"id":"11","logicalId":null,"generic_type":null,"eqType":"virtual","name":"maison","order":"0","type":"info","subType":"numeric","eqLogic_id":"2","isHistorized":"1","unite":"","configuration":{"calcul":"","returnStateValue":"","returnStateTime":"","updateCmdId":"","minValue":"","maxValue":"","listValue":"","virtualAction":1},"template":{"dashboard":"core::default","mobile":"core::default"},"display":{"invertBinary":"0"},"value":"","isVisible":"1","alert":[],"state":0}
                          When the value is 1 you get :

                          Code:
                           [{"id":"11","logicalId":null,"generic_type":null,"eqType":"virtual","name":"maison","order":"0","type":"info","subType":"numeric","eqLogic_id":"2","isHistorized":"1","unite":"","configuration":{"calcul":"","returnStateValue":"","returnStateTime":"","updateCmdId":"","minValue":"","maxValue":"","listValue":"","virtualAction":1},"template":{"dashboard":"core::default","mobile":"core::default"},"display":{"invertBinary":"0"},"value":"","isVisible":"1","alert":[],"state":1}
                          When you clear the cache or on jeedom restart you get :
                          Code:
                            
                           [{"id":"11","logicalId":null,"generic_type":null,"eqType":"virtual","name":"maison","order":"0","type":"info","subType":"numeric","eqLogic_id":"2","isHistorized":"1","unite":"","configuration":{"calcul":"","returnStateValue":"","returnStateTime":"","updateCmdId":"","minValue":"","maxValue":"","listValue":"","virtualAction":1},"template":{"dashboard":"core::default","mobile":"core::default"},"display":{"invertBinary":"0"},"value":"","isVisible":"1","alert":[],"state":""}
                          I am using this call :
                          8) Full Data...


                          Voici l’URL = http://#IP_JEEDOM#/jeedom/core/api/jeeApi.php?apikey=#APIKEY#&type=fullData

                          Renvoie tous les objets, équipements, commandes (et leur valeur si ce sont des infos) en json



                          So , would it be possibl, when you poll to ignore empty string? "state":""} I Think when a string is empty (i.e '''') 0 is entered into the homeseer device value.


                          That would resolve this issue completly ( i am trying to bypass this issue with another jeedom ( need one on port 80 for jeedom dsn) and with another jeedom on docker on my main server.(so jeedom is started before homeseer so i do not get the initial valueS from jeedom on startup..) with jeelink installed, and I need to poll mannualy from one jeedom to another jeedom because jeelink only do push )
                          This is really complex to setup... when the issue could be , i think, resolved by igoring empty string in the json call.
                          thank you.

                          Comment


                            #14
                            Interesting... I’ll look into it and let you know.


                            Envoyé de mon iPhone en utilisant Tapatalk

                            Comment


                              #15
                              Thanks

                              Comment

                              Working...
                              X