FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
357 views 4 comments
by anonymous
Hi,

Can it be possible to enter the  SMS_Phone number from the Alarm Configuration by a register from the slave? I mean, i need to enter the Alarm phone number from my HMI panel( by register), and not just as it is now, that i need to enter webui and then enter the number.

This way i could sent the equipment to client and he just enters its phone number in HMI. Right now, i need to do it myself remotly, which can be a mess, just for that, or give pass/user to enter webui to client, which i want to avoid.

Thanks.

1 Answer

0 votes
by anonymous

Hi,

As the Modbus requests generate a unique ID each time - before adding alarm through CLI or anywhere remotely, you would still need to configure Modbus Master request manually through WebUI. Once you're done configuring Modbus Master and a request - in configs a new ID is generated and is used to identify your request:

You can check whats your ID with uci command uci show | grep modbus

Then you can use this request ID to add Alarm in /etc/config/modbus_master_alarms

config alarm_677ce044451af790b9f5c3ef889fe8b5

        option device_config '677ce044451af790b9f5c3ef889fe8b5'

        option enabled '1'

        option f_code '3'

        option register '2'

        option condition 'equal'

        option value '1'

        option action 'sms'

        option msg 'asdasd'

        list telnum '+37060000000'

Or use uci  commands to set:
modbus_master_alarms.@alarm_677ce044451af790b9f5c3ef889fe8b5[0]=alarm_677ce044451af790b9f5c3ef889fe8b5
modbus_master_alarms.@alarm_677ce044451af790b9f5c3ef889fe8b5[0].device_config='677ce044451af790b9f5c3ef889fe8b5'
modbus_master_alarms.@alarm_677ce044451af790b9f5c3ef889fe8b5[0].enabled='1'
modbus_master_alarms.@alarm_677ce044451af790b9f5c3ef889fe8b5[0].f_code='3'
modbus_master_alarms.@alarm_677ce044451af790b9f5c3ef889fe8b5[0].register='2'
modbus_master_alarms.@alarm_677ce044451af790b9f5c3ef889fe8b5[0].condition='equal'
modbus_master_alarms.@alarm_677ce044451af790b9f5c3ef889fe8b5[0].value='1'
modbus_master_alarms.@alarm_677ce044451af790b9f5c3ef889fe8b5[0].action='sms'
modbus_master_alarms.@alarm_677ce044451af790b9f5c3ef889fe8b5[0].msg='asdasd'
modbus_master_alarms.@alarm_677ce044451af790b9f5c3ef889fe8b5[0].telnum='+37060000000'
In any case you would still need to create a request manually so ID could be generated.
I believe you could make a script that would do everything for your client automatically but we can't help you with development of it, so, unfortunately, you're on your own.
EB.
by anonymous

Hello ErnestasB,

Thanks for yor answer.

If i understood, the script you said is in order that my client can create a new Modbus Alarm instance?

I just need that its phone number  could be entered in my HMI panel (the telnum='+37060000000')  and be  sent to router, like write something in router by a register with modbus, because the alarm instance is created when im configuring the router to be sent.

by anonymous
Unfortunately, that would require firmware changes, there's no way to automatically send a phone number to Modbus alarm configuration without doing pre-configurations with requests.

EB.
by anonymous
Using a uci command and the alarm ID, i´ve been able to enter the phone number by SMS. But this way, it leaves the router open, by using others uci commands by SMS.

Please, can you(Teltonika) update, in future firmware, a way to enter a phone number for Modbus alarms, by Modbus register? Not just for our application, but for anyone who uses Modbus and its alarm, it could be very helpfull.

Thanks.
by anonymous
It will not leave your router open - as it still required authentication before executing anything that router receives.

EB.