MadaMzandu / uisp-ros-plugin

This is a follow up replacement for the previous Uisp api for mikrotik routers.
32 stars 9 forks source link

not work #33

Closed flynettech closed 1 year ago

flynettech commented 1 year ago

hello, after many attempts, but the plugin no longer works. it happened after the last uisp update

MadaMzandu commented 1 year ago

Hi I have not done much work on the plugin this past year so its possible the new uisp update is new features. Try to run the rebuild utility in settings and see if it repopulates the users.

Regards,

flynettech commented 1 year ago

I have already tried many times, I also reset the uisp server. but nothing does not repopulate the data.

MadaMzandu commented 1 year ago

Is it possible to copy and paste one of the failed api request logs from uisp.

flynettech commented 1 year ago

where do i find them?

flynettech commented 1 year ago

I don't know where to find the log file for the api. what I see is that it doesn't load the data, and it doesn't repopulate it. but in the mikrotik logs you see the access

flynettech commented 1 year ago

it doesn't even insert, plus the billing packages in the mikrotik

MadaMzandu commented 1 year ago

In crm > settings > webhooks > request logs. There will probably be some requests related to the plugin - just copy and paste one these thanks

flynettech commented 1 year ago

Immagine 2023-01-12 151959

flynettech commented 1 year ago


Fatal error: Uncaught TypeError: Argument 1 passed to MikrotikQueueSync\Synchronizer::formatSpeedForMikrotik() must be of the type float, null given, called in /data/ucrm/data/plugins/mkt-queue-sync/classes/Synchronizer.php on line 227 and defined in /data/ucrm/data/plugins/mkt-queue-sync/classes/Synchronizer.php:336 Stack trace:

0 /data/ucrm/data/plugins/mkt-queue-sync/classes/Synchronizer.php(227): MikrotikQueueSync\Synchronizer->formatSpeedForMikrotik(NULL)

1 /data/ucrm/data/plugins/mkt-queue-sync/classes/Synchronizer.php(180): MikrotikQueueSync\Synchronizer->formatUcrmListMaxLimit(Array)

2 /data/ucrm/data/plugins/mkt-queue-sync/classes/Synchronizer.php(130): MikrotikQueueSync\Synchronizer->getUcrmServiceList(Array)

3 /data/ucrm/data/plugins/mkt-queue-sync/public.php(43): MikrotikQueueSync\Synchronizer->sync()

4 /data/ucrm/data/plugins/mkt-queue-sync/public.php(51): {closure}()

5 /usr/src/ucrm/web/_plugins/mkt-queue-sync/public.php(3): require_once('/data/ucrm/data...')

6 {main}

thrown in /data/ucrm/data/plugins/mkt-queue-sync/classes/Synchronizer.php on line 336

MadaMzandu commented 1 year ago

Ok this error is for a different plugin. You might need to look for output for the ros-plugin.

flynettech commented 1 year ago

{"status":"failed","error":true,"message":"invalid value for upload-max-limit, an integer required","duration":0,"data":[]}

flynettech commented 1 year ago

