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

    How to add xS40 to Neuron L203 using custom software

    Official API - Evok
    6
    46
    21115
    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.
    • T
      TomasKnot @Boy Lenssen last edited by TomasKnot

      @Boy-Lenssen
      This looks like an address problem perhaps, or possibly some other communication setting issue. Did you try to set it up as I have above? At least for testing purposes.

      If you did do so then it may be another issue, possibly with a hardware definition; if you can run the following commands while connected to the Neuron and paste the output here we may find the problem.

      sudo su
      systemctl stop evok
      python /opt/evok.py
      
      B 1 Reply Last reply Reply Quote 0
      • B
        Boy Lenssen @TomasKnot last edited by

        @TomasKnot
        Hi! As far as I can see, I set it up exactly the way you said above...
        This is the output:

        The /get/all call is my software requesting the status of all in and outputs, you can ignore that.

        root@raspberrypi:/home/pi# python /opt/evok/evok.py 
        [I 180522 06:56:19 config:63] eprom: UniPi Neuron L203 version: 1.0 serial: 0x51
        [I 180522 06:56:19 evok:1634] Starting using config file /etc/evok.conf
        [I 180522 06:56:20 config:75] YAML Definition loaded: L30x.yaml, type: 3, definition count 0
        [I 180522 06:56:20 config:75] YAML Definition loaded: M20x.yaml, type: 3, definition count 1
        [I 180522 06:56:20 config:75] YAML Definition loaded: M50x.yaml, type: 3, definition count 2
        [I 180522 06:56:20 config:75] YAML Definition loaded: xS40.yaml, type: 3, definition count 3
        [I 180522 06:56:20 config:75] YAML Definition loaded: M30x.yaml, type: 3, definition count 4
        [I 180522 06:56:20 config:75] YAML Definition loaded: L40x.yaml, type: 3, definition count 5
        [I 180522 06:56:20 config:75] YAML Definition loaded: S10x.yaml, type: 3, definition count 6
        [I 180522 06:56:21 config:75] YAML Definition loaded: L51x.yaml, type: 3, definition count 7
        [I 180522 06:56:21 config:75] YAML Definition loaded: CUSTOM MODBUS DEVICE.yaml, type: 3, definition count 8
        [I 180522 06:56:21 config:75] YAML Definition loaded: L50x.yaml, type: 3, definition count 9
        [I 180522 06:56:21 config:75] YAML Definition loaded: xS30.yaml, type: 3, definition count 10
        [I 180522 06:56:21 config:75] YAML Definition loaded: xS10.yaml, type: 3, definition count 11
        [I 180522 06:56:21 config:75] YAML Definition loaded: M40x.yaml, type: 3, definition count 12
        [I 180522 06:56:21 config:75] YAML Definition loaded: M10x.yaml, type: 3, definition count 13
        [I 180522 06:56:21 config:75] YAML Definition loaded: M60x.yaml, type: 3, definition count 14
        [I 180522 06:56:22 config:75] YAML Definition loaded: L20x.yaml, type: 3, definition count 15
        [I 180522 06:56:22 config:75] YAML Definition loaded: xS50.yaml, type: 3, definition count 16
        [I 180522 06:56:22 config:75] YAML Definition loaded: evok-alias.yaml, type: 2, definition count 0
        [I 180522 06:56:22 evok:1698] HTTP server listening on port: 8080
        [I 180522 06:56:22 modbusclient_tornado:122] SPI client started
        [I 180522 06:56:22 modbusclient_rs485:333] UART client started
        [I 180522 06:56:22 neuron:268] Reading the UART board on Modbus address 1
        [D 180522 06:56:22 owclient:377] Entering 1wire loop
        [I 180522 06:56:22 web:2064] 101 GET /ws (::1) 3.76ms
        [D 180522 06:56:22 evok:158] New WebSocket client connected
        [I 180522 06:56:22 neuron:157] Reading SPI boards
        [I 180522 06:56:22 web:2064] 200 GET /rest/all (::1) 3.10ms
        [I 180522 06:56:22 config:351] Alias loaded: <neuron.Relay object at 0x75f42690> al_lights_kitchen
        [I 180522 06:56:22 config:351] Alias loaded: <neuron.Relay object at 0x75f42650> al_lights_bedroom
        [I 180522 06:56:24 web:2064] 101 GET /ws (::1) 1.79ms
        [D 180522 06:56:24 evok:158] New WebSocket client connected
        [I 180522 06:56:24 web:2064] 200 GET /rest/all (::1) 7.07ms
        [E 180522 06:56:28 neuron:290] No cached value of register 1018 on unit 1 - read error
            Traceback (most recent call last):
              File "/opt/evok/neuron.py", line 283, in readboards
                yield board.parse_definition(self.hw_dict, 1)
              File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 1055, in run
                value = future.result()
              File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 238, in result
                raise_exc_info(self._exc_info)
              File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 1069, in run
                yielded = self.gen.send(value)
              File "/opt/evok/neuron.py", line 409, in parse_definition
                regpolarity=m_feature['polar_reg'], legacy_mode=self.legacy_mode)
              File "/opt/evok/neuron.py", line 1309, in __init__
                curr_ds = self.arm.neuron.modbus_cache_map.get_register(1, self.regmode, unit=self.arm.modbus_address)[0]
              File "/opt/evok/neuron.py", line 48, in get_register
                raise Exception('No cached value of register %d on unit %d - read error' % (counter, unit))
            Exception: No cached value of register 1018 on unit 1 - read error
        ^C[I 180522 06:56:39 evok:1773] Shutting down
        
        1 Reply Last reply Reply Quote 0
        • T
          TomasKnot last edited by TomasKnot

          It looks like the system can't connect to the device - does the RX light on the Neuron (not the extension) flash at all? It should be roughly simultaneous with the TX light.

          From the log it looks like there's no valid communication with the extension unfortunately, so something must be wrong with the connection.

          B 1 Reply Last reply Reply Quote 0
          • U
            unix last edited by

            Hi
            this day after a reboot i have the same error message and the link from S103G to xs50 not working only one short blink from the modbus rx/tx

            reinstall evok and fresh image not working.

            root@pimatic:~# /usr/bin/python /opt/evok/evok.py
            [I 180524 19:27:48 config:63] eprom: UniPi Neuron S103 version: 1.0 serial: 0xd
            [I 180524 19:27:48 evok:1634] Starting using config file /etc/evok.conf
            [I 180524 19:27:48 config:75] YAML Definition loaded: M20x.yaml, type: 3, definition count 0
            [I 180524 19:27:48 config:75] YAML Definition loaded: xS40.yaml, type: 3, definition count 1
            [I 180524 19:27:48 config:75] YAML Definition loaded: M30x.yaml, type: 3, definition count 2
            [I 180524 19:27:48 config:75] YAML Definition loaded: L40x.yaml, type: 3, definition count 3
            [I 180524 19:27:49 config:75] YAML Definition loaded: L50x.yaml, type: 3, definition count 4
            [I 180524 19:27:49 config:75] YAML Definition loaded: M50x.yaml, type: 3, definition count 5
            [I 180524 19:27:49 config:75] YAML Definition loaded: M40x.yaml, type: 3, definition count 6
            [I 180524 19:27:49 config:75] YAML Definition loaded: L30x.yaml, type: 3, definition count 7
            [I 180524 19:27:49 config:75] YAML Definition loaded: xS50.yaml, type: 3, definition count 8
            [I 180524 19:27:49 config:75] YAML Definition loaded: CUSTOM MODBUS DEVICE.yaml, type: 3, definition count 9
            [I 180524 19:27:50 config:75] YAML Definition loaded: M60x.yaml, type: 3, definition count 10
            [I 180524 19:27:50 config:75] YAML Definition loaded: L20x.yaml, type: 3, definition count 11
            [I 180524 19:27:50 config:75] YAML Definition loaded: S10x.yaml, type: 3, definition count 12
            [I 180524 19:27:50 config:75] YAML Definition loaded: xS30.yaml, type: 3, definition count 13
            [I 180524 19:27:50 config:75] YAML Definition loaded: M10x.yaml, type: 3, definition count 14
            [I 180524 19:27:51 config:75] YAML Definition loaded: L51x.yaml, type: 3, definition count 15
            [I 180524 19:27:51 config:75] YAML Definition loaded: xS10.yaml, type: 3, definition count 16
            [I 180524 19:27:51 config:75] YAML Definition loaded: DALI.yaml, type: 3, definition count 17
            [I 180524 19:27:51 config:75] YAML Definition loaded: evok-alias.yaml, type: 2, definition count 0
            [I 180524 19:27:51 evok:1698] HTTP server listening on port: 8080
            [I 180524 19:27:51 modbusclient_tornado:122] SPI client started
            [I 180524 19:27:51 modbusclient_rs485:333] UART client started
            [I 180524 19:27:51 neuron:268] Reading the UART board on Modbus address 15
            [I 180524 19:27:51 neuron:157] Reading SPI boards
            [D 180524 19:27:51 owclient:377] Entering 1wire loop
            [I 180524 19:27:51 neuron:172] No board on SPI 2
            [E 180524 19:27:51 neuron:290] 'NoneType' object has no attribute 'get_register'
                Traceback (most recent call last):
                  File "/opt/evok/neuron.py", line 283, in readboards
                    yield board.parse_definition(self.hw_dict, 1)
                  File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 1055, in run
                    value = future.result()
                  File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 238, in result
                    raise_exc_info(self._exc_info)
                  File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 1069, in run
                    yielded = self.gen.send(value)
                  File "/opt/evok/neuron.py", line 561, in parse_definition
                    self.parse_feature(m_feature, board_id)
                  File "/opt/evok/neuron.py", line 546, in parse_feature
                    self.parse_feature_ao(max_count, m_feature, board_id)
                  File "/opt/evok/neuron.py", line 478, in parse_feature_ao
                    dev_id=self.dev_id, major_group=m_feature['major_group'], legacy_mode=self.legacy_mode)
                  File "/opt/evok/neuron.py", line 1777, in __init__
                    self.offset = (uint16_to_int(self.arm.neuron.modbus_cache_map.get_register(1, self.regcal + 1, unit=self.arm.modbus_address)[0]) / 10000.0)
                AttributeError: 'NoneType' object has no attribute 'get_register'
            [I 180524 19:27:51 neuron:172] No board on SPI 3
            [I 180524 19:27:51 config:351] Alias loaded: <neuron.Relay object at 0x7600dc70> al_lights_kitchen
            [I 180524 19:27:51 config:351] Alias loaded: <neuron.Relay object at 0x7600df50> al_lights_bedroom
            

            Regards

            1 Reply Last reply Reply Quote 0
            • A
              alydersen last edited by

              I have this exact same issue as "unix", both with the master branch and 2.0.6. Anyone that came up with a solution?

              1 Reply Last reply Reply Quote 0
              • T
                TomasKnot last edited by TomasKnot

                Hi @alydersen!

                Do you also have the xS50 and S103G models? The error is simply a generic error indicating that no data from the device is available to EVOK in its cache.

                It can be caused by wrong parity, bitcount or address settings, as well as potentially any other issues which break the communication.

                By far the most crucial LED indicator is the RX LED light on the master Neuron unit - does it light at all? If not it means that no response has been sent on the bus, which means that there is no data received on the underlying hardware - much less EVOK itself.

                Please see below, apologies

                1 Reply Last reply Reply Quote 0
                • T
                  TomasKnot last edited by

                  @alydersen

                  It looks like there has been a recent bug in EVOK which caused the hardware definitions to be parsed incorrectly. What I said above does stand, but the error is a software bug on our part.

                  You will need to download the release 2.0.7 in order to fix the problems you are seeing. The source of the error is a missing condition which causes UART hw_definitions to break, though only some of the time.

                  1 Reply Last reply Reply Quote 0
                  • A
                    alydersen last edited by

                    Thanks @TomasKnot - will try it out

                    1 Reply Last reply Reply Quote 0
                    • A
                      alydersen last edited by

                      @TomasKnot That did it - thanks again

                      1 Reply Last reply Reply Quote 0
                      • B
                        Boy Lenssen @TomasKnot last edited by Boy Lenssen

                        @tomasknot Sorry for the late response! I had a different project that needed my attention.

                        The RX light of the extension is constant on.
                        the TX light of the Neuron flashes. The RX light doesn't do anything.

                        Hope we can figure this out, as I got told we need to get this working soon, hopefully this week...

                        This is the config:

                        global_id = 1							; Mandatory, REQUIRED TO BE UNIQUE
                        allow_register_access = False 			; Optional, False default
                        scan_frequency = 10						; Optional, 10 default
                        scan_enabled = True 					; Optional, True default
                        
                        ; Below you can find examples for connecting devices over UART; first example is a Neuron extension while the second is a custom third-party device
                        ; Devices sharing a port use the port settings of the first device on that port (baud rate, parity, stopbits)
                        ; !!!Note that device_name has to match a filename in the /etc/hw_definitions directory!!! See /etc/hw_definitions/DOMAT MMIO.yaml for an example
                        
                        [EXTENSION_1]
                        global_id = 2							; Mandatory, REQUIRED TO BE UNIQUE
                        device_name = xS40						; Mandatory
                        modbus_uart_port = /dev/extcomm/0/0 	; Mandatory
                        ;neuron_uart_circuit = 1_01				; Optional, allows associating extensions with specific Neuron UART-over-Modbus ports (not possible for non-Modbus UART ports, e.g. /dev/ttyUSB0 or /dev/ttyS0)
                        ;allow_register_access = True 			; Optional, False default, is mandatory with third-party devices
                        address = 1							; Optional, 1 default
                        ;scan_frequency = 10 					; Optional, 10 default
                        ;scan_enabled = True 					; Optional, True default
                        ; Note that the following settings will be inherited by other devices sharing the same port, i.e. /dev/extcomm/0/0
                        baud_rate = 19200						; Optional, NEEDS UNIPI IMAGE TO WORK! USE API TO CONFIGURE UART MANUALLY IF USING STANDARD RASPBIAN
                        parity = N								; Optional, NEEDS UNIPI IMAGE TO WORK! USE API TO CONFIGURE UART MANUALLY IF USING STANDARD RASPBIAN
                        stop_bits = 1							; Optional, NEEDS UNIPI IMAGE TO WORK! USE API TO CONFIGURE UART MANUALLY IF USING STANDARD RASPBIAN
                        

                        This is the config on the xS40:

                        https://imgur.com/a/Af53afq

                        What can I do to help troubleshoot further?

                        1 Reply Last reply Reply Quote 0
                        • T
                          TomasKnot last edited by

                          @Boy-Lenssen
                          That definitely looks like a problem with UART settings, as no RX on the Neuron indicates that there is no response from the extension, not even an error response (which is what occurs when e.g. reading wrong registers or issuing invalid commands).

                          Could you try using the latest version of EVOK? It is possible that some recent changes will help fix the problems you are seeing.

                          B 1 Reply Last reply Reply Quote 0
                          • B
                            Boy Lenssen @TomasKnot last edited by

                            @tomasknot I'm sorry, I'm already running 2.0.7. Forgot to mention.

                            still getting this:

                                Traceback (most recent call last):
                                  File "/opt/evok/neuron.py", line 289, in readboards
                                    yield board.parse_definition(self.hw_dict, 1)
                                  File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 1055, in run
                                    value = future.result()
                                  File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 238, in result
                                    raise_exc_info(self._exc_info)
                                  File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 1069, in run
                                    yielded = self.gen.send(value)
                                  File "/opt/evok/neuron.py", line 571, in parse_definition
                                    self.parse_feature(m_feature, board_id)
                                  File "/opt/evok/neuron.py", line 547, in parse_feature
                                    self.parse_feature_di(max_count, m_feature, board_id)
                                  File "/opt/evok/neuron.py", line 413, in parse_feature_di
                                    regpolarity=m_feature['polar_reg'], legacy_mode=self.legacy_mode)
                                  File "/opt/evok/neuron.py", line 1394, in __init__
                                    curr_ds = self.arm.neuron.modbus_cache_map.get_register(1, self.regmode, unit=self.arm.modbus_address)[0]
                                  File "/opt/evok/neuron.py", line 50, in get_register
                                    raise Exception('No cached value of register %d on unit %d - read error' % (counter, unit))
                                Exception: No cached value of register 1018 on unit 1 - read error
                            
                            B 1 Reply Last reply Reply Quote 0
                            • B
                              Boy Lenssen @Boy Lenssen last edited by Boy Lenssen

                              @TomasKnot do you have any pointers for me? I really need to get this working for a customer :\

                              Any way I can supply you with more info to test it?

                              Maybe you can create an SD card image file of the configuration that works for you so I can try it out?

                              Martin Kudláček 1 Reply Last reply Reply Quote 0
                              • Martin Kudláček
                                Martin Kudláček @Boy Lenssen last edited by

                                @boy-lenssen Hello, I am terribly sorry for a delay on our side. Tommorow morning I will reproduce your setup (L203 with xS40) and supply you with the working image. Thank you for you patience.

                                Martin

                                1 Reply Last reply Reply Quote 0
                                • Martin Kudláček
                                  Martin Kudláček last edited by

                                  Hello @Boy-Lenssen ,
                                  I was able to get a working connection from UniPi Neuron L503 to xS40.

                                  Here you can see general wiring, the white wires are for RS485.
                                  0_1529568121337_rs485-wiring.jpg

                                  Here you can see the DIP switches on the xS40. As you can see, the Modbus address is set to 5, speed to 19200 and no parity. The unit is also set as a last one on the RS485 bus
                                  0_1529567730219_dip-switches.jpg

                                  And here you can see the working setup. I setted some ROs on the xS40 via the web interface
                                  0_1529568264463_leds.jpg

                                  This is the configuration file I used:

                                  #!!! Do not use '#' for comments !!!
                                  
                                  [MAIN]
                                  config_version = 2.5					; Configuration file version, DO NOT CHANGE!
                                  use_schema_verification = False			; Enabling this will deny any requests that do not match the JSON Schema; NOTE THAT THIS RESULTS IN A SIGNIFICANT INCREASE IN LATENCY AND SHOULD NOT BE USED EXCEPT FOR TESTING
                                  log_level = ERROR   					; Minimum severity of messages to be logged; one of INFO, DEBUG, WARNING, ERROR, CRITICAL
                                  log_file = /var/log/evok.log			; Log file to use; will be cleared on boot
                                  port = 8080								; !!! Internal API port - only change if you are certain you know what you are doing; FOR OUR WEB INTERFACE THE PORT SHOULD BE CHANGED IN "/etc/evok-nginx.conf" INSTEAD !!!
                                  webhook_enabled = False					; Enables webhook notification - see e.g. https://sendgrid.com/blog/whats-webhook/
                                  webhook_address = http://127.0.0.1:80   ; Put your server endpoint address here (e.g. http://123.123.123.123:/wh )
                                  webhook_device_mask = ["input","wd"]	; List of device types to notify on (written as a JSON list) - adding AI will generate a large amount of messages!
                                  webhook_complex_events = False			; EVOK will send POST requests with the same data as WebSocket, rather than an empty GET request
                                  wifi_control_enabled = False			; !!! REQUIRES THE UNIPIAP WIFI CONTROLLER TO BE INSTALLED !!! Will allow evok to control the internal Neuron wifi 
                                  soap_server_enabled = False				; Enables the simple SOAP server; use only if you need the functionality
                                  soap_server_port = 8081					; !!! IF SOAP SERVER IS ENABLED, THIS PORT NEEDS TO BE UNIQUE (i.e. different from the port setting above) !!!
                                  
                                  [NEURON_1]
                                  global_id = 1							; Mandatory, REQUIRED TO BE UNIQUE
                                  allow_register_access = False 			; Optional, False default
                                  scan_frequency = 10						; Optional, 10 default
                                  scan_enabled = True 					; Optional, True default
                                  
                                  ; Below you can find examples for connecting devices over UART; first example is a Neuron extension while the second is a custom third-party device
                                  ; Devices sharing a port use the port settings of the first device on that port (baud rate, parity, stopbits)
                                  ; !!!Note that device_name has to match a filename in the /etc/hw_definitions directory!!! See /etc/hw_definitions/DOMAT MMIO.yaml for an example
                                  
                                  [EXTENSION_1]
                                  global_id = 2							; Mandatory, REQUIRED TO BE UNIQUE
                                  device_name = xS40						; Mandatory
                                  modbus_uart_port = /dev/extcomm/0/0 	; Mandatory
                                  ;neuron_uart_circuit = 1_01				; Optional, allows associating extensions with specific Neuron UART-over-Modbus ports (not possible for non-Modbus UART ports, e.g. /dev/ttyUSB0 or /dev/ttyS0)
                                  ;allow_register_access = True 			; Optional, False default, is mandatory with third-party devices
                                  address = 5							; Optional, 1 default
                                  ;scan_frequency = 10 					; Optional, 10 default
                                  ;scan_enabled = True 					; Optional, True default
                                  ; Note that the following settings will be inherited by other devices sharing the same port, i.e. /dev/extcomm/0/0
                                  baud_rate = 19200						; Optional, NEEDS UNIPI IMAGE TO WORK! USE API TO CONFIGURE UART MANUALLY IF USING STANDARD RASPBIAN
                                  parity = N								; Optional, NEEDS UNIPI IMAGE TO WORK! USE API TO CONFIGURE UART MANUALLY IF USING STANDARD RASPBIAN
                                  stop_bits = 1							; Optional, NEEDS UNIPI IMAGE TO WORK! USE API TO CONFIGURE UART MANUALLY IF USING STANDARD RASPBIAN
                                  
                                  ;[EXTENSION_2]
                                  ;global_id = 3							; Mandatory, REQUIRED TO BE UNIQUE
                                  ;device_name = CUSTOM MODBUS DEVICE		; Mandatory
                                  ;modbus_uart_port = /dev/extcomm/0/0 	; Mandatory
                                  ;neuron_uart_circuit = 1_01				; Optional, allows associating extensions with specific Neuron UART-over-Modbus ports (not possible for non-Modbus UART ports, e.g. /dev/ttyUSB0 or /dev/ttyS0)
                                  ;allow_register_access = True 			; Mandatory with third-party devices
                                  ;address = 1 							; Optional, 15 default
                                  ;scan_frequency = 2 					; Optional, 1 default
                                  ;scan_enabled = True 					; Optional, True default
                                  
                                  [OWBUS_1]
                                  owbus = /dev/i2c-1 --i2c=/dev/i2c-1:ALL     		; Scanned bus (--i2c=/dev/i2c-1:ALL or localhost:2122 or 'u' for USB dongle)
                                  interval = 3          					; [s] Default sensor reading
                                  scan_interval = 300    					; [s] How often is scanning done
                                  
                                  ;Example of 1W-4R/4DI extension module, 1W-8R is almost the same, only with inputs instead of relays
                                  ;
                                  ; - Map a new 1Wire sensor with the appropriate address, type and interval
                                  ; - The syntax can be either SENSOR or 1WDEVICE
                                  ; - Setting the correct reading interval is crucial to achieve ideal performance; the default interval is 15s
                                  ;
                                  ;[1WDEVICE_2]
                                  ;bus = 1
                                  ;address = 29F39A17000000BC
                                  ;type = DS2408
                                  ;interval = 1
                                  ;
                                  ;[1WRELAY_10]
                                  ;sensor = 2
                                  ;pin = 0
                                  ;
                                  ;[1WRELAY_11]
                                  ;sensor = 2
                                  ;pin = 1
                                  ;
                                  ;[1WRELAY_12]
                                  ;sensor = 2
                                  ;pin = 2
                                  ;
                                  ;[1WRELAY_13]
                                  ;sensor = 2
                                  ;pin = 3
                                  ;
                                  ;[1WINPUT_20]
                                  ;sensor = 2
                                  ;pin = 4
                                  ;
                                  ;[1WINPUT_21]
                                  ;sensor = 2
                                  ;pin = 5
                                  ;
                                  ;[1WINPUT_22]
                                  ;sensor = 2
                                  ;pin = 6
                                  ;
                                  ;[1WINPUT_23]
                                  ;sensor = 2
                                  ;pin = 7
                                  

                                  I can supply you with working image as well, but I used an up-to-date Raspbian Stretch Lite and installed the Evok according to documentation with default values . Please test the settings above and let me know, if it works for you

                                  Martin

                                  1 Reply Last reply Reply Quote 0
                                  • B
                                    Boy Lenssen last edited by

                                    still the Rx on the Extension light is on and I get the same error as I posted before when running sudo python /opt/evok/evok.py

                                    @martin-kudláček said in How to add xS40 to Neuron L203 using custom software:

                                    The unit is also set as a last one on the RS485 bus

                                    do I need to do something for this? I'm sorry, I'm quite a noob on this.

                                    Martin Kudláček 1 Reply Last reply Reply Quote 0
                                    • Martin Kudláček
                                      Martin Kudláček @Boy Lenssen last edited by Martin Kudláček

                                      @boy-lenssen Just to be absolutely sure - did you:

                                      • set the DIP switches exactly the same as on the photo
                                      • replaced the /etc/evok.conf with the one I sent you
                                      • restarted evok with sudo systemctl restart evok

                                      The DIP switches need to be set while the extension is OFF and then turned ON.

                                      Thanks,
                                      Martin

                                      1 Reply Last reply Reply Quote 0
                                      • B
                                        Boy Lenssen last edited by

                                        @Martin-Kudláček I created a video of when I turn on the power.

                                        I replaced the evok.conf exactly with what you posted.
                                        I use the SD card I always use and updated it last week to 2.0.7.

                                        Here is the video: https://youtu.be/4_BAgph3VSA

                                        and this is the error I see in /var/log/evok.log:

                                        Traceback (most recent call last):
                                          File "/opt/evok/neuron.py", line 289, in readboards
                                            yield board.parse_definition(self.hw_dict, 1)
                                          File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 1055, in run
                                            value = future.result()
                                          File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 238, in result
                                            raise_exc_info(self._exc_info)
                                          File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 1069, in run
                                            yielded = self.gen.send(value)
                                          File "/opt/evok/neuron.py", line 571, in parse_definition
                                            self.parse_feature(m_feature, board_id)
                                          File "/opt/evok/neuron.py", line 547, in parse_feature
                                            self.parse_feature_di(max_count, m_feature, board_id)
                                          File "/opt/evok/neuron.py", line 413, in parse_feature_di
                                            regpolarity=m_feature['polar_reg'], legacy_mode=self.legacy_mode)
                                          File "/opt/evok/neuron.py", line 1394, in __init__
                                            curr_ds = self.arm.neuron.modbus_cache_map.get_register(1, self.regmode, unit=self.arm.modbus_address)[0]
                                          File "/opt/evok/neuron.py", line 50, in get_register
                                            raise Exception('No cached value of register %d on unit %d - read error' % (counter, unit))
                                        Exception: No cached value of register 1018 on unit 5 - read error
                                        2018-06-21 13:01:08,947 - evok - ERROR - No cached value of register 1018 on unit 5 - read error
                                        Traceback (most recent call last):
                                          File "/opt/evok/neuron.py", line 289, in readboards
                                            yield board.parse_definition(self.hw_dict, 1)
                                          File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 1055, in run
                                            value = future.result()
                                          File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 238, in result
                                            raise_exc_info(self._exc_info)
                                          File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 1069, in run
                                            yielded = self.gen.send(value)
                                          File "/opt/evok/neuron.py", line 571, in parse_definition
                                            self.parse_feature(m_feature, board_id)
                                          File "/opt/evok/neuron.py", line 547, in parse_feature
                                            self.parse_feature_di(max_count, m_feature, board_id)
                                          File "/opt/evok/neuron.py", line 413, in parse_feature_di
                                            regpolarity=m_feature['polar_reg'], legacy_mode=self.legacy_mode)
                                          File "/opt/evok/neuron.py", line 1394, in __init__
                                            curr_ds = self.arm.neuron.modbus_cache_map.get_register(1, self.regmode, unit=self.arm.modbus_address)[0]
                                          File "/opt/evok/neuron.py", line 50, in get_register
                                            raise Exception('No cached value of register %d on unit %d - read error' % (counter, unit))
                                        Exception: No cached value of register 1018 on unit 5 - read error
                                        2018-06-21 12:59:25,738 - evok - ERROR - No cached value of register 1018 on unit 5 - read error
                                        Traceback (most recent call last):
                                          File "/opt/evok/neuron.py", line 289, in readboards
                                            yield board.parse_definition(self.hw_dict, 1)
                                          File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 1055, in run
                                            value = future.result()
                                          File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 238, in result
                                            raise_exc_info(self._exc_info)
                                          File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 1069, in run
                                            yielded = self.gen.send(value)
                                          File "/opt/evok/neuron.py", line 571, in parse_definition
                                            self.parse_feature(m_feature, board_id)
                                          File "/opt/evok/neuron.py", line 547, in parse_feature
                                            self.parse_feature_di(max_count, m_feature, board_id)
                                          File "/opt/evok/neuron.py", line 413, in parse_feature_di
                                            regpolarity=m_feature['polar_reg'], legacy_mode=self.legacy_mode)
                                          File "/opt/evok/neuron.py", line 1394, in __init__
                                            curr_ds = self.arm.neuron.modbus_cache_map.get_register(1, self.regmode, unit=self.arm.modbus_address)[0]
                                          File "/opt/evok/neuron.py", line 50, in get_register
                                            raise Exception('No cached value of register %d on unit %d - read error' % (counter, unit))
                                        Exception: No cached value of register 1018 on unit 5 - read error
                                        2018-06-21 12:59:25,631 - evok - ERROR - No cached value of register 1018 on unit 5 - read error
                                        Traceback (most recent call last):
                                          File "/opt/evok/neuron.py", line 289, in readboards
                                            yield board.parse_definition(self.hw_dict, 1)
                                          File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 1055, in run
                                            value = future.result()
                                          File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 238, in result
                                            raise_exc_info(self._exc_info)
                                          File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 1069, in run
                                            yielded = self.gen.send(value)
                                          File "/opt/evok/neuron.py", line 571, in parse_definition
                                            self.parse_feature(m_feature, board_id)
                                          File "/opt/evok/neuron.py", line 547, in parse_feature
                                            self.parse_feature_di(max_count, m_feature, board_id)
                                          File "/opt/evok/neuron.py", line 413, in parse_feature_di
                                            regpolarity=m_feature['polar_reg'], legacy_mode=self.legacy_mode)
                                          File "/opt/evok/neuron.py", line 1394, in __init__
                                            curr_ds = self.arm.neuron.modbus_cache_map.get_register(1, self.regmode, unit=self.arm.modbus_address)[0]
                                          File "/opt/evok/neuron.py", line 50, in get_register
                                            raise Exception('No cached value of register %d on unit %d - read error' % (counter, unit))
                                        Exception: No cached value of register 1018 on unit 5 - read error
                                        1 Reply Last reply Reply Quote 0
                                        • Martin Kudláček
                                          Martin Kudláček last edited by

                                          Hello @Boy-Lenssen,
                                          here is the image: www.uschovna.cz/zasilka/ALFLHCVAFG743SWB-4SR

                                          Just save it on at least 8GB SD card with Win32DiskImager. The IP will be acquired via DHCP.

                                          Martin

                                          B 2 Replies Last reply Reply Quote 0
                                          • B
                                            Boy Lenssen @Martin Kudláček last edited by

                                            @martin-kudláček will do, it is downloading, but takes a couple of hours, it says...

                                            btw;
                                            I tried with a new image, Raspbian stretch lite, installed evok and set up the evok.conf for the extension. Same issue... No cached value of register 1018 on unit 5 - read error

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