Home Page Forums Community Italia Sviluppo OpenWebNet FRAME ERRATE DA F454

OpenWebNet
FRAME ERRATE DA F454

This topic contains 1 reply, has 2 voices, and was last updated by  sxpertle 10/05/2019 at 12:58.

0
1
116
  • Verified

    Ciao, uso da anni alcune applicazioni scritte in Python per leggere ed inviare frame dal mio impianto domotico; da oggi, improvvisamente e senza apparente motivo, il GW F454  non va più in monitor mode mentre continua a funzionare in command mode:

    Se eseguo questo script, tutto funziona:
    <p class=”p1″><span class=”s1″>ateway_host = </span><span class=”s2″>”10.0.0.53″</span></p>
    <p class=”p1″><span class=”s1″>gateway_port = 20000</span></p>
    <p class=”p1″><span class=”s1″>gateway_addr_port = gateway_host, gateway_port</span></p>
    <p class=”p2″></p>
    <p class=”p1″><span class=”s1″>sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)</span></p>
    <p class=”p1″><span class=”s1″>sock.connect(gateway_addr_port)</span></p>
    <p class=”p2″></p>
    <p class=”p1″><span class=”s1″>sock.send(</span><span class=”s2″>”*1*0*0##”</span><span class=”s1″>) </span></p>
    se eseguo lo script di monitor:
    <p class=”p1″><span class=”s1″>gateway_host = </span><span class=”s2″>”10.0.0.52″</span><span class=”s1″> <span class=”Apple-converted-space”>     </span></span><span class=”s3″> # set here the IP of your gateway</span></p>
    <p class=”p1″><span class=”s1″>gateway_port = 20000 <span class=”Apple-converted-space”>           </span></span><span class=”s3″> # set here the port of your gateway</span></p>
    <p class=”p2″><span class=”s3″>gateway_addr_port = gateway_host, gateway_port</span></p>
    <p class=”p3″></p>
    <p class=”p4″><span class=”s4″>def</span><span class=”s3″> monitor</span><span class=”s1″>():</span></p>
    <p class=”p2″><span class=”s3″><span class=”Apple-converted-space”>        </span>sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)</span></p>
    <p class=”p2″><span class=”s3″><span class=”Apple-converted-space”>        </span>sock.connect(gateway_addr_port)</span></p>
    <p class=”p1″><span class=”s1″><span class=”Apple-converted-space”>        </span>sock.send(</span><span class=”s2″>”*99*1##”</span><span class=”s1″>)<span class=”Apple-converted-space”>       </span></span><span class=”s3″> # Switch session to MONITOR mode</span></p>
    <p class=”p2″><span class=”s3″><span class=”Apple-converted-space”>        </span>data = “”</span></p>
    <p class=”p3″></p>
    <p class=”p2″><span class=”s3″><span class=”Apple-converted-space”>        </span></span><span class=”s4″>while</span><span class=”s3″> 1:</span></p>
    <p class=”p2″><span class=”s3″><span class=”Apple-converted-space”>                </span>next = sock.recv(1024)<span class=”Apple-converted-space”> </span></span><span class=”s5″> # now read data from MyHome BUS</span></p>
    <p class=”p2″><span class=”s3″><span class=”Apple-converted-space”>                </span>data = data + next</span></p>
    <p class=”p2″><span class=”s3″><span class=”Apple-converted-space”>                </span>eom = data.find(</span><span class=”s2″>”##”</span><span class=”s3″>)</span></p>
    <p class=”p1″><span class=”s1″><span class=”Apple-converted-space”>                </span>msg = data[0:eom+2] <span class=”Apple-converted-space”>   </span></span><span class=”s3″> # message is from position 0 until end of ##</span></p>
    <p class=”p2″><span class=”s3″><span class=”Apple-converted-space”>                </span>data = data[eom+2:] <span class=”Apple-converted-space”>   </span></span><span class=”s5″> # next message starts after ##</span></p>
    <p class=”p3″></p>
    <p class=”p2″><span class=”s3″><span class=”Apple-converted-space”>                </span></span><span class=”s4″>print</span><span class=”s3″> time.strftime(</span><span class=”s2″>”%H:%M:%S”</span><span class=”s3″>), msg</span></p>
    <p class=”p3″></p>
    <p class=”p3″></p>
    <p class=”p2″><span class=”s3″>monitor() <span class=”Apple-converted-space”>                         </span></span><span class=”s5″> # start the monitor</span></p>
    ottengo risposte tipo questa (la seconda cambia sempre) e poi resta in attesa:
    <p class=”p1″><span class=”s1″>18:07:07 *#*1##</span></p>
    <p class=”p1″><span class=”s1″>18:07:07 *#828564064##</span></p>
    Ho gia provato a resettare l’impianto, ma niente…

    Le normali automazioni tramite MH202 funzionano correttamente.

    A qualcuno è capitato qualcosa del genere.

    Grazie per eventuali suggerimento (spero nessuno risponda “chiama il supporto”).

    Guido

    • This topic was modified 1 month, 2 weeks ago by  sherazan.



    User
    sherazan
    Role
    End User
    33 posts
    Verified

    Buongiorno,

    la connessione sta andando bene
    il gateway ti chiede di inviare la password aperta crittografata.

    Ho già fatto i moduli giusti per tutto questo.

    li puoi trovare qui:

    • This reply was modified 1 month, 2 weeks ago by  sxpertle.



    User
    sxpertle
    Role
    System Integrator
    603 posts
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.