{ "uuid": "06694ffb-f4fd-42a4-92d2-83a59201dc5c", "changeType": "edit", "entity": "service", "entityId": 101, "eventName": "service.edit", "extraData": { "entity": { "id": 101, "prepaid": false, "clientId": 83, "status": 1, "name": "FLY-MAX", "fullAddress": "P.Te Feccia, Chiusdino, SI, Italia", "street1": null, "street2": "P.Te Feccia", "city": "Toscana", "countryId": 126, "stateId": null, "zipCode": "53012", "note": null, "addressGpsLat": 43.1775866, "addressGpsLon": 11.1049512, "servicePlanId": 4, "servicePlanPeriodId": 19, "price": 17.5, "hasIndividualPrice": true, "totalPrice": 21.35, "currencyCode": "EUR", "invoiceLabel": null, "contractId": null, "contractLengthType": 1, "minimumContractLengthMonths": null, "activeFrom": "2022-01-15T00:00:00+0100", "activeTo": null, "contractEndDate": null, "discountType": 0, "discountValue": null, "discountInvoiceLabel": "Sconto", "discountFrom": null, "discountTo": null, "tax1Id": null, "tax2Id": null, "tax3Id": null, "invoicingStart": "2022-02-19T00:00:00+0100", "invoicingPeriodType": 2, "invoicingPeriodStartDay": 19, "nextInvoicingDayAdjustment": 2, "invoicingProratedSeparately": true, "invoicingSeparately": false, "sendEmailsAutomatically": null, "useCreditAutomatically": true, "servicePlanName": "FLY-MAX", "servicePlanPrice": 17, "servicePlanPeriod": 1, "servicePlanType": "Internet", "downloadSpeed": null, "uploadSpeed": null, "hasOutage": false, "fccBlockId": null, "lastInvoicedDate": "2023-01-18T00:00:00+0100", "unmsClientSiteId": "2a048b47-6124-48cd-8865-309d08482da4", "attributes": [ { "id": "606baf28-a036-4db8-b478-4ca97243456b", "serviceId": 101, "customAttributeId": 1, "name": "PPPoE Password", "key": "pppoePassword", "value": "libi_daniele", "clientZoneVisible": false }, { "id": "54ce4664-4e0c-4ea2-8cda-00b6feb97210", "serviceId": 101, "customAttributeId": 2, "name": "PPPoE Username", "key": "pppoeUsername", "value": "libi_daniele", "clientZoneVisible": false }, { "id": "3071351a-7a55-47ac-9e12-671a9e5a96d3", "serviceId": 101, "customAttributeId": 14, "name": "Hotspot", "key": "hotspot", "value": "0", "clientZoneVisible": false }, { "id": "58415908-35df-46ee-a992-db64b6cffb39", "serviceId": 101, "customAttributeId": 18, "name": "Device Name", "key": "deviceName", "value": "ITALYRouterOSPCC", "clientZoneVisible": false } ], "addressData": null, "suspensionReasonId": null, "serviceChangeRequestId": null, "setupFeePrice": null, "earlyTerminationFeePrice": null, "downloadSpeedOverride": null, "uploadSpeedOverride": null, "trafficShapingOverrideEnd": null, "trafficShapingOverrideEnabled": false, "servicePlanGroupId": null }, "entityBeforeEdit": { "id": 101, "prepaid": false, "clientId": 83, "status": 1, "name": "FLY-MAX", "fullAddress": "P.Te Feccia, Chiusdino, SI, Italia", "street1": null, "street2": "P.Te Feccia", "city": "Toscana", "countryId": 126, "stateId": null, "zipCode": "53012", "note": null, "addressGpsLat": 43.1775866, "addressGpsLon": 11.1049512, "servicePlanId": 4, "servicePlanPeriodId": 19, "price": 17.5, "hasIndividualPrice": true, "totalPrice": 21.35, "currencyCode": "EUR", "invoiceLabel": null, "contractId": null, "contractLengthType": 1, "minimumContractLengthMonths": null, "activeFrom": "2022-01-15T00:00:00+0100", "activeTo": null, "contractEndDate": null, "discountType": 0, "discountValue": null, "discountInvoiceLabel": "Sconto", "discountFrom": null, "discountTo": null, "tax1Id": null, "tax2Id": null, "tax3Id": null, "invoicingStart": "2022-02-19T00:00:00+0100", "invoicingPeriodType": 2, "invoicingPeriodStartDay": 19, "nextInvoicingDayAdjustment": 2, "invoicingProratedSeparately": true, "invoicingSeparately": false, "sendEmailsAutomatically": null, "useCreditAutomatically": true, "servicePlanName": "FLY-MAX", "servicePlanPrice": 17, "servicePlanPeriod": 1, "servicePlanType": "Internet", "downloadSpeed": null, "uploadSpeed": null, "hasOutage": false, "fccBlockId": null, "lastInvoicedDate": "2023-01-18T00:00:00+0100", "unmsClientSiteId": "2a048b47-6124-48cd-8865-309d08482da4", "attributes": [ { "id": "606baf28-a036-4db8-b478-4ca97243456b", "serviceId": 101, "customAttributeId": 1, "name": "PPPoE Password", "key": "pppoePassword", "value": "libi_daniele", "clientZoneVisible": false }, { "id": "54ce4664-4e0c-4ea2-8cda-00b6feb97210", "serviceId": 101, "customAttributeId": 2, "name": "PPPoE Username", "key": "pppoeUsername", "value": "libi_daniele", "clientZoneVisible": false }, { "id": "3071351a-7a55-47ac-9e12-671a9e5a96d3", "serviceId": 101, "customAttributeId": 14, "name": "Hotspot", "key": "hotspot", "value": "0", "clientZoneVisible": false }, { "id": "58415908-35df-46ee-a992-db64b6cffb39", "serviceId": 101, "customAttributeId": 18, "name": "Device Name", "key": "deviceName", "value": "ITALYRouterOSPCC", "clientZoneVisible": false } ], "addressData": null, "suspensionReasonId": null, "serviceChangeRequestId": null, "setupFeePrice": null, "earlyTerminationFeePrice": null, "downloadSpeedOverride": null, "uploadSpeedOverride": null, "trafficShapingOverrideEnd": null, "trafficShapingOverrideEnabled": false, "servicePlanGroupId": null } } }

