Introducing pigpio-wamp

Hi!

This is my first post here, so apologies if I did something wrong :slight_smile:

I have been working on some WAMP components to be used for a personal project, the idea is to be able to control the GPIO pins on the Raspberry Pi and ensuring all components connected stay in sync, I call it pigpio-wamp, source code available https://github.com/om26er/pigpio-wamp. Right now the code base is pretty simple but I plan to add more features in future.

I already released the package as a snap to Ubuntu store and can be installed on a Ubuntu based system using:

$ sudo snap install pigpio --edge --devmode

``

For non-snap based Linux systems use runner executable on the root of the project.

Currently it has to be run from command line using below command, I’ll make that a daemon that starts automatically in the background.

$ sudo pigpio

``

To set the address of a WAMP router and a realm on it you have to call the below command first

$ sudo snap set pigpio crossbar=ws://your_wamp_router_ip/ realm=realm1

``

I am also working on an Android app to control those GPIO pins but its not releasable just yet (though its already functional), but it should be in a few days.

Cheer!

Hi Omer,

cool! thanks for sharing!

one question regarding snap packaging:

https://github.com/om26er/pigpio-wamp/blob/master/snap/snapcraft.yaml#L8

is is possible to use release mode (not devmode) and explicitly grant access to the GPIO from within the snap?

Cheers,
/Tobias

···

Am 17.07.2017 um 14:30 schrieb Omer Akram:

Hi!

This is my first post here, so apologies if I did something wrong :slight_smile:

I have been working on some WAMP components to be used for a personal
project, the idea is to be able to control the GPIO pins on the Raspberry
Pi and ensuring all components connected stay in sync, I call it
pigpio-wamp, source code available https://github.com/om26er/pigpio-wamp.
Right now the code base is pretty simple but I plan to add more features in
future.

I already released the package as a snap to Ubuntu store and can be
installed on a Ubuntu based system using:

$ sudo snap install pigpio --edge --devmode

For non-snap based Linux systems use `runner` executable on the root of the
project.

Currently it has to be run from command line using below command, I'll make
that a daemon that starts automatically in the background.

$ sudo pigpio

To set the address of a WAMP router and a realm on it you have to call the
below command first

$ sudo snap set pigpio crossbar=ws://your_wamp_router_ip/ realm=realm1

I am also working on an Android app to control those GPIO pins but its not
releasable just yet (though its already functional), but it should be in a
few days.

Cheer!

Hi Tobias,

It seems we cannot have snap in confined mode on the Ubuntu Core image that is released due to a bug[1]
​ but I had inquired in their forums and they told me to use the ‘candidate’ image[2]. That way a our snap will only be allowed to use the GPIO pins that we allow from the host (through snap connect command).

[1] https://bugs.launchpad.net/snapd/+bug/1664388
[
​2​

] https://forum.snapcraft.io/t/need-snapcraft-yaml-review/1333/3
​​

Thanks!

···

On Wed, Jul 19, 2017 at 4:39 PM, Tobias Oberstein tobias.o...@gmail.com wrote:

Hi Omer,

cool! thanks for sharing!

one question regarding snap packaging:

https://github.com/om26er/pigpio-wamp/blob/master/snap/snapcraft.yaml#L8

is is possible to use release mode (not devmode) and explicitly grant access to the GPIO from within the snap?

Cheers,

/Tobias

Am 17.07.2017 um 14:30 schrieb Omer Akram:

Hi!

This is my first post here, so apologies if I did something wrong :slight_smile:

I have been working on some WAMP components to be used for a personal

project, the idea is to be able to control the GPIO pins on the Raspberry

Pi and ensuring all components connected stay in sync, I call it

pigpio-wamp, source code available https://github.com/om26er/pigpio-wamp.

Right now the code base is pretty simple but I plan to add more features in

future.

I already released the package as a snap to Ubuntu store and can be

installed on a Ubuntu based system using:

