Showing posts with label Raspimatic. Show all posts
Showing posts with label Raspimatic. Show all posts

Monday, October 19, 2020

Granting Access for non Root to GPIOs

https://stackoverflow.com/questions/30938991/access-gpio-sys-class-gpio-as-non-root



Anleitung dafür Rechte auf GPIOs zu setzen aus:
http://www.netzmafia.de/skripten/hardware/RasPi/RasPi_GPIO_Shell.html

Datei:
# /etc/udev/rules.d/80-gpio-noroot.rules
# Zugriff auf GPIO ohne root-Rechte ermoeglichen
#
# Gruppe aendern
SUBSYSTEM=="gpio", RUN+="/bin/chown -R root.gpio /sys/class/gpio"
SUBSYSTEM=="gpio", RUN+="/bin/chown -R root.gpio /sys/devices/virtual/gpio"
# Sticky-Bit setzen
SUBSYSTEM=="gpio", RUN+="/bin/chmod g+s /sys/class/gpio"
SUBSYSTEM=="gpio", RUN+="/bin/chmod g+s /sys/devices/virtual/gpio"
# Zugriffsrechte setzen
SUBSYSTEM=="gpio", RUN+="/bin/chmod -R ug+rw /sys/class/gpio"
SUBSYSTEM=="gpio", RUN+="/bin/chmod -R ug+rw /sys/devices/virtual/gpio"


#Jetzt müssen Sie nur noch den udev-Daemon von den Änderungen wissen lassen (beim nächsten Reboot passiert das dann automatisch):
sudo service udev restart
sudo udevadm trigger --subsystem-match=gpio

Iobroker zur Gruppe gpios hinzufügen:
sudo usermod -aG gpio iobroker



Nun ist folgendes passiert: 
Die Rechte auf die GPios wurden auf die Gruppe GPIO erweitert.
Dies wird bei jedem Boot wiederholt.
Der Nutzer Iobroker wurde dieser Gruppe hinzugefügt und kann nach einem Neustart nun die GPios schalten.


Sunday, December 8, 2019

IObroker in Homematic

Finally, after one year with Homematic IP and Homematic running via a Raspi and the ELV expansion module, I'll try to include more Raspis via iobroker into my automation.

Right now, the role or structure for accessing other Raspis GPios through Homematic IP is not clear to me. However I have the following idea:
Setup will be as follows:
- Rasberrymatic with ELV expansion and iobroker addin --> multihost slave
- Raspberry with some kind of ubuntu and iobroker installed --> multihost master



After some thinking I will got with an Iobroker installation on another PI only to test ioBroker.
Simulatneously I installed debmatic:
https://github.com/alexreinert/debmatic
on that pi and will try to link it to the first homematic as well as iobroker.


Next step with IOBroker on second PI was to install RPI extension as well as Vis.
RPI needs config in Instance Menu. If error with writing to certain block occurs,e.g.:
18309) Cannot evaluate: Filesystem 1K-blocks Used Available Use% Mounted on /dev/mmcblk0p2 7318052 4276676 2701448 62% / /1024


Then you probably need to uncheck the Raspberry Checkbox in RPI Config on IoBroker


Iobroker auf raspi 4 installieren
https://technikkram.net/2019/07/funktioniert-iobroker-auf-neuem-raspberry-pi-4-installieren



Io Broker move to new host:
https://forum.iobroker.net/topic/12365/raspberrypi-defekt-daten-retten/6


Break.
Iobroker went to new Raspi4 because of Memory consumption.
Debmatic ist out of discussion as well as running iobroker on the homematic pi.
Now I'm gonna link Iobroker on PI 1 to homematic on Pi 2 via Network.



Problems with radar2.plugin on Raspi3 Ubuntu:
 After reboot i get:
host.RelayPi12020-06-09 21:10:54.654errorCaught by controller[0]: at process._tickCallback (internal/process/next_tick.js:61:11) errno: 19, code: 'ENODEV', syscall: 'bind' }
host.RelayPi12020-06-09 21:10:54.653errorCaught by controller[0]: at process.nextTick (/opt/iobroker/node_modules/@abandonware/noble/lib/noble.js:60:24)
host.RelayPi12020-06-09 21:10:54.653errorCaught by controller[0]: at NobleBindings.init (/opt/iobroker/node_modules/@abandonware/noble/lib/hci-socket/bindings.js:78:13)
host.RelayPi12020-06-09 21:10:54.652errorCaught by controller[0]: at Hci.init (/opt/iobroker/node_modules/@abandonware/noble/lib/hci-socket/hci.js:100:35)
host.RelayPi12020-06-09 21:10:54.652errorCaught by controller[0]: { Error: ENODEV, No such device


Issuing the following command:
sudo hciattach /dev/ttyAMA0 bcm43xx 921600

solves the error till next reboot.



Sunday, December 30, 2018

Homematic Startup

Hallo zusammen,

nachdem ich nach erfolgreichen Umzug als kleinen Start in die Heimautomatisierungswelt mit dem Homematic IP Heizungsset warm geworden bin, komme ich endlich nach mehr als einem Jahr dazu das ganze auf etwas stabilere und autarke Beine zu stellen.

Ziel ist es ein Stück  von der reinen Cloud Lösung Homematic IP zu kommen, sowie die Standard Wireless und Wired Aktoren der Homematic anschließen zu können.

Erste Anwendungsfälle für mich werden sein:
- Lichtsteuerung
- Rolladensteuerung
- Garagentorsteuerung
- Heizungssteuerung

Hierzu folgendes Setup:
- Raspi Model B3
- RPI-RF-MOD von ELV nebst Gehäuse und Netzteil
- 32 GB mini SD Karte

Alle Details entnehmt Ihr bitte:
https://homematic-forum.de/forum/viewtopic.php?t=26917
Dieser Artikel ist die Grundlage für alle hier vorgestellte.


Dabei bin ich mit der ersten SD Karte auch noch hierüber gestolpert:
https://raspberrypi.stackexchange.com/questions/47910/raspberry-breaks-sd-card-31-mb-raw



  1. Die nächsten Projekte sind eine automatische Lichtsteuerung im Außenbereich nach Anleitung hier: https://pixelfriedhof.com/index.php/it-technik/hausautomatisierung/119-homematic-programm-zeitgesteuerte-beleuchtung-mit-manuellem-override
  2. Automatische Steuerung der Umwältspumpe der Heizung nach Zeitprofil, erweiterbar um Bewegungsmelder/externe Trigger
  3. Anwesenheitssteuerung: Ansätze sind Homematic und Openhab