Giter Site home page Giter Site logo

pyatv-mqtt-bridge's Introduction

Hi, I'm Sebbo. ๐Ÿ‘‹

  • ๐Ÿ’ผ I'm currently working at @XCNT
  • ๐Ÿชด Working on a plant-manager.app in my spare time (still private)
  • ๐Ÿค– Likes to tinker with his home automation system

pyatv-mqtt-bridge's People

Contributors

dependabot[bot] avatar depfu[bot] avatar dersimn avatar github-actions[bot] avatar glecoz avatar sebbo2002 avatar semantic-release-bot avatar tonybrobston 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

Watchers

 avatar  avatar  avatar  avatar

pyatv-mqtt-bridge's Issues

Question: Is it version tvOS15 compatible?

Hi @sebbo2002,

I used your app since a few months ago, everything okay since that. But now I recognized my AppleTV automatically updated to tvOS15 and it seems it does not work anymore. Do you think this is possible?

As long as I understodd pyatv was updated for this. Is it possible that you can have a look, too? Maybe you have to reimplement pyatv? I use your docker version.

Thanks a lot in advance!
bytedealer

Docker Image Update

Would love to see the Docker image updated to the latest release of pyatv. Current Docker image is at 0.9.7 and latest I see is 0.14.4.

Get the Artwork

Hi,

in pyatv there is the possibility to get the Artwork. Is it possible to integrate this in the mqtt bridge?

Thanks a lot.

Cannot start container

Hi,

after using the bridge for a while after updating to 7.0.1 I cannot start the container with an error:

Error response from daemon: unable to find user node: no matching entries in passwd file

It appears the user "node" is missing in the container?

Version 6.0.3 starts just fine.

I am running docker on an Unraid server.

I tried with docker-compose as well, but gut the same error:

services:
  pyatv-mqtt-bridge:
    container_name: pyatv-mqtt-bridge
    image: sebbo2002/pyatv-mqtt-bridge
    restart: unless-stopped
    network_mode: "host"
    volumes:
      - /mnt/user/appdata/pyatv-mqtt-bridge/config.json:/app/config.json:ro
    command: pyatv-mqtt-bridge /app/config.json

Any idea how to fix this?

Regards
Bernd

Missing armv7 builds

I was wondering why my Apple TV wasn't turning off properly while leaving home, just because the MQTT /powerState subtopic wasn't published anymore to my broker, so I just updated my docker-compose file with the latest armv7 image available :

image: sebbo2002/pyatv-mqtt-bridge:80a6b204a0b95acd608b179abb2e2d8f9136fb0e

Now it's working fine again, but would you mind providing the armv7 images again (if built automatically) ? There are still tons of Raspberry Pi armv7 online out there (mine is Pi 4 B bought brand new 2 years ago), bcs we now get the following error :

docker pull sebbo2002/pyatv-mqtt-bridge

Using default tag: latest
latest: Pulling from sebbo2002/pyatv-mqtt-bridge
no matching manifest for linux/arm/v7 in the manifest list entries

Otherwise we need to git pull your repo regularly, and docker-compose --build each time from your Dockerfile. ๐Ÿ˜“

Thanks.

image

syntax error

Hello,

I have installed the pyatv and then your pyatv-mqtt-bridge in a LXC container in proxmox. I can connect to my Apple TV with pyatv.
Now I'm trying to get your bridge working, but first question is, where should I locate the config.json file?
When I start pyatv-mqtt-bridge with pyatv-mqtt-bridge --debug /home/eve/pyatv-mqtt-bridge.json
then I get this MSG:

SyntaxError: Unexpected token '.'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/@sebbo2002/pyatv-mqtt-bridge/node_modules/mqtt/build/lib/topic-alias-send.js:3:21)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)

I really don't know how to solve this issue.

MQTT Values on Volume Change

Love the MQTT data, but I have an issue when the volume changes from another device.

Example: Music starts playing and you get title, time, status etc... into MQTT and have the data to drive other automations.
However, if the volume is adjusted from another device, say an iPhone, the previous data is removed from MQTT and you do not have all the other information from the previous values there.

Feature Request: Maintain the previous values in MQTT when volume changes happen from another device.

Add a Dockerfile

Hello

i did not tested your library so far but could we extend it to do the paring over MQTT?
Also it would be nice to have a Dockerfile ๐Ÿ˜‰

pyatv-mqtt-bridge config.example.json

Hello,

i have install your tool. Now I configure the mqtt config file:

root@pyatv:~# nano config.example.json

