Which software should I use for 13 blinds and shutters?



  • The above logs were done with openHAB installation on the same Pi. To make clear that i don't have a problem with the not configured openHAB i have done an new clean installation:

    pi@raspberrypi:~ $ wget https://github.com/UniPiTechnology/neuron_tcp_modbus_overlay/archive/v1.0.0.zip
    --2016-12-02 20:07:00--  https://github.com/UniPiTechnology/neuron_tcp_modbus_overlay/archive/v1.0.0.zip
    Auflösen des Hostnamen »github.com (github.com)«... 192.30.253.113, 192.30.253.112
    Verbindungsaufbau zu github.com (github.com)|192.30.253.113|:443... verbunden.
    HTTP-Anforderung gesendet, warte auf Antwort... 302 Found
    Platz: https://codeload.github.com/UniPiTechnology/neuron_tcp_modbus_overlay/zip/v1.0.0[folge]
    --2016-12-02 20:07:01--  https://codeload.github.com/UniPiTechnology/neuron_tcp_modbus_overlay/zip/v1.0.0
    Auflösen des Hostnamen »codeload.github.com (codeload.github.com)«... 192.30.253.120, 192.30.253.121
    Verbindungsaufbau zu codeload.github.com (codeload.github.com)|192.30.253.120|:443... verbunden.
    HTTP-Anforderung gesendet, warte auf Antwort... 200 OK
    Länge: nicht spezifiziert [application/zip]
    In »»v1.0.0.zip«« speichern.
    v1.0.0.zip              [  <=>                 ]  38,20K   155KB/s   in 0,2s   
    2016-12-02 20:07:02 (155 KB/s) - »v1.0.0.zip« gespeichert [39120]
    pi@raspberrypi:~ $ unzip v1.0.0.zip
    Archive:  v1.0.0.zip
    d66ef41199393d9b095c0acd43910f2aeac4e5e7
       creating: neuron_tcp_modbus_overlay-1.0.0/
      inflating: neuron_tcp_modbus_overlay-1.0.0/LICENSE  
      inflating: neuron_tcp_modbus_overlay-1.0.0/README.md  
      inflating: neuron_tcp_modbus_overlay-1.0.0/install.sh  
       creating: neuron_tcp_modbus_overlay-1.0.0/neuron_tcp_server/
      inflating: neuron_tcp_modbus_overlay-1.0.0/neuron_tcp_server/Makefile  
      inflating: neuron_tcp_modbus_overlay-1.0.0/neuron_tcp_server/README.md  
      inflating: neuron_tcp_modbus_overlay-1.0.0/neuron_tcp_server/armpty.c  
      inflating: neuron_tcp_modbus_overlay-1.0.0/neuron_tcp_server/armpty.h  
      inflating: neuron_tcp_modbus_overlay-1.0.0/neuron_tcp_server/armspi.c  
      inflating: neuron_tcp_modbus_overlay-1.0.0/neuron_tcp_server/armspi.h  
      inflating: neuron_tcp_modbus_overlay-1.0.0/neuron_tcp_server/bandwidth-client.c  
      inflating: neuron_tcp_modbus_overlay-1.0.0/neuron_tcp_server/nb_modbus.c  
      inflating: neuron_tcp_modbus_overlay-1.0.0/neuron_tcp_server/nb_modbus.h  
      inflating: neuron_tcp_modbus_overlay-1.0.0/neuron_tcp_server/neuron_tcp_server.c  
      inflating: neuron_tcp_modbus_overlay-1.0.0/neuron_tcp_server/neuronspi.c  
      inflating: neuron_tcp_modbus_overlay-1.0.0/neuron_tcp_server/neurontcp.service  
      inflating: neuron_tcp_modbus_overlay-1.0.0/neuron_tcp_server/spicrc.c  
      inflating: neuron_tcp_modbus_overlay-1.0.0/neuron_tcp_server/spicrc.h  
       creating: neuron_tcp_modbus_overlay-1.0.0/spi_overlay/
      inflating: neuron_tcp_modbus_overlay-1.0.0/spi_overlay/compile-dtc  
      inflating: neuron_tcp_modbus_overlay-1.0.0/spi_overlay/neuron-spi.dts  
    pi@raspberrypi:~ $ cd ./neuron_tcp_modbus_overlay-1.0.0/
    pi@raspberrypi:~/neuron_tcp_modbus_overlay-1.0.0 $ sudo bash ./install.sh
    Installing libmodbus
    OK   http://mirrordirector.raspbian.org jessie InRelease
    OK   http://archive.raspberrypi.org jessie InRelease                    
    OK   http://mirrordirector.raspbian.org jessie/main armhf Packages      
    OK   http://mirrordirector.raspbian.org jessie/contrib armhf Packages
    OK   http://archive.raspberrypi.org jessie/main armhf Packages   
    OK   http://archive.raspberrypi.org jessie/ui armhf Packages     
    OK   http://mirrordirector.raspbian.org jessie/non-free armhf Packages
    OK   http://mirrordirector.raspbian.org jessie/rpi armhf Packages
    Ign http://archive.raspberrypi.org jessie/main Translation-de_DE 
    Ign http://archive.raspberrypi.org jessie/main Translation-de    
    Ign http://archive.raspberrypi.org jessie/main Translation-en
    Ign http://archive.raspberrypi.org jessie/ui Translation-de_DE
    Ign http://archive.raspberrypi.org jessie/ui Translation-de
    Ign http://archive.raspberrypi.org jessie/ui Translation-en
    Ign http://mirrordirector.raspbian.org jessie/contrib Translation-de_DE
    Ign http://mirrordirector.raspbian.org jessie/contrib Translation-de
    Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en
    Ign http://mirrordirector.raspbian.org jessie/main Translation-de_DE
    Ign http://mirrordirector.raspbian.org jessie/main Translation-de
    Ign http://mirrordirector.raspbian.org jessie/main Translation-en
    Ign http://mirrordirector.raspbian.org jessie/non-free Translation-de_DE
    Ign http://mirrordirector.raspbian.org jessie/non-free Translation-de
    Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en
    Ign http://mirrordirector.raspbian.org jessie/rpi Translation-de_DE
    Ign http://mirrordirector.raspbian.org jessie/rpi Translation-de
    Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en
    Paketlisten werden gelesen... Fertig          
    Paketlisten werden gelesen... Fertig
    Abhängigkeitsbaum wird aufgebaut.       
    Statusinformationen werden eingelesen.... Fertig
    Die folgenden Pakete wurden automatisch installiert und werden nicht mehr benötigt:
      libboost-filesystem1.55.0 libboost-program-options1.55.0 libboost-regex1.55.0 libcwiid1 libjs-prettify libqscintilla2-11 libqscintilla2-l10n libqt4-network libqt4-xmlpatterns libqtwebkit4 libruby1.9.1 libruby1.9.1-dbg libtcl8.5
      libtcltk-ruby1.9.1 libtk8.5 ri1.9.1 ruby1.9.1 ruby1.9.1-dev ruby1.9.1-examples ruby1.9.1-full ruby1.9.3 supercollider supercollider-common supercollider-ide supercollider-language supercollider-supernova tcl8.5 tk8.5
    Verwenden Sie »apt-get autoremove«, um sie zu entfernen.
    Die folgenden zusätzlichen Pakete werden installiert:
      libmodbus5
    Die folgenden NEUEN Pakete werden installiert:
      libmodbus-dev libmodbus5
    0 aktualisiert, 2 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
    Es müssen 97,9 kB an Archiven heruntergeladen werden.
    Nach dieser Operation werden 140 kB Plattenplatz zusätzlich benutzt.
    Holen: 1 http://mirrordirector.raspbian.org/raspbian/ jessie/main libmodbus-dev armhf 3.0.6-1 [77,0 kB]
    Holen: 2 http://mirrordirector.raspbian.org/raspbian/ jessie/main libmodbus5 armhf 3.0.6-1 [20,9 kB]
    Es wurden 97,9 kB in 1 s geholt (82,8 kB/s).
    Vormals nicht ausgewähltes Paket libmodbus5:armhf wird gewählt.
    (Lese Datenbank ... 130665 Dateien und Verzeichnisse sind derzeit installiert.)
    Vorbereitung zum Entpacken von .../libmodbus5_3.0.6-1_armhf.deb ...
    Entpacken von libmodbus5:armhf (3.0.6-1) ...
    Vormals nicht ausgewähltes Paket libmodbus-dev wird gewählt.
    Vorbereitung zum Entpacken von .../libmodbus-dev_3.0.6-1_armhf.deb ...
    Entpacken von libmodbus-dev (3.0.6-1) ...
    Trigger für man-db (2.7.0.2-5) werden verarbeitet ...
    libmodbus5:armhf (3.0.6-1) wird eingerichtet ...
    libmodbus-dev (3.0.6-1) wird eingerichtet ...
    Trigger für libc-bin (2.19-18+deb8u6) werden verarbeitet ...
    Enabling SPI overlay
    Warning (unit_address_vs_reg): Node /fragment@0 has a unit name, but no reg property
    Warning (unit_address_vs_reg): Node /fragment@1 has a unit name, but no reg property
    Compiling neurontcp server...
    gcc -g -c  -I .  armspi.c -o armspi.o
    gcc -g -c  -I .  spicrc.c -o spicrc.o
    gcc -g -c  -I .  nb_modbus.c -o nb_modbus.o
    gcc -g -c  -I .  armpty.c -o armpty.o
    gcc -g -c  -I .  neuron_tcp_server.c -o neuron_tcp_server.o
    gcc -g neuron_tcp_server.o armspi.o spicrc.o nb_modbus.o armpty.o  -lmodbus -lutil -o neuron_tcp_server
    gcc -g -c  -I .  neuronspi.c -o neuronspi.o
    gcc -g neuronspi.o armspi.o spicrc.o -o neuronspi
    gcc -g -c  -I .  bandwidth-client.c -o bandwidth-client.o
    gcc -g bandwidth-client.o armspi.o spicrc.o nb_modbus.o armpty.o  -lmodbus -lutil -o bandwidth-client
    Installing Neuron TCP server into /opt/neurontcp/
    Enabling neurontcp service for systemd
    Created symlink from /etc/systemd/system/neurontcp.service to /lib/systemd/system/neurontcp.service.
    Created symlink from /etc/systemd/system/multi-user.target.wants/neurontcp.service to /lib/systemd/system/neurontcp.service.
    Reboot is required. Is it OK to reboot now? [y/n]
    
    • two warnings occurred:

    Enabling SPI overlay
    Warning (unit_address_vs_reg): Node /fragment@0 has a unit name, but no reg property
    Warning (unit_address_vs_reg): Node /fragment@1 has a unit name, but no reg property

    are they relevant?

    • after reboot:
    pi@raspberrypi:~ $ systemctl status neurontcp
    ? neurontcp.service - Unipi Neuron Modbus/Tcp Server
       Loaded: loaded (/lib/systemd/system/neurontcp.service; enabled)
       Active: active (running) since Fr 2016-12-02 20:12:19 CET; 6min ago
     Main PID: 404 (neuron_tcp_serv)
       CGroup: /system.slice/neurontcp.service
               +-404 /opt/neurontcp/neuron_tcp_server -p 502 --check-firmware
    pi@raspberrypi:~ $ sudo systemctl stop neurontcp.service 
    pi@raspberrypi:~ $ systemctl status neurontcp
    ? neurontcp.service - Unipi Neuron Modbus/Tcp Server
       Loaded: loaded (/lib/systemd/system/neurontcp.service; enabled)
       Active: inactive (dead) since Fr 2016-12-02 20:19:13 CET; 4s ago
      Process: 404 ExecStart=/opt/neurontcp/neuron_tcp_server -p 502 --check-firmware (code=killed, signal=TERM)
     Main PID: 404 (code=killed, signal=TERM)
    pi@raspberrypi:~ $ 
    pi@raspberrypi:~ $ /opt/neurontcp/neuron_tcp_server -p 502 --check-firmware
    modbus_tcp_listen: Permission denied
    Abgebrochen
    pi@raspberrypi:~ $ sudo /opt/neurontcp/neuron_tcp_server -p 502 --check-firmware
    

    no further message for 4 hours...

    It seams that the "New connection from 127.0.0.1:45210 on socket 13" messages from the first install were caused by openHAB or something else i have done playing around.

    Could you please give me some hint what i am doing wrong or is the blinking normal without active connection to the server?


  • administrators

    Alright I have not tested it with the PIXEL desktop, but only with the lite version. But it should not make any difference.

    How many devices do you see in /dev/spi*



  • Hi,

    4 devices:

    • spidev0.0
    • spidev0.1
    • spidev0.2
    • spidev0.3

  • administrators

    That looks OK. Are you sure there is no output after you run the daemon manually? There must be something :)



  • Yes i am sure. Shall i take a video?


  • administrators

    Ok, please run it with more verbose output and pate the output:

    /opt/neurontcp/neuron_tcp_server -p 502 --check-firmware -vvv
    


  • pi@raspberrypi:~ $ sudo /opt/neurontcp/neuron_tcp_server -p 502 --check-firmware -vvv
    Board on /dev/spidev0.1 firmware=4.6  hardware=0.16 (B-1000-1)
    Board on /dev/spidev0.3 firmware=4.6  hardware=8.16 (E-16Di-1_U-14Ro-1)
    Board on /dev/spidev0.2 firmware=4.6  hardware=8.16 (E-16Di-1_U-14Ro-1)
    Board0 PTY0 /dev/pts/1
    Starting loop
    

    and then nothing more for two hours


  • administrators

    @armin this means that the hw and sw (tcp modbus server) is working ok. Now it is ut to you to send the commands...

    You shouldd use the modbus protocolfor communicating with neuron - see the modbus map of your device at downloads.unipi.technology

    So far no command line tool. But modbus is pretty easy.



  • Hi,

    the LEDs are still blinking (2 seconds on, 2 seconds off).
    Is this normal behavior if no client is connected to the server?


  • administrators

    According to the manual: https://files.unipi.technology/index.php/s/zTmrEbQEvifNd6W?path=%2FProducts%2FNeuron%2FDocumentation#pdfviewer

    chapter 2.2.1 LED diodedescription

    and later MWD description. It means you do not communicate with the devices. Which is also notable that there is no output when you run the server by hand.