Coder Social home page Coder Social logo

markvader / ha-rpi_rf Goto Github PK

View Code? Open in Web Editor NEW
30.0 30.0 5.0 164 KB

Home Assistant Raspberry Pi GPIO RF Integration

License: Apache License 2.0

Python 100.00%
custom-component home-assistant home-assistant-component home-assistant-hacs rpi-gpio rpi-rf

ha-rpi_rf's Introduction

Hi there ๐Ÿ‘‹

I'm Mark B, I now work in Data Engineering & SysOps having worked previously in non-IT related fields for 15 years. I really like to dabble in many areas with software and contribute to a variety of projects in hardware (C++), Home Automation (mainly Python) & Medical Software (Java & User Documentation).

I have a strong interest in diabetes technology (having had type 1 Diabetes for over 22 years) and try to contribute to various opensource projects in the DIY Artifical Pancreas world and support the users of these systems. Commercial closed loop systems are the (near) future for Diabetes and DIY systems are here for the bold and the brave now. I use AndroidAPS, xDrip+ & Nightscout

Being a big fan of Home Assistant Website/Github, the open source home automation project (that puts local control and privacy first), I've taken on maintaining and developing some integrations. I maintain and develop the ha-rpi_rf custom component, I've written a python library for the Sonic water smart shutoff valve by Hero Labs and a Home Assistant integration for this device. I've now turned my attention to the local api, to really gave users local control and not have to be dependent on a webservice.

Want to collobrate, let me know

Much more to come.

Mark

Anurag's GitHub stats

ha-rpi_rf's People

Contributors

arniebarni avatar dependabot[bot] avatar markvader avatar oskargert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ha-rpi_rf's Issues

Error in configuration.yaml after hacs and rpi_rf Update

hi,

i have an issue with the configuration.yaml since i have updated homeassistant.
i also updatred hacs, rpi_gpio and rpi_rf.

ERROR-Message:
bad indentation of a mapping entry at line 58, column 9:
gpio: 17

Has somebody any clue about a solution?

 - platform: rpi_rf
    gpio: 17
    switches:
      Stern:
    pulselength: 300
        protocol: 1
        code_on: 1394001
        code_off: 1394004
        signal_repetitions: 10
      Druckerbeleuchtung:
        protocol: 1
        pulselength: 300
        code_on: 1397073
        code_off: 1397076
        signal_repetitions: 10
      Nachtischlampe Freddy:
        protocol: 1
        pulselength: 300
        code_on: 1397841
        code_off: 1397844
        signal_repetitions: 10
      Lichterkette:
        protocol: 1
        pulselength: 300
        code_on: 4195665
        code_off: 4195668
        signal_repetitions: 10
      Nachttischlampe Jill:
        protocol: 1
        pulselength: 300
        code_on: 4198737
        code_off: 4198740
        signal_repetitions: 10
      Standlampe:
        protocol: 1
        pulselength: 300
        code_on: 4199505
        code_off: 4199508
        signal_repetitions: 10

Having trouble to read results

Excuse me for not understand, but i have the rpi_rf installed on my HA, but i dont know how to use it.
What do i have to do to read what RF devices the integration has found on my system ??
I have a lot of RF devices in my home that i want to control from HA and i also have a Telldus Hygrometer that i want to use in my bathroom to control the fan.
Is there any easy way to read the remoter values from a Nexa remote or any other brand in HA ?
Does it exists a Card thats easy to download to HA that also can control the rpi_rf and making it easy to integrate products in to automations ?
In my rpi_rf folder it did come up a new folder named "pycache" with 2 files, "init.cpython-310.pyc" and "switch.cpython-310.pyc" but i dont know how to use them or read them.
I think that the solution with adding a RF transmitter and reciver to the GPIO pins on RPI is a great idea because i dont want to buy different hubs and having dozens of hubs thats just doing 1 thing.
I did buy earlyer a Sonoff RFBridgeR2 but havent got anything working on that and when i find rpi_rf i instantly wanted to try that instead.
Great job on this integration, and if this work with Telldus/Tellstick products you deserves the Nobel price because the shops sell Telldus products that needs to be connected to a hub thats not anywhere to find or buy!

Switch service call order not guaranteed?

