wicol / emqtt Goto Github PK
View Code? Open in Web Editor NEWEmail to MQTT bridge
License: MIT License
Email to MQTT bridge
License: MIT License
mqtt platform in hass was updated recently:
The default availability payloads for the MQTT switch platform have changed from “ON” and “OFF” to “online” and “offline” (in order to match the majority of MQTT platforms that already supported availability reporting). (@DanNixon - #11336) (breaking change)
I'm not sure if this mean the PAYLOAD should be "online" and "offline" instead of "ON" and "OFF"
Initially I had MQTT_PORT
set to its default value 1883 but emqtt then throws the below error from paho when it tries to publish:
TypeError: '<=' not supported between instances of 'str' and 'int'
I don't have the full stack easily on hand now as I already worked around the issue by not defining the port. I assume what happens is that the environment variable is being read as a string and not a number.
Unfortunately I have no python experience so I cannot easily create a PR on this.
Hi,
your bridge is quite helpful. I'd like to package (and mirror) it; to do so in a legal way I need a license information:
Can you please select a license for your project and add the license file e.g. as LICENSE and with a short copyright + LICENSE note into the actual source code?
Thanks in advance
I had to add the "py3-pip" to the apk add to get the image to build. I guess pip3 isn't part of python3 package; I'm not sure if it was different before or if it's due to using a Raspberry Pi.
Once it builds, then it doesn't run, but I'll file that as a separate issue.
Image on docker hub is for linux/amd64; so I locally built this for my Pi4 and it fails to run. I suspect it's due to updated Alpine.
Creating emqtt ... done
Attaching to emqtt
emqtt | 2021-04-10 04:17:31,523 - emqtt - INFO - Setting up a filehandler
emqtt | 2021-04-10 04:17:31,524 - emqtt - INFO - Configured to save attachments
emqtt | Exception in thread Thread-1:
emqtt | Traceback (most recent call last):
emqtt | File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
emqtt | self.run()
emqtt | File "/usr/lib/python3.8/threading.py", line 870, in run
emqtt | self._target(*self._args, **self._kwargs)
emqtt | File "/usr/lib/python3.8/site-packages/aiosmtpd/controller.py", line 169, in _run
emqtt | asyncio.set_event_loop(self.loop)
emqtt | File "/usr/lib/python3.8/asyncio/events.py", line 753, in set_event_loop
emqtt | get_event_loop_policy().set_event_loop(loop)
emqtt | File "/usr/lib/python3.8/asyncio/unix_events.py", line 1365, in set_event_loop
emqtt | super().set_event_loop(loop)
emqtt | File "/usr/lib/python3.8/asyncio/events.py", line 647, in set_event_loop
emqtt | assert loop is None or isinstance(loop, AbstractEventLoop)
emqtt | AssertionError
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.