GithubHelp home page GithubHelp logo

ragingcomputer / amridm2mqtt Goto Github PK

View Code? Open in Web Editor NEW
71.0 71.0 41.0 14 KB

runs rtlamr to read IDM power meter data and send to MQTT broker

License: MIT License

Python 93.34% Dockerfile 6.66%

amridm2mqtt's People

Contributors

brent20 avatar ragingcomputer avatar skullydazed 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

amridm2mqtt's Issues

DockerHub?

Would it be possible for you to add the docker for this to DockerHub?

It looks like someone else tried at one point to add it to DockerHub (user by the name of bashninja) but his DockerHub for this doesn't work at all.

Dual use one USB radio dongle.

Thanks a bunch for this code. It's capital nifty.
This may not be an issue. But thought I would ask.
I have one USB radio dongle in my pi3.
I have 2 git projects/codes working well. 1 is rtlamr/rtl_tcp (for my energy meter) and the other is rtl_433 (for a Lacross temp sensor). Both work good. But only separately. Both are sending out results to an mqtt broker.

I would like to maybe run both at the same time (if possible). Or just have one program run 25 minutes, quit, start the other program for 5 minutes, quit. And start the first one again for 25 min. And repeat. All day long.

I have been trying to sloppily stop and start code and reset USB dongle but doing it cleanly (so either starts again we'll) isn't working out yet. Thanks for any pointers.

Docker instance never connects to MQTT server

I have my docker run as follows:

docker run -it --name amridm2mqtt \
--privileged \
-v /dev/bus/usb:/dev/bus/usb \
-e WATCHED_METERS=60162325 \
-e READINGS_PER_HOUR=60 \
-e MQTT_HOST=10.0.0.25 \
amridm2mqtt

When running that command, the following data is shown:

14:44:17.667417 decode.go:45: CenterFreq: 912600155
14:44:17.668354 decode.go:46: SampleRate: 2359296
14:44:17.668505 decode.go:47: DataRate: 32768
14:44:17.668680 decode.go:48: ChipLength: 72
14:44:17.669938 decode.go:49: PreambleSymbols: 32
14:44:17.670049 decode.go:50: PreambleLength: 4608
14:44:17.670100 decode.go:51: PacketSymbols: 736
14:44:17.670146 decode.go:52: PacketLength: 105984
14:44:17.670206 decode.go:59: Protocols: idm
14:44:17.670252 decode.go:60: Preambles: 01010101010101010001011010100011
14:44:17.671150 main.go:119: GainCount: 29

And nothing past there. When I check my MQTT logs, this client doesn't even connect. This is running on a Raspberry Pi 3.

When I follow the run instructions from https://github.com/bemasher/rtlamr, I can see readings coming in.

Wrong docker name

The docker file you included has the name misspelled.

Your repository calls it amridm2mqtt, but the docker name is amirdm2mqtt (the i and r is flipped)

Need support for MQTT Authentication

I'm using a basic username and password for my MQTT Broker (while it may not be as important), would it be possible to add MQTT Credentials for authentication?

Thanks!

Docker - Error connecting to spectrum server

Hi,

I'm not completely clear on what's going on, but reading this in sounds like the wrong package might be getting installed when running docker build ?

This is the error when running the container :

10:51:53.631047 main.go:90: Error connecting to spectrum server: dial tcp 127.0.0.1:1234: connect: connection refused

It then hangs forever. I would +1 #8, it'd be great not to have to mess around with building the container.

Thanks

Defining Radio

Where can I define the radio for this script? I tried searching and could not figure out how. I ended reassigning my rtl_433 radio in the meantime just curious for future use.

How do I know what meters I can watch?

I'd like to use amridm2mqtt to collect info from my electric, gas, and water meters. I don't know if/how they're broadcasting, though, so I don't know what meters to put in for WATCHED_METERS. Is there a way I can watch all meters that it picks up and then narrow down the ones that are mine?

Sending scm data to MQTT instead of idm

Hi, not sure if it should be in issue or Pull request, but I just wanted to let you know that if you want to add this to your repo, feel free... I modified your file to send the scm data to MQTT instead of IDM. I did this because while my power meter was sending idm data, my gas meter was not and I could not receive that data. This could help others who have gas, water or power that doesn't send idm data.

After modifying the "amridm2mqtt" file I named it "amridm2mqtt_scm" and changed the amridm2mqtt.systemd.service to point to the new file. I also increased the time between starting rtl_tcp and rtlamr to 20s, as I think rtl_tcp was a bit slow to start on boot on my raspberry pi and had problem running rtlamr from the script.

Thanks for your great work! without that code, I would have been lost, as I am new to all this...
amridm2mqtt_scm.txt

Docker-compose help please

I'm having trouble getting things to work, any help you could provide would be much appreciated.

Here's my file structure:

- homeassistant
- mosquitto
- amridm2mqtt
    - amridm2mqtt
    - Dockerfile
    - messagetypes.py
    - settings_docker.py
- compose.yml

My compose.yml contains the following related to amridm2mqtt:


  amridm2mqtt:
    container_name: meters
    build: amridm2mqtt
    restart: unless-stopped
    privileged: true
    volumes:
      - /dev/bus/usb:/dev/bus/usb
    environment:
      - WATCHED_METERS=762546086
      - READINGS_PER_HOUR=4
      - MQTT_HOST=mqtt
      - MQTT_PORT=1883
    depends_on:
      - mosquitto

But I keep getting this error:
ERROR: for amridm2mqtt Cannot start service amridm2mqtt: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/amridm2mqtt/amridm2mqtt": stat /amridm2mqtt/amridm2mqtt: no such file or directory: unknown

Where am I going wrong?

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.