{
  "broker": "mqtt://192.168.1.1",
  "devices": [

 ***and so on***

Now I would like to start the service

root@pyatv:~# pyatv-mqtt-bridge config.example.json
bash: pyatv-mqtt-bridge: command not found

What am I doing wrong? Thank you!

Outdated docker images (maybe caused by some failing GitHub actions)

First, great work! Literally ran the container once and forgot about it; few months later still working flawlessly on my Pi.

Outdated Docker Images

By accident i discovered that your published docker images are pretty much all outdated, except the version for amd64.

The :latest tag is missing the armv6, armv7 & arm64/aarch64 platform images and the last armXY image is older than a year.

I'm guessing the failed ci buils went under your radar: https://github.com/sebbo2002/pyatv-mqtt-bridge/actions/runs/3129789032

Not sure why they are failing exactly tho, as I'm able to build the images without any issues from develop branch.

Built with $ docker buildx build --platform linux/arm64,linux/amd64,linux/arm/v7 --tag dotwee/pyatv-mqtt-bridge:latest . and tested arm64 successfully.

Screenshot 2022-10-01 at 02 29 59

Question: How to get NodePyATVPowerState events?

Hi @sebbo2002!

What a great piece of software! I successfully set up pyatv-mqtt-bridge in a docker container. I subscribed to the topics and boom - it works. One thing I am missing the power state events. I found them in pyatv-node but it seems I am doing something wrong because I don't get them.

Could you please give me a hint?

Thanks a lot and in advance!
bytedealer

Launching Apps

Have you considered adding the possibility to launch apps? I think that would be a great feature and would allow integration into a lot of different automation platforms.

Docker Container - cyclic mqtt messages

Hello,

can you help? I don't get mqtt messages from the docker container, only after restart the conatiner.
Are there no cyclic MQTT messages?

Edit: Ahh, this is wrong, only the position is not updated. When I paused playback then the status is updated. Can you help?

Thanks in advance,
kai

Broker username/password required

I'm trying to get pyatv-mqtt-bridge working on my system, but I've hit a roadblock. My MQTT broker requires a username/password for clients to connect, and I can't find a way to include those in the config file.

/powerState MQTT messages stop being published after a few minutes

Context :
I send some appletv/$id/turnOff MQTT messages to pyatv-mqtt-bridge to standby my Apple Tv.
But if send these messages when the the apple Tv is already off, it turns it on instead.
This is why I subscribed to the appletv/$id/powerState messages published by your bridge to my broker, then I update a value in a DB each time the powerState value changes, so that I know when to turn off the TV or not.

Issue :
When starting the container, the /powerState messages are published by your bridge to my MQTT broker, but after about 2-3 minutes, if I switch the Apple TV bon on or off, then the powerState messages stop being published to the broker, for an unknown reason.

If I restart the pyatv-mqtt-bridge container, it works again for 2-3 minutes, then these messages stop being published again.
It seems to be like your bridge doesn't keep the connection alive with the broker (Mosquitto in my case), then stops publishing any MQTT message for such reasons.

[info][10.0.0.125] [node-pyatv][18] stdout: {"result": "success", "datetime": "2024-01-11T17:05:32.981710+00:00", "power_state": "on"}
[info][10.0.0.125] [node-pyatv][18] No hash value found in input ({"result":"success","datetime":"2024-01-11T17:05:32.981710+00:00","power_state":"on"})
[info][10.0.0.125] [node-pyatv][18] No mediaType value found in input ({"result":"success","datetime":"2024-01-11T17:05:32.981710+00:00","power_state":"on"})
[info][10.0.0.125] [node-pyatv][18] No deviceState value found in input ({"result":"success","datetime":"2024-01-11T17:05:32.981710+00:00","power_state":"on"})
[info][10.0.0.125] [node-pyatv][18] No title value found in input ({"result":"success","datetime":"2024-01-11T17:05:32.981710+00:00","power_state":"on"})
[info][10.0.0.125] [node-pyatv][18] No artist value found in input ({"result":"success","datetime":"2024-01-11T17:05:32.981710+00:00","power_state":"on"})
[info][10.0.0.125] [node-pyatv][18] No album value found in input ({"result":"success","datetime":"2024-01-11T17:05:32.981710+00:00","power_state":"on"})
[info][10.0.0.125] [node-pyatv][18] No genre value found in input ({"result":"success","datetime":"2024-01-11T17:05:32.981710+00:00","power_state":"on"})
[info][10.0.0.125] [node-pyatv][18] No totalTime value found in input ({"result":"success","datetime":"2024-01-11T17:05:32.981710+00:00","power_state":"on"})
[info][10.0.0.125] [node-pyatv][18] No position value found in input ({"result":"success","datetime":"2024-01-11T17:05:32.981710+00:00","power_state":"on"})
[info][10.0.0.125] [node-pyatv][18] No shuffle value found in input ({"result":"success","datetime":"2024-01-11T17:05:32.981710+00:00","power_state":"on"})
[info][10.0.0.125] [node-pyatv][18] No repeat value found in input ({"result":"success","datetime":"2024-01-11T17:05:32.981710+00:00","power_state":"on"})
[info][10.0.0.125] [node-pyatv][18] No app value found in input ({"result":"success","datetime":"2024-01-11T17:05:32.981710+00:00","power_state":"on"})
[info][10.0.0.125] [node-pyatv][18] No appId value found in input ({"result":"success","datetime":"2024-01-11T17:05:32.981710+00:00","power_state":"on"})
[info][10.0.0.125] [node-pyatv][18] No focusState value found in input ({"result":"success","datetime":"2024-01-11T17:05:32.981710+00:00","power_state":"on"})
[info][10.0.0.125] {"values":{"key":"dateTime","old":"2024-01-11T17:05:20.129Z","new":"2024-01-11T17:05:32.981Z","device":{"name":"Salon","host":"10.0.0.125","id":"64D2C4C9FF9A"}}}
[info][10.0.0.125] {"values":{"key":"powerState","old":"off","new":"on","device":{"name":"Salon","host":"10.0.0.125","id":"64D2C4C9FF9A"}}}








The last empty lines on the log above are when I did carriage returns in my terminal and was switching on / off with the Apple TV remote and nothing was logged anymore in terms of powerState messages...

So basically I have no way to standby my Apple TV through pyatv-mqtt-bridge

tvOS 15 config

Hi sebbo2002,

i'm not able to use your library for tvOS15. neither control nor getting updates from the device.
How does the config file looks like when using the airplay protocol?

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.