While we don't know real status of RF devices in some automations I call "switch off" first and then "switch on" (because actually my RF lights controller works in "toggle" mode. But I found that light can be turned on and then turned off. It looks like RF call order is random.

Maybe it is an issue. Or maybe it is something specific, I don't know.

running rpi_rf from a remote raspberry pi

Hello,
Just wanted to find out if this is a possibility :

Home Assistant running on a PC or as a VM with HACS installed + the RPI_RF integration as per your instructions via HACS.

Raspberry PI running Raspberry Pi OS Lite with GPIO RF Modules & also the RPI_RF ( basically with the ability to sniff / send commands to 433mhz devices via command line ).

Is there any way to direct the rpi_rf setup in the configuration.yaml to send commands to the remote raspberry pi ?

Example idea :
#############################################

Example configuration.yaml entry

switch:

  • platform: rpi_rf
    gpio: 17
    switches:
    bedroom_light:
    code_on: 1234567
    code_off: 1234568
    binary_sensor:
  • platform: remote_rpi_gpio
    host: IP_ADDRESS_OF_REMOTE_PI
    ports:
    17: RF Tranmitter
    27: RF Receiver
    #############################################

Hope all this is making sense ?

The crux of the idea is to use Home Assistant either physical or virtualised and then be able to utilise a remote raspberry pi with GPIO RF modules to send commands to the RF devices / sockets etc thus making it a in-house solution instead of any third party RF Gateway / Vendors.

Many thanks.

'rpi_rf' has no attribute 'RFDevice'

I've just upgraded ha to the latest version and needed to use your integration but upon adding via hacs I get the following error.

I've tried all sorts to fix it. Any idea?

Logger: homeassistant.components.switch
Source: custom_components/rpi_rf/switch.py:69
Integration: Switch (documentation, issues)
First occurred: 13:56:13 (3 occurrences)
Last logged: 13:56:13

Error while setting up rpi_rf platform for switch
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
await asyncio.shield(task)
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/rpi_rf/switch.py", line 69, in setup_platform
rfdevice = rpi_rf.RFDevice(gpio)
AttributeError: module 'rpi_rf' has no attribute 'RFDevice'

No issue, question: Support of Klik aan Klik uit.

Hi,

What a wonderful integration for HA!!! Im using a RFlink to control 2 old klik aan klik uit modules. (Dim)
When I install this integration will it support KaKu also? Because then I only need to add the receive/transmitter module on the right gpis pins and I can remove the old RFlink board.

Cheers,
Peter

Error after HACS install ha-rpi_rf

I have core-2022.3.8 installed with supervisor-2022.03.5 and Home Assistant OS 7.6.
I installed via HACS, rebooted. I am getting the following errors:
Any ideas what might be causing this failure?
Thank you!

ERROR (SyncWorker_1) [homeassistant.util.package] Unable to install package RPi.GPIO==0.7.1: error: subprocess-exited-with-error
  
  ร— python setup.py bdist_wheel did not run successfully.
  โ”‚ exit code: 1
  โ•ฐโ”€> [6 lines of output]
      running bdist_wheel
      running build
      running build_py
      running build_ext
      building 'RPi._GPIO' extension
      error: command 'gcc' failed: No such file or directory
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for RPi.GPIO
  error: subprocess-exited-with-error
  
  ร— Running setup.py install for RPi.GPIO did not run successfully.
  โ”‚ exit code: 1
  โ•ฐโ”€> [8 lines of output]
      running install
      /usr/local/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      running build_ext
      building 'RPi._GPIO' extension
      error: command 'gcc' failed: No such file or directory
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  WARNING: No metadata found in /usr/local/lib/python3.9/site-packages
error: legacy-install-failure

ร— Encountered error while trying to install package.
โ•ฐโ”€> RPi.GPIO

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
WARNING: You are using pip version 22.0.3; however, version 22.0.4 is available.
You should consider upgrading via the '/usr/local/bin/python3 -m pip install --upgrade pip' command.

The integration doesn't seem to work

HW: Rpi3

Home Assistant 2023.10.5
Supervisor 2023.10.1
Operating System 11.1
Frontend 20231005.0 - latest

my configuration

switch:
  - platform: rpi_rf
    gpio: 17
    switches:
      bell:
        signal_repetitions: 1
        pulselength: 388
        code_on: 3010305
        code_off: 3010305
        unique_id: "custom_unique_id"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.