[SOLVED] LED ON/OFF Zolertia re-mote

Hi! I have a network of zolertia re-motes and a border router built from a re-mote and an ENC28J60.
I got the connection working with Ubidots and I can see the sensor values etc. I now want to send values to the re-mote using a ON/OFF switch on the dashboard to toggle a LED. I cant get this to work.

I have an Ubidots.h where I specify my token and subscriptions/topics. I don’t know how to subscribe to a specific variable on this platform since all other guides are based on the Arduino platform.

Regards

Greetings, unfortunately there is not an example from the main developer of Contiki to connect Zolertia with Ubidots using MQTT, my advise is to look theofficial base MQTT example and to adapt it to connect to Ubidots according to ourbroker specification. Probably you will need to modify these lines:

#define DEFAULT_CONF_AUTH_TOKEN       ""
#define DEFAULT_CONF_AUTH_USER        ""
#define MQTT_DEMO_CONF_BROKER_IP_ADDR "2607:f0d0:3:b::2"

If you need additional hints, probably you should open an issue in the official zolertia repo.

All the best

Hi! Solved it. For others with the same problem. I went to mqtt-node/device/udibots_demo.h
where I changed line #93;

#define DEFAULT_COMMAND_EVENT_RELAY “/relay_toggle/lv”

to match my udibots-variable which I called “reference”;

#define DEFAULT_COMMAND_EVENT_RELAY “/reference/lv”

Simple as that!
regards

1 Like

Greetings, thanks for sharing your solution.

All the best

I have done this even though it is not working

Hello @maniramesh,

Please refer to the links provided in the following post, and make sure that the assigned parameters are right ones:

Cheers,
Maria H.

I have changed the BROKER IP ADDRESS ::ffff:3217:7C44 instead 2607:f0d0:3:b::2
IF I CHANGE THIS IP ADDRESS then mqtt_Client is not getting connect to Router

I was trying to do send and retrieve the data using remote-revb +Orion Router with Ubidots cloud
i’m able to send the sensor data to the ubidots cloud and i was able to get it successfully
but when i’m trying to control my actuator using ubidots SWITCH and SLIDER widget i was not getting the output .
Actually i was little confused with subscription i don’t know weather I’ve followed correct way or not.
i have created the “led_toggle” variable in my auto created device
if i click on the SWITCH widget the it is not receiving.
i found that the ubidots_publish_handler it not called not executed i thought that if the data received then only it will be called.

please help me to solve this .
Thank you

hello @mariahernandez @jotathebest @anjo0155
can you please help me for the above issue

Dear @maniramesh,

I highly recommend reading the MQTT documentation to have a clear understanding of the data handling under this protocol. Then, perform the tests with an MQTT client simulator.

Once the integration works using the MQTT client simulator as it should, proceed with the integrations using the same configurations made in the tests. Regarding the other configurations, I recommend you to follow carefully the parameters provided by anjo0155, since everything worked correctly on his side.

If the problem still occurs after having a satisfactory result with the client simulator, I recommend you redirect your question to the zolertia community.

Cheers,
Maria H.

yes I have tried with MQTTLens it is working
but with my program only it was Not working

NOW I WAS UNABLE TO PUBLISH THE DATA ALSO TO THE CLOUD SUDDENLY THE MQTT CLIENT IS NOT GETTING CONNECT TO ROUTER
I’M USING THE BROKER IP ADDRESS
::ffff:3217:7c44
IS THE IP ADDRESS IS GOT CHANGED OR WHAT?
WHY I WAS UNABLE TO PUBLISH THE DATA
please help me to solve this issue
@mariahernandez @jotathebest @anjo0155

Dear @maniramesh,

Great to know that everything worked out well with MQTTLens, this is a breakthrough.

Regarding the problem presented, at this moment I don’t have a device to verify from my side if it is working correctly or not. However, @anjo0155 managed to make it work satisfactorily with the characteristics provided above. For this reason, I recommend you to redirect your question to the Zolertia forum.

Happy day,
Maria H.

tq @mariahernandez

and some time the client is not connecting to Ubidots and it is taking more time .

i’m usng the broker IP address
::ffff:3217:7c44

is this the problem ?

@mariahernandez @jotathebestv @anjo0155
I need the information in IP ADDERSS which one we have to provide in Client

the only address working is this one
::ffff:3217:7c44

this is not working
( ```
2607:f0d0:3:b::2


but if use the first one i was unable to subscribe the data

@jotathebest pls ans

Hi there, the first IP is not officially supported by us, please refer to this link to get the actual fixed Ubidots IPs. Keep in mind that if your account is an educational one, you should use this ip 2607:f0d0:2101:39::2

I have just run a test at my side using mosquitto and our offered IPV6 and I am able to connect without issues:

unfortunately, as you are using a third party library that was not developed by us, the issue is out of our scope. Maybe you should ask for assistance directly to the main Zolertia developer at their github issues collector.

All the best

  1. if that is not official IP address means how the data is uploading only ?

2)Why if i give ur Official IP address means it is not at all connecting to the server ?

Hi there, probably in the past that IP was supported and is not yet deprecated, but I highly advise you to use the official ones. Our supported IPs subscribes to our broker, I already shared a screenshot with you in the previous post as evidence. In your case, the issue is related with the third party library that you are using and that is why I advised you to ask directly to the main Zolertia developer for additional hints to solve the problem as third party libraries are something out of our management.

All the best

Thank you @jotathebest