Forum Replies Created
-
AuthorPosts
-
Jorge
ParticipantHi, I have a similar question. I am receiving data via MQTT and getting an 8-bit binary that I want to convert to an ASCII character. I am doing the conversion in the JS file, but when I try to put the character in a view table, I get an error.
Communication line error:
js file:
Jorge
Participantthe channel properties were incorrect, now everything works.
thank you Mikhail for your help.
Jorge
ParticipantI notice that when I send the command with the button, there is no command code, but when it is sent from the administrator, the command code needs to be the same as the command code from the device properties. If not, I get an error when I send the command from the administrator.
Jorge
ParticipantI don´t know if this is helpful.
the commands sent from the button are the ones without the “Code” value
Jorge
Participanthere there are
the correct command when it is sent from the administrator:
the same command when it is sent from the button:
Also, the log line shows the error when the command is sent from the button and OK when it is sent from the administrator.
Jorge
ParticipantOn the same line of questions, I want to send the JSON payload through a button, but I can’t get the format. In the channel device configuration, I select String as the Command format, but the output of pressing the button is in hex, and with this method, I get an error: invalid command.
the payload is this:
{“devEui”:”a8404152d185b432″,”confirmed”:true,”fPort”:5,”data”:”AwAA”}the output of pressing the button is this:
output line log:
Jorge
ParticipantHi, I managed to send commands, I created a communication line for each topic, and then in the communication line for sending commands, I made an MQTT client device, added a subscription to the topic I wanted to send commands then added 2 commands to switch a relay, while adding the commands, in the command code a had to put the actual command I want to send and if not, does not work, and finally to send the command, right click on the devices, select “Send Command…” put the command I want to send in the command code and the string data.
now I am working to do this with a button from a scheme.
Jorge
Participantno problem.
this is the line option:
this is the Device 1 properties (works fine, I receive data):
this is the Device 2 properties (not working, can’t send commands)
this is how I send the command:
Jorge
ParticipantI created another device for sending commands because I am working with 2 different devices(one to subscribe (works) and the other one to send commands (doesn’t work)). Also, this is deployed on a Linux machine, while the administrator runs on Windows.
For the new device, I added a subscription with the topic where I want to send commands then I right-clicked the devices, selected “send command…” and typed the command in the command code, the command I need to send is JSON formatted
{"devEui":"a8404152d185b432","confirmed":true,"fPort":5,"data":"AwAA"}
In the Line Log when I send a command, it says:
2024-11-26 10:47:17 Command '{"devEui":"a8404152d185b432","confirmed":true,"fPort":5,"data":"AwAA"}' to the device [3] MQTT LT-22222-L Error: invalid command
if i enter the linux machine via ssh and send this command via mosquittoMQTT it works:
mosquitto_pub -h localhost -p 1883 -t 'application/861cbd58-9d39-4046-a074-b6d47e40dec7/device/a8404152d185b432/command/down' -m '{"devEui":"a8404152d185b432","confirmed":true,"fPort":5,"data":"AwAA"}'
thanks for your time
-
This reply was modified 9 months, 1 week ago by
Jorge.
Jorge
ParticipantI was looking at the possibility of using an MQTT broker, ChirpStack comes with one [MQTT]
Jorge
ParticipantThanks to all of you for answering, this was sort of an ask first read later situation. Chirpstask is an open source LoRaWAN server software that lets you implement HTTP, MQTT, AWS SNS, Azure Service-Bus, GCP Pub/Sub, IFTTT, InfluxDB, myDevices, Pilot Things, Semtech LoRa Cloud™, ThingsBoard to the server rather easily.
For the moment, I will try to implement influxDB.
If you have any suggestions, you are welcome to share them.I am also going to keep updating this thread if I have good results.
-
This reply was modified 9 months, 1 week ago by
-
AuthorPosts