MadaMzandu commented 1 year ago

Thanks for the log. The plugin response is "invalid value for upload-max-limit, an integer required".

Please verify that the service plan limits do not have fractions e.g. 1.2Mbps.

flynettech commented 1 year ago

in the speed of the services I have not set any value

flynettech commented 1 year ago

Immagine 2023-01-12 154341 Immagine 2023-01-12 154359

MadaMzandu commented 1 year ago

Ok I think that's the problem the service plan has no limit - try to put a limit and see if it works.

flynettech commented 1 year ago

i just tried, but nothing does not repopulate the data. it doesn't even enter service plans in mikrotik

MadaMzandu commented 1 year ago

Ok Please check the logs again to see if there is a new error

flynettech commented 1 year ago

{"status":"failed","error":true,"message":"invalid value for argument remote-address","duration":0,"data":[]}

MadaMzandu commented 1 year ago

Ok the error means its not able to assign an ip address. Are you able to paste the request object like before so we can see what was sent

flynettech commented 1 year ago

{ "uuid": "6b5b1f8e-f2ad-4bd5-8481-706e8540bdff", "changeType": "edit", "entity": "service", "entityId": 101, "eventName": "service.edit", "extraData": { "entity": { "id": 101, "prepaid": false, "clientId": 83, "status": 1, "name": "FLY-MAX", "fullAddress": "P.Te Feccia, Chiusdino, SI, Italia", "street1": null, "street2": "P.Te Feccia", "city": "Toscana", "countryId": 126, "stateId": null, "zipCode": "53012", "note": null, "addressGpsLat": 43.1775866, "addressGpsLon": 11.1049512, "servicePlanId": 4, "servicePlanPeriodId": 19, "price": 17.5, "hasIndividualPrice": true, "totalPrice": 21.35, "currencyCode": "EUR", "invoiceLabel": null, "contractId": null, "contractLengthType": 1, "minimumContractLengthMonths": null, "activeFrom": "2022-01-15T00:00:00+0100", "activeTo": null, "contractEndDate": null, "discountType": 0, "discountValue": null, "discountInvoiceLabel": "Sconto", "discountFrom": null, "discountTo": null, "tax1Id": null, "tax2Id": null, "tax3Id": null, "invoicingStart": "2022-02-19T00:00:00+0100", "invoicingPeriodType": 2, "invoicingPeriodStartDay": 19, "nextInvoicingDayAdjustment": 2, "invoicingProratedSeparately": true, "invoicingSeparately": false, "sendEmailsAutomatically": null, "useCreditAutomatically": true, "servicePlanName": "FLY-MAX", "servicePlanPrice": 17, "servicePlanPeriod": 1, "servicePlanType": "Internet", "downloadSpeed": 100, "uploadSpeed": 20, "hasOutage": false, "fccBlockId": null, "lastInvoicedDate": "2023-01-18T00:00:00+0100", "unmsClientSiteId": "2a048b47-6124-48cd-8865-309d08482da4", "attributes": [ { "id": "606baf28-a036-4db8-b478-4ca97243456b", "serviceId": 101, "customAttributeId": 1, "name": "PPPoE Password", "key": "pppoePassword", "value": "libi_daniele", "clientZoneVisible": false }, { "id": "54ce4664-4e0c-4ea2-8cda-00b6feb97210", "serviceId": 101, "customAttributeId": 2, "name": "PPPoE Username", "key": "pppoeUsername", "value": "libi_daniele", "clientZoneVisible": false }, { "id": "3071351a-7a55-47ac-9e12-671a9e5a96d3", "serviceId": 101, "customAttributeId": 14, "name": "Hotspot", "key": "hotspot", "value": "0", "clientZoneVisible": false }, { "id": "58415908-35df-46ee-a992-db64b6cffb39", "serviceId": 101, "customAttributeId": 18, "name": "Device Name", "key": "deviceName", "value": "ITALYRouterOSPCC", "clientZoneVisible": false } ], "addressData": null, "suspensionReasonId": null, "serviceChangeRequestId": null, "setupFeePrice": null, "earlyTerminationFeePrice": null, "downloadSpeedOverride": null, "uploadSpeedOverride": null, "trafficShapingOverrideEnd": null, "trafficShapingOverrideEnabled": false, "servicePlanGroupId": null }, "entityBeforeEdit": { "id": 101, "prepaid": false, "clientId": 83, "status": 1, "name": "FLY-MAX", "fullAddress": "P.Te Feccia, Chiusdino, SI, Italia", "street1": null, "street2": "P.Te Feccia", "city": "Toscana", "countryId": 126, "stateId": null, "zipCode": "53012", "note": null, "addressGpsLat": 43.1775866, "addressGpsLon": 11.1049512, "servicePlanId": 4, "servicePlanPeriodId": 19, "price": 17.5, "hasIndividualPrice": true, "totalPrice": 21.35, "currencyCode": "EUR", "invoiceLabel": null, "contractId": null, "contractLengthType": 1, "minimumContractLengthMonths": null, "activeFrom": "2022-01-15T00:00:00+0100", "activeTo": null, "contractEndDate": null, "discountType": 0, "discountValue": null, "discountInvoiceLabel": "Sconto", "discountFrom": null, "discountTo": null, "tax1Id": null, "tax2Id": null, "tax3Id": null, "invoicingStart": "2022-02-19T00:00:00+0100", "invoicingPeriodType": 2, "invoicingPeriodStartDay": 19, "nextInvoicingDayAdjustment": 2, "invoicingProratedSeparately": true, "invoicingSeparately": false, "sendEmailsAutomatically": null, "useCreditAutomatically": true, "servicePlanName": "FLY-MAX", "servicePlanPrice": 17, "servicePlanPeriod": 1, "servicePlanType": "Internet", "downloadSpeed": 100, "uploadSpeed": 20, "hasOutage": false, "fccBlockId": null, "lastInvoicedDate": "2023-01-18T00:00:00+0100", "unmsClientSiteId": "2a048b47-6124-48cd-8865-309d08482da4", "attributes": [ { "id": "606baf28-a036-4db8-b478-4ca97243456b", "serviceId": 101, "customAttributeId": 1, "name": "PPPoE Password", "key": "pppoePassword", "value": "libi_daniele", "clientZoneVisible": false }, { "id": "54ce4664-4e0c-4ea2-8cda-00b6feb97210", "serviceId": 101, "customAttributeId": 2, "name": "PPPoE Username", "key": "pppoeUsername", "value": "libi_daniele", "clientZoneVisible": false }, { "id": "3071351a-7a55-47ac-9e12-671a9e5a96d3", "serviceId": 101, "customAttributeId": 14, "name": "Hotspot", "key": "hotspot", "value": "0", "clientZoneVisible": false }, { "id": "58415908-35df-46ee-a992-db64b6cffb39", "serviceId": 101, "customAttributeId": 18, "name": "Device Name", "key": "deviceName", "value": "ITALYRouterOSPCC", "clientZoneVisible": false } ], "addressData": null, "suspensionReasonId": null, "serviceChangeRequestId": null, "setupFeePrice": null, "earlyTerminationFeePrice": null, "downloadSpeedOverride": null, "uploadSpeedOverride": null, "trafficShapingOverrideEnd": null, "trafficShapingOverrideEnabled": false, "servicePlanGroupId": null } } }

