Giter Club home page Giter Club logo

Comments (28)

4homeassistant avatar 4homeassistant commented on July 18, 2024 1

Let me check tomorrow how I can capture the syntax MQTTAnalyzer sends to the mosqitto server plugin on my HassOS Rasperry Pi. Sorry, I am no developer thus have to spend some more time to get what I need 😉

from homeassistant-goecharger-mqtt.

4homeassistant avatar 4homeassistant commented on July 18, 2024 1

I never would not trust you ;-)
So if I get you right, I just manipulated the current state output but not the chargers settings itself, right? Bear with me... ;-)

from homeassistant-goecharger-mqtt.

4homeassistant avatar 4homeassistant commented on July 18, 2024 1

Just got the answer to the issue I posted: goecharger/go-eCharger-API-v2#116 (comment)
These cardIndex values (trx >0) will be accepted with the new beta firmware available soon.

from homeassistant-goecharger-mqtt.

syssi avatar syssi commented on July 18, 2024

The trx value is available as sensor only at the moment. Could you provide some examples values which can be passed to the trx topic? As workaround you could use the goecharger_mqtt.set_config_key service to the any values on any topic: https://github.com/syssi/homeassistant-goecharger-mqtt/#service-goecharger_mqttset_config_key

from homeassistant-goecharger-mqtt.

4homeassistant avatar 4homeassistant commented on July 18, 2024

Thank you for your quick reply @syssi! 😊
Tried to do it with that script and already played around with the syntax but nothing happened.

sequence:
  - service: goecharger_mqtt.set_config_key
    data:
      serial_number: "xxxxxx"
      key: "trx"
      value: "2"

from homeassistant-goecharger-mqtt.

4homeassistant avatar 4homeassistant commented on July 18, 2024

Due to the api documentation https://github.com/goecharger/go-eCharger-API-v2/blob/main/apikeys-en.md you can pass the following values:

null: no ID set
0: charging without ID
1-10: charging with ID

from homeassistant-goecharger-mqtt.

syssi avatar syssi commented on July 18, 2024

I did the same using the services tab of the developer tools: http://your-homeassistant-host:8122/developer-tools/service

service: goecharger_mqtt.set_config_key
data:
  serial_number: "072246"
  key: trx
  value: 2

If I monitor the MQTT traffic using mosquitto_sub -v -t '/go-eCharger/#' I can see something like this:

$ mosquitto_sub -v -t '/go-eCharger/#'
/go-eCharger/072246/trx/set 1
/go-eCharger/072246/trx/result starting transaction for 1 is not allowed 1

from homeassistant-goecharger-mqtt.

syssi avatar syssi commented on July 18, 2024

I've prepare a pull request to introduce a select entity in future:

https://github.com/syssi/homeassistant-goecharger-mqtt/pull/69/files

You will be able to select one of the values using a drop-down.

from homeassistant-goecharger-mqtt.

4homeassistant avatar 4homeassistant commented on July 18, 2024

Can you try it without 'set' and just use the value itself? Something like /xxxxxx/trx/2 or trx=2
I tried with MQTTAnalyzer to set the value and don't know the syntax that it passes but it works when I don't choose 'set'.

from homeassistant-goecharger-mqtt.

syssi avatar syssi commented on July 18, 2024

If I don't use /set the charger doesn't accept the command:

/go-eCharger/072246/trx 0 # no repsonse
/go-eCharger/072246/trx 1 # no response
/go-eCharger/072246/trx 2 # no response
/go-eCharger/072246/trx/set null
/go-eCharger/072246/trx/result there is currently no transaction null
/go-eCharger/072246/trx/set 0
/go-eCharger/072246/trx/result success
/go-eCharger/072246/trx 0
/go-eCharger/072246/trx/set 1
/go-eCharger/072246/trx/result starting transaction for 1 is not allowed 1
/go-eCharger/072246/trx/set 0
/go-eCharger/072246/trx/result success
/go-eCharger/072246/trx/set null
/go-eCharger/072246/trx/result success
/go-eCharger/072246/trx null

from homeassistant-goecharger-mqtt.

syssi avatar syssi commented on July 18, 2024

I've prepared a new release. If you update the custom component using HACS there should popup a new select entity called "Transaction". This can be used to send trx instructions between null and 9.

from homeassistant-goecharger-mqtt.

4homeassistant avatar 4homeassistant commented on July 18, 2024

I've prepared a new release. If you update the custom component using HACS there should popup a new select entity called "Transaction". This can be used to send trx instructions between null and 9.

