Initial thoughts

Moderators: grovkillen, Stuntteam, TD-er, enesbcs

Post Reply
Message
Author
FluffyChicken
Normal user
Posts: 11
Joined: 22 Dec 2019, 17:57

Initial thoughts

#1 Post by FluffyChicken » 04 Mar 2021, 14:19

Today I installed this on my PiZero that runs my own Python3 software to do just sensor logging and sending via MQTT. I use ESPEasy on erm ESP's so thought I'd give this a go.

Up to date PiOS32 install.

Went through the motions and everything started fine :-)
Excellent start. Looks nice and familiar too.



It seems python3 packages need to be installed globally (sudo) and not as the local user.
though I've not tried to run RPIEasy.py without sudo yet, sees I can't as I lose web access, shame. (just tested)

I don't have a DHT device to use at the moment, but Adafruit module has been deprecated archive for a long time, look at something else or moving to Circuit Python. Not only will you get a lot of other sensors, LoraWAN & TTN etc with that. But it may make moving it over to other devices easier?

Lacks the SDS010 Particle Sensor I use, not to worry, I'm just playing as it looks interesting.
Lacks BME680 and if you try to get that working, you could move to using the BSEC and reading from that.
BME280, good
DS180B20 good, but not got one attached, (these work better on the ESP thought)
Lots of interesting things there too.
Module installing just worked :-) Easy :-)

