Navigation

    UniPi.technology Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. majorcsa
    M
    • Continue chat with majorcsa
    • Start new chat with majorcsa
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups

    majorcsa

    @majorcsa

    1
    Reputation
    13
    Posts
    213
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    majorcsa Follow

    Posts made by majorcsa

    • Switching relays in synchronous mode?

      Hi,

      I have several UniPi L203 and I would like to integrate it to another solution (HomeAssistant) which can use the Evok REST API. When I configure it to turn a relay on or off with POSTing the necessary URL and data it works fine. However then it tries to fetch the same resource with GET to see if the change was successful. However the EVOK API still reports the old status and it requires some time to reflect the real status.
      Would it be possible to have the POST in synchronous mode? I mean it would return the result only if the resource is really changed its status. This could be an additional parameter to the call, then the upcoming call could reflect the real status of the relay.

      Thanks,
      Csaba

      posted in Official EVOK API
      M
      majorcsa
    • RE: Unipispi (neuron) kernel module on latest raspbian

      I'm just curious if you plan to do an automatic release of the neuron-kernel package after raspbian-kernel image update?

      posted in Official EVOK API
      M
      majorcsa
    • RE: Unipispi (neuron) kernel module on latest raspbian

      As far as I can see, currently there is no up-to-date neuron kernel package available at the moment?

      posted in Official EVOK API
      M
      majorcsa
    • RE: Unipispi (neuron) kernel module on latest raspbian

      @tomasknot: I made a quick test, and it seems the neuron-kernel package has no version for the newest kernel:

      neuron-kernel : Depends: raspberrypi-kernel (= 1.20180703-1) but 1.20180817-1 is to be installed
      

      The neuron-firmware package does not depend on the neuron-kernel package. Is it intentional? I think the firmware is not really usable without the kernel module.

      posted in Official EVOK API
      M
      majorcsa
    • RE: Unipispi (neuron) kernel module on latest raspbian

      Hi @tomasknot,

      It's really cool, I'm definitely going to test it!

      Thanks,
      Csaba

      posted in Official EVOK API
      M
      majorcsa
    • RE: Unipispi (neuron) kernel module on latest raspbian

      @tomasknot Yes, I think, but you're using

      #if NEURONSPI_DETAILED_DEBUG > 0
      

      everywhere to check this debug variable, but in this file there is only an #ifdef which is true as it's really defined with the value 0. So I think, this "debug" part will be included all time even if you have this variable set to 0.

      posted in Official EVOK API
      M
      majorcsa
    • RE: Unipispi (neuron) kernel module on latest raspbian

      @tomasknot I forgot to ask: I had to make 2 small changed to be able to compile the module:

      diff --git a/modules/unipi/raspbian b/modules/unipi/raspbian
      index b48e09d..f9cb26c 100755
      --- a/modules/unipi/raspbian
      +++ b/modules/unipi/raspbian
      @@ -5,7 +5,7 @@
       # for new version checking delete file tmp/versions
       #
       #################################################
      -if [ -s tmp/versions ]; then
      +if [ ! -s tmp/versions ]; then
      

      Without this change the version file would be created only if it does exist already :)

      diff --git a/modules/unipi/src/unipi_tty.c b/modules/unipi/src/unipi_tty.c
      index a6aa074..1e21a11 100644
      --- a/modules/unipi/src/unipi_tty.c
      +++ b/modules/unipi/src/unipi_tty.c
      @@ -69,7 +69,7 @@
       
       
       // #undef UNIPI_TTY_TRACE
      -#ifdef NEURONSPI_DETAILED_DEBUG
      +#if NEURONSPI_DETAILED_DEBUG > 0
       # define unipi_tty_trace(f, args...)   trace_printk(f, ##args)
      

      As the variable is defined but 0 it's still using trace_printk which generated a big fat warning during the kernel load to not to use this module in production. I think it should not be used by default.

      Regards,
      Csaba

      posted in Official EVOK API
      M
      majorcsa
    • RE: Unipispi (neuron) kernel module on latest raspbian

      @tomasknot Thanks for the quick help, it solved my issue, indeed.
      So, now it seems, that neuron could make easily work on a standard raspbian stretch installation, no need to use your custom image.

      Do you plan to release binary .deb packages or dkms for the kernel modules and overlay? It would be awesome if I could just install a plain raspian then add an apt-source and install neuron dependencies :)

      Thanks for the great work and the quick help,
      Csaba

      posted in Official EVOK API
      M
      majorcsa
    • Unipispi (neuron) kernel module on latest raspbian

      Hi,

      I'm trying to use the latest raspbian stretch (using raspberrypi-kernel 1.20180817-1) with a Neuron L203. I've managed to compile the kernel module from your git repository (https://git.unipi.technology/UniPi/unipi-kernel) with success, using the script within the modules/unipi directory.

      The module can be loaded successfully into the kernel, but the only message is:

      [  453.707228] unipi: loading out-of-tree module taints kernel.
      [  453.710108] UNIPISPI: SPI Driver Registered, Major Version: Version 1.15:2018:08:14
      

      Do I need to do anything else to make this module work and detect the HW?

      Thanks in advance,
      Csaba

      posted in Official EVOK API
      M
      majorcsa
    • RE: evok not working

      @tomas_knot Thanks, a lot it makes sense. I'll then definitely move to the opensource image, as my main platform will be the modbus over TCP or RS485, I just wanted to also try the Mervis, but then I will use a different SD card for that.

      posted in Official EVOK API
      M
      majorcsa