SigFox component

Had the same error.
You should protect the decode operation
payload = bytes.fromhex(data[‘data’]).decode(‘utf-8’)
by
try:
payload = bytes.fromhex(data[‘data’]).decode(‘utf-8’)
except UnicodeDecodeError:
# just take it as it is it can be raw binary data
payload = data[‘data’]

I may submit a patch for that.

Thank you for the reply, where is the code located that has to be altered?
I assume it is the sensor.py file but cannot find it in the home assitant configurator .

Yes, it is in sensor.py, line 128 in version 0.102.3
I’ll submit a patch in a few minutes.

Patch submitted.

@flebourse thanks.

ps: where can i find thr sensor.py file in the HA maps?

Depends on your installation.
Mine:
/root/homeassistant/lib/python3.7/site-packages/homeassistant/components/sigfox/sensor.py

If you do the edit, copy all the files in the sigfox directory to your .homeassistant/custom_components/sigdox
Create the subdirs as appropriate.

and edit the copy.
I’ts late. mouse faster than brain.

@flebourse Thanks for the info.

I found the map usr/local/lib/python3.7/site-packages
Unfortunately i can not find a map inthere called components/sigfox/sensor.py, very weird. It has to be somewhere.
I run hassio on Raspberry Pi

I have now made a custom_components folder in my config. Will check tommorow if the edited sigfox file here works.

The custom_components/sigfox is the cleanest way.
for the original:
find / -name sigfox -print
should give you the location.

So i made the custom_components map with the sigfox map and the files from github and edited the sigfox.py file.
This corrupted my hassio, could not connect anymore. Had to log on as root via keyboard and delete the sigfox map in the custom components map. Now back up and running.

If i type in the command to find the sigfox file i get:
“bash: find/: No such file or directory”

Now i am puzzeled :slight_smile:

Ok i got it working :slight_smile: :smiley: , the problem was that i had not correctly edited the sensor.py file.
What i did

  1. create a new map in my config folder : custom_components
  2. create a new map in custom_components : sigfox
  3. from github location of edited sigfox file from Flebourse i copied all of the files in my sigfox map and after a restart all was ok !

    @flebourse thanks!

Now i can start templating!

Glad to see that it works.

I fear something has changed. Yesterday al my running modules stopped in ha. In the sigfox backend i can see that they are sending. The api settings are correct. When i reset hass the modules dissapear. On The sigfox site i see some announcements of changes.
I think the code has to be changed for recieving

hm, it seems another problem.
When i go to https://backend.sigfox.com/api/
And paste my login and password that was generated i get : {“message”:“The requested resource was not found.”}

It seems that the API_URL is no longer correct from yesterday, anyone els having the same problem?

I checked https://support.sigfox.com/docs/api-documentation and see that sinds 27/04 api V1 is deprecated…

OK, it is indeed the new version that causes the problem, when i use
https://api.sigfox.com/v2/devices/
and log in with my credentials i can get the data of my devices, so the custom component does sadly does not work anymore @robmarkcole

I created an issue on GitHub

Just curious if this integration will get the needed updates. According to the integration-page it’s only in use in 3 installations.

Not from me. Appears they have an uncertain future https://www.datacenterdynamics.com/en/news/iot-startup-sigfox-files-for-bankruptcy/
Hopefully one of the 3 users will show an interest in the maintenance

Thanks for the warning. Fortunately, I was able to restrain my impulsiveness during my holiday, and did not buy any devices :slight_smile:

Do you know similar devices that are supported by Home Assistant ?