Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

M2M and publishes #28

Closed
jpmens opened this issue Aug 6, 2014 · 7 comments
Closed

M2M and publishes #28

jpmens opened this issue Aug 6, 2014 · 7 comments

Comments

@jpmens
Copy link
Member

jpmens commented Aug 6, 2014

(I warned you I'd think up evil stuff during your vacation!)

In view of limiting data (M2M etc.) I'm thinking whether we could add some intelligence to the number of MQTT publishes that occur. For example:

  • Quiet time (a.k.a. parked hours). Configurable time frame (22:30 - 06:45) during which the Greenwich should not publish at all, or maybe once an hour only.
  • Dynamic speed. We currently have minDist and minSpeed, but supposing we have minDist=100 and we're driving at 100 km/h, this will cause lots of publishes. If we can detect we're going over a certain speed, we could dynamically increase the minDist, thereby lowering number of publishes but still having dynamic maps update rather frequently.

Something we should consider as enhancement, I'd say.

@ckrey
Copy link
Member

ckrey commented Aug 6, 2014

What do we want?:

  • save bandwith if not necessary
  • get accurate and up to date locations
  • receive a ping even if vehicle is stationary
  • Stationary Mode:
    detect: no movement greater than minDistance
    publish: every pingInterval seconds
  • Slow Mode
    detect: movement > minDistance and speed > minSpeed
    publish: every slowInterval seconds
  • Fast mode
    detect: movement >minDistance and speed > fastSpeef
    publish: every maxInterval seconds

always publish when changing mode

thougths?

@jpmens
Copy link
Member Author

jpmens commented Aug 6, 2014

We want to save bandwidth and get accurate locations.

StationaryMode sounds good, and I think "quietTime" should be in there as well, to further reduce publishes during, say, night times.

SlowMode also sounds good.

For FastMode, I think minDistance needs to be higher than for SlowMode, which is what I meant by "dynamic adjustment".

I don't think an explicit pub on mode change is required really, because this will happen automatically?

In any case we have to think about this carefully.

@Choralthings
Copy link

@jpmens it is possible to use Ignition line (green line connected to fuse) as key.
If you disconnect green cable from fuse and you connect it to vehicle key, when you'll disconnect the key, Greenwich enter in stand-by mode and it will not send messages.

@jpmens
Copy link
Member Author

jpmens commented Aug 8, 2014

@ckrey would this be something for status=-1 ?

@ckrey
Copy link
Member

ckrey commented Aug 8, 2014

yes, I haven't tested yet but should be already the case: Ignition off, java goes to intended close and sends a status=-1 messages

@ckrey
Copy link
Member

ckrey commented Aug 9, 2014

  • When stationary, GW will publish after minInterval seconds. Typical value is once per hour.
  • When GW moves, it will publish after maxInterval seconds. Typical value is once per minute.
  • Detection of move is by evaluation of current speed and distance from the last published location. Threshold speed is given by minSpeed with a default of 5 km/h and threshold distance by minDistance with a default of 100 m.
  • Stationary publishes are marked as triggered with "t":"T", moving publishes with "t":"t".
  • Trigger values "d" for distance and "s" for speed are obsolete.

@ckrey ckrey closed this as completed Aug 9, 2014
@ckrey
Copy link
Member

ckrey commented Aug 12, 2014

  • When transitioning from move to stationary and additional publish is sent marked with trigger "p" (park)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants