Coder Social home page Coder Social logo

iobroker.sureflap's People

Contributors

apollon77 avatar dependabot[bot] avatar flip0r avatar mcm1957 avatar scrounger avatar sickboy78 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

iobroker.sureflap's Issues

Battery voltage / percentage

I am not sure if this is an issue or a feature request.
I use rechargeable batteries (4 ) In my sureflap. The red light starts very early to signal a low battery status. When I ignore it the sureflap continues working properly for a couple of weeks.
I guess the reason why the red light starts flashing very early is that the voltage threshold is based on the voltage of zinc alkaline battery. As the voltage of rechargeable NiMh batteries are lower - even if they are fully charged - I think that the red light starts flashing earlier if NiMh batteries are used.
Right now the voltage is 5,0522 V and the battery percentage datapoint shows "0". However the sureflap is still working.
Is it possible to calculate the battery percentage value depending on the type of batteries that is used?

Adapter Crash js-controller 5.x

Adpater crash with js-controller since 5.0 (currently 5.0.8):

`sureflap.1 2023-07-20 21:49:21.601 error undefined is not a valid state value
sureflap.1 2023-07-20 21:49:21.600 error Error: undefined is not a valid state value at Object.maybeCallbackWithError (/opt/iobroker/node_modules/@iobroker/js-controller-common/build/lib/common/maybeCallback.js:35:17) at Sureflap._setState (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:5388:49) at Sureflap.setState (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:5349:21) at Sureflap.setSerialNumberToAdapter (/opt/iobroker/node_modules/iobroker.sureflap/main.js:1288:9) at /opt/iobroker/node_modules/iobroker.sureflap/main.js:576:13 at new Promise () at Sureflap.getDeviceStatusFromData (/opt/iobroker/node_modules/iobroker.sureflap/main.js:554:39) at /opt/iobroker/node_modules/iobroker.sureflap/main.js:300:21
sureflap.1 2023-07-20 21:49:21.597 error unhandled promise rejection: undefined is not a valid state value
sureflap.1 2023-07-20 21:49:21.596 error Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().`

Compatibility check and testing for Node.js 14 and 16

Dear Adapter develop,

Node.js 14 is now available for a year and Node.js 16 was release just some days ago and will become LTS by October 2021. We plan to update the ioBroker Node.js recommendation (currently 12.x) to 14.x later this year.

Please check your adapter with Node.js 14 especially, and ideally also directly with Node.js 16

Please add both versions to the adapter testing which is executed on commits.

If your adapter requires a certain minimum version of Node.js please set the 'engine' setting in package.json accordingly! Please also do this if the adapter is not able to work in certain Node.js versions, so that ioBroker can prevent users from installing te adapter if not compatible!

On questions please talk to us at ioBroker/ioBroker.js-controller#1138

Please close the issue after you checked it.

Thank you very much for your support!

unable to install 1.0.6

hi,

when i try to install 1.0.6 via the "Installatzion from own URL" pointing to the tar.gz I get this Message:

$ ./iobroker url "https://github.com/Sickboy78/ioBroker.sureflap/archive/refs/tags/v1.0.6.tar.gz" --debug
install Sickboy78/ioBroker.sureflap#refs/tags/v1.0.6.tar
NPM version: 6.14.12
npm install Sickboy78/ioBroker.sureflap#refs/tags/v1.0.6.tar --loglevel error (System call)
npm ERR! code 1
npm ERR! Command failed: git checkout refs/tags/v1.0.6.tar
npm ERR! error: pathspec 'refs/tags/v1.0.6.tar' did not match any file(s) known to git
npm ERR!

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Program Files\iobroker\SmartHome\env\npm-cache_logs\2021-09-14T06_39_40_517Z-debug.log
upload [5] sureflap.admin C:/Program Files/iobroker/SmartHome/node_modules/iobroker.sureflap/admin/words.js words.js application/javascript
upload [4] sureflap.admin C:/Program Files/iobroker/SmartHome/node_modules/iobroker.sureflap/admin/SureFlap_Pet_Door_Connect_Hub_Phone.png SureFlap_Pet_Door_Connect_Hub_Phone.png image/png
upload [3] sureflap.admin C:/Program Files/iobroker/SmartHome/node_modules/iobroker.sureflap/admin/sureflap.png sureflap.png image/png
upload [2] sureflap.admin C:/Program Files/iobroker/SmartHome/node_modules/iobroker.sureflap/admin/style.css style.css text/css
upload [1] sureflap.admin C:/Program Files/iobroker/SmartHome/node_modules/iobroker.sureflap/admin/index_m.html index_m.html text/html
upload [0] sureflap.admin C:/Program Files/iobroker/SmartHome/node_modules/iobroker.sureflap/admin/admin.d.ts admin.d.ts video/mp2t
process exited with code 0

What am I doing wrong?

History Bug is back?

Hello Sebastian,
My history in iobroker got the last update around two hours ago.
is it possible that the api got changed again or could it be that History bug you mentioned in a past post is back?
i couldn't tell excactly when this started but my girlfriend told me about one week ago that the status of our cats not changed in time.
this would make sense because of the significantly delayed history.

Cheers
MedusA

TypeError: Cannot read property 'where' of undefined

Immer wenn ich den Adapter starte, bekomme ich alle ca 30 sekunden folgenden Fehler
(26167) TypeError: Cannot read property 'where' of undefined

allerdings habe ich nur drei Futterautomaten und keine Katzenklappen.
Der Fehler klingt aber nicht so, als würde dies die Ursache sein.

Wenn du jemanden mit einem Futterautomaten brauchst, der etwas testen, helfe ich gerne. (natürlich auch bei anderen Problemen)

Update stable version in repo from 1.2.3 to 2.1.1

Think about update stable version to 2.1.1

Version: stable=1.2.3 (73 days old) => latest=2.1.1 (15 days old)
Installs: stable=168 (61.54%), latest=26 (9.52%), total=273

Click to use developer portal
Click to edit

Note: This is an automatically generated message and not personally authored by bluefox!
Do not close this issue manually as a new issue will be created if condition for update still exists
@mcm1957 for evidence

Feature: setPetLocking

Hi,

would it be possible to add this one:
setPetLocking.php

locking=[out|in] oder
lockingid=[2=out|3=in] oder
lockingLox=[0=out|1=in]

petname=[...]
Name des Haustiers muss zur Sicherheit immer mitgegeben werden

as i read in loxone wiki it is possible to set a lock mode for every pet

massive request for 'app.api.surehub.io' since v1.1.5

Describe the bug
Yesterday i updated to v1.1.5. Now i discovered that there are a lot of reqeusts for 'app.api.surehub.io' every seconds.

To Reproduce
Steps to reproduce the behavior:

  1. start the adapter and listen to traffic

Expected behavior
As in version v1.1.2 only one request per minute.

grafik

Compatibility check to js-controller 4.0

Dear Adapter developer,

with js-controller 4.0 object definitions are now also checked that min/max in only provided for number/mixed objects and that the type of the default value matches to the object type.

If something is not correct this is logged as 'warning' or 'info' log.

Please also make sure to update to the lastest @iobroker/testing dependency 2.5.4 or to accept the PR from Apollon77 for legacy testing!

Please spent some time to verify your adapter by ideally starting with a fresh instance and do some actions and verify the log. If you see a warn or info log there from these checks please adjust the adapter and fix the relevant cases.

For questions please refer to ioBroker/ioBroker.js-controller#1749

Please close the issue after you checked it.

Thank you very much for your support to get the best experience for the growing numbers of ioBroker users!

IOB error log flooded with Request Timeout error

Hello,

first of all i want to thank you for the great integration of the surepet products in Iobroker.
Unfortunately my Iobroker log is daily flooded with approximately 40 - 70 error messages.

Here is an Example:


2023-08-04 08:21:11.857 - error: sureflap.0 (14831) Request timeout
2023-08-04 08:21:11.857 - error: sureflap.0 (14831) Error: Request timeout: retrying in 60 seconds
2023-08-04 08:21:11.858 - error: sureflap.0 (14831) Request error: Error: socket hang up
2023-08-04 08:23:12.166 - error: sureflap.0 (14831) Request timeout
2023-08-04 08:23:12.167 - error: sureflap.0 (14831) Error: Request timeout: retrying in 60 seconds
2023-08-04 08:23:12.167 - error: sureflap.0 (14831) Request error: Error: socket hang up
2023-08-04 08:25:13.161 - error: sureflap.0 (14831) Request timeout
2023-08-04 08:25:13.161 - error: sureflap.0 (14831) Error: Request timeout: retrying in 60 seconds
2023-08-04 08:25:13.162 - error: sureflap.0 (14831) Request error: Error: socket hang up
2023-08-04 08:27:14.169 - error: sureflap.0 (14831) Request timeout
2023-08-04 08:27:14.169 - error: sureflap.0 (14831) Error: Request timeout: retrying in 60 seconds
2023-08-04 08:27:14.170 - error: sureflap.0 (14831) Request error: Error: socket hang up
2023-08-04 08:29:14.486 - error: sureflap.0 (14831) Request timeout
2023-08-04 08:29:14.487 - error: sureflap.0 (14831) Error: Request timeout: retrying in 60 seconds
2023-08-04 08:29:14.487 - error: sureflap.0 (14831) Request error: Error: socket hang up
2023-08-04 08:31:14.790 - error: sureflap.0 (14831) Request timeout
2023-08-04 08:31:14.791 - error: sureflap.0 (14831) Error: Request timeout: retrying in 60 seconds
2023-08-04 08:31:14.791 - error: sureflap.0 (14831) Request error: Error: socket hang up

The installed version of the Adapter is the latest V 1.1.9
JS-controller 5.0.11
Node.js v18.17.0
NPM 9.6.7

This kind of problem consists for a long time but i think over the time it got worse and worse.
I don't know if i'm the only one facing this problems but i hope there is a way to solve this.

Please let me know if there is a way to thank you for your work with a little donation.

Error: Request returned status code 401

Hab mir auch mal die Version 1.0.4 installiert. Konfig passt, eswerden alle 3 Katzen angezeigt. Die Instanz bleibt Gelb mit der Meldung Verbunden mit Sureflap false. ImLog steht:
Error: Request returned status code 401

Weight for remaining food in bowl not written

Describe the bug
The value for the weight of the remaining food in the bowls are not written.
The below mentioned objects, e.g. "'Eisfahrtstrasse.EG_EG_SurePetHub.EG_KU_FeedElla.bowls.0" is existing

image

Food Type & Target Weight are proper written.

To Reproduce
The below mentioned log entry is written on every adapter restart

Expected behavior
Weight of the remaining food written as value.

Screenshots & Logfiles
021-12-19 20:53:04.369 - �[33mwarn�[39m: sureflap.0 (4225) got feeder remaining food data for object 'Eisfahrtstrasse.EG_EG_SurePetHub.EG_KU_FeedYoda.bowls.0' but object does not exist. This can happen if number of bowls is changed. Restart adapter. If warning persists, contact developer.
2021-12-19 20:53:04.369 - �[33mwarn�[39m: sureflap.0 (4225) got feeder remaining food data for object 'Eisfahrtstrasse.EG_EG_SurePetHub.EG_KU_FeedElla.bowls.0' but object does not exist. This can happen if number of bowls is changed. Restart adapter. If warning persists, contact developer.
2021-12-19 20:53:04.369 - �[33mwarn�[39m: sureflap.0 (4225) got feeder remaining food data for object 'Eisfahrtstrasse.EG_EG_SurePetHub.EG_KU_FeedLuna.bowls.0' but object does not exist. This can happen if number of bowls is changed. Restart adapter. If warning persists, contact developer.
2021-12-19 20:53:04.369 - �[33mwarn�[39m: sureflap.0 (4225) got feeder remaining food data for object 'Eisfahrtstrasse.EG_EG_SurePetHub.EG_KU_FeedLilli.bowls.0' but object does not exist. This can happen if number of bowls is changed. Restart adapter. If warning persists, contact developer.

Versions:
2021-12-19 20:55:49.387 - �[32minfo�[39m: sureflap.0 (11059) starting. Version 1.0.8 in /opt/iobroker/node_modules/iobroker.sureflap, node: v14.18.2, js-controller: 3.3.21

Thanks for support
Steffan

Adapter blocks javascript / system (CPU Load 100%)

Describe the bug
Adapter start or data refresh cause that cpu usage of javascript instance raised to 100% and blocks the whole scripts running.

It took me a long time to find the cause of the problem, as I always looked for it in a script.
However, the error is reproducible on two systems.

  1. freshly installed system without any scripts:
    keine_scripte

  2. my productive system
    prod_system

Versions:

  • Adapter version: 1.2.3
  • JS-Controller version: 5.0.17
  • Node version: 18.19.1
  • Operating system: ubuntu 22.04

I create a variante where the history data are disabled, see #52.
This reduces the load considerably and no longer leads to blocking.
However, when I look at the code, I think that there is a general problem when creating / deleting / updating the objects, because this is a lot of data and, for example, currently generates 1400 data points for me.
The data points should not be deleted and recreated every time, but updated if necessary.

Zeitangabe stimmt in Vis nicht mit Adapterangaben überein

Hallo @Sickboy78 - Ich bins noch einmal;
Ich habe in Vis eine Verknüpfung mit dem Datenpunkt "since" angelegt. Dabei ist mir aufgefallen, dass die Zeitangabe im Datenpunkt stimmt; in der Vis-Verknüpfung wird jedoch anstatt zB 19:00 18:00 angezeigt.

Im Datenpunkt steht: Sun Mar 14 2021 19:39:00 GMT+0100 (Mitteleuropäische Normalzeit)
In der Vis-Verknüpfung dann: Zeitstempel

Hast du eine Idee woran das liegen könnte?

Ein weiteres Anliegen hätte ich noch zu diesem Zeit Stempel: ich habe es in der Vis nicht fertig gebracht, dass es mir das "+00:00" (GMT) nicht anzeigt (empfinde ich als unnötig). Die Trennung von Datum und Uhrzeit konnte ich realisieren, indem ich das "T" als Trennzeichen angegeben habe.

Compatibility check to js-controller 3.3 and Admin5 React UI

Dear Adapter developer,

with js-controller 3.2 and js-controller 3.3 some additional checks were added to make sure that created objects match to the specifications and also written state values match to the object definition.

If something is not correct this is logged as 'warning' or 'info' log.

Please take the time to verify your adapter by ideally starting with a fresh instance and do some actions and verify the log. If you see a warn log there from these checks please adjust the adapter and fix the relevant cases.

For questions please refer to ioBroker/ioBroker.js-controller#1301

Additionally we are preparing Admin 5 which will have a completely rewritten UI. Please install Admin 5, activate that new UI and verify that the configuration of you adapter works as expected also there.

More informations on Admin 5 can be found in Forum https://forum.iobroker.net/topic/44282/test-adapter-admin-5-0-x-alpha-der-neuen-ui

Please close the issue after you checked it.

Thank you very much for your support!

Water dispenser integration

First of all, thank you very much for the adapter. Works perfectly.
I have now bought the water dispenser.
Would it be possible to implement this also in the adapter ? Thanks in advance.

Update stable version in repo from 1.2.0 to 1.2.1

Think about update stable version to 1.2.1

Version: stable=1.2.0 (60 days old) => latest=1.2.1 (15 days old)
Installs: stable=158 (58.96%), latest=37 (13.81%), total=268

Click to use developer portal
Click to edit

Note: This is an automatically generated message and not personally authored by bluefox!

State Offline

Expected behavior
All my Devices are Offline State (False)
only the ONLINE States are incorrect all other Datapoints still work

Screenshots & Logfiles

screen

Versions:

  • Adapter version: 1.0.9
  • JS-Controller version: 3.3.22
  • Node version: v12.22.8
  • Operating system: IOBroker Raspberry

UNCAUGHT_EXCEPTION when adapter starts

Describe the bug
when i start the adapter i get

sureflap.0 | 2022-03-14 14:29:21.756 | warn | Terminated (UNCAUGHT_EXCEPTION): Without reason
sureflap.0 | 2022-03-14 14:29:21.756 | info | terminating
sureflap.0 | 2022-03-14 14:29:21.756 | info | everything cleaned up
sureflap.0 | 2022-03-14 14:29:21.755 | error | Cannot read property 'length' of undefined
sureflap.0 | 2022-03-14 14:29:21.754 | error | TypeError: Cannot read property 'length' of undefined     at Immediate.<anonymous> (/opt/iobroker/node_modules/iobroker.sureflap/main.js:1784:66)     at processImmediate (internal/timers.js:466:21)
sureflap.0 | 2022-03-14 14:29:21.754 | error | uncaught exception: Cannot read property 'length' of undefined
sureflap.0 | 2022-03-14 14:29:20.581 | info | update loop started
sureflap.0 | 2022-03-14 14:29:20.580 | info | starting update loop...
sureflap.0 | 2022-03-14 14:29:20.579 | info | connected
sureflap.0 | 2022-03-14 14:29:20.050 | debug | login count: 1
sureflap.0 | 2022-03-14 14:29:20.050 | debug | json: {"email_address":"****","password":"****","device_id":"****"}
sureflap.0 | 2022-03-14 14:29:20.050 | debug | password: ****
sureflap.0 | 2022-03-14 14:29:20.050 | debug | email_address: ****
sureflap.0 | 2022-03-14 14:29:20.050 | info | connecting...
sureflap.0 | 2022-03-14 14:29:20.049 | debug | starting SureFlap Adapter v1.1.2
sureflap.0 | 2022-03-14 14:29:20.040 | info | starting. Version 1.1.2 in /opt/iobroker/node_modules/iobroker.sureflap, node: v14.19.0, js-controller: 3.3.22

Versions:

  • Adapter version: 1.1.2
  • JS-Controller version: 3.3.22
  • Node version: v14.19.0
  • Operating system: Debian 9.13

Additional context
Hub + SureFlap works with PetCare App

Add User-Agent in Header

Since 01st June 2023 an additional header is required

for example
'User-Agent': 'Mozilla/5.0'

Update stable version in repo from 1.2.1 to 1.2.3

Think about update stable version to 1.2.3

Version: stable=1.2.1 (102 days old) => latest=1.2.3 (15 days old)
Installs: stable=197 (71.64%), latest=40 (14.55%), total=275

Click to use developer portal
Click to edit

Note: This is an automatically generated message and not personally authored by bluefox!

(10783) TypeError: Cannot read property 'where' of undefined

Hallo;
Ich habe die folgende Fehlermeldung im Log: (10783) TypeError: Cannot read property 'where' of undefined

Zudem steht in den Datenpunkten von "since" der jeweiligen Tiere nichts - werden die Daten erst übernommen, wenn ein Tier durch die Klappe ging, oder sollten sie vom Hub übernommen werden?

All devices online & connection sind auf true

undefined control.type

Hallo
Musste heute die neuen Lizenzvereinbahrungen in der App annehmen und mein PW ändern; dabei ist mir im Adapter im Log folgendes aufgefallen:
" undefined is not a valid state value for id "sureflap.0.Home.Home_Cat_Hub.Buero_neu.assigned_pets.Charlie.control.type" "

Diese Meldung ist bei allen drei Haustieren gekommen....
Meine Adapter-Version ist 1.1.0
Die App Version ist 3.1.15 auf Android

Gruss
Matt

Error setting states with js controller 4.0.12

Tried this Adapter for the first time. Getting states from API works perfectly.
Setting states instead fails with these errors:

System: Linux
Adapter version: 1.1.0
js controller 4.0.12
NPM 14.19.0

Cannot read property 'length' of undefined

TypeError: Cannot read property 'length' of undefined at Sureflap.getTagIndexForDeviceIndex (/opt/iobroker/node_modules/iobroker.sureflap/main.js:2077:61) at Sureflap.resetControlPetTypeToAdapter (/opt/iobroker/node_modules/iobroker.sureflap/main.js:1363:25) at /opt/iobroker/node_modules/iobroker.sureflap/main.js:717:10 at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:95:5)

unhandled promise rejection: Cannot read property 'length' of undefined

Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().

changing pet type failed: Error: Request returned status code 500

FaceID

Hello Sebastian,
I have the idea of ​​pairing the cat flap with a FaceID camera and am wondering if I can leave the cat flap as it is and put my camera in between for extra security? Do you have an idea if this is possible? I wanted to write you a message but I can't find a contact.
Best regards
Patrick

Error: Request returned status code 403

Describe the bug
seit ein paar Tagen aktualisieren sich meine Objekt nicht mher unes es gibt den Fehler:

Error: Request returned status code 403

To Reproduce
Steps to reproduce the behavior:
Login ist richtig und ist mit "Login successfull" bestätigt

Log:

sureflap.0 | 2023-06-02 06:08:36.154 | info | disconnected
-- | -- | -- | --
sureflap.0 | 2023-06-02 06:08:36.153 | error | Error: Request returned status code 403
sureflap.0 | 2023-06-02 06:08:35.704 | info | connecting...


Versions:
Plattform
linux
Betriebssystem
linux
Architektur
x64
CPUs
2
Geschwindigkeit
2159 MHz
Modell
AMD Turion(tm) II Neo N54L Dual-Core Processor
RAM
7.45 GB
System-Betriebszeit
35 T. 12:37:00
Node.js
v16.19.1 (Es gibt eine neuere Version: v16.20.0 - Empfohlene Version v18.16.0)
time
1685680760786
timeOffset
-120
Anzahl der Adapter
474
NPM
8.19.3
Datenträgergröße
24.48 GB
freier Festplattenspeicher
10.11 GB
Betriebszeit
34 T. 22:21:46
Aktive Instanzen
39
Weg
/opt/iobroker/
Hostname
iOBroker2022

Memory leak

The adapter uses massive amounts of ram after a few days of running.

surepet

Which leads to memory exhaustion:

ram

Adapter-Version v1.0.0
js-controller: 4.0.19

image

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.