Upload the attached files
Where on Vera FS should I put Plugin/_SensorMqtt1. files? I don’t see any info on that. Thanks!
Upd: Found Develop Apps/Luup files → Upload
[/s]
Client can not connect to mosquitto (mosquitto version 1.4.11 (build date 2017-04-21 14:26:22+0300)). Is it a supported version?
Plugin from master (GitHub - jonferreira/vera-mqtt)
Aug 11 17:52:22 ubox mosquitto[39363]: 1502463142: New connection from 10.3.1.9 on port 1883.
Aug 11 17:52:22 ubox mosquitto[39363]: New connection from 10.3.1.9 on port 1883.
Aug 11 17:52:22 ubox mosquitto[39363]: 1502463142: Sending CONNACK to 10.3.1.9 (0, 5)
Aug 11 17:52:22 ubox mosquitto[39363]: Sending CONNACK to 10.3.1.9 (0, 5)
Aug 11 17:52:22 ubox mosquitto[39363]: 1502463142: Socket error on client <unknown>, disconnecting.
Aug 11 17:52:22 ubox mosquitto[39363]: Socket error on client <unknown>, disconnecting.
so I am trying to get this to give me a report of the KWH used on my open energy monitor using MQTT values it provides
This work in OpenHab like this
Number emonpi_ct1 “Power 1 [%d W]” { mqtt=“<[mosquitto:emon/emonpi/power1:state:default]” }
Number emonpi_ct2 “Power 2 [%d W]” { mqtt=“<[mosquitto:emon/emonpi/power2:state:default]” }
Number emonpi_vrms “Voltage [%.1f VRMS]” { mqtt=“<[mosquitto:emon/emonpi/vrms:state:default]” }
I can see all the values using a spy with the below TOPIC
Topic : emon/#
and I see number values in
emon/emontxshield/power1
how do I rewrite the Topic/Target to show these values on the CHIILD node I have created already?
Topic : emon/emontxshield/power1
Target: urn:upnp-org:serviceId:PowerMeter,CurrentPower=payload.power and (tonumber(payload.power) or “0”)
Bruce, what node are you using for writing to the influxDB? the standard node-red-contrib-influxdb node does not like the format of your parser function. i’ve been trying to get all sensor data into the influxDB, but whenever i select any measurement it tells me the series is empty. i was looking over the format of the message sent to the influxDB node and all looks good.
Has anyone managed to use this with AWS or Azure IOT Hub? I’m currently using mysensors.org sensors/gateway (non-mqtt), and I’m looking at rebuilding all of this to send my data up to AWS (ideally) or Azure.
I need to not only publish data from the Vera to IOT Hub, but I also need to be able to subscribe to IOT hub and create devices on the Vera which get that data.
AWS yes. Azure I gave up on because I believe to make what I was doing work, I had to pay for their message hub or some middleware or something like that. I do prefer AWS.
For AWS I believe I did set up a bridge. On Linux that I already had running on a small board computer. RPi would work fine but I typically use Odroid XU4.
I tweaked the mqtt client code a little bit to suit my fancy. Nothing major.
I have several virtual devices that receive mqtt messages with effect. A switch, temperature, humidity, string container. It’s fun to mess with.
I have this setup for a lot of sensors and it all working great except one.
Device type: urn:schemas-micasaverde-com:device:DoorSensor:1
category_num: 4
subcategory_num: 1
It never gets Tripped, but on the dash board it shows like its tripped. Can’t understand why I don’t get anything from this device (and yes its activated under Alias)
I have tried and tried to install MQTT using this instructions GitHub - vosmont/vera-mqtt
I added Dependencies and Plugin and verified that it’s in place.
I added a device following the instructions.
I restarted Vera Edge.
But every time it’s ends upp with this:
2/08/18 21:57:26.321 Device_LuaUPnP::LoadDeviceDoc ixmlParseBufferEx /etc/cmh-ludl//D_SensorMqtt1.xml size 41234 ret 106 <0x77daf000>
01 02/08/18 21:57:26.322 JobHandler_LuaUPnP::CreateDevice_LuaUPnP failed to load 187/D_SensorMqtt1.xml so device 187 is offline <0x77daf000>
I see the purpose of this plugin is to send events from Vera to MQTT. Is there a reverse plugin? I have another system that is sending to MQTT and I want Vera to grab those events and apply them to a Virtual Switch inside Vera that can then be used for created rules against.
The goal, is for switching or maintaining multiple systems. I’m coming from or trying to come from SmartThings. I can send SmartThings events to MQTT. Now I need to receive them with Vera and act upon them. I have this setup currently from SmartThings to Home Assistant and I would like to have Vera be the center of my Automations collecting from other sources if possible.
Otherwise, it may seem as though Home Assistant would be the choice to be the “Center” of everything and have other systems sending data to it. But then that leaves me with the question of what do I need Vera for then?
The plugin can receive events also. The payload can then be passed to a child device of the plugin. I have tested this using a binary switch, humidity sensor, temperature sensor, and a multi-string container. I did have to manually create the child devices and change the id_parent attribute to point to the plugin. The plugin then creates a few variables in the child device that you can configure with a topic, and what you want to do with the payload. In my case, for the thermometer, the topic is set to Vera/Topics/Thermometer and the target is configured with urn:upnp-org:serviceId:TemperatureSensor1,CurrentTemperature=payload.temperature and (tonumber(payload.temperature) or “0”)
The plugin works good.
But I would like send a MQTT message by an another system like raspeberry/linux. For the test I use mosquitto_pub with the vera IP address and 3480 port number. The function return an error with this message ‘The connection was lost’.
Have you an idea ? It’s possible to send an external MQTT message to the Vera ?
Sorry for the delayed reply. I don’t visit the forum as much as I used to.
Yes you can. But the Vera MQTT Plugin is a client, not a broker, so you can’t point your mosquitto client (mosquitto_pub is a client) to it. A client must connect to a broker.
You can start and run your own broker on the Pi via the mosquitto package, or you can use the awesome and free Cloud MQTT broker service which is the same that I use (no affiliation whatsoever). Or any broker you are already using will work fine too.
There’s some fiddling to get everything set up between the Cloud MQTT endpoint, the Vera plugin, and your pub client on the Pi. So, to send the external MQTT message to the Vera, the mosquitto pub client on your Pi connects to the Cloud MQTT (or your own broker) and publishes a message to a topic that the Vera MQTT Plugin is listening on. Of course the Vera plugin has to connect to the same Cloud MQTT broker (or your own) and be listening on that topic.
Btw I also like to use the mqtt-spy software (Java package, runs on my Win7Pro and elsewhere I assume) to be able to monitor things when setting it all up. It’s a client too meaning you can use it to connect to your broker and monitor the same topics and also publish messages to topics if you want.
I do not know the plugin but your log shows a LUA code error. File L_SensorMqtt1.lua line 377 should show a pairs command. Its variable does not have a value for some reason.