• Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. rob
    R
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 9
    • Best 0
    • Controversial 0
    • Groups 0

    rob

    @rob

    0
    Reputation
    784
    Profile views
    9
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    rob Unfollow Follow

    Latest posts made by rob

    • RE: "UNIPISPI: SPI CRC2 Not Correct" - why?

      Hi,

      Same problem still present on neuron-node-red_image-20220412.0, see here for details
      Thanks to you @knebb I am now able to use my system again. Let's hope they fix this soon.

      rob

      posted in UniPi Neuron Series
      R
      rob
    • RE: NodeRed image-20220412.0 broken?

      And broken it is.

      I found out I had many SPI CRC2 errors in my kernel logs.
      Looking around I found this post

      It turns out the stock image 20220412.0 for nodered actually ships with the broken revision 1.108 of the kernel module.
      Thanks to @knebb 's instructions I was able to downgrade to v1.106 and my neuron seems to be working fine again.

      I hope someone from the customer support gets to see this post and fixes the image quickly.
      Guys, you have a terrific product line (I bought two neurons and some accessories over the years and I am a very happy customer), but you should really improve the regression testing before releasing: it is not the first time I have problems when trying to use an official image: see here

      I might be able to provide you with some logs in case you need help in troubleshooting on older hardware (S103 S/N 109 from 2017): just contact me in the next couple of days - then I'll have to put the system back on the field.

      rob

      posted in Node-RED
      R
      rob
    • NodeRed image-20220412.0 broken?

      Hi,

      I just downloaded the neuron-node-red_image-20220412.0 image from the website and flashed it on my neuron S103 (S/N 119).
      It starts up fine, but then I see no inputs or outputs on the evok control panel:

      2fe858c4-5a31-43b2-b49c-2280cc44c5b0-image.png

      The log available on the configuration page of the control panel shows these errors:

      b54cac1a-220c-4bdd-85a1-b3f3a3daa7b1-image.png

      Also, the output of http://neruon-ip/rest/all is as follows:

      [{"glob_dev_id": 1, "last_comm": 0.06825900077819824, "ver2": "1.0", "sn": 119, "circuit": "1", "model": "S103", "dev": "neuron", "board_count": 0}, {"bus": "/dev/i2c-1", "interval": 3.0, "dev": "owbus", "scan_interval": 300.0, "circuit": "1", "do_scan": false, "do_reset": false}]

      Do note the "board:count : 0", is that expected?

      The node-red ui itself with the default flow seems fine, but nothing happens when i try to switch a DO on (the led on the neuron does not light up).

      The hardware itself was working fine with a couple-of-years old image, I believe this must be a software issue, nothing should be wrong with the hardware.

      Any ideas?

      thanks,

      rob

      posted in Node-RED
      R
      rob
    • RE: How to disable and enable the 1Wire bus (M503)

      Hi,

      I just ran into the same problem as Vesa (one wire bus suddenly lost) and I can confirm that this procedure worked, but I had to reboot the rpi afterwards.

      I wonder if the change to /etc/systemd/system/neurontcp.service is really necessary, I initially tried polling the server without modifying the file and it seemed to work anyway.

      If someone else needs this, the only cli tool to poll the modbus server I found functioning on the rpi is this one:
      https://datapacket.dl.sourceforge.net/project/mblogic/MBLogic-All/MBLogic_All_Release-32/mblogic_all_2011-04-16.zip

      You will have to set the line endings in the file to linux style, before running:
      ./pollmb.py -p 502 -u 1 -f 5 -a 1001 -q 1 -d 1
      ./pollmb.py -p 502 -u 1 -f 5 -a 1001 -q 1 -d 0

      posted in Official EVOK API
      R
      rob
    • RE: M203 clean evok install not working

      Quick update:

      I repeated the Evok installation as per the instructions above on a clean vanilla raspbian stretch image taken from the official raspberry pi repo (not the UniPi customized one) and everything works fine.

      Thus - there seems to be some misconfiguration in the official UniPi image, at least when used with M203: beware.

      Rob

      posted in Official EVOK API
      R
      rob
    • M203 clean evok install not working

      Hi,

      I bought an M203, and flashed the official UniPian Neuron OS image available here
      Trying to access the web interface showed an empty list of inputs and outputs, nothing was working:

      alt text

      So I tried an apt-get dist-upgrade followed by a manual installation of latest evok 2.0 as per instructions available here

      Rebooted, I get the same result.

      Here is the log I get when launching evok manually as instructed in the debug section of the documentation:

      pi@M203-sn100:/etc $ sudo python /opt/evok/evok.py
      [I 180106 15:58:02 config:66] eprom: UniPi Neuron M203 version: 1.0 serial: 0x64
      [I 180106 15:58:02 evok:1640] Starting using config file /etc/evok.conf
      [I 180106 15:58:02 config:78] YAML Definition loaded: CUSTOM MODBUS DEVICE.yaml, type: 3, definition count 0
      [I 180106 15:58:02 config:78] YAML Definition loaded: S10x.yaml, type: 3, definition count 1
      [I 180106 15:58:02 config:78] YAML Definition loaded: M30x.yaml, type: 3, definition count 2
      [I 180106 15:58:02 config:78] YAML Definition loaded: M20x.yaml, type: 3, definition count 3
      [I 180106 15:58:03 config:78] YAML Definition loaded: L20x.yaml, type: 3, definition count 4
      [I 180106 15:58:03 config:78] YAML Definition loaded: M50x.yaml, type: 3, definition count 5
      [I 180106 15:58:03 config:78] YAML Definition loaded: xS30.yaml, type: 3, definition count 6
      [I 180106 15:58:03 config:78] YAML Definition loaded: L51x.yaml, type: 3, definition count 7
      [I 180106 15:58:03 config:78] YAML Definition loaded: L40x.yaml, type: 3, definition count 8
      [I 180106 15:58:04 config:78] YAML Definition loaded: xS40.yaml, type: 3, definition count 9
      [I 180106 15:58:04 config:78] YAML Definition loaded: M40x.yaml, type: 3, definition count 10
      [I 180106 15:58:04 config:78] YAML Definition loaded: L30x.yaml, type: 3, definition count 11
      [I 180106 15:58:04 config:78] YAML Definition loaded: L50x.yaml, type: 3, definition count 12
      [I 180106 15:58:04 config:78] YAML Definition loaded: M10x.yaml, type: 3, definition count 13
      [I 180106 15:58:05 config:78] YAML Definition loaded: xS50.yaml, type: 3, definition count 14
      [I 180106 15:58:05 config:78] YAML Definition loaded: DALI.yaml, type: 3, definition count 15
      [I 180106 15:58:05 config:78] YAML Definition loaded: xS10.yaml, type: 3, definition count 16
      [I 180106 15:58:05 config:78] YAML Definition loaded: evok-alias.yaml, type: 2, definition count 0
      [I 180106 15:58:05 evok:1704] HTTP server listening on port: 8080
      [I 180106 15:58:05 modbusclient_tornado:125] SPI client started
      [I 180106 15:58:05 neuron:173] Reading SPI boards
      [I 180106 15:58:05 neuron:188] No board on SPI 1
      [I 180106 15:58:05 neuron:188] No board on SPI 2
      [D 180106 15:58:05 owclient:376] Entering 1wire loop
      [I 180106 15:58:05 neuron:188] No board on SPI 3
      [E 180106 15:58:05 config:358] Invalid device circuit number 1_01
      Traceback (most recent call last):
      File "/opt/evok/config.py", line 353, in add_aliases
      dev_obj = Devices.by_int(dev_pointer["dev_type"], dev_pointer["circuit"])
      File "/opt/evok/devices.py", line 67, in by_int
      raise Exception('Invalid device circuit number %s' % str(circuit))
      Exception: Invalid device circuit number 1_01
      [E 180106 15:58:05 config:358] Invalid device circuit number 1_02
      Traceback (most recent call last):
      File "/opt/evok/config.py", line 353, in add_aliases
      dev_obj = Devices.by_int(dev_pointer["dev_type"], dev_pointer["circuit"])
      File "/opt/evok/devices.py", line 67, in by_int
      raise Exception('Invalid device circuit number %s' % str(circuit))
      Exception: Invalid device circuit number 1_02
      [E 180106 15:58:05 neuron:227] 'NoneType' object has no attribute 'do_scan'
      Traceback (most recent call last):
      File "/opt/evok/neuron.py", line 225, in scan_boards
      yield self.modbus_cache_map.do_scan()
      AttributeError: 'NoneType' object has no attribute 'do_scan'
      [E 180106 15:58:06 neuron:227] 'NoneType' object has no attribute 'do_scan'
      Traceback (most recent call last):
      File "/opt/evok/neuron.py", line 225, in scan_boards
      yield self.modbus_cache_map.do_scan()
      AttributeError: 'NoneType' object has no attribute 'do_scan'
      [E 180106 15:58:06 neuron:227] 'NoneType' object has no attribute 'do_scan'
      Traceback (most recent call last):
      File "/opt/evok/neuron.py", line 225, in scan_boards
      yield self.modbus_cache_map.do_scan()
      AttributeError: 'NoneType' object has no attribute 'do_scan'
      [E 180106 15:58:07 neuron:227] 'NoneType' object has no attribute 'do_scan'
      Traceback (most recent call last):
      File "/opt/evok/neuron.py", line 225, in scan_boards
      yield self.modbus_cache_map.do_scan()
      AttributeError: 'NoneType' object has no attribute 'do_scan'
      [I 180106 15:58:07 web:2063] 101 GET /ws (::1) 6.00ms
      [D 180106 15:58:07 evok:169] New WebSocket client connected
      [I 180106 15:58:07 web:2063] 304 GET /rest/all (::1) 6.26ms
      [E 180106 15:58:07 neuron:227] 'NoneType' object has no attribute 'do_scan'
      Traceback (most recent call last):
      File "/opt/evok/neuron.py", line 225, in scan_boards
      yield self.modbus_cache_map.do_scan()
      AttributeError: 'NoneType' object has no attribute 'do_scan'
      ^C[I 180106 15:58:07 evok:1779] Shutting down

      Is there something wrong with my hardware? It seems to me the RPI can not communicate with the internal plc boards.
      Or is it a configuration mistake? What could I possibly have done wrong?

      I'll be very grateful to anyone who could shed some light.
      Thanks!

      Rob

      posted in Official EVOK API
      R
      rob
    • RE: EVOK: wget/POST api only works when control panel is open in browser

      @tomas, thank you for taking care of this issue.

      Let me add some more info:

      1. I tried also the python/JsonRPC approach and I can confirm it behaves the same way, it only updates the values while a websocket connection is in place.

      2. As a workaround, I am using the code from the python websocket example on the evok github page to open a websocket connection from bash. I let it run in background on the rpi and this is enough for my original bash script (also running locally) to get the right real-time values from the REST calls, without the need to keep a separate computer running with the browser open on the control panel webpage.

      3. In the output of the python websocket app I only see the temperature values updating, but no reflection of input and output state changes... I did not investigate further, but tomas you might want to take a look at that also.

      I must say I really like the neuron concept and its combination with Evok, programming a PLC with standard linux tools, it just feels... empowering :)
      Hoping the stable, official release for Neuron comes soon.

      Also, let me suggest to improve the documentation... I know, it's tedious and time consuming, but good documentation gives first time customers like me the feeling of a robust product with a solid company behind, and makes everything just easier to start with.
      Keep up the great work guys!!

      rob

      posted in Official EVOK API
      R
      rob
    • EVOK: wget/POST api only works when control panel is open in browser

      Re: Enabling counter mode for Neuron inputs via evok

      After discovering that counter_mode for digital inputs on Neuron S103 is actually enabled even though it is reported as disabled by evok POST api, I implemented my business logic as a simple bash script which uses wget as per the examples on the evok github page.

      It works nicely, but ONLY if I have a browser open on the "UNIPI control panel" page.

      As soon as I close the browser, all values are not updated anymore!
      Polling the counter value from my bash script always returns an old number (and old values of input states also), and as soon as I reopen the browser on the control panel I get a big jump in the counter in my app.

      It seems as if EVOK only updates its internal state if a websocket connection is in place.
      This seems horribly wrong to me: is it by design? Is there something wrong in my setup?

      Anyone else having this issue?
      Please advise.

      rob

      posted in Official EVOK API
      R
      rob
    • Enabling counter mode for Neuron inputs via evok

      I'm using the latest evok on a Neuron S103 but I can't find a way to configure an input for counting on rising or falling edges via the web interface.

      /etc/evok.conf has just a [Neuron] section with no options to set for input lines and polling the status on a fresh install with "wget -qO- http://my.pi.ip.address/rest/all" returns counter_mode=disabled on all inputs.

      Available rest/post/etc api examples in the github docs do not explain how to accomplish this basic task...
      Has anyone managed to get the counters working on a Neuron?
      Thanks.

      posted in Official EVOK API
      R
      rob