# \[APP\]\[Pro\] go-e Charger

**URL:** <https://community.homey.app/t/app-pro-go-e-charger/74195>\
**Category:** Apps\
**Tags:** app, homey-pro, sdk3\
**Created:** [December 27, 2022, 3:57pm UTC](https://community.homey.app/t/app-pro-go-e-charger/74195 "2022-12-27T15:57:00Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![OH2TH](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/oh2th/32/111414_2.png) [@OH2TH](https://community.homey.app/u/OH2TH)\
**Post date:** [August 26, 2023, 5:39am UTC](https://community.homey.app/t/app-pro-go-e-charger/74195/41 "2023-08-26T05:39:18Z")

</div>

Back from summer things and time to continue here. @peltsi51, could you shere a sample of the flow where you use the condition “charging”, so that I can setup a test scenario here.

---

<div class="post-metadata">

**Author:** ![peltsi51](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peltsi51/32/12564_2.png) [@peltsi51](https://community.homey.app/u/peltsi51)\
**Post date:** [August 26, 2023, 11:50am UTC](https://community.homey.app/t/app-pro-go-e-charger/74195/42 "2023-08-26T11:50:20Z")

</div>

Here is one flow where I use it. Nevertheless the condition card didn’t work in any simpler flow either.

I had the problem multiple times during the summer, but lately (about two weeks) I haven’t noticed it anymore. Don’t know what could be changed or is it a coincident.

Like I said before the http status page of the charger did show the correct state and also the homey go-e charger device showed the correct state, but the condition card didn’t.

Might be hard to debug, but good luck.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/1/31e8a2cf1ffa695b4dc839dbc269d8aa207d2051.jpeg)

---

<div class="post-metadata">

**Author:** ![OH2TH](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/oh2th/32/111414_2.png) [@OH2TH](https://community.homey.app/u/OH2TH)\
**Post date:** [August 27, 2023, 10:10am UTC](https://community.homey.app/t/app-pro-go-e-charger/74195/43 "2023-08-27T10:10:10Z")

</div>

Wow, quite complex 🙂

I have a test flow now running logging everything to a google sheet.

 ![Screenshot 2023-08-27 at 13.06.44](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/9/39eb99c6f4a3b9f0c8d36cb2725f73ba5c4996ad.jpeg)

Hopefully I will be able to find the issue.

From the past what I have experienced with the builtin Date & Time trigger cards, that in some unknown conditions they might not trigger. This was on a HP2019, now however my primary is HP2023 so there may be a difference there also.

---

<div class="post-metadata">

**Author:** ![OH2TH](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/oh2th/32/111414_2.png) [@OH2TH](https://community.homey.app/u/OH2TH)\
**Post date:** [August 30, 2023, 4:07am UTC](https://community.homey.app/t/app-pro-go-e-charger/74195/44 "2023-08-30T04:07:38Z")

</div>

So far all of the tests are working as expected and have not had a state difference between the device and the app. So for now, I can not reproduce @peltsi51 your problem. Let’s keep an eye on this.  
It may just be that some of the scheduled queries every 5 or 10 seconds fail. Could you add to your flow a notification to the condition card (the red line) to catch that error and log it for you.  
Then again your debug report did not show such issues.

---

<div class="post-metadata">

**Author:** ![OH2TH](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/oh2th/32/111414_2.png) [@OH2TH](https://community.homey.app/u/OH2TH)\
**Post date:** [August 30, 2023, 4:20am UTC](https://community.homey.app/t/app-pro-go-e-charger/74195/45 "2023-08-30T04:20:13Z")

</div>

# Authentication and Allow Charging

While investigating @peltsi51 issue, I stumbled on an other issue related to how authentication in V3 and V4 related API works.

If you are using authentication either by the mobile app (anonymous auth) or RFIDs and you have security settings set to wait for authentication, non of the allow charging actions will work until someone authenticates.

I’m working on a new feature to support authentication [When authentication is required, allow\_charging will not change state · Issue #17 · oh2th-homey/com.go-e.charger · GitHub](https://github.com/oh2th/com.go-e.charger/issues/17)

However, if you need allow charging to work, there are two ways:

- make sure you authenticate, when you plug in your car, so that your flows will work.
- or disable the security feature in the device settings in the mobile app, anyone who plugs in can charge.

I’m surprised that no one has reported this yet.

# Question to go-eCharger V3 and V4 users.

1. Should the Homey go-eCharger app automatically authenticate the anonymous user when `Allow Charging` is set to true either by a flow or from the UI?

Or

1. Would it be better to add a new flow card to authenticate the anonymous user (and later a specific RFID tag user). This could be a UI action also as a list type picker.

The latter is a little bit more work, however it would bring the RFID tag support slightly closed.

---

<div class="post-metadata">

**Author:** ![Picsou621](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/picsou621/32/15357_2.png) [@Picsou621](https://community.homey.app/u/Picsou621)\
**Post date:** [August 30, 2023, 6:34am UTC](https://community.homey.app/t/app-pro-go-e-charger/74195/46 "2023-08-30T06:34:17Z")

</div>

I can imagine that the majority of Go-e Charger users are private users who make purely private use of the charging stations, and therefore don’t use the authentication functions. That’s probably why no problems have been reported to date. Personally, I don’t use the authentication functions, and I must confess that I didn’t fully understand your question. I’m only speaking for myself here of course, but I’m interested that whatever changes are made, everything continues to work as before for users who don’t use the authentication function 😉

---

<div class="post-metadata">

**Author:** ![peltsi51](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peltsi51/32/12564_2.png) [@peltsi51](https://community.homey.app/u/peltsi51)\
**Post date:** [September 17, 2023, 10:16am UTC](https://community.homey.app/t/app-pro-go-e-charger/74195/47 "2023-09-17T10:16:19Z")

</div>

The condition card works properly (no error message), but it gives that the the car is not charging, although the car is actually charging and the Homey device also shows charging.

It’s now again happening. Do you want me to check something? Here are some pictures and the status page of the charger.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/a/3a200a7bdd04d5a7f5e8dd6a83978f4716da8460.png)

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/3/2335f8d0365f757337d2ef2e45ad36ed0dbe1d24.png)

```auto
{"version":"B","tme":"1309230715","rbc":"126","rbt":"1742132960","car":"2","amp":"6","err":"0","ast":"0","alw":"1","stp":"0","cbl":"20","pha":"63","tmp":"28","dws":"3835802","dwo":"0","adi":"0","uby":"0","eto":"91832","wst":"3","txi":"0","nrg":[217,217,219,1,60,60,59,13,13,13,0,397,100,100,100,13],"fwv":"041.0","sse":"007232","wss":" ********","wke":"************","wen":"1","cdi":"0","tof":"0","tds":"1","lbr":"153","aho":"0","afi":"0","azo":"0","ama":"16","al1":"6","al2":"7","al3":"8","al4":"10","al5":"16","cid":"255","cch":"65535","cfi":"15132337","lse":"1","ust":"0","wak":"f1e974a8f8","r1x":"2","dto":"0","nmo":"0","sch":"AAAAAAAAAAAAAAAA","sdp":"0","eca":"0","ecr":"0","ecd":"0","ec4":"0","ec5":"0","ec6":"0","ec7":"0","ec8":"0","ec9":"0","ec1":"0","rca":"","rcr":"","rcd":"","rc4":"","rc5":"","rc6":"","rc7":"","rc8":"","rc9":"","rc1":"","rna":"","rnm":"","rne":"","rn4":"","rn5":"","rn6":"","rn7":"","rn8":"","rn9":"","rn1":"","loe":0,"lot":25,"lom":0,"lop":1,"log":"CSCBWLRI","lon":0,"lof":6,"loa":0,"lch":0,"mce":0,"mcs":"test.mosquitto.org","mcp":1883,"mcu":"","mck":"","mcc":0}       

```

---

<div class="post-metadata">

**Author:** ![OH2TH](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/oh2th/32/111414_2.png) [@OH2TH](https://community.homey.app/u/OH2TH)\
**Post date:** [September 17, 2023, 11:46am UTC](https://community.homey.app/t/app-pro-go-e-charger/74195/48 "2023-09-17T11:46:33Z")

</div>

You could have a look at [Homey Developer Tools](https://tools.developer.homey.app/tools/devices) when this happens. There is capability is\_charging that should of course be true when charging. That is the capability the condition card is looking when it is needed.

In addition you could use Trigger `Charging changed` to monitor and log the changes for that capability.

###### Capabilities

| ID | Title | Type | Value | Set Value | Last Changed |
| --- | --- | --- | --- | --- | --- |
| transaction | User Card | enum | auth\_none | | |
| authentication | Wait for Authentication | boolean | true | | |
| alarm\_device | Device Error | boolean | false | | |
| is\_connected | Car connected | boolean | false | | |
| **is\_charging** | Car charging | boolean | false | | |
| is\_allowed | Charging Allowed | boolean | false | SET | |
| num\_phases | Charging phases | enum | 3 | SET | |
| button\_three\_phase | Three Phase Charging | boolean | true | SET | |
| button\_single\_phase | Single Phase Charging | boolean | false | SET | |
| **status** | Device Status | enum | station\_idle | | |
| current\_max | Maximum Current | number | 16 | | |
| current\_limit | Current Limit | number | 16 | | |
| cable\_limit | Type-2 Cable Ampere | number | 20 | | |
| measure\_temperature.charge\_port | Port Temperature | number | 25.5 | | 46 seconds ago |
| measure\_temperature | Temperature | number | 20.5 | | 1 second ago |
| measure\_voltage | Voltage | number | 694.71 | | 1 second ago |
| measure\_current | Current | number | 0 | | |
| measure\_power | Power | number | 0 | | |
| meter\_power.session | Energy Last Session | number | 34.61 | | |
| meter\_power | Energy | number | 2125.28 | | |

Basicly is\_charging is derived from the status of the go-echarger with:

```auto
if (deviceInfo.status !== oldStatus) {
	// API car = 1
	if (deviceInfo.status === 'station_idle') {
		await this.setValue('is_connected', false);
		await this.setValue('is_charging', false);
	}
	// API car = 2
	if (deviceInfo.status === 'car_charging') {
		await this.setValue('is_connected', true);
		await this.setValue('is_charging', true);
	}
	// API car = 3
	if (deviceInfo.status === 'station_waiting') {
		await this.setValue('is_connected', true);
		await this.setValue('is_charging', false);
	}
	// API car = 4
	if (deviceInfo.status === 'car_finished') {
		await this.setValue('is_connected', true);
		await this.setValue('is_charging', false);
	}
}

```

You can use this to filter down to the values I use from the api, to limit the amount queried.

```auto
http://IPADDRESS/api/status?filter=sse,fna,car,alw,acs,frc,trx,err,wh,pha,nrg,eto,tma,amp,ama,cbl,fsp

```

At this time I can not see why it shouldn’t be correct.

---

<div class="post-metadata">

**Author:** ![peltsi51](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peltsi51/32/12564_2.png) [@peltsi51](https://community.homey.app/u/peltsi51)\
**Post date:** [September 17, 2023, 12:42pm UTC](https://community.homey.app/t/app-pro-go-e-charger/74195/49 "2023-09-17T12:42:54Z")

</div>

The is\_charging in the developer tools gives true as it should. The status in developer tools is showing car\_charging. But the condition card gives false 🤯

Hmm. Something strange happening, but cannot catch how and why.

---

<div class="post-metadata">

**Author:** ![OH2TH](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/oh2th/32/111414_2.png) [@OH2TH](https://community.homey.app/u/OH2TH)\
**Post date:** [September 17, 2023, 2:47pm UTC](https://community.homey.app/t/app-pro-go-e-charger/74195/50 "2023-09-17T14:47:21Z")

</div>

If you replace the condition card with a logic card for `yes/no` condition and use the `Charging` tag from go-eCharger?

![Screenshot 2023-09-17 at 17.39.54](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/d/0d0f66ef6fee9730c0f79ee90744cecf6fd8aab7.png)

They are directly interchangeable and practically does the same comparison.

---

<div class="post-metadata">

**Author:** ![peltsi51](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peltsi51/32/12564_2.png) [@peltsi51](https://community.homey.app/u/peltsi51)\
**Post date:** [September 27, 2023, 3:19pm UTC](https://community.homey.app/t/app-pro-go-e-charger/74195/51 "2023-09-27T15:19:50Z")

</div>

More debugging:

1. Device shows charging
2. Goe app Condition card charging is false
3. Condition card yes/no with charging tag is giving no
4. Device status tag contains car\_charging, seen in comparator condition card and in development page.
5. Charging tag contains no, seen in development page

I will change the used condition cards to condition card with device status tag containing word “charging”

---

<div class="post-metadata">

**Author:** ![OH2TH](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/oh2th/32/111414_2.png) [@OH2TH](https://community.homey.app/u/OH2TH)\
**Post date:** [September 27, 2023, 5:50pm UTC](https://community.homey.app/t/app-pro-go-e-charger/74195/52 "2023-09-27T17:50:18Z")

</div>

This is so strange as I can’t seem to replicate the issue.

---

<div class="post-metadata">

**Author:** ![peltsi51](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peltsi51/32/12564_2.png) [@peltsi51](https://community.homey.app/u/peltsi51)\
**Post date:** [September 27, 2023, 6:31pm UTC](https://community.homey.app/t/app-pro-go-e-charger/74195/53 "2023-09-27T18:31:23Z")

</div>

Strange it is.

I cannot also say that why this happens or in what cases, seems quite random because it doesn’t happen always.

Nonetheless I got workaround to the problem, so until the mystery unveils itself I’m happy with the workaround.

Thanks for the help!

---

<div class="post-metadata">

**Author:** ![peltsi51](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peltsi51/32/12564_2.png) [@peltsi51](https://community.homey.app/u/peltsi51)\
**Post date:** [September 27, 2023, 6:55pm UTC](https://community.homey.app/t/app-pro-go-e-charger/74195/54 "2023-09-27T18:55:35Z")

</div>

Could it be somehow possible that this part of the code for some reason doesn’t get excecuted? For example the oldStatus doesn’t get set in “previous round”. Would this lead into the case that the device status tag is correct but the conditions are wrong? Just guessing here.

> [@OH2TH](#):
>
> `if (deviceInfo.status !== oldStatus) {`

---

<div class="post-metadata">

**Author:** ![OH2TH](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/oh2th/32/111414_2.png) [@OH2TH](https://community.homey.app/u/OH2TH)\
**Post date:** [September 28, 2023, 3:07am UTC](https://community.homey.app/t/app-pro-go-e-charger/74195/55 "2023-09-28T03:07:25Z")

</div>

Well, not ruling that out, so will need to look in to that. Then again that one should make the problem visible to more people.

---

<div class="post-metadata">

**Author:** ![OH2TH](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/oh2th/32/111414_2.png) [@OH2TH](https://community.homey.app/u/OH2TH)\
**Post date:** [September 29, 2023, 4:34am UTC](https://community.homey.app/t/app-pro-go-e-charger/74195/56 "2023-09-29T04:34:47Z")

</div>

There is a really small chance that device status could be out of sync if the and cards are used in a flow that is triggered every 5 seconds, which is the internal interval of the app to update information from the charger.

It just might be that if the flow is running exactly at the same time when the update interval happens, the flow might get different values.

I’ll change the code order so that it should run the status dependant capability updates together.

Probably need to add some checks on the condition cards, to wait for the capability update to completem before returning a result.

---

<div class="post-metadata">

**Author:** ![OH2TH](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/oh2th/32/111414_2.png) [@OH2TH](https://community.homey.app/u/OH2TH)\
**Post date:** [September 29, 2023, 4:38am UTC](https://community.homey.app/t/app-pro-go-e-charger/74195/57 "2023-09-29T04:38:45Z")

</div>

# New update (test: [2.6.1](https://homey.app/a/com.go-e.charger/test))

> ## Changes include
> 
> - Group status related capability updates together. Could help in status being out of sync when a flow is running.

Note: The internal interval for the device updates is set to 5 seconds. I do not recommend to have flows that triggers also every 5 seconds, better to trigger a bit less often.

@peltsi51 , could you try the test version if that would help with the condition cards to be in sync with status.

---

<div class="post-metadata">

**Author:** ![peltsi51](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peltsi51/32/12564_2.png) [@peltsi51](https://community.homey.app/u/peltsi51)\
**Post date:** [October 11, 2023, 4:02pm UTC](https://community.homey.app/t/app-pro-go-e-charger/74195/58 "2023-10-11T16:02:53Z")

</div>

Up to this point the condition card worked with the test version, but for some reason now it doesn’t. But the device status tag is working correctly.

Feels like this problem is only with my setup so don’t feel obliged to debug this any further.

 ![1000008290](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/5/05e53bf16d0937253abbf4ebe2e2279a97f80bd1.jpeg)

---

<div class="post-metadata">

**Author:** ![Nogdose](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/nogdose/32/16576_2.png) [@Nogdose](https://community.homey.app/u/Nogdose)\
**Post date:** [October 21, 2023, 11:36am UTC](https://community.homey.app/t/app-pro-go-e-charger/74195/59 "2023-10-21T11:36:48Z")

</div>

Hi @OH2TH , Thanks for great app! Any plans for [go-e Controller: PV Surplus Charging, Dynamic Load Balancing & More | go-e](https://go-e.com/en/products/go-e-controller) ?

---

<div class="post-metadata">

**Author:** ![OH2TH](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/oh2th/32/111414_2.png) [@OH2TH](https://community.homey.app/u/OH2TH)\
**Post date:** [October 21, 2023, 2:02pm UTC](https://community.homey.app/t/app-pro-go-e-charger/74195/60 "2023-10-21T14:02:32Z")

</div>

Maybe at some time. I do not have it myself, so wouldn’t be able to test it.

API for is separate from the ones for the chargers. Possibly a separate app might be logical.

[Previous page](https://community.homey.app/t/app-pro-go-e-charger/74195.md?page=2)

[Next page](https://community.homey.app/t/app-pro-go-e-charger/74195.md?page=4)
