Sandy, here is my definition for the VariableDevice:
Devices -> Add a new device… -> Class: VariableDevice --> Variables Add -->
Sandy, here is my definition for the VariableDevice:
Devices -> Add a new device… -> Class: VariableDevice --> Variables Add -->
@Mr.Sponti said in MagicMirror Pimatic (Home Automation) Dashboard:
“Livingroom temperature {round($DST_Temperature,1)} °C - humidity {round($DST_Humidity,1)} %”
Sandy, I’ve tested the notification board with the following string varibale. The units of your measured values need to be part of the string defined in the field expression of your variable device.
“Livingroom temperature {round($Temperaturen.Esszimmer,1)} °C - humidity {round($Temperaturen.Esszimmer,1)} %”
Hi Sandy,
to display temperature and the humidity of your DST sensor in the Notification Board with rounded values and the right units should already possible. Try to use the following approach:
In pimatic create a VariableDevice with a string variable and assign a string including your temperature and humidity Variable.attributes of your DST sensor.
(e.q. “Livingroom temperature {round($DST_Temperature,1)} °C - humidity {round($DST_Humidity,1)} %”
Configure the new VariableDevice into the Notification Board of the MMM-Pimatic module
I didn’t test that, but it should work in that way.
Rounding of the values is not a big issue as there is a method '.toFixed(2) ’ available. At the moment the unit specified in the config file is assigned to all values in the table. To implement the value rounding and a individual unit for every value I need to enhance the code. I will put it on my action list for the next version.
@ganther said in MagicMirror Pimatic (Home Automation) Dashboard:
dhtsensor
Hi Sandy, how is your dht22-sensor connected? Is the sensor direct connected to the Rasperry GPIO pins and you use the plugin “dht-sensors”?
What shows up for the sensor if you create a listing of “variables” from your pimatic menu?
@Peter , you can ignore these Warnings, but you need to install the socket.io-client modul:
cd ~/MagicMirror/modules/MMM-Pimatic
npm install socket.io-client
@Peter Here you can find the latest version of my MMM-Pimatic module. The README isn’t yet covering all features but should be sufficient for the installation and basic configuration of the module.
Please feel free to contact me if you need help to get it running.
@Peter
I’ve reworked my MMM-Pimatic modul but need now to adjust the description on gihub. The modul connects to a pimatic server to listen on device attribute changes and displays changes as notifications on the MagicMirror screen. Temperature values can be displayed in a separate table. As soon as I’ve completed the Readme, I will send you a message.
@start-the-fire said in Quit MM with script:
CTRL-C isn’t an option cause I’m us
Hi, maybe you can use my bash script mmhelper.sh to start/stop MagicMirror from the command line or from another script (e.q. python, nodejs).
#!/bin/bash
#
# mmhelper.sh start | stop | status | hdmi_on | hdmi_off| hdmi_status
#
# Last edited: 10.09.2017 (c) Mr.Sponti
#
#set -x
HOME=/home/pi
PATH=$PATH:$PWD
MY_NAME=$(basename -- "$0")
function monitor_on() {
/opt/vc/bin/tvservice --preferred > /dev/null 2>&1
sudo chvt 6
sudo chvt 7
}
function monitor_off() {
/opt/vc/bin/tvservice --off > /dev/null 2>&1
}
function monitor_status() {
# get power status --> 1 = off , 0 = on
power=$(/opt/vc/bin/tvservice --status |grep "TV is off"|wc -l)
if [ $power -eq 1 ]
then
echo "off"
elif [ $power -eq 0 ]
then
echo "on"
fi
}
# check first runstring parameter
if [ -z "$1" ]
then
cmd=start
else
cmd=$1
fi
case $cmd in
"start") # start MagicMirror
pm2 start mm
;;
"stop") # stop MagicMirror
pm2 stop all
;;
"status")
pm2 status mm
;;
"hdmi_on") # switch monitor on
monitor_on
monitor_status
;;
"hdmi_off") # switch monitor off
monitor_off
monitor_status
;;
"hdmi_status")
monitor_status
;;
*) echo "undefined command"
echo "usage: $MY_NAME start|stop|status|hdmi_on|hdmi_off|hdmi_status"
esac
You also need the mm.sh script in your home directory!
pm2 flush
# start Magic Mirror system
cd ~/MagicMirror
DISPLAY=:0 npm start
Merry Christmas!
@Kugelfang said in Electron CPU usage:
I tried your precise instructions but my system still installed electron 1.7.9
cd $HOME/MagicMirror
npm uninstall -g electron
npm uninstall electron
npm install electron@1.4.15