-
Dear, first of all thanks for this great work. I want to publish mqtt messages to a mosquitto browser
{ my goal is to receive in mosquitto live messages on swipe and send command for open relays
thanks for the support Livio |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments 5 replies
-
Very happy to hear somebody is using the MQTT stuff :-) :-) ... it always seemed like a such a flexible and robust way to integrate systems. Ok, it looks like you have full encryption enabled - that is only necessary if you're using a public MQTT broker (e.g. the HiveMQ dev instance) and are (rightly) concerned about other users being able to look at your messages. If you're running your own broker on your own network you don't need any of that and it makes things unnecessarily complicated so start by disabling all the authentication and encryption in uhppoted.conf:
With those settings you should be able see plaintext messages on the mosquito client:
I'm using HiveMQ but it should be the same for mosquito - if you're seeing the encrypted messages then you're probably mostly configured correctly already. Once you've got that all working we can step through tightening up the security bit-by-bit if you need to. Notes:
|
Beta Was this translation helpful? Give feedback.
-
dear thanks for your quick reply this is my .conf file I followed this guide to install the latest release 0.8.0 but I only receive this message {"message":{"system":{"alive":{"message":"1 error","subsystem":"health-check"}}},"hmac":"15fe3b46284d111df88bd5c28af7657171e994a9944618510cb5d42383ef620b"} and sometimes this message { no swipe record received... where do it take the listner address? if you need I can activate a temporary ssh access from external to allow you to connect to my system, I'll send you address,port and credential in a private mail. with the command sudo uhppote-cli --debug get-devicesthe output is 192.168.0.101 is the ip of uhppote board thanks for your support Livio |
Beta Was this translation helpful? Give feedback.
-
Ok, that's looking almost good - your controller is configured to send events to the AccessControl application so all you need to do is change the controller listener address using uhppote-cli set-listener command. For example, if the IP address of the Ubuntu system is 192.168.0.100, then:
Notes:
|
Beta Was this translation helpful? Give feedback.
-
Awesome .. that's really great:-) :-) .. re. reboot Ubuntu. That shouldn't have been necessary - best guess is that something else was already running in the background and the reboot killed it, but TBH it could have been anything. re. events message. I've created an issue to add human readable descriptions to the event message. It's a little complicated because the text has to be reasonably easy to internationalise so it's going to take a bit of experimenting and thought. For the moment though, the easiest place to get the lookup codes is either the NodeRED project: or the NodeJS project: re. MQTT commands. Hmmm, thought I had documented them but clearly it slipped through the cracks :-(. Ok, will add that to the ever-growing TODO list but for now the Makefile has an example of every supported command message. re. multiple event listeners. I knew that question was coming :-> !! At the moment it's not really possible because the UDP event messages need to be redistributed to multiple listeners and that needs some low level network stuff which is not cross-platform compatible. It's also a little tricky because the UHPPOTE AccessControl Windows application doesn't really 'play nice' with other software. BUT .. the next release of the uhppoted-tunnel is planned to include an event connector which should (hopefully) implement event redistribution to multiple listeners. In the interim, you may be able to repurpose one of the other UDP tunnel type projects out there. re. uhppoted-mqtt on Windows. Running it on Windows is the basically same as running it on Linux - except that if it's running as a service then you have to use the Windows Service Manager instead of systemctl. It shouldn't conflict with the UHPPOTE AccessControl application, except that only one of them will receive the event messages. If you can let me know once you've got your OpenHAB implementation working I'll add a link to it on the main README. Am sure other people will find it useful! |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
That's good news! It's possible the AccessControl application only initialises the controller listener once (on the initial configuration).
uhppoted-mqtt is (or at least should be) using the event index as stored on the controller, which starts at 1 so it's possible that the AccessControl application is using an internal index that starts at zero. But just to verify, can you please run the following commands:
and see which event matches the uhppoted-mqtt and AccessControl logs respectively.
tl;dr: Basically yes :-). Somewhat longer explanation: MQTTv3 which is the protocol used by uhppoted-mqtt does not support a request-response pattern (MQTTv5 does but was not implemented by paho at the time) so a request ID allows a client to correlate a response message with a request and the reply-to topic allows the client to match received messages to handlers in much the same way a REST server matches URLs to handlers. Both are optional and for client convenience only (i.e. neither are used internally in the uhppoted-mqtt server):
|
Beta Was this translation helpful? Give feedback.
-
Dear after updating to v.0.8.8 i receive a lot of mqtt messages from all the input, also from not linked imput of the board |
Beta Was this translation helpful? Give feedback.
-
Hi, There were only two changes from v0.8.7 to v0.8.8:
Neither of those should cause a problem - what version were you running previously? And can you post a sample of the messages? |
Beta Was this translation helpful? Give feedback.
-
Ah, ok, that explains it - the events handling was reworked in v0.8.7. There's an explanation in the README with more detail and some history in these two issues if you're interested: But - to summarise - as of v0.8.7 uhppoted-mqtt has two events feeds:
The historical events feed (which is what you're seeing) will slowly retrieve all the events from a controller in small batches and your controller has 5500+ events which it is trying ever so desperately to catch up with, so it's going to take a while. If you just leave it running it will eventually have retrieved all the events and the feed will go back to normal. If you only want to see current events, then you need to subscribe to the ./events/live topic (or alternatively reconfigure the topics in your uhppoted.conf file). However, you may also want to check your controller - that forced open alarm event is possibly something worth following up and if 5500+ events is more than you expect then you may have a door contact that is 'chattering'. re. firmware. Unfortunately the manufacturer has stated categorically that the controller firmware cannot be upgraded. According to their Amazon page:
|
Beta Was this translation helpful? Give feedback.
That's good news! It's possible the AccessControl application only initialises the controller listener once (on the initial configuration).
uhppoted-mqtt is (or at least should be) using the event index as stored on the controller, which starts at 1 so it's possible that the AccessControl application is using an internal index that starts at zero. But just to verify, can you plea…