Giter VIP home page Giter VIP logo

Comments (31)

pergolafabio avatar pergolafabio commented on June 11, 2024

its strange, happened today again, this morning when disarming and arming,state is changed after 3-4 minutes

if i do it from the riscoapp or riscocloud website , the state is instant, like the polling interval

whats also strange :
if i arm/disarm from the risco panel, and then for example login in the risco app, then the state is also instant changed in your project

is it maybe because the riscocloud is not changed instantly when we arm/disarm from panel? so riscocloud is maybe also polling from the panel?? and if we login to the website, it does the polling instantly, but then again, your project is already logged in, and doing something so it should reflect changes

or is is maybe user based? to much sessions in login? maybe create another user account and setup that one in your project

from risco-mqtt-bridge.

lucacalcaterra avatar lucacalcaterra commented on June 11, 2024

Must try on my panel ... And then send you a feedback. Unfortunately there is no much control over the Risco Cloud Api, we can only poll... and ... Hope :-(

from risco-mqtt-bridge.

pergolafabio avatar pergolafabio commented on June 11, 2024

so you login with somekind of javascript and then check the status ?
i am indeed interested, if you arm/disarm with panel, and then in your code do a manual poll, see if its changed or not ...
i think its changing every x minutes, thats the delay we have, or it changes instanly when we login to the website or use the APP

so maybe reinitiate from your code a login every 1 min or something? or maybe somekind of another polling method, one that does more, somekind of refresh and poll method

from risco-mqtt-bridge.

lucacalcaterra avatar lucacalcaterra commented on June 11, 2024

The js code poll every x seconds (not remember if 8 or 10) and periodically check if user is logged out... in this case relogin )

from risco-mqtt-bridge.

pergolafabio avatar pergolafabio commented on June 11, 2024

yes, i see that in logging too, that sometimes the status is presented to MQTT , thats probably when a relogin happens
but isnt it possible to do somekind of REFRESH and POLL ? instead of poll only, maybe it does
not sure what you poll, but sometimes we also need to press the F5 button , when we want to see a change on a website :)

from risco-mqtt-bridge.

lucacalcaterra avatar lucacalcaterra commented on June 11, 2024

the polling requests can be optimized, obviously. But for now seems to working. i must verify your issue

from risco-mqtt-bridge.

pergolafabio avatar pergolafabio commented on June 11, 2024

ok, i have now setup a second user, so using that user now in your project, lets see whats happens later today when i come home
but what i noticed now, when i armed/disarmed from the APP, the state changed in home assistant, but when i armed/disarmed from your app, it doesnt do the arming/disarming , probably because 2 users are login at the same time? 2 different users

i think this now also happens in your code , see error i have on my app:

https://www.dropbox.com/s/9dbhx46fmrjec5u/Screenshot_20190205-151338.jpg?dl=0

but if i wait long enough , like 5 minutes, its working again

2019-02-05 14:16:25 stdout 05-02-2019 14:16:25 �[34mdebug�[39m: ...Control Panel State taken and overview not empty... OK
2019-02-05 14:16:25 stdout 05-02-2019 14:16:25 �[34mdebug�[39m: polling ...
2019-02-05 14:16:17 stdout 05-02-2019 14:16:17 �[34mdebug�[39m: arm command result ok
2019-02-05 14:16:17 stdout 05-02-2019 14:16:17 �[34mdebug�[39m: user code is expired? : false
2019-02-05 14:16:17 stdout 05-02-2019 14:16:17 �[32minfo�[39m: arm/disarm command arrived
2019-02-05 14:16:17 stdout 05-02-2019 14:16:17 �[32minfo�[39m: message from mqtt arrived:riscopanel/armstatus/SET/armed

from risco-mqtt-bridge.

pergolafabio avatar pergolafabio commented on June 11, 2024

ok, just got home, disarmed from the panel, state changed after 4 minutes
but maybe this screenshot explains the issue?
https://www.dropbox.com/s/9dbhx46fmrjec5u/Screenshot_20190205-151338.jpg?dl=0
i think the panel is also somekind of user, so if we arm/disarm from panel
then that "panel" user is logged in, therefore your code is not able to retrieve the status until somekind of timeout occurs?
can you see that maybe is somekind of debugging?

from risco-mqtt-bridge.

pergolafabio avatar pergolafabio commented on June 11, 2024

sorry, wrong screenshot
here is good one :

https://www.dropbox.com/s/9dbhx46fmrjec5u/Screenshot_20190205-151338.jpg?dl=0

from risco-mqtt-bridge.

pergolafabio avatar pergolafabio commented on June 11, 2024

btw, have you received some kind of API documentation from Risco? or yoo created this on your own? or dyou simulate an login with forms? (javascript)

from risco-mqtt-bridge.

lucacalcaterra avatar lucacalcaterra commented on June 11, 2024

btw, have you received some kind of API documentation from Risco? or yoo created this on your own? or dyou simulate an login with forms? (javascript)

No, Risco doesn't release nothing about it..... i created on my own.

Anyway, i've the same issue on my panel. Acting on panel cause delay on mqtt publishing. I must investigate on it, but i've not so much time

from risco-mqtt-bridge.

pergolafabio avatar pergolafabio commented on June 11, 2024

ah ok, well, good to hear that you were able to reproduce
thnx in advance

from risco-mqtt-bridge.

lucacalcaterra avatar lucacalcaterra commented on June 11, 2024

@pergolafabio
I found it... unfortunately don't think can fix it.

The issue is the same if you use the risco web app on riscocloud site.
Tried to arm/disarm from the panel and the Web app has the same delay of my app.

In android app this not happen probably because use specific notification system and sync.

So... the Risco API in my opinion are really bad :-( They should implement a sort of webhook for sync clients. Hope they use new technologies for manage the cloud.

Think we can close the isse... right ?

from risco-mqtt-bridge.

pergolafabio avatar pergolafabio commented on June 11, 2024

ow , thats sux
gonna try it also
so you arm/disarm from panel, and that status is only updated after a few minutes on risco web ?
and what if you like some kind of refresh? because now i have a delay like 3-4 minutes, maybe if you initiate a refresh like every 30 secs or something, its faster updated?

from risco-mqtt-bridge.

lucacalcaterra avatar lucacalcaterra commented on June 11, 2024

from risco-mqtt-bridge.

pergolafabio avatar pergolafabio commented on June 11, 2024

@lucacalcaterra ok tried it myself, refreshing doesnt help
BUT
i armed / disarmed on panel, and indeed if you then browse to www.riscocloud.com , security page, you see indeed the slider moving to armed/disarmed/partially after a 3 minutes or something
this is indeed the timeout we see in your APP
BUT :)
on the left side on riscocloud.com, there is also an event history, so if you arm/disarm, the event is created INSTANT , no timeout there? so maybe an approach to set the state in your APP, based on the last event? instead of the security page?

from risco-mqtt-bridge.

lucacalcaterra avatar lucacalcaterra commented on June 11, 2024

from risco-mqtt-bridge.

pergolafabio avatar pergolafabio commented on June 11, 2024

do they have an rest API? do you have documentation?

from risco-mqtt-bridge.

lucacalcaterra avatar lucacalcaterra commented on June 11, 2024

from risco-mqtt-bridge.

pergolafabio avatar pergolafabio commented on June 11, 2024

Ah ok, btw, is the event log already included in your nodejs/log, then I can maybe capture that with mqtt to change state

from risco-mqtt-bridge.

pergolafabio avatar pergolafabio commented on June 11, 2024

Or are you going to change your code so that the state is based on the last event history? ;)

from risco-mqtt-bridge.

lucacalcaterra avatar lucacalcaterra commented on June 11, 2024

from risco-mqtt-bridge.

pergolafabio avatar pergolafabio commented on June 11, 2024

ok, i am watching the mqtt messages
am i correct saying that you dont update the riscopanel/eventhistory/lastevent on every arm/disarm event? but just once a while? so you are not polling this always
because when arm mqtt message like arm/disarms comes in, the eventhistory is not always up to date

if yes

can i change the code or can you tell me what i need to change, so this one : topic 'riscopanel/eventhistory/lastevent' , is always up to date? can it be polled everytime and sending as an mqtt message? if thats is possible, then then there is no extreme delay on the state anymore

from risco-mqtt-bridge.

pergolafabio avatar pergolafabio commented on June 11, 2024

PS: riscocloud.com has been updated, app is still working :)
maybe now the state on riscocloud is faster updated :)

from risco-mqtt-bridge.

lucacalcaterra avatar lucacalcaterra commented on June 11, 2024

from risco-mqtt-bridge.

pergolafabio avatar pergolafabio commented on June 11, 2024

its still the same page, but they did an update on in, www.riscocloud.com was globally offline for about 2 hours, this was 1 hour ago
they did some improvements and new features, allthough i dont see any difference
but maybe state of the slider is more instant now
i didnt check it yet, not at home at this moment to arm/disarm from the panel

from risco-mqtt-bridge.

pergolafabio avatar pergolafabio commented on June 11, 2024

hmm, tested it, but still same delay with the new riscocloud.com
only last event is actually updated, but not the state slider

from risco-mqtt-bridge.

pergolafabio avatar pergolafabio commented on June 11, 2024

Btw , you are focussing on the cloud, but is there no way to capture stuff from the local network? Since it's connected with an cable?

from risco-mqtt-bridge.

lucacalcaterra avatar lucacalcaterra commented on June 11, 2024

from risco-mqtt-bridge.

pergolafabio avatar pergolafabio commented on June 11, 2024

ok, can you have a look at this comment? :)

#13 (comment)

from risco-mqtt-bridge.

pergolafabio avatar pergolafabio commented on June 11, 2024

@lucacalcaterra , ok, you are not gonna fix this, since there is indeed a delay on the riscocloud site itself
BUT

riscopanel/eventhistory/lastevent => this is one is reliable, i can can create a sensor in HA, based on that MQTT message, that last event on risco site is changed immediately, when you arm / disarm from a risco hardware panel

but if i subscribe to that mqtt, seems its not in the polling interval, the mqtt message isnt updated immediately , am i right? if yes , can you change that behaviour, to also download the last event in the polling interval?

from risco-mqtt-bridge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.