SystemInfo is providing a CPU Temp (I assume it's using vcgencmd measure_temp ?) not checked the code.
Would be nice to have additional info there, like throttling, low power warning etc
GUI - Dashboard, interesting.
P.S. I like the ability to force a 'Run' could add that to ESPEasy?

GPS, now this should be called GNSS as that is the overreaching name for it. GPS is the US only system.
I have a GNSS (ublox8) device so have GLANASS etc, or are you only looking for GP* rather than GN* NMEA.
Looks like it's serial only.
It would be nice and maybe better to use gpsd and let it worry about the interface and reading of a device.
or peak at pynmea2 module. It would open up more Values.
P.S. you could set the serial port and console from within the interface, you can issue the command from the terminal for us. Then ask/force a reboot? something like

Code: Select all

raspi-config nonint do_serial 1 0
(check the 1 and 0's though).
Is 'Fix' accessible as a variable?

Over all I'm liking it :-)

Looking at the variables, it could still do (as could ESPEasy) with having ISO time, a more universal method of time transfer.
this is what I use in Python3, or variants of this code.

Code: Select all

# 2018-08-25T14:23:45+00:00
datetime.now(timezone.utc).replace(microsecond=0).isoformat()
Not looked at MQTT or seeing which Lora you can do.

thankyou for making this.

User avatar
enesbcs
Normal user
Posts: 576
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: Initial thoughts

#2 Post by enesbcs » 04 Mar 2021, 19:55

Thank you for your feedback!
FluffyChicken wrote: 04 Mar 2021, 14:19 It seems python3 packages need to be installed globally (sudo) and not as the local user.
Yes, this is the reason why "Root rights needed" style alert showing in red color on several places in RPIEasy.
Every installation needs elevated rights, not just python packages, under any operating system. Unless you are installing Google Chrome to your own profile on Windows, which hasnt need other rights than standard user.
FluffyChicken wrote: 04 Mar 2021, 14:19 though I've not tried to run RPIEasy.py without sudo yet, sees I can't as I lose web access, shame. (just tested)
It is a linux restirection: Only root has the right to use port 80. If you are OK with other ports, as 8080, you can run it without root.
FluffyChicken wrote: 04 Mar 2021, 14:19 I don't have a DHT device to use at the moment, but Adafruit module has been deprecated archive for a long time, look at something else or moving to Circuit Python. Not only will you get a lot of other sensors, LoraWAN & TTN etc with that. But it may make moving it over to other devices easier?
CircuitPython has a lot of dependencies (and i mean LOT) of its own libs, which i do not prefer. Old adafruit module is still working, but a pure python DHT driver also added as alternative.
FluffyChicken wrote: 04 Mar 2021, 14:19 Lacks the SDS010 Particle Sensor I use, not to worry, I'm just playing as it looks interesting.
_P053_PMSx003 plugin supports this devices:
["PMSx003","PMS3003","PMS5003S","PMS5003ST","PMS5003T","SDS01x","SDS198","HPMA115S0","HPMA115C0","SPS30","MCU680"]
FluffyChicken wrote: 04 Mar 2021, 14:19 Lacks BME680 and if you try to get that working, you could move to using the BSEC and reading from that.
Yep. I think about buying it some days ago, but its rather expensive with no more precision than a HTU21D so i removed it from my Ali Cart.
FluffyChicken wrote: 04 Mar 2021, 14:19 DS180B20 good, but not got one attached, (these work better on the ESP thought)
They works just fine with the integrated linux kernel driver. I've tested 3 of them on one pin in the same time.
FluffyChicken wrote: 04 Mar 2021, 14:19 SystemInfo is providing a CPU Temp (I assume it's using vcgencmd measure_temp ?) not checked the code.
CPU Temp is gathered using the standard Linux way:
/sys/class/thermal/thermal_zone
Which is working on Raspberry and Orange PI, and on normal Linux Desktop PC's. In case it is not, it fallbacks lmsensor readings, if it is working.
FluffyChicken wrote: 04 Mar 2021, 14:19 Would be nice to have additional info there, like throttling, low power warning etc
Nice idea, but i have absolutely no idea how to code that, for all of the above platforms.
FluffyChicken wrote: 04 Mar 2021, 14:19 P.S. I like the ability to force a 'Run' could add that to ESPEasy?
"taskrun" command is supported by ESPEasy also, but only from commands, not from the GUI.
FluffyChicken wrote: 04 Mar 2021, 14:19 GPS, now this should be called GNSS as that is the overreaching name for it. GPS is the US only system.
I have a GNSS (ublox8) device so have GLANASS etc, or are you only looking for GP* rather than GN* NMEA.
Looks like it's serial only.
P082_GPS plugin having the same capabilities, name and functions as the ESPEasy variant. It is also serial only and watches for GGA, ZDA and VTG messages to decode data, regardless GP or GN head.
Can you show me an Arduino compatible GPS module, which is not using serial communication?
FluffyChicken wrote: 04 Mar 2021, 14:19 It would be nice and maybe better to use gpsd and let it worry about the interface and reading of a device.
or peak at pynmea2 module. It would open up more Values.
It is open source. Anyone who has time and energy can add these features. Current capabilities works fine for me. :)
FluffyChicken wrote: 04 Mar 2021, 14:19 Is 'Fix' accessible as a variable?
No. RPIEasy calls GPS#GotFix and GPS#LostFix events as ESPEasy does.
FluffyChicken wrote: 04 Mar 2021, 14:19 Looking at the variables, it could still do (as could ESPEasy) with having ISO time, a more universal method of time transfer.
this is what I use in Python3, or variants of this code.

Code: Select all

# 2018-08-25T14:23:45+00:00
datetime.now(timezone.utc).replace(microsecond=0).isoformat()
Interesting, but what is the use case of this? ESPEasy logs also uses local time, and RPIEasy tries to be similar. However it looks like a very interesting task to use several RPIEasy installations on the same network, but at the same time at several timezones/countries on Earth, which surely needs ISO time displays.

FluffyChicken
Normal user
Posts: 11
Joined: 22 Dec 2019, 17:57

Re: Initial thoughts

#3 Post by FluffyChicken » 07 Mar 2021, 08:29

A few quick ones..
(on my mobile so bloody hard to reply easily)

BME680 is not just humidity, is T/P/H and VOC (or eVOC, eCO2 for indoor use).
It's the next step up from a BME280.


gpsd is on all Linux systems, I don't care about Arduino environment, I doubt they'll have gpsd as they don't have the advantage of an OS behind them.
gpsd does the interfacing (serial) and has all the drivers, interpretation to provide a standard format you read over a socket, so much so the GNSS device can be on another computer, your phone etc. The hard part is a module for python, gps or gps3 should do it, but I don't know their limitations, I've used gps3 for gpsd reading. Not saying it's the perfect solution, just ideas https://gpsd.gitlab.io/gpsd/index.html

I don't know about cross compatibility with other platforms (temps, throttling) just the Pi and it uses their own system to provide the code.
You could also get the serial number to display.
Perhaps drop the RPi naming? As I implies its Pi targeted and would be specific.


Yes Blinka is large, but it would be the ease of adding new parts, they're doing the hard work.
And was only a thought :-)
I use a small part of in my LoraWAN TTN.

I use all my Python3 packages installed via pip3 as local users (e.g. Pi) on the Pi, not sudo if I can avoid it, not even a virtual environment as that always seems like more faff, for my setups.
If I can drop running it as sudo as you say by switching to 8080, then excellent.


I would never have thought to look in a PMS sensors (Plantower) for a different model (NovaFitness), that's different to ESPEasy, maybe drop the model naming and just call it Particle Sensors?


ISO time is a standard timestamp used in IoT and communications. The UK government and I assume others use the standard, DEFRA use it. It provides a method where timezones don't matter as it is all there in a logical order. The layout is defined, so you're not guessing what (x x x) (x-x-x) means or other time setups, hence why it is used, I think you can represent duration with it to, I know we use it to grab the last few hours of the DEFRA sensor data from the air monitors.

Reason,... we use it for our city community projects ;-) and it all in python3 now. Saves me having to bodge it together with concatenation for sending in an MQTT JSON string.
It's less about the timezone. (though BST could be used).


