exking / udi-mqtt-poly Goto Github PK
View Code? Open in Web Editor NEWMQTT Broker NodeServer
License: MIT License
MQTT Broker NodeServer
License: MIT License
When the new values were added to the Flag type, the editor definition didn't get updated. It still specifies that it should only look at 5 values from the nls file instead of the new 12 supported values.
@therealmysteryman , could you push that change and submit a PR?
Or I could make the change, but I have no real test environment at this time. It's a pretty simple change.
I am not a programmer, but I have tinkered with coding before. I have been trying to get the MQTT Poly to support Shelly devices, and I have been able to look into the differences and similarities against Sonoff / Tasmota devices.
I have a Shelly1 working as far as controlling the ON and OFF functions, but I am trying to add the Temperature sensor information and that has proven more difficult.
Here is a reference of all the commands the device receives and provides, any help would be appreciated:
https://shelly-api-docs.shelly.cloud/#shelly1-1pm-mqtt
Eventually, I would like to get your Poly to support at least these devices:
https://shelly-api-docs.shelly.cloud/#shelly-h-amp-t-mqtt
https://shelly-api-docs.shelly.cloud/#shelly-motion-mqtt
Attached are the files I have modified so far.
MQTT.zip
When I try to install this node server from the UI (after successfully running ./install.sh) it complains it can't find profile.zip. There is profile directory but the node install wants it zipped up.
I have created a fork to support sensor using MQTT, that only return a numerical value. I come accross this issue often with device that have support to HA. Instead of returning a structured JSON they only send one message per value. Here an example ( https://github.com/hpeyerl/airthingswave-mqtt )
Not sure if that something you would like to add in the official nodeserver ? Here the class I created. I would prefer running the official release instead of my fork :)
`class MQraw(polyinterface.Node):
def init(self, controller, primary, address, name, device):
super().init(controller, primary, address, name)
self.cmd_topic = device['cmd_topic']
self.on = False
def start(self):
pass
def updateInfo(self, payload):
try :
self.setDriver('ST', int(payload))
except Exception as ex :
LOGGER.error('Failed to parse MQTT Payload: {} {}'.format(ex, payload))
def query(self, command=None):
self.controller.mqtt_pub(self.cmd_topic, '')
self.reportDrivers()
drivers = [{'driver': 'ST', 'value': 0, 'uom': 56}
]
id = 'MQSR'
hint = [4, 2, 0, 0]
commands = {
'QUERY': query
}`
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.