flynettech commented 1 year ago

if you give me an email, I create an account and enter the server

MadaMzandu commented 1 year ago

Ok this account has a public email address please use that

flynettech commented 1 year ago

ok i have invite to crm on email

MadaMzandu commented 1 year ago

ok

MadaMzandu commented 1 year ago

Which account number can I use for testing

MadaMzandu commented 1 year ago

Client ID

flynettech commented 1 year ago

at your choice or 1126

flynettech commented 1 year ago

you are great, it worked

MadaMzandu commented 1 year ago

Ok two problems, the service plans need to have a limit otherwise the mikrotik rejects the request and you need to specify the device name. This is because the plugin supports setup with multiple routers. I have created a drop down for the device name, i think the instructions are in the readme if you need to add more devices.

flynettech commented 1 year ago

ok i tried on another user, with id 83 but nothing happens in mikrotik

MadaMzandu commented 1 year ago

Ok I think there is a bug with the profile creation. Can you check if the relevant profile has been created in ppp > profile on the mikrotik

flynettech commented 1 year ago

I had created it by hand in ppp-profile, here it exists. try to delete it?

MadaMzandu commented 1 year ago

try to delete it and lets see if the plugin will create it

flynettech commented 1 year ago

ok deleted

flynettech commented 1 year ago