Wow! Thank you for that quick update. You were faster than I typed my last post. Just installed and checked if it works. Unfortunately it still fails. I'll check how to get the working syntax from MQTTAnalyzer tomorrow.

from homeassistant-goecharger-mqtt.

syssi avatar syssi commented on July 18, 2024

If you are using the latest firmware I'm pretty sure the new feature is working as intended. Please try to monitor the feedback of your charger using MQTTAnalyzer tomorrow. I guess your expectations are wrong. ;-)

from homeassistant-goecharger-mqtt.

4homeassistant avatar 4homeassistant commented on July 18, 2024

The chargers are running 055.0 🤔

from homeassistant-goecharger-mqtt.

syssi avatar syssi commented on July 18, 2024

I use the same firmware version 055.0.

from homeassistant-goecharger-mqtt.

4homeassistant avatar 4homeassistant commented on July 18, 2024

Okay, mosquitto_sub captures

/go-eCharger/xxxxxx/trx 2

when I use MQTTAnalyzer to set trx and your integration immediately shows that value in Lovelace.

from homeassistant-goecharger-mqtt.

4homeassistant avatar 4homeassistant commented on July 18, 2024

Next thing I tried successfully:
Run the service 'MQTT:Publish' in developer tools with topic '/go-eCharger/xxxxxx/trx' and payload '2'
So there must be anything with the integration that's different. I wish I could do more but we must be close to the solution.
image
Result
image

from homeassistant-goecharger-mqtt.

syssi avatar syssi commented on July 18, 2024

Trust me. You have to use the /set topic to instruct your charger to execute the command. The /trx topic without suffix is used to return the current state. The current state is displayed at the custom component. You aren't allowed to manipulate the feedback topic directly. This won't affect the charger settings

from homeassistant-goecharger-mqtt.

4homeassistant avatar 4homeassistant commented on July 18, 2024

Or in other words: the documentation of the go-eCharger API is (still) not correct regarding trx. I had a quick chat with their support a couple of weeks ago and they replied that trx only accepts values null and 0 to date and they want to discuss this question with their developers since the documentation is different.

from homeassistant-goecharger-mqtt.

4homeassistant avatar 4homeassistant commented on July 18, 2024

Just opened an issue there (sorry - in german)
goecharger/go-eCharger-API-v2#116

from homeassistant-goecharger-mqtt.

syssi avatar syssi commented on July 18, 2024

You are in the right track! The charger accepts null and 0 at the moment. In this case the transaction sensor changes to the new value. If you select/set/send a value >0 the command gets rejected and the state of the transaction sensor doesn't change.

from homeassistant-goecharger-mqtt.

4homeassistant avatar 4homeassistant commented on July 18, 2024

If this is working, would it be possible to add trx to the Config key select box?

image

from homeassistant-goecharger-mqtt.

syssi avatar syssi commented on July 18, 2024

Done: https://github.com/syssi/homeassistant-goecharger-mqtt/releases/tag/0.15.1

Please update your custom component to the latest release.

from homeassistant-goecharger-mqtt.

4homeassistant avatar 4homeassistant commented on July 18, 2024

Great @syssi, thany you so much. I keep you updated if it works with the upcoming beta firmware as soon as I get it.

from homeassistant-goecharger-mqtt.

syssi avatar syssi commented on July 18, 2024

You are welcome!

from homeassistant-goecharger-mqtt.

4homeassistant avatar 4homeassistant commented on July 18, 2024

Yesterday go-e released the new firmware 055.2 beta with the above mentioned updates and it works as expected. Only the select entity has some strange behaviour. See my screen capture below. If I select Card 1 it jumps to Card 0, sometimes the corresponding trx value [cardIndex+1] doesn't change at all. Do you have an idea why? The service goecharger_mqtt.set_config_key works fine :-)
Edit: I have been too quick. goecharger_mqtt.set_config_key also does not work as expected. Any entered number leads to a value entered number -1 but since this behaviour even occurs with the local http API it seems to be a bug in the charger firmware. I already posted that in my issue goecharger/go-eCharger-API-v2#116

homeassistant-goecharger-mqtt_trx-selector.mp4

from homeassistant-goecharger-mqtt.

syssi avatar syssi commented on July 18, 2024

I will have a look but it will take some time.

from homeassistant-goecharger-mqtt.

syssi avatar syssi commented on July 18, 2024

You are on the right track. This issue must be addressed on firmware level. As soon as input and output values are in sync this implementation should work properly.

from homeassistant-goecharger-mqtt.

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.