FOSSiBOT integration

Hi,
Could someone help me, how I can integrate the FOSSiBOT F2400 into HA?
I really appreciate any help you can provide.

1 Like

If someone has the knowledge to create a Home Assistant integration, I did a full reverse engineering of FOSSIBOT API.

2 Likes

Hi,
today i received the new Fossibot F3600 Pro. Put it under some stress tests and i can only say β€˜what a engine’, fantastic.
As HA user i am also interested in a integration.

Iamslan can you publish in some way your API information ?
I never wrote a integration but it should be possible by looking all other examples .

Regards

Here you go: GitHub - iamslan/fossibot-reverse-engineering

Hi guys, just updated the repository with home assistant implementation using RESTful integration.

It works even if it’s not clean as a proper custom integration.

@Hydrocephalic @HansMarc

1 Like

lovelace

Got my Fossibot 2400 yesterday, a little disappointed by the absence of HA integration. Gonna dive into this topic tomorrow, maybe find something worthy.

Habe die gleiche Herausforderung mit der F2400.

Passt das 1:1 wie bei der F3600Pro?

Great Job! Thank you a lot!
I have installed it on my old Raspberry and connect it over the Network from my HA.
But i have a problem: After few seconds he lost the connection to the mqtt-server and only a restart of your script can reconnect it.

My Idea is to kill the task and restart it by a cron job …but this ist not so a nice way :thinking:
… But i am admin and programming is not realy mine :wink:

Have you got a tip for me to resolve this problem on a better way?

BR and thanks a lot

Hi @iamslan, thank you!

Unfortunately, I haven’t had a chance to test it yet, because my F2400 has been β€œin transit” for almost 2 months.

You have to change the mqtt client ID in the script. You get disconnected as others run the same script with the same client ID.

Yes, I’m also triggering a periodic restart with the help of a cronjob currently.

It still needs a lot of work, it’s basically a proof of concept for now.

I can’t find any time to continue right now, that’s why it went full public on github, but I may continue at some point.

Hey @iamslan,

thank u so much for your work. Would love to integrate my Fossibot 2400w to Home Assistant.

As I am not a programmer and pretty new to linux. I have this response when I try to run.

node sydpower-run.js f*****.g*****[email protected] m*****j-*****x-*****e

I got this Message:

