• Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    EVOK sends but is not receiving

    Official EVOK API
    2
    4
    749
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      Pavelf last edited by

      Hello, I just installed EVOK on UniPi 1.1 and clean Raspbian Stretch.
      1wire is working fine but Relays seem to be working one-way only - web interface for relays is not showing which relays are on or off. But It will switch relays on/off when clicked the switch on webpage...
      Seems like the EVOK is not receiving feedback / some confirmation from relays.

      Can you guide me where/how to start looking for possible cause ?

      Prior to that I had fully working EVOK/Unipi1.1 on Wheezy so hardwarewise all should be ok.

      Attaching start log of evok...

      root@unipi:/etc# systemctl stop evok.service
      root@unipi:/etc# sudo python /opt/evok/evok.py
      [I 190528 20:29:37 evok:1664] Starting using config file /etc/evok.conf
      /opt/evok/config.py:86: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
        self.definitions += [yaml.load(yfile)]
      [I 190528 20:29:37 config:87] YAML Definition loaded: xS10.yaml, type: 3, definition count 0
      [I 190528 20:29:37 config:87] YAML Definition loaded: CUSTOM MODBUS DEVICE.yaml, type: 3, definition count 1
      [I 190528 20:29:37 config:87] YAML Definition loaded: xS40.yaml, type: 3, definition count 2
      [I 190528 20:29:37 config:87] YAML Definition loaded: xS30.yaml, type: 3, definition count 3
      [I 190528 20:29:37 config:87] YAML Definition loaded: xS50.yaml, type: 3, definition count 4
      [I 190528 20:29:37 config:87] YAML Definition loaded: evok-alias.yaml, type: 2, definition count 0
      [I 190528 20:29:37 evok:1731] HTTP server listening on port: 8080
      [D 190528 20:29:38 owclient:377] Entering 1wire loop
      [D 190528 20:29:38 owclient:317] New sensor DS18B20 - 281C675F07000040
      [D 190528 20:29:38 owclient:317] New sensor DS18B20 - 28FF9C8C6416038A
      [D 190528 20:29:38 owclient:317] New sensor DS18B20 - 28FF6A09641603E8
      [D 190528 20:29:38 owclient:317] New sensor DS18B20 - 28FF669B6416032F
      [D 190528 20:29:38 owclient:317] New sensor DS18B20 - 28FF1D41631604D1
      [I 190528 20:29:39 web:2064] 101 GET /ws (127.0.0.1) 23.46ms
      [D 190528 20:29:39 evok:158] New WebSocket client connected
      [I 190528 20:29:39 web:2064] 101 GET /ws (127.0.0.1) 5.27ms
      [D 190528 20:29:39 evok:158] New WebSocket client connected
      [I 190528 20:29:40 web:2064] 101 GET /ws (127.0.0.1) 3.78ms
      [D 190528 20:29:40 evok:158] New WebSocket client connected
      [I 190528 20:29:40 web:2064] 101 GET /ws (127.0.0.1) 3.87ms
      [D 190528 20:29:40 evok:158] New WebSocket client connected
      [I 190528 20:29:40 web:2064] 101 GET /ws (::1) 3.96ms
      [D 190528 20:29:40 evok:158] New WebSocket client connected
      [I 190528 20:29:40 web:2064] 101 GET /ws (::1) 4.19ms
      [D 190528 20:29:40 evok:158] New WebSocket client connected
      [I 190528 20:29:40 web:2064] 101 GET /ws (::1) 3.71ms
      [D 190528 20:29:40 evok:158] New WebSocket client connected
      [I 190528 20:29:42 web:2064] 101 GET /ws (127.0.0.1) 6.97ms
      [D 190528 20:29:42 evok:158] New WebSocket client connected```
      M 1 Reply Last reply Reply Quote 0
      • M
        martin_triska administrators @Pavelf last edited by

        @pavelf Hello, it seems to something around the web-socket (used e.g. for relay state readout) connection is going wrong. The connection should be established just once, not several times per second. Can you double-check JavaScript settings in your web browser (must be allowed) and/or try an another one ?

        1 Reply Last reply Reply Quote 0
        • P
          Pavelf last edited by Pavelf

          @pavelf said in EVOK sends but is not receiving:

          k

          Hi, there is an instance of nodered running which connects via websocket in multiple flows hence the multiple connections.
          Any other ideas? the commands to relays are working, it's just the evok web which seems not to be getting any response from relays...

          One more thing I found out:
          when I run the following command

          gpio -x mcp23008:100:0x20:0 readall
          
          

          I get the following result:

          +------+---------+--------+
          |  Pin | Digital | Analog |
          +------+---------+--------+
          |  100 |     0   |     0  |
          |  101 |     0   |     0  |
          |  102 |     0   |     0  |
          |  103 |     0   |     0  |
          |  104 |     0   |     0  |
          |  105 |     1   |     0  |
          |  106 |     1   |     0  |
          |  107 |     1   |     0  |
          +------+---------+--------+
          

          The "Digital" column actually shows values according to reality, unlike EVOK which only shows last state I did set to relays in evok, and not showing its actual value.

          One more thing:
          I am using FHEM app where it is actually the same problem - I can switch relays there, but the changes to relay state done by other app (e.g. in Evok web) are not shown there and vice versa.

          So I suspect this must be something in pigpio. Unfortunately i tried to do some diagnostics using PIGS command but I could not find syntax to read relay states to verify the PIGPIO is causing the issue...

          1 Reply Last reply Reply Quote 0
          • M
            martin_triska administrators last edited by

            Hello @Pavelf,
            if I understand you, the problem with logical states synchronization occurs during the same GPIOs toggling from more than one different applications/libraries simultaneously (Evok, pigpio, FHEM, WiringPi...). The Evok always returns internally-cached values which can lead to described behaviour under certain circumstances. Also, the pigpio internally used by the Evok has been upgraded recently. I will check this more thoroughly and let you know.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post