VorlonCD/bi-aidetection

Log errors with new version - 2.1.6

Closed this issue · 8 comments

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

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

I reverted back to the old version and working again.

image

@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).....

  • Is AITOOL.EXE running on any other computer, as a SERVICE or do you see more than one copy in Task Manager > Details tab?
  • Do ANY other devices on your network use the same telegram token? Other than just a phone app for notifications? Something configured in NodeRed? A Telegram Windows Desktop app? Other smart home devices?
  • A fix for another user was to get a new bot token, but that doesnt explain why it thinks it is in use.
  • Have rebooted since you first saw the error?
  • Have you ever posted a log that might have your telegram token visible? Could someone else be using it outside your network? (That sound is @Yonny24 making a thick tin foil hat :) )

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.

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:

  • Create a new telegram token just for AITOOLS usage (not sure if that messes with your existing workflow)
  • Disable telegram integration in the other 3rd party tool
  • Ignore the telegram warning in AITOOL. It should still work to send alert notifications even if you see the error?? Double check this. You will just be missing out on the ability to reply to the telegram message to tell AITOOL to PAUSE, START, MUTE, UNMUTE, RESTARTCOMPUTER.

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

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

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!

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.

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?

shutdown.exe -r -f -t 10