FEEDBACK: Raspberry Pi particle-agent structure -- complaint

Particle’s Raspberry Pi (beta) development scheme.
Having the Photon imitate the Arduino sketch structure (setup(), loop()) made sense. But the Raspberry
Pi is not that kind of animal. Or rather, Linux is not that kind of OS.

  1. The “sketch” model leads to running particle-agent as
    super-user since generally access to GPIO pins require SU. However, I
    can imagine using Particle’s cloud services without any reference to
    GPIO in the RPi at all. E.g., collecting data from Photons and passing
    it along.
  2. When I DO read sensors or write to GPIO to switch things
    I tend to split device access up into separate programs that provide
    info when I ask (through the several inter-processor communication
    methods). Or I use crontab to schedule things. If I need to turn
    something on at 6pm and off at 7am with a Photon I have to do it in a
    sketch loop() but I’d never do that with a RPi. There are better ways.
    These “programs” may have to run as SU briefly but the main Particle
    cloud communicator need not. And should not.

We appreciate the feedback, let me ping a colleague that would be best suited to help you out with this. @julien.

Thanks for sharing your thoughts. What we tried to do in the first beta is provide the minimal way to compile and run firmware-style sketches on the Raspberry Pi. I hear loud and clear the need to use more restricted accounts when possible. It was on my to-do list but it didn’t make it in time for the first beta. Stay tuned for improvements in that area early next year.

4 Likes

Good morning all and a merry Christmas … I have with some success have been using a Raspi and a Photon or two with an opensource program called OpenHAB … www.openhab.org if you would like more information please let me know …I have discovered that not only can you post values to OpenHAB you can also publish to particle at the same time and then forward to an IOT provider…thanks

1 Like

1 Like

That sounds great @jade7272 ! Thanks for this tip!
Can openhab also control photons with particle.function?

I want to check it out…
:metal::older_man:

Yea it can …I use the Node-Red program to bridge the two as the MQTT sketches are a bit wonky and the particle needs to be reset once I. A while but Particle publish and subscribe seem to work great …I’m going to be publishing a full instruction set on OpenHab/ Particle/Node-Red on how to tie them together with some examples on the Particle side and the node Red on the instructable sand hacks yer sites here in the next week or so …

1 Like

Thanks @jade7272! That sounds great!
I’m not a programmer, so I will try but don’t know if it’s something for me…

Could you post the links here to your bridging goodies please?

:+1::older_man:

Ok … Here is a link to my Instructable …do you use a Linux computer or have a Raspberry Pi ? Raspberries are excellent for doing this type of projects… https://www.instructables.com/id/Home-Automation-21

There are 2 PDFs at the bottom that will get you started with OpenHab …How to download etc… I also used a link to another tutorial that takes you step by step http://www.homeautomationforgeeks.com …As for node Red http://nodered.org it come with the Raspberry Pi as a Program

1 Like

Please note that I use OpenHab version 1.8 as it is a little less complicated to learn…

1 Like

Thanks @jade7272!
Sorry for my late reaction to your posts.
I am very busy with other matters right now but I will try to proceed with your tips and come back here…
:wave::older_man:

Here is a like to my new instructable