$ sudo snap install pigpio --edge --devmode

For non-snap based Linux systems use runner executable on the root of the

project.

Currently it has to be run from command line using below command, I’ll make

that a daemon that starts automatically in the background.

$ sudo pigpio

To set the address of a WAMP router and a realm on it you have to call the

below command first

$ sudo snap set pigpio crossbar=ws://your_wamp_router_ip/ realm=realm1

I am also working on an Android app to control those GPIO pins but its not

releasable just yet (though its already functional), but it should be in a

few days.

Cheer!

Hi Omer,

Hi Tobias,

It seems we cannot have snap in `confined` mode on the Ubuntu Core image
that is released due to a bug[1]
​ but I had inquired in their forums and they told me to use the

Thanks for digging this out!

We probably would like to have a doc page or something dedicated to Ubuntu Core / snaps with Autobahn in general, and on the Pi in particular.

Such hard to find tips like this one would naturally be a nice addition then to such a page.

As we are talking here, do you know when the Core flavor of 17.04 is due?

I am asking, because of kernel version - as far as I know, ubuntu 17.04 (core also?) is based on kernel 4.10, right?

There are some interesting embedded devices (Marvell SoC based) that only have full Linux mainline support beginning with 4.10

Another Q: is Ubuntu Core able to do remote OTA updates of the kernel and userland snaps _across_ major versions?

Asking because 17.04 won't be a LTS. So could I update a Core 17.04 device over the air to 18.04 LTS once that comes out?

···

Am 19.07.2017 um 15:00 schrieb Omer Akram:

---

If you find answers to above, please collect them "somewhere" - we'll move them to a yet to be decided place then later.

Just want to make sure such hard to find and useful infos are not lost.

Rgd "somewhere": these are probably not AB XX specific infos, but general snap'ped AB infos, or Pi specific infos.

Best place for Pi related infos would be

https://github.com/crossbario/iotcookbook/blob/master/device/pi/README.md

(there are already some Docker notes there .. hence infos rgd snaps on Pi would fit naturally)

Cheers,
/Tobias

'candidate' image[2]. That way a our snap will only be allowed to use the
GPIO pins that we allow from the host (through `snap connect` command).

[1] https://bugs.launchpad.net/snapd/+bug/1664388
[
​2​
] https://forum.snapcraft.io/t/need-snapcraft-yaml-review/1333/3
​​

Thanks!

On Wed, Jul 19, 2017 at 4:39 PM, Tobias Oberstein < > tobias.o...@gmail.com> wrote:

Hi Omer,

cool! thanks for sharing!

one question regarding snap packaging:

https://github.com/om26er/pigpio-wamp/blob/master/snap/snapcraft.yaml#L8

is is possible to use release mode (not devmode) and explicitly grant
access to the GPIO from within the snap?

Cheers,
/Tobias

Am 17.07.2017 um 14:30 schrieb Omer Akram:

Hi!

This is my first post here, so apologies if I did something wrong :slight_smile:

I have been working on some WAMP components to be used for a personal
project, the idea is to be able to control the GPIO pins on the Raspberry
Pi and ensuring all components connected stay in sync, I call it
pigpio-wamp, source code available https://github.com/om26er/pigpio-wamp.
Right now the code base is pretty simple but I plan to add more features
in
future.

I already released the package as a snap to Ubuntu store and can be
installed on a Ubuntu based system using:

$ sudo snap install pigpio --edge --devmode

For non-snap based Linux systems use `runner` executable on the root of
the
project.

Currently it has to be run from command line using below command, I'll
make
that a daemon that starts automatically in the background.

$ sudo pigpio

To set the address of a WAMP router and a realm on it you have to call the
below command first

$ sudo snap set pigpio crossbar=ws://your_wamp_router_ip/ realm=realm1

I am also working on an Android app to control those GPIO pins but its not
releasable just yet (though its already functional), but it should be in a
few days.

Cheer!