it does not create it

MadaMzandu commented 1 year ago

ok noted let me check the code and see. Will get back to you.

flynettech commented 1 year ago

Thanks so much

kikipatton commented 1 year ago

Following this trail by far the best support

On Thu, 12 Jan 2023 at 18:46, flynettech @.***> wrote:

Thanks so much

— Reply to this email directly, view it on GitHub https://github.com/MadaMzandu/uisp-ros-plugin/issues/33#issuecomment-1380589467, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIGHHQ4CE4KXBIGIN7QYPO3WSARMBANCNFSM6AAAAAATZILCZA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

flynettech commented 1 year ago

yes I hope it is solved with the plugin

MadaMzandu commented 1 year ago

Hi Are you able to share access again so we can test. Thanks

flynettech commented 1 year ago

yes ga I sent you the email, sorry, I made a mistake with a customer, and uploaded a backup. You have already received another email

MadaMzandu commented 1 year ago

ok great

MadaMzandu commented 1 year ago

Can I use the same client id for testing?

flynettech commented 1 year ago

yes

flynettech commented 1 year ago

or you choose

MadaMzandu commented 1 year ago

ok thanks

MadaMzandu commented 1 year ago

{"status":"ok","error":false,"message":"account for xxxx was successfully added","duration":0,"data":[]}

Please check the mikrotik for account should be with disabled profile as the account is suspended.

flynettech commented 1 year ago

yes add and disable it

MadaMzandu commented 1 year ago

{"status":"failed","error":true,"message":"failure: secret with the same name already exists","duration":0,"data":[]}

Will add a test router so that I can see the mikrotik end.