Giter Club home page Giter Club logo

Comments (12)

mattsaxon avatar mattsaxon commented on August 28, 2024

How are you suggesting that would that work? Would you have another device such as another Rpi connected via serial and use MQTT to communicate between the HA instance and the other device?

from hass-jablotron80.

Thoky81 avatar Thoky81 commented on August 28, 2024

Yes with another Rpi which is close to alarm and therefore can be connected with usb cable. But if you have a suggestion how to connect the Rpi with Ubuntu in VM with USBIP or socat it would be helpful.

from hass-jablotron80.

mattsaxon avatar mattsaxon commented on August 28, 2024

In terms of an MQTT solution, can I suggest you look at this component https://www.home-assistant.io/components/mqtt_eventstream/

I haven't tried it, but it would appear to allow multiple HA instances to synchronise their state.

Therefore I think for your use case, you would run HA on both Rpi instances, and publish/subscribe to the Jablotron events on both instances.

from hass-jablotron80.

Thoky81 avatar Thoky81 commented on August 28, 2024

Have you seen the plaksnor MQTT support ? Do you think we can have it too in JA -80?
Thanks

from hass-jablotron80.

mattsaxon avatar mattsaxon commented on August 28, 2024

It's certainly technically feasible, I just don't have anytime to do it.

Though, has anyone tried my suggestion of using the build in MQTT replication rather than coding it into the component

from hass-jablotron80.

mattsaxon avatar mattsaxon commented on August 28, 2024

I've looked at @plaksnor 's changes and they should be fairly easy to incorporate. However I don't have a suitable setup to test it on. @Thoky81 would you be able to help me unit test (there may be lots of issues due to my lack of suitable set-up). If so I'll see when I can do a merge? Alternatively, happy for you to merge the code and test, then send to this repo as a PR

from hass-jablotron80.

FransOv avatar FransOv commented on August 28, 2024

I made an MQTT bridge that can be connected directly to the Jablotron 80 bus, not using the JA-82T, which is essentially - I think - a USB to RS485 converter. The bridge I made consists of a Wemos D1 mini with the Tasmota software, a level converter and a TTL to RS485 converter. Total cost is about 10 euro and a bit of soldering. It can be powered by a 12v to 5V voltage converter directly from the 12V supply of the Jablotron 80 bus.
image
If you are not interested in controlling the Jablotron 80, but only wish to import the status, you can interface the D1 mini with only an optocoupler and two resistors.
The script I made publishes the following JSON via MQTT whenever the raw state changes:
In armed state
{
"zones": "ABC",
"alarm": "Normal",
"alert": 0,
"device": 0,
"msgid": 4,
"raw": "ED6304000F00000065"
}
In standby:
{
"zones": "None",
"alarm": "Normal",
"alert": 0,
"device": 0,
"msgid": 0,
"raw": "ED600000010000006F"
}
The script accepts two commands via MQTT:
Alarm 1 or 0 to set or unset the system
and
Service 1 or 0 to set the system to service mode or normal mode

from hass-jablotron80.

Flupke1979 avatar Flupke1979 commented on August 28, 2024

@FransOv Could you share some more info on your Wemos MQTT Setup please? I'm very interested in this.

from hass-jablotron80.

FransOv avatar FransOv commented on August 28, 2024

@Flupke1979
I built this because my Jablotron alarm system is downstairs and the server running Home Assistant is up in the attic. I did not want an extra cable between those two for the JA-82T. Furthermore I need the JA-82T at my desktop to run the OLink software. I found out that the Jablotron bus uses the RS485 protocol and decoded enough of the messages to be able to emulate a keypad.
With the setup presented above, I can communicate from my Home Assistant server with the Jablotron 80 via MQTT in order to receive status information and to set/reset the Alarm and the Service mode. What you need is any ESP8266 module, I use the Wemos D1 mini, a level shifter like this one (https://www.tinytronics.nl/shop/nl/spanning-converters/level-converters/spi-i2c-uart-bi-directionele-logic-level-converter-4-kanaals) and an RS485 to TTL converter like this one (https://opencircuit.nl/Product/MAX485-TTL-to-RS485-module). If you want to power the device from the 12V line on the Jablotron bus, you will also need a 12V to 5V step-down converter.
The schematic is fairly straightforward, Esp8266<=>Level shifter <=> RS485 converter.
image

On the software side you need Tasmota (https://tasmota.github.io/docs/), compiled with scripting support and support for invoking subroutines from the command line. You will also need to make a small change to the software (support_tasmota.ino module) in order to use 0xFF as a delimiter in serial communication.

If you just want the status information and do not need to issue commands to the Jablotron system you can skip the scripting and use a far simpler circuit. Connecting the A and B lines of the bus via an optocoupler and a 120K resistor to the RX and Gnd of the ESP8266 is sufficient. On the software side you might still need the modification of the support_tasmota.ini module (not strictly necessary when you can accept some malformed messages). The standard Tasmota software will publish each message received on the serial interface via an MQTT tele/%device_topic%/RESULT = {"SerialReceived":"ED600000010000006F"} message.

from hass-jablotron80.

jpsfs avatar jpsfs commented on August 28, 2024

@mattsaxon I would be interested in giving a hand testing this feature

from hass-jablotron80.

FransOv avatar FransOv commented on August 28, 2024

It turned out that the Rs485 to TTL converted I used is not very stable. The two I had stopped working after a few months. I now use this one https://www.aliexpress.com/item/32776361974.html which is very stable. it requires some changes to the circuit, but the concept stays the same.

from hass-jablotron80.

mattsaxon avatar mattsaxon commented on August 28, 2024

Closing as this repo is no longer maintained. https://github.com/tahvane1/jablotron80 is much better. However is doesn't support remote access. I'm considering, for another project, creating a ESP32 support for remote serial which might be a more generic approach than MQTT. Both should work however.

from hass-jablotron80.

Related Issues (20)

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.