Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Anyone Using Environment Sensors with moOde?
#1
Question 
Hello,

I have several instances of moOde running at home. I primarily use them in the kids rooms for white noise while they sleep. I also use ESP boards (ESP8266 and ESP32) paired with various sensors (BMx280, DHT22, HDC1080, etc.) for gathering environmental information in the room.

I figured instead of having this information published via MQTT with an ESP microcontroller, I would just use the Pi running moOde instead.
I'm already in the process of getting this working. I already tested a python library for a BMP280 sensor. I may look for a C library for the sensor and write a C program instead. I'm researching the MQTT client and reoccurring publishing data to a topic.  

I'm curious to know if anyone else is using their moOde install for something similar?

Several people using MQTT for controlling moOde and I might incorporate these examples as well.
Reply
#2
Quote: I have several instances of moOde running at home. I primarily use them in the kids rooms for white noise while they sleep.

Lol... priorities !  

Does it work ?

and this begs the question....do you use it yourself for sleepy time  Smile ?  or is it an 'opiate for the masses'  shades of 1984 !!

Just at a loose end....Bob Big Grin
----------
bob
Reply
#3
Hi heman22

I have a project using a potentiometer connected to an ADS1115 ADC, which operates like a sensor

   https://moodeaudio.org/forum/showthread.php?tid=3834

After looking at lots of driver code and other projects using the ADS1115 I finally found that the kernel included a driver for the board that could be used with "Industrial I/O", and it was very easy to use with the libiio C library (hard to believe how little code was required) 

   https://github.com/antiprism/turnandrun/search?q=iio

The following page describes setting up the BMP280 fo use with IIO

   https://petermolnar.net/article/linux-i2c-iio-collectd/

Adrian.
Reply
#4
@heman22

I haven't monitored sensors via a moOde install but certainly MQTT clients work fine in RaspiOS. I scripted the mosquitto client, for example, to monitor the progress of simultaneous moOde builds on several RPi models back in the day when binary images weren't being distributed.

Besides its light weightedness, the wonderful thing about MQTT is its ubiquity---name a platform and there's likely to be a MQTT implementation for it. You can mix and match RPi, ESP8266, etc.

Coincidentally, I'm starting a project to monitor temp and humidity (and, hopefully, air flow or at least the state of the fan) in a number of rooms in the house we recently moved into. ATM, the air distribution system is seriously unbalanced. My personal calculus is that using microcontrollers makes better sense because
  • I want to monitor at least 6 spaces so cost is a factor
  • I want to keep the power consumption and heat generation down to avoid influencing the temp sensor; as well, the monitors doesn't have to be battery powered, but that could be a bonus because I could move them around easily
  • I don't want to have to reinstall the monitoring software any time I reinstall moOde (which I tend to do a lot in testing)
  • I want an excuse for a microcontroller project so I can explore the progress that's been made in the 8 years since I last did one Tongue
Good luck.

Regards,
Kent
Reply
#5
(01-23-2022, 05:57 AM)DRONE7 Wrote:
Quote: I have several instances of moOde running at home. I primarily use them in the kids rooms for white noise while they sleep.

Lol... priorities !  

Does it work ?

and this begs the question....do you use it yourself for sleepy time  Smile ?  or is it an 'opiate for the masses'  shades of 1984 !!

Just at a loose end....Bob Big Grin

Using moOde in the kids rooms works well. There are some issues I have when the power goes out at home. The Pis don't seem to come back right? I usually have to pull the power on them again for them to connect to wi-fi. It's hard to troubleshoot since they are in the kids rooms and tucked away under or behind furniture so the kids can't get at them Tongue . I did attempt to add a KB and TV to the one in my daughter's room. I don't remember the exact details as it was a year ago or more, but I was not able to get anything to display on the screen and I believed tried getting to different ttys without success. Since I have a work around, I haven't dedicated time to do a proper RCA. 

moOde plays the same local audio file on loop for months at a time without hiccup (unless the power goes out). I usually have to connect via UPNP and tell moOde to play after a power outage even with the resume playback turned on. Another thing I haven't looked at. I did see some posts about the auto play issue (I'm also on a really old version 6.7.1... Saw a thread on the forum about updating them Smile ).

 I do not use it for sleepy time in my room, but will at some point.
Reply
#6
(01-23-2022, 08:22 PM)TheOldPresbyope Wrote: @heman22

I haven't monitored sensors via a moOde install but certainly MQTT clients work fine in RaspiOS. I scripted the mosquitto client, for example, to monitor the progress of simultaneous moOde builds on several RPi models back in the day when binary images weren't being distributed.

Besides its light weightedness, the wonderful thing about MQTT is its ubiquity---name a platform and there's likely to be a MQTT implementation for it. You can mix and match RPi, ESP8266, etc.

Coincidentally, I'm starting a project to monitor temp and humidity (and, hopefully, air flow or at least the state of the fan) in a number of rooms in the house we recently moved into. ATM, the air distribution system is seriously unbalanced. My personal calculus is that using microcontrollers makes better sense because
  • I want to monitor at least 6 spaces so cost is a factor
  • I want to keep the power consumption and heat generation down to avoid influencing the temp sensor; as well, the monitors doesn't have to be battery powered, but that could be a bonus because I could move them around easily
  • I don't want to have to reinstall the monitoring software any time I reinstall moOde (which I tend to do a lot in testing)
  • I want an excuse for a microcontroller project so I can explore the progress that's been made in the 8 years since I last did one Tongue
Good luck.

Regards,
Kent


You are absolutely right. I already have 7 ESPs deployed gathering temp and humidity data. For the boy's room I have a Pi running moOde and an ESP with a sensor. For the sake of being able to use the ESP from the boys room on another project, I figured I would put that sensor on the Pi.

I also set the sensors up around the house to get a feel how unbalanced the rooms are. I'm taking the data from MQTT and use nodered to put the data in an influx database. I used Grafana to display the data. All of this is run in various docker containers. I'm starting to script everything I run at home, so I will have a repo with my BASH script to install what's needed after and will just pull and run the script.

I attached a screen shot of one of the Grafana dashboards.
   
Reply
#7
Nice!
Reply
#8
I ended up installing a BMX280 Node in Node-RED and I push the data over MQTT to get ingested in InfluxDB. It works rather well even with it running on a Pi Zero W.
Reply


Forum Jump: