Code Monkey home page Code Monkey logo

powermaxesp8266's People

Contributors

ayasystems avatar clement87 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

clement87

powermaxesp8266's Issues

Request: Sync NTP time with Powermax time at any event

Although the ESP syncs the time by NTP, the system time of the Powermax -panel isn't.
It would be nice if at any arbitrary moment, but at least once a day, the Powermax system time would be synced with the ESP time.
Maybe this could be done when any kind of event is fired.
As far as I can see the pmax lib has a function for setting the time.
I would try this myself, but I can't get the source compiled due to a lot of compiling errors.

Time sync

I am now able to compile without errors, thanks to the latest change.
So am now trying to get the panel to sync with the ESP system time.
As far as I can see and understand (and that is very little), the time sync is part of this function in the PowerMaxAlarm lib:

//Should be called when panel is enrolled and entered download mode successfully
void PowerMaxAlarm::powerLinkEnrolled()

precondition is that the ESP has the system time already set.
This happens only when successfully logged on to an MQTT server, right?
So we have to wait for that.
And the panel should be in download mode.

What I want to try is to activate the time sync when the status of the panel changes to DISARMED.
That way I can test if the time is synced when the DISARM button is pushed in the web interface of the ESP.
To do this we have to add these calls to the onStatusChange() switch case? :

sendCommand(Pmax_DL_EXIT);
sendCommand(Pmax_DL_START);
powerLinkEnrolled();
sendCommand(Pmax_DL_EXIT);

But I have no idea if my thinking is correct.

(Not sure what the function os_getLocalTime() should do. I have set the return value to TRUE)

Anyways, I have a feeling you already tried to make the time sync working, but maybe with your knowledge we can give it another try to make it work? I can compile and test against a Powermax system.

stat_tamper missing from zone mqtt publish

stat_tamper is missing from the json in the mqtt powermax/zone messages.
eg:

{ "zoneId": 4, "zoneName": "Upstairs", "zoneType": 12, "zoneTypeStr": "Interior", "sensorId": 195, "sensorType": "Motion", "sensorMake": "Visonic PIR", "enrolled": true, "signalStrength": 3, "lastEvent": true, "lastEventTime": 12888, "stat_doorOpen": false, "stat_bypased": false, "stat_lowBattery": false, "stat_active": true }

It is also not present in the /log url:

{"zoneId":4,"zoneName":"Upstairs","zoneType":12,"zoneTypeStr":"Interior","sensorId":195,"sensorType":"Motion","sensorMake":"Visonic PIR","enrolled":true,"signalStrength":3,"lastEvent":false,"lastEventTime":0,"stat_doorOpen":false,"stat_bypased":false,"stat_lowBattery":false,"stat_active":true}

It is however there on the /status url 'enroled_zones' section:

{"zoneName":"Upstairs", "zoneType":12, "zoneTypeStr":"Interior", "sensorId":195, "sensorType":"Motion", "sensorMake":"Visonic PIR", "signalStrength":3, "lastEvent":5, "lastEventAge":881, "stat_doorOpen":false, "stat_bypased":false, "stat_lowBattery":false, "stat_active":true, "stat_tamper":false}

which comes from the PowerMax lib 'Zone::DumpToJson' method, not the mqtt.ino 'void publishAlarmZone(int ix)' method. So it is there on the zone object, but doesn't get pulled out by the mqtt publishAlarmZone method. I can see that the mqtt method does include the tamper alarm, and the json path looks correct, so I'm not sure why this is being left off...

doc["stat_tamper"] = alarmZone.stat.tamper;

mqtt packet size is 512:

MQTT_MAX_PACKET_SIZE: 512 (Need more of 256)

and the zone message is ~358 bytes, so that shouldn't be the problem.

change settings

Hello,

Is it possible to made an change button when you want to change settings like the mqtt server without flashing the esp board?

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.