spacemanspiff2007 / sml2mqtt

Sml to MQTT Bridge
GNU General Public License v3.0
25 stars 8 forks source link

New functions #25

Closed baiti closed 3 months ago

baiti commented 1 year ago

This is actually not an issue, at least not literally.

The devices we're using with sml2mqtt require a PIN to me morsed into the sensor via a flash light. Once that's done, another sequence must be pulsed in to keep the device unlocked. Then a third sequence needs to be pulsed in to enable the extended info record.

Now comes the nightmare: On a powerloss, the device forgets all this and you have to pulse the three sequences in again!

It would be very nice, if sml2mqtt could be extended such that it can pulse these sequences into the device. It could do this hardcoded upon starting the daemon. It could also be done by subscribing to an MQTT topic, perhaps other means too.

Thoughts?

spacemanspiff2007 commented 1 year ago

Is this only available via flashlight or can you send in some serial commands?

baiti commented 1 year ago

There is a probe magnetically attached to the device. I believe it works bidirectional, which means both the device and the probe have a sender and a receiver. I am using a probe like this: https://www.amazon.de/Hichi/dp/B0BTL4HSG5

baiti commented 1 year ago

let me expand on it: I would assume there is no such thing like sending a command such as for instance "Send PIN = xxxx". It is most llikely more what is called a "bit banging" interface. For instance you send "Light on" .... then wait for a while, then send "Light off" and by doing so actually pulse a message into the device.

spacemanspiff2007 commented 1 year ago

I just googled a bit how to set the tx pin through usb high for a certain amount of time but I found nothing. If you find something I'll take a look at it but I most likely guess there is a serial command that will do the same as the flashlight. Maybe you can find that out?

baiti commented 1 year ago

I just googled a bit how to set the tx pin through usb high for a certain amount of time but I found nothing. If you find something I'll take a look at it but I most likely guess there is a serial command that will do the same as the flashlight. Maybe you can find that out?

Yes, will do some research and get back to this thread once I have something.

spacemanspiff2007 commented 3 months ago

closed (stale)