This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

MQTT subscribe
#3
(03.12.2018, 08:43)admin Wrote: Upgrade firmware to 2018 RC1. It has built-in MQTT library support and some other features required for this script.

Create resident script with 0 sleep interval. Change broker IP address and mapping tables as needed.
mqtt_to_object maps topic to a group address, object_to_mqtt maps group address to atopic.

Do full script restart via disable/enable when changing any mapping tables and/or broker address.

I'm trying to do this but it doesn't works. I supose that when I send a value to the broker, automatically the script must receive the value? 

I've just upgrade the firmware. Here's the actual version:

[Image: firmware.png]

Here's my code where I put the mosquitto test broker and the topic "arqueta/humedad" I'm testing. the object 32/1/1 is a "05. 1 byte unsigned integer".

As I say, it doesn't works and I don't know what I'm doing wroing.

The correct line to broker is without "http://"

broker = 'test.mosquitto.org'

Now it works the suscribe.
Reply


Messages In This Thread
MQTT subscribe - by pentadom - 30.11.2018, 17:39
RE: MQTT subscribe - by admin - 03.12.2018, 08:43
RE: MQTT subscribe - by pentadom - 03.12.2018, 10:18
RE: MQTT subscribe - by Dario - 04.02.2020, 12:10
RE: MQTT subscribe - by admin - 04.02.2020, 12:40
RE: MQTT subscribe - by Dario - 04.02.2020, 16:39
RE: MQTT subscribe - by Tifon - 08.03.2020, 09:33
RE: MQTT subscribe - by admin - 09.03.2020, 08:46
RE: MQTT subscribe - by admin - 19.02.2021, 12:10
RE: MQTT subscribe - by admin - 22.02.2021, 07:24
RE: MQTT subscribe - by admin - 22.02.2021, 08:10
RE: MQTT subscribe - by myg - 25.02.2021, 09:35
RE: MQTT subscribe - by admin - 26.02.2021, 11:59
RE: MQTT subscribe - by admin - 19.03.2021, 09:33
RE: MQTT subscribe - by a455115 - 12.12.2022, 14:05
RE: MQTT subscribe - by admin - 12.12.2022, 16:00
RE: MQTT subscribe - by a455115 - 13.12.2022, 07:23
RE: MQTT subscribe - by admin - 13.12.2022, 08:48
RE: MQTT subscribe - by a455115 - 14.12.2022, 07:09
RE: MQTT subscribe - by admin - 14.12.2022, 08:10
RE: MQTT subscribe - by a455115 - 14.12.2022, 10:05
RE: MQTT subscribe - by admin - 14.12.2022, 12:49
RE: MQTT subscribe - by a455115 - 14.12.2022, 15:04
RE: MQTT subscribe - by admin - 15.12.2022, 08:40
RE: MQTT subscribe - by tomnord - 18.01.2024, 13:16
RE: MQTT subscribe - by admin - 18.01.2024, 13:38
RE: MQTT subscribe - by tomnord - 18.01.2024, 13:51
RE: MQTT subscribe - by tomnord - 23.01.2024, 08:08
RE: MQTT subscribe - by Daniel - 23.01.2024, 08:09
RE: MQTT subscribe - by tomnord - 23.01.2024, 11:01
RE: MQTT subscribe - by Daniel - 23.01.2024, 11:16
RE: MQTT subscribe - by tomnord - 23.01.2024, 12:08
RE: MQTT subscribe - by Daniel - 23.01.2024, 12:41
RE: MQTT subscribe - by FatMax - 31.01.2024, 08:49
RE: MQTT subscribe - by Daniel - 31.01.2024, 09:28
RE: MQTT subscribe - by FatMax - 31.01.2024, 12:49
RE: MQTT subscribe - by admin - 31.01.2024, 12:52
RE: MQTT subscribe - by FatMax - 31.01.2024, 12:59
RE: MQTT subscribe - by admin - 31.01.2024, 13:01
RE: MQTT subscribe - by FatMax - 31.01.2024, 13:18
RE: MQTT subscribe - by admin - 31.01.2024, 13:23
RE: MQTT subscribe - by FatMax - 31.01.2024, 13:31
RE: MQTT subscribe - by admin - 31.01.2024, 13:53

Forum Jump: