VorlonCD / bi-aidetection

Alarm system for Blue Iris based on Artificial Intelligence.
https://ipcamtalk.com/threads/tool-tutorial-free-ai-person-detection-for-blue-iris.37330/
GNU General Public License v2.0
207 stars 45 forks source link

Log errors with new version - 2.1.6 #296

Closed Yonny24 closed 2 years ago

Yonny24 commented 2 years ago

I updated from 2.0.1206 to 2.1.6 today and started receiving a large amount of errors.

1) - sunset-sunrise window parameter is not valid anymore 2) conflict with telegram token.

I reverted back to the old version and working again.

image

VorlonCD commented 2 years ago

@Yonny24 - its not sunrise-sunset, it just cant read the correct LAT LONG values for some reason.

AITOOL tries to read BlueIris lat/long settings so it can correctly determine your location for sunrise/sunset.

On the machine that has BlueIris installed, can you screenshot BI > SETTINGS > SCHEDULE tab for me? I want to see how your "Latitude" and "Longitude" settings are configured. Although, this would give away your location so all I need to know is the formatting if you care. For example, mine shows a "40.000000" for Lat, and "-70.000000" for long. Someone else had an issue when theirs was using a comma rather than decimal point but I thought I had that fixed in the last build.

Also, if you open AITOOL.SETTINGS.JSON, how do these settings look?

"localLatitude": 40.000000,
"localLongitude": -70.000000,

If one is simply "0" that could certainly cause the errors from the log. If wrong you could update the file with your correct GPS location and that would be used rather than the BlueIris settings.

For the Telegram error - A new feature also "listens" for telegram commands such as PAUSE or START. Telegram only allows one tool per token to listen for messages (except for its own phone app of course).....

VorlonCD commented 2 years ago

Oh and if you edit your JSON file directly I believe you have to use a period rather than a comma for the decimal place.

So this would be invalid because the JSON format uses a comma to separate the fields:

"localLatitude": 40,000000,
"localLongitude": -70,000000,

In theory use of a comma in BlueIris settings should be fine.

VorlonCD commented 2 years ago

Ahh, and the Telegram issue may be solved. I found a recent forum post that indicates you could be using Frigate/Nodered with Telegram? If they are connected (and listening with a 'webhook') to the telegram conversation using the same token, that would prevent AITOOL from also listening at the same time. Only ONE client is allowed to listen/create a webhook. So, a few solutions:

When AITOOL cannot listen to the telegram conversation, should it report it differently? Or not give an "error"?

Yonny24 commented 2 years ago

Thanks for looking into this.

Lat/long both match. this and the json in AI. Both dots. I do have a telegram.exe service running on this machine for the desktop program, this is the only one though. I'll try but stopping this and setting it to manual. I have nodered but on another PC, running proxmox. 3 telegram bots connected.

If all else fails I'll try a new bot and new token.

ah but wait this is the older version json setting here. I got rid of the new version. I need time later tonight to test this, once the family are sleeping.

"localLatitude": -34.873774, "localLongitude": -56.019736,

image

Yonny24 commented 2 years ago

This morning I created a new bot and added that new token to the AI tool. Re-ran the update, tested and all seems ok - no log errors - lat/long seem fine for sunset/sunrise. Also no telegram API conflicts, fortunately.

So this new token and bot for the AI tool is not to be used anywhere else, for example on nodered? I have another bot there to receive the mqtt data.

Also, how do the commands work?

A few more basic remote control commands via Telegram: MUTE, UNMUTE, VOLUMEUP, VOLUMEDOWN, VOLUMESET LEVEL, RESTARTCOMPUTER

Is the volumeUP for the phone telegram is installed on? If its on mute sending the message 'VOLUMEUP' will turn up the phones volume? Or am I misunderstanding this feature? I did try that and nothing happened on my phone, I did set privacy to disable.

Many thanks!

VorlonCD commented 2 years ago

I cant explain why sunrise/sunset working this time. All looked good with your settings. Perhaps corrupt before?

But the next version will handle invalid lat/long better.

If you want to use the new commands thats the only reason why the token cant be in use other places. In ANY case it wont stop you from getting alerts as normal.

The commands control the computer, not the phone. From your phone if you type PAUSE 30 it will pause all cameras for 30 minutes so you stop getting notifications. I have all manor of sounds for different events playing on the computer that has AITOOL installed so MUTE will mute the computer.

Yonny24 commented 2 years ago

oh the restart option is good. I know blue iris has this also from the UI3 interface. I have a nodered also that pings a specific port (81 for BI) if no response (i.e. blue iris or something is frozen) it will send the shutdown command via an ssh node.

But having the 2nd option of reboot from the bot is good if things are not working as they should be. What kind of restart command does it send? shutdown -r -f?

VorlonCD commented 2 years ago

shutdown.exe -r -f -t 10