The DS18B20 on Pi's tend to lose them every now and again, mind they have a similar problem with BMEs too on i2c.
I've not seen the DS18s vanish and ran many in a daisy and even star setup and of multiple pins, but many have.
(I'm a regular on the RPi forum).
Last edited by FluffyChicken on 07 Mar 2021, 12:09, edited 3 times in total.

FluffyChicken
Normal user
Posts: 11
Joined: 22 Dec 2019, 17:57

Re: Initial thoughts

#4 Post by FluffyChicken » 07 Mar 2021, 11:35

Just noticed in the Particle Sensors you listed, you have
MCU680, that a BME680 with a microcontroller (STM32) on it to provide a serial output with iirc bsec's but it's limited and not sure it can be updated or changed to eVOC. Else it's just an i2c BME680, it is not a Particle Sensor, so confused why it's listed under them.
I'd split that of the Particle Sensors and move it to the Environment Sensors, especially as there is no way I or anyone would look there for it.
But consider some better naming or duplicate/alias them as plugins if you must replicate ESPEasy and device families.

After another play around, I'll delve into the code and see what you're doing. Can't say I can help to much though, but you never know.
I'll see if I can get that webpage :8080 going.
and a play with the daylight/location :-)

User avatar
enesbcs
Normal user
Posts: 576
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: Initial thoughts

#5 Post by enesbcs » 08 Mar 2021, 23:08

FluffyChicken wrote: 07 Mar 2021, 08:29 Perhaps drop the RPi naming? As I implies its Pi targeted and would be specific.
RPi was the first system supported. Now it can run on Orange Pi, Rock PI S, and of course on any Debian running PC with python3.
I think about renaming the project but it would cause more trouble than advantage. Especially in the git update process.
FluffyChicken wrote: 07 Mar 2021, 08:29 I would never have thought to look in a PMS sensors (Plantower) for a different model (NovaFitness), that's different to ESPEasy, maybe drop the model naming and just call it Particle Sensors?
Added other sensor names to P053.

User avatar
enesbcs
Normal user
Posts: 576
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: Initial thoughts

#6 Post by enesbcs » 08 Mar 2021, 23:15

FluffyChicken wrote: 07 Mar 2021, 11:35 Just noticed in the Particle Sensors you listed, you have
MCU680, that a BME680 with a microcontroller (STM32) on it to provide a serial output with iirc bsec's but it's limited and not sure it can be updated or changed to eVOC. Else it's just an i2c BME680, it is not a Particle Sensor, so confused why it's listed under them.
I'd split that of the Particle Sensors and move it to the Environment Sensors, especially as there is no way I or anyone would look there for it.
MCU680 is supported by the underlaying PyPMS library ( https://github.com/avaldebe/PyPMS ), which choosen to support this kind of device for some reason. I've just added to the select box of RPIEasy, nothing more. :) I guess users will forgive me, that an extra sensor is available under P053.
Actually the PMS5003T (i have this device, and this was the main target of the plugin) also provides temperature and humidity, and works surprisingly well.

FluffyChicken
Normal user
Posts: 11
Joined: 22 Dec 2019, 17:57

Re: Initial thoughts

#7 Post by FluffyChicken » 10 Mar 2021, 11:35

:-)
Anyway, I'm on gitub but not with this forum name :-)


I certainly think the plugin needs some work, I know a few of is use SDS010 as it's the main PM sensor used in Air Monitoring with DIY systems, mainly due to following real (government) sensors more closely. Though PMS are often used in off the shelf system, but they use more sophisticated algorithms and constant calibration.
It needs it timing capability made available, to it.
One day, and don't hold you breath, there maybe a plugin _P056_SDS011-Dust.ino
My main problem is whenever I stop RPIEasy, it stops the fan on the SDS and that nad a fan start triggers a power pule down the 5V and reboots. So a right royal pain to work with.
I'll make another setup using it's USE adaptor it comes with.

Anyway, GNSS fixes fist, updating my setup now.

User avatar
enesbcs
Normal user
Posts: 576
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: Initial thoughts

#8 Post by enesbcs » 10 Mar 2021, 19:45

FluffyChicken wrote: 10 Mar 2021, 11:35 My main problem is whenever I stop RPIEasy, it stops the fan on the SDS and that nad a fan start triggers a power pule down the 5V and reboots. So a right royal pain to work with.
Maybe a larger capacitor between VDD and GND helps this problem.

FluffyChicken
Normal user
Posts: 11
Joined: 22 Dec 2019, 17:57

Re: Initial thoughts

#9 Post by FluffyChicken » 21 Mar 2021, 20:24

Nope, that doesn't work, it's an ongoing problem on the RPi forums.
A few tricks have been found but still fail for others, basically powering externally. Just one of the flaw of a PiZero.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest