Comments (4)
where is the file in homeassistant config? i.e. the pwd
from ha-shinobi.
@chemelli74 according to the original error, the request was not autorized, it has nothing to do with the workaround,
the issue is in line 464 where the code is trying to load the details of the monitor and it holds nothing (because it failed),
will release full fix for that issue, both to protect the api call and the handling of the empty data
from ha-shinobi.
Investigated a bit more.
I changed the code as follow around line 461:
from:
if monitor is None:
_LOGGER.debug("Invalid monitor details found")
to:
if monitor is None or not monitor.get("ke"):
_LOGGER.debug("Invalid monitor details found")
and added a log line around line 315:
if self.status == ConnectivityStatus.Connected:
_LOGGER.warning("Simone - load_monitors in update()")
await self._load_monitors()
This is the resulting log:
2024-04-15 19:04:37.885 INFO (MainThread) [custom_components.shinobi.managers.rest_api] Status changed from 'Connected with temporary API key' to 'Connected to the API'
2024-04-15 19:04:37.886 WARNING (MainThread) [custom_components.shinobi.managers.rest_api] Simone - load_monitors in update()
2024-04-15 19:04:37.895 WARNING (MainThread) [custom_components.shinobi.managers.rest_api] Invalid monitor details found
2024-04-15 19:04:37.906 INFO (MainThread) [custom_components.shinobi.managers.websockets] Status changed from 'None' to 'Connected to the API'
2024-04-15 19:04:37.906 INFO (MainThread) [custom_components.shinobi.managers.websockets] Starting to listen connected
2024-04-15 19:04:38.962 WARNING (MainThread) [custom_components.shinobi.managers.rest_api] Simone - load_monitors in update()
2024-04-15 19:04:38.973 WARNING (MainThread) [custom_components.shinobi.managers.rest_api] Simone - load_monitors in update()
You can see that the call fails only the 1st time.
And on top of that, noticed that "update()" is called even 3 times in 1 second.
from ha-shinobi.
from ha-shinobi.
Related Issues (20)
- Invalid Server Details (debug enabled) HOT 16
- Motion detection not working when using Tensorflow and event filter HOT 14
- HomeAssistant log is showing errors HOT 3
- Unable to play live stream HOT 8
- Media browser using camera identifier. Possible to use camera name instead? HOT 4
- Timezone ignoreg HOT 7
- Motion detection stopped working since 3.x HOT 3
- Latest home assistant update (2023.08.1) seems broken shinobi integration HOT 8
- Integrations should cancel non-critical tasks when receiving the stop event HOT 11
- Invalid server details HOT 4
- Integration doesn't create camera entity
- Non-thread-safe operation invoked on an event loop other than the current one HOT 1
- Media brower "Unknown Error" HOT 2
- Startup throws this - Failed to load monitor data: {'ok': False, 'msg': 'Not Authorized'}, Error: the JSON object must be str, bytes or bytearray, not NoneType, Line: 464 HOT 3
- Motion binary_sensor not working if Shinobi primary engine is not Pixel Array HOT 8
- Unexpected exception importing component on HA ver. 2024.1.0b0 HOT 8
- Proposal: Collaborate to port integration to core HOT 2
- Failed to load monitor data HOT 13
- Configure API manually HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ha-shinobi.