using this in a scripting datasource I can restart the publisher
function enablePublisher(xid, enabled) { var publisher = com.serotonin.m2m2.db.dao.PublisherDao.instance.getPublisher(xid); publisher.enabled = enabled; com.serotonin.m2m2.Common.runtimeManager.savePublisher(publisher); } if (startPublisherRestartScript.value === 1){ startPublisherRestartScript.set(0); enablePublisher("Pub_E2AX_TRK-3.1", true); }my problem is that I don't know how to understand that the publisher is sending data to nowhere, the alarm on Connection and Socket are not working as expected so, for example I could check this port number:
d66fb17b-6d2c-4225-bbc2-cc2eb07b356f-immagine.png
it changes when the modem change IP, how I can have the port number in the same scripting datasource?
I would like to avoid to restart the publisher every minute.
Thanks
Antonio