Fetched anonymous authorized token: f7*******************7
Fetched logged-in access token: undefined
Fetched MQTT access token: undefined
/home/pi/fossibot-reverse-engineering/sydpower-run.js:149
for (const device of devicesRequest.data.rows) {
^

TypeError: devicesRequest.data.rows is not iterable
at SydpowerConnector.connect (/home/pi/fossibot-reverse-engineering/sydpower-run.js:149:46)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v18.19.0

I am Pretty sure my username and password is correct. I use brightEMS on an iPhone your codes are running on a raspberry 3 B with a brand new installation from today.

U mentioned u have a lot to do. Would be great to have a step by step installation integration.

Thank u so much
Mey

Hi, konntest du dein Problem lΓΆsen?

Versuche gerade eine Integration von der Fossibot 2400W-B im Home Assistant. Bin aber total am Zweifeln. Vermutlich mangels Linux Programmier Kenntnisse…

Thanks for sharing your hard work @iamslan!
This is really helpful and wanted to share my appreciation.

WOW!!! Thanks a lot! OK this was the reason for the disconnect …
for the other guys: You can change it in the sydpower.run.js

const clientId = β€œclient_yournewpasswort”;
const password = β€œyournewpasswort”;

random clientid and other random password didn’t work for me,
for whatever reason.

Manne

It would be really handy of this was made available in a docker container on dockerhub with the username/pass exposed as variables. I just bought a F2400 so I just might do that this weekend. I already run some docker containers on my unraid to add integrations to Home Assistant where they are not natively available.

1 Like

Hey, building a docker image was extremely easy with chatGPT guiding me through the basics. Google has become completely useless.

However, when trying to run the container it throws an error:

2025-03-07 22:05:18 Fetched anonymous authorized token: BLABLABLA
2025-03-07 22:05:19 Fetched logged-in access token: undefined
2025-03-07 22:05:19 Fetched MQTT access token: undefined
2025-03-07 22:05:19 /app/sydpower-run.js:149
2025-03-07 22:05:19     for (const device of devicesRequest.data.rows) {
2025-03-07 22:05:19                                              ^
2025-03-07 22:05:19 
2025-03-07 22:05:19 TypeError: devicesRequest.data.rows is not iterable
2025-03-07 22:05:19     at SydpowerConnector.connect (/app/sydpower-run.js:149:46)
2025-03-07 22:05:19     at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
2025-03-07 22:05:19 
2025-03-07 22:05:19 Node.js v22.14.0

could this be due to a failed login and the devicesRequest.data.rows does not contain anything ? (if so, some error handling would be in order :+1:)

edit:

Alright, I’ve changed the docker CMD format from JSON arguments to just the classic way of doing the command and now it works immediately. So I’m just going to look into why the JSON notation failed and them I’m gonna upload it to dockerhub. :confetti_ball:

Ok guys it’s up and running ! :partying_face:

DOCKER IMAGE

You can grab the image off DockerHub:
https://hub.docker.com/repository/docker/instantcasette/fossibot

Here’s the dockerfile from which it was built:

# Use an official Node.js base image
FROM node:lts

# Variables
ENV USERNAME=xxx
ENV PASSWORD=xxx

# Install git (and other dependencies if necessary)
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*

# Set working directory 
WORKDIR /app

# Clone the Fossibot repo
RUN git clone https://github.com/iamslan/fossibot-reverse-engineering.git .

# Install dependencies
RUN npm install

# Expose the port
EXPOSE 3000

# Start the application
CMD ["sh", "-c", "node sydpower-run.js ${USERNAME} ${PASSWORD}"]

UNRAID DOCKER CONTAINER SETUP

Unraid > Docker > Add Container

Name = Fossibot
Repository = docker.io/instantcasette/fossibot:latest

+ Add Another Path, Port, Variable Label or Device

Config Type = Variable
Name = Username
Key = USERNAME
Value = YOUR_FOSSIBOT_USERNAME_EMAIL_HERE

+ Add Another Path, Port, Variable Label or Device

Config Type = Variable
Name = Password
Key = PASSWORD
Value = YOUR_FOSSIBOT_PASSWORD_HERE

+ Add Another Path, Port, Variable Label or Device

Config Type = Port
Name = Port
Container Port = 3000
Host Port = 3000_OR_WHATEVERS_AVAILABLE

Top Right > Advanced View

Registry URL = https://hub.docker.com/repository/docker/instantcasette/fossibot
WebUI = http://[IP]:[PORT:3000]/devices

Now press the apply button and you’re done !
You can look at the console output to see the updates rolling in as well as just press the WebUI button to directly view a printout of your devices. Enjoy !

This makes it somewhat more convenient whilst we await for someone awesome to do a proper HA integration. :+1:

1 Like

Hi,
I have tried the docking container and I’m facing a problem.

The container works correctly for the first 5-6 queries and then stops working.

Connected to MQTT broker!
Subscribed to topics '34CDB0EEBAB2/device/response/state,34CDB0EEBAB2/device/response/client/+'
Published 17,3,0,0,0,80,102,71 to topic '34CDB0EEBAB2/client/request/data'
New message on topic '34CDB0EEBAB2/device/response/client/04'
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ (index)      β”‚ _id                        β”‚ product_id                 β”‚ device_id           β”‚ mqtt_state β”‚ last_connect_time β”‚ last_disconnect_time β”‚ productInfo β”‚ device_name β”‚ device_img_index β”‚ is_master β”‚ soc    β”‚ totalInput β”‚ totalOutput β”‚ usbOutput β”‚ dcOutput β”‚ acOutput β”‚ ledOutput β”‚ maximumChargingCurrent β”‚ acSilentCharging β”‚ usbStandbyTime β”‚ acStandbyTime β”‚ dcStandbyTime β”‚ screenRestTime β”‚ stopChargeAfter β”‚ dischargeLowerLimit β”‚ acChargingUpperLimit β”‚ wholeMachineUnusedTime β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 34CDB0EEBAB2 β”‚ 'xxxxx'                    β”‚ 'xxxxx'                    β”‚ '34:CD:B0:XX:XX:XX' β”‚ 1          β”‚ 1741421883728     β”‚ 1741421874453        β”‚ [Object]    β”‚ 'F2400'     β”‚ 0                β”‚ 1         β”‚ '72.6' β”‚ 36         β”‚ 104         β”‚ false     β”‚ false    β”‚ true     β”‚ false     β”‚ 20                     β”‚ false            β”‚ 5              β”‚ 480           β”‚ 480           β”‚ 180            β”‚ 0               β”‚ 100                 β”‚ 1000                 β”‚ 10                     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Published 17,3,0,0,0,80,102,71 to topic '34CDB0EEBAB2/client/request/data'
Published 17,3,0,0,0,80,102,71 to topic '34CDB0EEBAB2/client/request/data'
Published 17,3,0,0,0,80,102,71 to topic '34CDB0EEBAB2/client/request/data'
Published 17,3,0,0,0,80,102,71 to topic '34CDB0EEBAB2/client/request/data'
Connected to MQTT broker!
Subscribed to topics '34CDB0EEBAB2/device/response/state,34CDB0EEBAB2/device/response/client/+'
Published 17,3,0,0,0,80,102,71 to topic '34CDB0EEBAB2/client/request/data'
Published 17,3,0,0,0,80,102,71 to topic '34CDB0EEBAB2/client/request/data'
Published 17,3,0,0,0,80,102,71 to topic '34CDB0EEBAB2/client/request/data'
Published 17,3,0,0,0,80,102,71 to topic '34CDB0EEBAB2/client/request/data'
Published 17,3,0,0,0,80,102,71 to topic '34CDB0EEBAB2/client/request/data'
Published 17,3,0,0,0,80,102,71 to topic '34CDB0EEBAB2/client/request/data'
Error: Connection closed
    at MqttClient._flushStoreProcessingQueue (/app/node_modules/mqtt/build/lib/client.js:1196:28)
    at MqttClient.remove (/app/node_modules/mqtt/build/lib/client.js:1100:22)
    at Object.onceWrapper (node:events:632:28)
    at MqttClient.emit (node:events:530:35)
    at Duplex.<anonymous> (/app/node_modules/mqtt/build/lib/client.js:271:18)
    at Duplex.emit (node:events:518:28)
    at emitClose (/app/node_modules/ws/lib/stream.js:12:10)
    at process.processTicksAndRejections (node:internal/process/task_queues:89:21)
Published 17,3,0,0,0,80,102,71 to topic '34CDB0EEBAB2/client/request/data'
Error: Connection closed

If I restart the docker container, the first few queries work, then I get the β€œError: connection closed” error message again.

Maybe the problem is that it tries to query the API too often in a short period of time?