Gateway Addon for Hass.io



  • Hi there,
    in these days I've been trying to get the Gateway working as an add-on for Hass.io, running on RaspberryPi3.
    You can find all my work (well, tons of hours for just some lines! :D) here on GitHub. Even it's the master branch, it's totally in development...
    So, now, I'm stuck.

    It looks like that if I start the Docker container as privileged, it works! But not when it start with the configuration you see, and neither I can give the privileged capability to the container.
    Any ideas on what on the host I should expose?



  • @ghiglie I presume you've seen this. Tried them all?

    Privilege for access to hardware/system. Available access: NET_ADMIN, SYS_ADMIN, SYS_RAWIO, SYS_TIME, SYS_NICE



  • Is this the error you're taking about?

    [services.d] starting services
    [services.d] done.
    ifelse: fatal: unable to exec /run.sh: Permission denied
    [cmd] /run.sh exited 111
    [cont-finish.d] executing container finish scripts...
    [cont-finish.d] 99-message.sh: executing... 
    -----------------------------------------------------------
                    Oops! Something went wrong.
     
     We are so sorry, but something went terribly wrong when
     starting or running this add-on.
     
     Be sure to check the log above, line by line, for hints.
    -----------------------------------------------------------
    [cont-finish.d] 99-message.sh: exited 0.
    [cont-finish.d] done.
    


  • Try setting permissions on run.sh.

    RUN chmod a+x /run.sh
    
    CMD [ "/run.sh" ]
    


  • oops, sorry, I've fixed that locally after I pushed the code to git. I see just now I'm not exposing the 5003 port... 😐

    I'll add the RUN command.

    I mean, mysgw hangs on activating the transport.

    @hautomate said in Gateway Addon for Hass.io:

    @ghiglie I presume you've seen this. Tried them all?

    Privilege for access to hardware/system. Available access: NET_ADMIN, SYS_ADMIN, SYS_RAWIO, SYS_TIME, SYS_NICE

    Yes, tried all, even with gpio set to true.



  • Add...

    "host_network": true,

    and for port 5003, what about this?

    "ports": {
    "5003/tcp": 5003
    },

    Or put the port as an option so it could be configured by the user. I'm not sure what else would be needed for this to work.

    "options": {
    "port": 5003,



  • @hautomate said in Gateway Addon for Hass.io:

    Add...

    "host_network": true,

    and for port 5003, what about this?

    "ports": {
    "5003/tcp": 5003
    },

    Or put the port as an option so it could be configured by the user. I'm not sure what else would be needed for this to work.

    "options": {
    "port": 5003,

    I've added it locally, since it's primaly a MQTT image.

    I'm stopping here now:

    mysgw: Starting gateway...
    mysgw: Protocol version - 2.2.0-rc.2
    mysgw: MCO:BGN:INIT GW,CP=RNNGL---,VER=2.2.0-rc.2
    mysgw: TSF:LRT:OK
    mysgw: TSM:INIT
    mysgw: TSF:WUR:MS=0

    so it's not starting the transport.
    Any idea on what I shoudl enable?



  • @ghiglie hmm, not sure. Would you please update your repo with the latest and I'll try a reinstall and have a closer look?



  • @hautomate said in Gateway Addon for Hass.io:

    @ghiglie hmm, not sure. Would you please update your repo with the latest and I'll try a reinstall and have a closer look?

    sorry, I'm out for work 😞 I'll do ASAP tomorrow!

    EDIT: Updated!



  • @ghiglie It shows the last commit as 14 days ago...



  • Will be watching with interest. I'd like to move to hass.io but this is the one thing stopping me.



  • @hautomate said in Gateway Addon for Hass.io:

    @ghiglie It shows the last commit as 14 days ago...

    git-noob mistake! updated!



  • @ghiglie said in Gateway Addon for Hass.io:

    git-noob mistake! updated!

    Haha! I forgot to tell you that I have no idea what I'm doing 🙂

    The 'run chmod' command is still missing in the dockerfile.



  • Wondering what the status of this is. Would love to try it out as I have migrated to hassio and would love to integrate mysensors gateway back on the same rpi.


Log in to reply
 

317
Online

7.3k
Users

8.1k
Topics

87.5k
Posts

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.