neolink icon indicating copy to clipboard operation
neolink copied to clipboard

Add an mqtt subcommand

Open QuantumEntangledAndy opened this issue 4 years ago • 4 comments
trafficstars

Depends on #203


This PR adds an mqtt subcommand.

This will allow neolink to connect to an mqtt server.

  • Neolink will post motion detection message to the server as
  • neolink/camname/status/motion: on/off
neolink mqtt --config=config.toml
  • Neolink will listen for the following commands

    • neolink/camname/control/led: on/off
    • neolink/camname/control/ir: on/off/auto
    • neolink/camname/control/reboot: <message value ignored>

QuantumEntangledAndy avatar Aug 25 '21 03:08 QuantumEntangledAndy

@QuantumEntangledAndy What is missing for this one?

Would love to have motion detection events in Home Assistant over MQTT.

Can I somehow help testing this?

petergam avatar Nov 14 '21 18:11 petergam

@petergp Motion detection from #203 should be merged first, there nothing particularly stopping it from getting merged per say, I think it is just not always having the time to work on it around the dayjobs etc

QuantumEntangledAndy avatar Nov 15 '21 04:11 QuantumEntangledAndy

Hi, Coming from https://github.com/thirtythreeforty/neolink/issues/260 Could it be possible to add camera manipulation endpoint in addition to motion detection? for example /camera1/streaming/start /camera1/streaming/stop /camera1/motion-streaming/start (if/when on-motion streaming is merged) /camera1/motion-streaming/stop (if/when on-motion streaming is merged) /camera1/battery

Thanks a lot!

ytzelf avatar Mar 27 '22 20:03 ytzelf

Some of those request don't work with the current design. We cannot for example stop streaming as neolink rtsp and neolink mqtt kinda act separately. Mqtt just serves as a command and control to the camera. Where as starting and stopping the stream would means starting and stopping the client.

To get it to work like your suggestion would mean a redesign of how the two are incorporated.

The battery would be possible but since I don't own a battery camera I cannot reverse engineer those messages and have little drive to do so.

You are however more than welcome to write up a PR of your own and I will help where I can.

QuantumEntangledAndy avatar Mar 28 '22 11:03 QuantumEntangledAndy

With no progress on my PRs in years I am closing them in favour of working on my own fork. If your interested in these features please see there

QuantumEntangledAndy avatar Mar 01 '23 07:03 QuantumEntangledAndy