For some more detail of issue 1 i've added the IO page set to high

For some more detail of issue 1 i've added the unplug setting page settings

The following code in the Teltonika Tracker Decoder is the cause of not getting the power restore alarm:
register(252, fmbXXX, (p, b) -> p.addAlarm(b.readUnsignedByte() > 0 ? Position.ALARM_POWER_CUT : null));
Note there is no ALARM_POWER_RESTORE logic. You will have to do this via setting the I/O for External voltage to:
Whenever the tracker voltage enters this range (2v-16v in this example), it will generate a high priority record but importantly with an "event" type of 66. You can then create a computed attribute in Traccar that generates the "powerRestored" alarm when the event attribute value is 66.
Now that I've spent more time with it I would no longer recommend using the UI to show alarms via this kind of method. Just send a notification to the user and that's it. It will get too complicated otherwise.
We've done a metric ton of work on changes to the Traccar code lately for our own repo. A bunch of that will end up as PRs upstream, including when we eventually update the Teltonika Decoder to fix issues like the Power Restore Alarm.
Hello, been reading this thread and have an 2 issues (Running version 6.11.1)
https://www.traccar.org/forums/topic/teltonika-power-cutrestored-solution/#post-117730-f1b2f7700bb1
Issue 1. I've done all the steps including adding the new data to the server, added computed attributes, and assigned both the commuted attribute to the device but also the notifications for "power cut" and "power restored" when the power is lost it works perfectly, when its restored the alarm clears after a minute or so but no notification or push etc for power restore.
When i look at my event list i don't have any power restored (as attachment) despite the fault clearing
Ive also attached an extract of changers in my server if that's causing issues
I've tested it with a FMB965.
This is the attribute from the original thread
io252 == 1 && lastIo252 == 0 ? "powerCut" :
io252 == 1 && lastIo252 == 1 ? "powerCut" :
io252 == 0 && lastIo252 == 1 ? "powerRestored" :
io252 == 0 && lastIo252 == 0 ? null : null
And i have also tried this
io252 == 1 ? "powerCut" :
io252 == 0 ? "powerRestored" :
null
Always with the same result, power cut works fine and push notification, when power restore happens, it clears the fault in the web page and app, but doesn't send a push notification.
Issue 2. when I test this with a FMT100 (latest software) it never triggers, when I'm in the Teltonika configurator, I disconnect the power and it go different each time however across the course of say 5 seconds it goes 12v, 9.6v, 6.1v, 3v, then 0, it must report this to Traccar and the pop up window shows randomly one of the values, eg 6.1V and never changes, however never the 0v, each time i try its a little bit different with different voltages recorded.
In Teltonika I've the "Eventual records" turned off, and on the voltage in the IO menu, set this to high, any ideas?